@zonos/elements 1.5.1 → 1.5.3

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 (250) hide show
  1. package/dist/cjs/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
  2. package/dist/cjs/{cart-CiXlehwQ.js → cart-C39TMSgB.js} +27 -13
  3. package/dist/cjs/{collect-Drr8fY-q.js → collect-lF9DenLk.js} +4 -4
  4. package/dist/cjs/{getMissingRequiredShippingFields-DI6qF1z3.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
  5. package/dist/cjs/{handleFetch-DQLhurnE.js → handleFetch-DVfjFTYO.js} +181 -71
  6. package/dist/cjs/{hasInclusivePrice-84KS94yH.js → hasInclusivePrice-CEPf3_FG.js} +1 -1
  7. package/dist/cjs/index.cjs.js +158 -47
  8. package/dist/cjs/{invoice-5hVfSXpb.js → invoice-BD3pCr8P.js} +3 -3
  9. package/dist/cjs/{localization-B2mjW0Xa.js → localization-BhNVhLZs.js} +24 -48
  10. package/dist/cjs/{paypal-pd8Nz_R_.js → paypal-Bd1qmwiv.js} +4 -4
  11. package/dist/cjs/{placeTestOrder-DrI8rD9o.js → placeTestOrder-BMQRvX2q.js} +3 -3
  12. package/dist/cjs/{renderCheckoutCurrency-u5q8YdUb.js → renderCheckoutCurrency-DE2p8CT8.js} +2 -2
  13. package/dist/cjs/{shouldShowLanguageSelect-gBg4KeTQ.js → shouldShowLanguageSelect-NOVWOU53.js} +1 -1
  14. package/dist/cjs/{submitGtag-Rc-S3PnH.js → submitGtag-D4sB7w4z.js} +1 -1
  15. package/dist/cjs/{taxIdFields-BrIaPTcd.js → taxIdFields-BKbk2bhi.js} +2 -2
  16. package/dist/cjs/{updateCheckoutSessionAttributes-d0IKpwW8.js → updateCheckoutSessionAttributes-KxwcsKhM.js} +1 -1
  17. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +6 -6
  18. package/dist/cjs/zonos-address-display_2.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
  20. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
  21. package/dist/cjs/zonos-card_5.cjs.entry.js +5 -5
  22. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +18 -18
  23. package/dist/cjs/zonos-checkout.cjs.entry.js +48 -22
  24. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
  25. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +9 -9
  26. package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
  27. package/dist/cjs/zonos-controller.cjs.entry.js +65 -40
  28. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  29. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  30. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  31. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
  33. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +9 -9
  34. package/dist/cjs/zonos-invoice.cjs.entry.js +6 -6
  35. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  36. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +8 -7
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +14 -4
  39. package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
  40. package/dist/collection/components/main/zonos-controller.js +26 -10
  41. package/dist/collection/components/store/checkout/cart.js +3 -2
  42. package/dist/collection/components/store/checkout/stripe.js +23 -10
  43. package/dist/collection/components/store/storageStore.js +7 -6
  44. package/dist/collection/components/utils/__tests__/helpers/blockStorage.js +24 -0
  45. package/dist/collection/components/utils/api/getExchangeRate.js +2 -1
  46. package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
  47. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
  48. package/dist/collection/components/utils/handleFetch.js +19 -9
  49. package/dist/collection/components/utils/hello/countryOverrideStorage.js +17 -40
  50. package/dist/collection/components/utils/logging/installConstructorCapture.js +58 -0
  51. package/dist/collection/components/utils/logging/reportBlockedStorage.js +34 -0
  52. package/dist/collection/components/utils/logging/sendErrorLog.js +8 -1
  53. package/dist/collection/components/utils/logging/startZonosInit.js +35 -0
  54. package/dist/collection/components/utils/logging/thrownMessage.js +16 -0
  55. package/dist/collection/components/utils/safeStorage.js +39 -0
  56. package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
  57. package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
  58. package/dist/collection/scripts/_getZonosQaUrl.js +3 -2
  59. package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
  60. package/dist/collection/scripts/_loadStripe.js +15 -4
  61. package/dist/collection/scripts/_zonosBase.js +46 -33
  62. package/dist/collection/types/generated/graphql.frontend.types.js +0 -16
  63. package/dist/collection/types/generated/graphql.internal.types.js +215 -1
  64. package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
  65. package/dist/esm/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +26 -14
  66. package/dist/esm/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +4 -4
  67. package/dist/esm/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
  68. package/dist/esm/{handleFetch-D5GYDF-O.js → handleFetch-BFVO7oAR.js} +178 -72
  69. package/dist/esm/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
  70. package/dist/esm/index.js +158 -47
  71. package/dist/esm/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +3 -3
  72. package/dist/esm/{localization-DHM91diu.js → localization-B5CRzthT.js} +25 -49
  73. package/dist/esm/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +4 -4
  74. package/dist/esm/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +3 -3
  75. package/dist/esm/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
  76. package/dist/esm/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
  77. package/dist/esm/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
  78. package/dist/esm/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +2 -2
  79. package/dist/esm/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
  80. package/dist/esm/zonos-address-completion-dialog_7.entry.js +6 -6
  81. package/dist/esm/zonos-address-display_2.entry.js +2 -2
  82. package/dist/esm/zonos-address_4.entry.js +4 -4
  83. package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
  84. package/dist/esm/zonos-card_5.entry.js +5 -5
  85. package/dist/esm/zonos-cart-items_12.entry.js +18 -18
  86. package/dist/esm/zonos-checkout.entry.js +48 -22
  87. package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
  88. package/dist/esm/zonos-collect-finish_6.entry.js +9 -9
  89. package/dist/esm/zonos-collect.entry.js +6 -6
  90. package/dist/esm/zonos-controller.entry.js +65 -40
  91. package/dist/esm/zonos-country-flag.entry.js +2 -2
  92. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  93. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  94. package/dist/esm/zonos-hello.entry.js +2 -2
  95. package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
  96. package/dist/esm/zonos-invoice-finish_5.entry.js +9 -9
  97. package/dist/esm/zonos-invoice.entry.js +6 -6
  98. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  99. package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
  100. package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
  101. package/dist/esm-es5/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +59 -59
  102. package/dist/esm-es5/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +2 -2
  103. package/dist/esm-es5/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
  104. package/dist/esm-es5/handleFetch-BFVO7oAR.js +73 -0
  105. package/dist/esm-es5/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
  106. package/dist/esm-es5/index.js +94 -65
  107. package/dist/esm-es5/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +1 -1
  108. package/dist/esm-es5/{localization-DHM91diu.js → localization-B5CRzthT.js} +7 -10
  109. package/dist/esm-es5/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +1 -1
  110. package/dist/esm-es5/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +1 -1
  111. package/dist/esm-es5/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +5 -5
  112. package/dist/esm-es5/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
  113. package/dist/esm-es5/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
  114. package/dist/esm-es5/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +1 -1
  115. package/dist/esm-es5/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
  116. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
  117. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  118. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  119. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  120. package/dist/esm-es5/zonos-card_5.entry.js +6 -6
  121. package/dist/esm-es5/zonos-cart-items_12.entry.js +127 -127
  122. package/dist/esm-es5/zonos-checkout.entry.js +22 -11
  123. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  124. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  125. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  126. package/dist/esm-es5/zonos-controller.entry.js +21 -12
  127. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  128. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  129. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  130. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  131. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  132. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  133. package/dist/esm-es5/zonos-invoice.entry.js +3 -3
  134. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  135. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  136. package/dist/scripts/index.d.ts +22 -0
  137. package/dist/scripts/index.js +1 -1
  138. package/dist/scripts/loadZonos.js +1 -1
  139. package/dist/scripts/zonos.js +1 -1
  140. package/dist/types/components/main/mountCheckoutWithoutStripe.d.ts +8 -0
  141. package/dist/types/components/store/checkout/stripe.d.ts +4 -1
  142. package/dist/types/components/utils/__tests__/helpers/blockStorage.d.ts +3 -0
  143. package/dist/types/components/utils/logging/installConstructorCapture.d.ts +20 -0
  144. package/dist/types/components/utils/logging/reportBlockedStorage.d.ts +16 -0
  145. package/dist/types/components/utils/logging/startZonosInit.d.ts +5 -0
  146. package/dist/types/components/utils/logging/thrownMessage.d.ts +1 -0
  147. package/dist/types/components/utils/safeStorage.d.ts +4 -0
  148. package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
  149. package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
  150. package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
  151. package/dist/types/scripts/_zonosBase.d.ts +16 -0
  152. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
  153. package/dist/types/types/generated/graphql.frontend.types.d.ts +0 -22
  154. package/dist/types/types/generated/graphql.frontend.types.ts +0 -51
  155. package/dist/types/types/generated/graphql.internal.types.d.ts +270 -1
  156. package/dist/types/types/generated/graphql.internal.types.ts +341 -1
  157. package/dist/zonos-elements/index.esm.js +1 -1
  158. package/dist/zonos-elements/{p-8fa6cfff.entry.js → p-02faff47.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-216a908d.system.entry.js → p-0c68cbbb.system.entry.js} +2 -2
  160. package/dist/zonos-elements/{p-vTIygnHq.system.js → p-1OG3IJgY.system.js} +1 -1
  161. package/dist/zonos-elements/{p-960070d0.system.entry.js → p-1cd2d097.system.entry.js} +3 -3
  162. package/dist/zonos-elements/{p-1e6db427.entry.js → p-255e411a.entry.js} +1 -1
  163. package/dist/zonos-elements/p-2c_UqKJL.system.js +7 -0
  164. package/dist/zonos-elements/{p-DprOoI2W.system.js → p-3AUMK-5E.system.js} +154 -154
  165. package/dist/zonos-elements/{p-d3345b2c.entry.js → p-3ee87d8b.entry.js} +1 -1
  166. package/dist/zonos-elements/{p-cccaad60.system.entry.js → p-42fa5694.system.entry.js} +10 -10
  167. package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
  168. package/dist/zonos-elements/{p-fda89981.system.entry.js → p-4ce4c49f.system.entry.js} +3 -3
  169. package/dist/zonos-elements/{p-f3d9a380.system.entry.js → p-5622fc50.system.entry.js} +263 -252
  170. package/dist/zonos-elements/{p-5585db86.system.entry.js → p-59457fd9.system.entry.js} +73 -64
  171. package/dist/zonos-elements/{p-65817880.entry.js → p-66398133.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-d8f375da.system.entry.js → p-674323ac.system.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-678b9214.entry.js → p-71d9a5b7.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-189cc594.system.entry.js → p-81780f8f.system.entry.js} +2 -2
  175. package/dist/zonos-elements/{p-6e691736.entry.js → p-821b83a2.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-1fda4aec.system.entry.js → p-877a82d2.system.entry.js} +94 -94
  177. package/dist/zonos-elements/p-8daec112.entry.js +1 -0
  178. package/dist/zonos-elements/{p-46a839d2.system.entry.js → p-93bc75fd.system.entry.js} +13 -13
  179. package/dist/zonos-elements/{p-2ca826b9.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-84e76348.entry.js → p-9a4947a5.entry.js} +1 -1
  181. package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
  182. package/dist/zonos-elements/p-BIJM2Kj-.js +1 -0
  183. package/dist/zonos-elements/p-BJFa5RwX.js +1 -0
  184. package/dist/zonos-elements/{p-6vSUiBfr.system.js → p-BOh4ifdL.system.js} +51 -54
  185. package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
  186. package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
  187. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  188. package/dist/zonos-elements/{p-CbhN65lj.system.js → p-BvoPE_nb.system.js} +1 -1
  189. package/dist/zonos-elements/{p-iAIzUA4k.js → p-C3E55OqH.js} +1 -1
  190. package/dist/zonos-elements/{p-CBUz18kA.system.js → p-C3gF3UV5.system.js} +23 -23
  191. package/dist/zonos-elements/{p-XoQH3S7Z.system.js → p-CD2ahEZn.system.js} +1 -1
  192. package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
  193. package/dist/zonos-elements/{p-CGNVm52g.system.js → p-CEV0O_IQ.system.js} +5 -5
  194. package/dist/zonos-elements/{p-D1e9zNDA.js → p-CJmWr75U.js} +1 -1
  195. package/dist/zonos-elements/{p-DgUrB-1a.system.js → p-CZ-uYiCo.system.js} +1 -1
  196. package/dist/zonos-elements/p-Cn2xE-9t.system.js +256 -0
  197. package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
  198. package/dist/zonos-elements/{p-BrQ8n8NS.system.js → p-Cw_Qnyow.system.js} +3 -3
  199. package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
  200. package/dist/zonos-elements/p-D0DkOoAw.system.js +73 -0
  201. package/dist/zonos-elements/p-D9OPKqLg.js +1 -0
  202. package/dist/zonos-elements/{p-ojtNq-r5.system.js → p-DXlojp_Y.system.js} +1 -1
  203. package/dist/zonos-elements/{p-DpwmHU8R.js → p-Df62LRNs.js} +2 -2
  204. package/dist/zonos-elements/{p-CHKKvuiz.js → p-Lsqrpzc5.js} +1 -1
  205. package/dist/zonos-elements/{p-C9XLkmmb.system.js → p-YQFbWtjn.system.js} +1 -1
  206. package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
  207. package/dist/zonos-elements/{p-941a95a1.system.entry.js → p-a6bb296c.system.entry.js} +7 -7
  208. package/dist/zonos-elements/{p-2b63865a.system.entry.js → p-abb85879.system.entry.js} +3 -3
  209. package/dist/zonos-elements/{p-12b24ebb.entry.js → p-b8653024.entry.js} +1 -1
  210. package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
  211. package/dist/zonos-elements/{p-f5f95990.system.entry.js → p-be067e12.system.entry.js} +15 -15
  212. package/dist/zonos-elements/p-bmrOH9oh.js +1 -0
  213. package/dist/zonos-elements/p-c185bc23.entry.js +1 -0
  214. package/dist/zonos-elements/{p-2d513aa3.entry.js → p-c6e78de2.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-55813e9f.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
  216. package/dist/zonos-elements/{p-3e705c9b.entry.js → p-cbb96382.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-53eac12f.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
  218. package/dist/zonos-elements/{p-6410fa11.system.entry.js → p-df240119.system.entry.js} +16 -16
  219. package/dist/zonos-elements/{p-1cc42a98.system.entry.js → p-e16e4db6.system.entry.js} +17 -17
  220. package/dist/zonos-elements/{p-064d8829.system.entry.js → p-eb016dd8.system.entry.js} +20 -20
  221. package/dist/zonos-elements/{p-1199baef.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-ef5344ea.entry.js → p-ed8a7a7f.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-4917b74d.entry.js → p-ef932fda.entry.js} +1 -1
  224. package/dist/zonos-elements/{p-e7fdb2c9.entry.js → p-f792ba5f.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-DiMEP3mh.js → p-fZcKMzE-.js} +1 -1
  226. package/dist/zonos-elements/{p-CMo3ZweU.js → p-fdritVtG.js} +1 -1
  227. package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
  228. package/dist/zonos-elements/p-gEViRqvf.js +1 -0
  229. package/dist/zonos-elements/{p-Dtu_Japy.system.js → p-v8IEjQ2z.system.js} +39 -39
  230. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  231. package/package.json +10 -10
  232. package/dist/esm-es5/handleFetch-D5GYDF-O.js +0 -60
  233. package/dist/zonos-elements/p-107f287b.entry.js +0 -1
  234. package/dist/zonos-elements/p-25eb99d4.entry.js +0 -1
  235. package/dist/zonos-elements/p-46b9f0cf.entry.js +0 -1
  236. package/dist/zonos-elements/p-636b71d4.entry.js +0 -1
  237. package/dist/zonos-elements/p-7dc7f328.entry.js +0 -1
  238. package/dist/zonos-elements/p-8f9d8795.entry.js +0 -1
  239. package/dist/zonos-elements/p-BMPYH-LT.js +0 -1
  240. package/dist/zonos-elements/p-C70h5mKA.js +0 -1
  241. package/dist/zonos-elements/p-CTiqplrr.js +0 -1
  242. package/dist/zonos-elements/p-Ch1w0Lr7.js +0 -1
  243. package/dist/zonos-elements/p-D1SmY_fZ.js +0 -1
  244. package/dist/zonos-elements/p-D6xXnsM_.js +0 -1
  245. package/dist/zonos-elements/p-DE4a-QD5.js +0 -1
  246. package/dist/zonos-elements/p-DQrMfUzi.system.js +0 -227
  247. package/dist/zonos-elements/p-DZdkJHK9.system.js +0 -7
  248. package/dist/zonos-elements/p-U33isUJG.js +0 -1
  249. package/dist/zonos-elements/p-ebe157b5.entry.js +0 -1
  250. package/dist/zonos-elements/p-zVLAvre1.system.js +0 -60
@@ -1,17 +1,17 @@
1
- var __awaiter=this&&this.__awaiter||function(o,t,e,s){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,r){function i(o){try{l(s.next(o))}catch(o){r(o)}}function a(o){try{l(s["throw"](o))}catch(o){r(o)}}function l(o){o.done?e(o.value):n(o.value).then(i,a)}l((s=s.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(o){return function(t){return l([o,t])}}function l(a){if(s)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(e=0)),e)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;n=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){e.label=a[1];break}if(a[0]===6&&e.label<r[1]){e.label=r[1];r=a;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(a);break}if(r[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return o.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,e as getAssetPath,h,a as Host,F as Fragment,d as createEvent,g as getElement}from"./index-_lt63o7c.js";import{d as cartStore,L as cartStoreHasOneEligibleItem,M as isEuDapRemittance,m as cartStoreIsOrderModificationPaymentOnlySession,N as stripeStoreApplyPromoCode,O as stripeStoreRemovePromoCode,b as stripeStore,H as stripeStoreReset,c as stripeStoreRetrievePayment,t as trackConversionEvent,P as stripeStoreResetPromoCode,Q as stripeStoreMessageBasedOnStatus,R as storeCreditStore,S as storeCreditStoreReset,B as storeCreditStoreCoversFullAmount,y as isPolicyConsentRequired,G as policyConsentStore,T as stripeStoreRecordPolicyConsent,x as cartStoreNextStep,U as extractName,V as resolveTaxIdSelection,W as stripeStoreTranslateAddressToLatin,I as cartStoreOnChange,X as getCountryField,Y as stripeStoreAsyncAddressUpdate,Z as cartStoreUpdateSelectedShippingOption,_ as cartStoreGetShippingTransitInfo,$ as cartStoreGetMethod,a0 as sortServiceLevelOptionsByAmount}from"./cart-DmJkjiDE.js";import{t as translate,l as localizationStore,s as storageStore,k as languages,w as getExchangeRate,x as numberFormat,h as localizationStoreOnChange}from"./localization-DHM91diu.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-B31ZNkUv.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-ByGDytaN.js";import{c as classes}from"./classes-BJHSB96f.js";import{z as zonosStore,c as createStore,d as zonosStoreOnChange,g as getZonosStoreTheme,e as getShouldRequirePeruTaxId,a as zonosStoreFontFamily}from"./zonosStore-BXP9FvIt.js";import{D as DUTY_KEY,T as TAXES_KEY,h as hasInclusivePrice}from"./hasInclusivePrice-DhGXpH2D.js";import{i as isSameHostCheckoutLink}from"./isSameHostCheckoutLink-BxAHnL5J.js";import{s as submitAnalytics,c as paypalStoreReset,a as paypalStore}from"./paypal-BfW5aLJw.js";import{h as handleFetch,s as sendErrorLog,j as jsonParse,g as getIsTestMode,i as isCheckoutMobile,a as getIsStagingMode,l as logError}from"./handleFetch-D5GYDF-O.js";import{c as createCustomEvent}from"./createCustomEvent-XQfWgQLB.js";import{g as getBorderRadius}from"./getBorderRadius-BiGd45jw.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{s as shouldShowLanguageSelect}from"./shouldShowLanguageSelect-DwSfSHar.js";import{p as placeTestOrder}from"./placeTestOrder-CyWUFhxD.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{g as getContrastColor}from"./getContrastColor-CfCPlW9U.js";import{i as isColorVariable}from"./isColorVariable-DXXUq2Lv.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-B0bQH0uw.js";import{g as getMissingRequiredShippingFields}from"./getMissingRequiredShippingFields-DljgpDZe.js";import{c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{s as shouldRenderShortAddressCodeInput}from"./shouldRenderShortAddressCodeInput-Bc8k2vN0.js";import{b as isPeruTaxIdActive,a as isPeruTaxIdType,s as stripTaxIdSeparators,p as peruTaxIdTypeFromValue,r as rfcRegex,c as curpRegex}from"./taxIdRules-xYlx7ZXW.js";import{b as peruTaxIdFormatError,e as euCountryCodes}from"./TaxId-DMIgN_sT.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-BEFrutel.js";import"./debounce-DWqMT4lo.js";import"./debounce-DHj2iHA1.js";import"./ShortAddressCode-nJ6oI8-n.js";
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,s){function n(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function i(o){try{l(s.next(o))}catch(o){r(o)}}function a(o){try{l(s["throw"](o))}catch(o){r(o)}}function l(o){o.done?t(o.value):n(o.value).then(i,a)}l((s=s.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(o){return function(e){return l([o,e])}}function l(a){if(s)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(t=0)),t)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,t){if(t||arguments.length===2)for(var s=0,n=e.length,r;s<n;s++){if(r||!(s in e)){if(!r)r=Array.prototype.slice.call(e,0,s);r[s]=e[s]}}return o.concat(r||Array.prototype.slice.call(e))};import{r as registerInstance,e as getAssetPath,h,a as Host,F as Fragment,d as createEvent,g as getElement}from"./index-_lt63o7c.js";import{h as cartStore,N as cartStoreHasOneEligibleItem,O as isEuDapRemittance,q as cartStoreIsOrderModificationPaymentOnlySession,P as stripeStoreApplyPromoCode,Q as stripeStoreRemovePromoCode,e as stripeStore,J as stripeStoreReset,f as stripeStoreRetrievePayment,u as trackConversionEvent,R as stripeStoreResetPromoCode,S as stripeStoreMessageBasedOnStatus,T as storeCreditStore,U as storeCreditStoreReset,D as storeCreditStoreCoversFullAmount,A as isPolicyConsentRequired,I as policyConsentStore,V as stripeStoreRecordPolicyConsent,z as cartStoreNextStep,W as extractName,X as resolveTaxIdSelection,Y as stripeStoreTranslateAddressToLatin,K as cartStoreOnChange,Z as getCountryField,_ as stripeStoreAsyncAddressUpdate,$ as cartStoreUpdateSelectedShippingOption,a0 as cartStoreGetShippingTransitInfo,a1 as cartStoreGetMethod,a2 as sortServiceLevelOptionsByAmount}from"./cart-b84n0nhi.js";import{t as translate,l as localizationStore,s as storageStore,k as languages,w as getExchangeRate,x as numberFormat,h as localizationStoreOnChange}from"./localization-B5CRzthT.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-CpeuDWx-.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-ByGDytaN.js";import{c as classes}from"./classes-BJHSB96f.js";import{z as zonosStore,c as createStore,d as zonosStoreOnChange,g as getZonosStoreTheme,e as getShouldRequirePeruTaxId,a as zonosStoreFontFamily}from"./zonosStore-BXP9FvIt.js";import{D as DUTY_KEY,T as TAXES_KEY,h as hasInclusivePrice}from"./hasInclusivePrice-DfEiyzw7.js";import{i as isSameHostCheckoutLink}from"./isSameHostCheckoutLink-BxAHnL5J.js";import{s as submitAnalytics,c as paypalStoreReset,a as paypalStore}from"./paypal-CF_oM0B6.js";import{h as handleFetch,s as sendErrorLog,j as jsonParse,c as safeGetItem,e as safeSetItem,b as safeRemoveItem,g as getIsTestMode,i as isCheckoutMobile,a as getIsStagingMode,l as logError}from"./handleFetch-BFVO7oAR.js";import{c as createCustomEvent}from"./createCustomEvent-XQfWgQLB.js";import{g as getBorderRadius}from"./getBorderRadius-BiGd45jw.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{s as shouldShowLanguageSelect}from"./shouldShowLanguageSelect-CJinx9-m.js";import{p as placeTestOrder}from"./placeTestOrder-BTpfyqPL.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{g as getContrastColor}from"./getContrastColor-CfCPlW9U.js";import{i as isColorVariable}from"./isColorVariable-DXXUq2Lv.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-C9bMKTjz.js";import{g as getMissingRequiredShippingFields}from"./getMissingRequiredShippingFields-EY10c34-.js";import{c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{s as shouldRenderShortAddressCodeInput}from"./shouldRenderShortAddressCodeInput-Bc8k2vN0.js";import{b as isPeruTaxIdActive,a as isPeruTaxIdType,s as stripTaxIdSeparators,p as peruTaxIdTypeFromValue,r as rfcRegex,c as curpRegex}from"./taxIdRules-xYlx7ZXW.js";import{b as peruTaxIdFormatError,e as euCountryCodes}from"./TaxId-DMIgN_sT.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-C5xzFHjG.js";import"./debounce-DWqMT4lo.js";import"./debounce-DHj2iHA1.js";import"./ShortAddressCode-nJ6oI8-n.js";
2
2
  /**
3
3
  * Import-free so `scripts/buildItemCustomization.mjs` can emit one module.
4
4
  * demo-app imports the generated `item-customization.js`, not this file.
5
5
  */var ITEM_CUSTOMIZATION_ATTRIBUTE_KEY="itemCustomization";var isRecord=function(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)};
6
- /** Drops an empty name, a non-string value, and the unselected value "0". */var readDisplayableItemCustomization=function(o){if(!isRecord(o)){return null}var t=o.name;if(typeof t!=="string"||t===""){return null}var e=o.value;if(typeof e!=="string"||e==="0"){return null}return{name:t,value:e}};var parseJson=function(o){try{
6
+ /** Drops an empty name, a non-string value, and the unselected value "0". */var readDisplayableItemCustomization=function(o){if(!isRecord(o)){return null}var e=o.name;if(typeof e!=="string"||e===""){return null}var t=o.value;if(typeof t!=="string"||t==="0"){return null}return{name:e,value:t}};var parseJson=function(o){try{
7
7
  // The generated package entry cannot import the shared jsonParse helper.
8
8
  // eslint-disable-next-line no-restricted-syntax
9
9
  return JSON.parse(o)}catch(o){return null}};
10
- /** Selected customization entries, with the original object for extra ids. */var readItemCustomizationEntries=function(o){var t;var e=(t=o===null||o===void 0?void 0:o.find((function(o){return(o===null||o===void 0?void 0:o.key)===ITEM_CUSTOMIZATION_ATTRIBUTE_KEY})))===null||t===void 0?void 0:t.value;if(!e){return[]}var s=parseJson(e);if(!Array.isArray(s)){return[]}return s.flatMap((function(o){var t=readDisplayableItemCustomization(o);if(!t||!isRecord(o)){return[]}return[{choice:t,raw:o}]}))};
10
+ /** Selected customization entries, with the original object for extra ids. */var readItemCustomizationEntries=function(o){var e;var t=(e=o===null||o===void 0?void 0:o.find((function(o){return(o===null||o===void 0?void 0:o.key)===ITEM_CUSTOMIZATION_ATTRIBUTE_KEY})))===null||e===void 0?void 0:e.value;if(!t){return[]}var s=parseJson(t);if(!Array.isArray(s)){return[]}return s.flatMap((function(o){var e=readDisplayableItemCustomization(o);if(!e||!isRecord(o)){return[]}return[{choice:e,raw:o}]}))};
11
11
  /**
12
12
  * Reads a cart row's `itemCustomization` attribute into display pairs.
13
13
  * Unreadable data is an empty list.
14
- */var parseItemCustomizations=function(o){return readItemCustomizationEntries(o).map((function(o){return o.choice}))};var zonosCartItemsCss=function(){return":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;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-choices{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:4px;min-width:0}:host .zonos--cart-item-name .zonos--cart-item-choices zonos-text{overflow-wrap:break-word;white-space:normal}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}"};var ZonosCartItems=/** @class */function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=getAssetPath("./assets/empty-item.jpeg");var e=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"eeb10f76fbab43d256e6130fe2ab88a33c1598aa",class:"zonos--cart-items zonos--elements"},h("table",{key:"61ae44a57c1386f5ca6afb17c388ae9fcf29d8a1",class:"zonos--cart-table"},h("tbody",{key:"8471ae46186543cee754685e0182c4057d982967"},e.map((function(e){var s=e.imageUrl;var n=cleanHtmlMarkdown(e.name);var r=parseItemCustomizations(e.attributes);var i=e.amount*e.quantity;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},s&&!o.errorImages.includes(s)?h("img",{alt:e.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[s],false)},src:e.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:e.name,src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("div",null,n.map((function(o){return h("zonos-text",{type:"label"},o)}))),r.length>0&&h("div",{class:"zonos--cart-item-choices"},r.map((function(o){return h("zonos-text",{textColor:"gray-600",type:"caption"},o.value===""?o.name:"".concat(o.name,": ").concat(o.value))}))),h("zonos-text",{textColor:"gray-600",type:"caption"},translate("Quantity"),": ",e.quantity)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel",weight:600},renderCheckoutCurrency({amount:i,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartItems.style=zonosCartItemsCss();var ChevronUpIcon$2='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var zonosCartRestrictedItemsCss=function(){return':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{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;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;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}'};var ZonosCartRestrictedItems=/** @class */function(){function o(o){registerInstance(this,o);
14
+ */var parseItemCustomizations=function(o){return readItemCustomizationEntries(o).map((function(o){return o.choice}))};var zonosCartItemsCss=function(){return":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;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-choices{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:4px;min-width:0}:host .zonos--cart-item-name .zonos--cart-item-choices zonos-text{overflow-wrap:break-word;white-space:normal}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}"};var ZonosCartItems=/** @class */function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var e=getAssetPath("./assets/empty-item.jpeg");var t=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"eeb10f76fbab43d256e6130fe2ab88a33c1598aa",class:"zonos--cart-items zonos--elements"},h("table",{key:"61ae44a57c1386f5ca6afb17c388ae9fcf29d8a1",class:"zonos--cart-table"},h("tbody",{key:"8471ae46186543cee754685e0182c4057d982967"},t.map((function(t){var s=t.imageUrl;var n=cleanHtmlMarkdown(t.name);var r=parseItemCustomizations(t.attributes);var i=t.amount*t.quantity;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},s&&!o.errorImages.includes(s)?h("img",{alt:t.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[s],false)},src:t.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:t.name,src:e,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("div",null,n.map((function(o){return h("zonos-text",{type:"label"},o)}))),r.length>0&&h("div",{class:"zonos--cart-item-choices"},r.map((function(o){return h("zonos-text",{textColor:"gray-600",type:"caption"},o.value===""?o.name:"".concat(o.name,": ").concat(o.value))}))),h("zonos-text",{textColor:"gray-600",type:"caption"},translate("Quantity"),": ",t.quantity)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel",weight:600},renderCheckoutCurrency({amount:i,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartItems.style=zonosCartItemsCss();var ChevronUpIcon$2='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var zonosCartRestrictedItemsCss=function(){return':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{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;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;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}'};var ZonosCartRestrictedItems=/** @class */function(){function o(o){registerInstance(this,o);
15
15
  /**
16
16
  * This is to hide the section when the parent collapse on mobile
17
17
  */this.hide=false;this.errorImages=[];this.internalCollapsed=true;
@@ -19,13 +19,13 @@ return JSON.parse(o)}catch(o){return null}};
19
19
  * Should do something after the component is loaded
20
20
  */this.firstRender=true}o.prototype.componentDidLoad=function(){
21
21
  // Reset if it's first render
22
- this.firstRender=true};o.prototype.render=function(){var o=this;var t;var e=getAssetPath("./assets/empty-item.jpeg");var s=((t=cartStore.exchangeRate)===null||t===void 0?void 0:t.rate)||1;var n=cartStore.restrictedItems.length;if(this.hide||n===0){
22
+ this.firstRender=true};o.prototype.render=function(){var o=this;var e;var t=getAssetPath("./assets/empty-item.jpeg");var s=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;var n=cartStore.restrictedItems.length;if(this.hide||n===0){
23
23
  // show nothing if the parent is collapsed or no restricted items
24
24
  return null}if(this.firstRender){
25
25
  // Auto expand if all items are restricted
26
- this.internalCollapsed=cartStoreHasOneEligibleItem();this.firstRender=false}return h(Host,{class:classes(["zonos--cart-restricted-items","zonos--elements",this.internalCollapsed&&"collapsed"])},h("button",{class:classes(["zonos--cart-title-collapse-trigger",this.internalCollapsed&&"collapsed"]),onClick:function(){o.internalCollapsed=!o.internalCollapsed}},h("div",{class:"zonos--title-wrapper"},h("zonos-text",{textColor:"red-600",type:"label"},"".concat(translate(this.internalCollapsed?"Show":"Hide")," ").concat(n," ").concat(translate("restricted items"))),h("zonos-icon",{content:ChevronUpIcon$2,iconColor:"red-600"}))),h("zonos-collapse",{collapsed:this.internalCollapsed},h("zonos-banner",{bannerTitle:translate("The following items are unable to be shipped to your country and are not included in your cart total."),intent:"error"}),h("table",{class:"zonos--cart-table"},h("tbody",null,cartStore.restrictedItems.map((function(t,n){var r,i;var a=t.imageUrl;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},a&&!o.errorImages.includes(a)?h("img",{alt:
26
+ this.internalCollapsed=cartStoreHasOneEligibleItem();this.firstRender=false}return h(Host,{class:classes(["zonos--cart-restricted-items","zonos--elements",this.internalCollapsed&&"collapsed"])},h("button",{class:classes(["zonos--cart-title-collapse-trigger",this.internalCollapsed&&"collapsed"]),onClick:function(){o.internalCollapsed=!o.internalCollapsed}},h("div",{class:"zonos--title-wrapper"},h("zonos-text",{textColor:"red-600",type:"label"},"".concat(translate(this.internalCollapsed?"Show":"Hide")," ").concat(n," ").concat(translate("restricted items"))),h("zonos-icon",{content:ChevronUpIcon$2,iconColor:"red-600"}))),h("zonos-collapse",{collapsed:this.internalCollapsed},h("zonos-banner",{bannerTitle:translate("The following items are unable to be shipped to your country and are not included in your cart total."),intent:"error"}),h("table",{class:"zonos--cart-table"},h("tbody",null,cartStore.restrictedItems.map((function(e,n){var r,i;var a=e.imageUrl;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},a&&!o.errorImages.includes(a)?h("img",{alt:
27
27
  // Use matched item name if available
28
- ((r=t.matchedItem)===null||r===void 0?void 0:r.name)||t.name||"Restricted item ".concat(n+1),onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[a],false)},src:a,style:{"min-width":"40px"},width:40}):h("img",{alt:t.name||"Restricted item ".concat(n+1),src:e,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("zonos-text",{type:"label"},((i=t.matchedItem)===null||i===void 0?void 0:i.name)||t.name),h("zonos-text",{type:"caption"},t.restriction.reason)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:t.amount*t.quantity*s,isForeign:false}))))}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartRestrictedItems.style=zonosCartRestrictedItemsCss();
28
+ ((r=e.matchedItem)===null||r===void 0?void 0:r.name)||e.name||"Restricted item ".concat(n+1),onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[a],false)},src:a,style:{"min-width":"40px"},width:40}):h("img",{alt:e.name||"Restricted item ".concat(n+1),src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("zonos-text",{type:"label"},((i=e.matchedItem)===null||i===void 0?void 0:i.name)||e.name),h("zonos-text",{type:"caption"},e.restriction.reason)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:e.amount*e.quantity*s,isForeign:false}))))}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartRestrictedItems.style=zonosCartRestrictedItemsCss();
29
29
  // Markdown URL allows a single level of balanced `(...)` (e.g.
30
30
  // `https://example.com/foo_(v2)`); anything deeper is rare in real-world URLs
31
31
  // and we'd rather not write a recursive grammar. Bare URLs match greedily up
@@ -52,42 +52,42 @@ var BARE_URL_TRAILING_PUNCT=/[.,;:!?\]}"']+$/;
52
52
  * // { type: 'text', value: 'Visit ' },
53
53
  * // { type: 'link', href: 'https://example.com', text: 'docs' },
54
54
  * // ]
55
- */var parseLinkedText=function(o){var t,e;var s=[];
55
+ */var parseLinkedText=function(o){var e,t;var s=[];
56
56
  // Reset the shared regex state in case a previous call left a lastIndex.
57
57
  LINK_REGEX.lastIndex=0;var n=0;var r;while((r=LINK_REGEX.exec(o))!==null){if(r.index>n){s.push({type:"text",value:o.slice(n,r.index)})}var i=r[1],a=r[2],l=r[3];
58
58
  // One of the alternations matched: either a markdown link (mdText + mdUrl)
59
59
  // or a bare URL (plainUrl). Use the URL as both href and display text for
60
60
  // bare URLs.
61
- if(a&&i){s.push({href:a,text:i,type:"link"})}else if(l){var c=(e=(t=l.match(BARE_URL_TRAILING_PUNCT))===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:"";var u=c?l.slice(0,l.length-c.length):l;s.push({href:u,text:u,type:"link"});if(c){s.push({type:"text",value:c})}}n=LINK_REGEX.lastIndex}if(n<o.length){s.push({type:"text",value:o.slice(n)})}return s};var zonosCartSubtotalCss=function(){return":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:20px 8px;vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price,:host .zonos--cart-promo-code-col{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}:host .zonos--cart-subtotal-price zonos-text{white-space:nowrap}:host .zonos--cart-subtotal-price zonos-text,:host .zonos--cart-pay-total zonos-text{white-space:nowrap}:host .zonos--cart-promo-code-input-wrapper{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}:host .zonos--cart-promo-code-input{-ms-flex:1;flex:1}:host .zonos--cart-custom-message .zonos--column:last-child{padding:0 8px;width:auto;text-align:left}:host .zonos--cart-custom-message zonos-banner{padding:12px;border-radius:var(--zonos-elements-radius-6)}"};var ZonosCartSubtotal=/** @class */function(){function o(o){var t=this;registerInstance(this,o);
61
+ if(a&&i){s.push({href:a,text:i,type:"link"})}else if(l){var c=(t=(e=l.match(BARE_URL_TRAILING_PUNCT))===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:"";var u=c?l.slice(0,l.length-c.length):l;s.push({href:u,text:u,type:"link"});if(c){s.push({type:"text",value:c})}}n=LINK_REGEX.lastIndex}if(n<o.length){s.push({type:"text",value:o.slice(n)})}return s};var zonosCartSubtotalCss=function(){return":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:20px 8px;vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price,:host .zonos--cart-promo-code-col{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}:host .zonos--cart-subtotal-price zonos-text{white-space:nowrap}:host .zonos--cart-subtotal-price zonos-text,:host .zonos--cart-pay-total zonos-text{white-space:nowrap}:host .zonos--cart-promo-code-input-wrapper{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}:host .zonos--cart-promo-code-input{-ms-flex:1;flex:1}:host .zonos--cart-custom-message .zonos--column:last-child{padding:0 8px;width:auto;text-align:left}:host .zonos--cart-custom-message zonos-banner{padding:12px;border-radius:var(--zonos-elements-radius-6)}"};var ZonosCartSubtotal=/** @class */function(){function o(o){var e=this;registerInstance(this,o);
62
62
  /**
63
63
  * Loading state for apply promo code button
64
- */this.loading=false;this.getInclusivePriceType=function(){var o,t;var e=localizationStore.inclusivePricingConfigurations.find(Boolean);var s=((o=e===null||e===void 0?void 0:e.configurations[DUTY_KEY])===null||o===void 0?void 0:o.status)==="ENABLED";var n=((t=e===null||e===void 0?void 0:e.configurations[TAXES_KEY])===null||t===void 0?void 0:t.status)==="ENABLED";if(s&&n){return"DUTY_TAX_AND_FEE"}
64
+ */this.loading=false;this.getInclusivePriceType=function(){var o,e;var t=localizationStore.inclusivePricingConfigurations.find(Boolean);var s=((o=t===null||t===void 0?void 0:t.configurations[DUTY_KEY])===null||o===void 0?void 0:o.status)==="ENABLED";var n=((e=t===null||t===void 0?void 0:t.configurations[TAXES_KEY])===null||e===void 0?void 0:e.status)==="ENABLED";if(s&&n){return"DUTY_TAX_AND_FEE"}
65
65
  // Fee would also be included with duty if it's inclusive
66
66
  if(s){return"DUTY_AND_FEE"}if(n){return"TAX"}return null};
67
67
  /**
68
68
  * Render a single merchant-provided message line. Segments come from
69
69
  * [[parseLinkedText]] and are emitted as VNodes (never `innerHTML`) so
70
70
  * untrusted strings can't inject HTML.
71
- */this.renderMessageLine=function(o){return parseLinkedText(o).map((function(o){var t;if(o.type!=="link"){return o.value}
71
+ */this.renderMessageLine=function(o){return parseLinkedText(o).map((function(o){var e;if(o.type!=="link"){return o.value}
72
72
  // For BigCommerce, a same-host `/checkout` link should navigate the
73
73
  // current tab (`_self`) instead of opening a new one — this unloads the
74
74
  // Zonos checkout and opens the native checkout in its place rather than
75
75
  // leaving two checkouts open at once (05CHECK-887).
76
- var e=!!((t=window.Zonos)===null||t===void 0?void 0:t.isBigCommerce)&&isSameHostCheckoutLink(o.href);return h("zonos-link",{href:o.href,rel:"noopener noreferrer",target:e?"_self":"_blank"},o.text)}))};this.renderCustomMessage=function(){var o=cartStore.customMessage.filter((function(o){return!!o.trim()}));if(!o.length){return null}return h("tr",{class:"zonos--row zonos--cart-custom-message"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column",colSpan:2},h("zonos-banner",{intent:"info"},h("zonos-text",{type:"boldLabel"},o.map((function(o,e){return h(Fragment,null,e>0&&h("br",null),t.renderMessageLine(o))}))))))};this.getCartSubtotalSubtitle=function(){var o=t.getInclusivePriceType();if(o==="DUTY_AND_FEE"){return h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Duties and fees included"))}if(o==="TAX"){return h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Taxes included"))}return null};
76
+ var t=!!((e=window.Zonos)===null||e===void 0?void 0:e.isBigCommerce)&&isSameHostCheckoutLink(o.href);return h("zonos-link",{href:o.href,rel:"noopener noreferrer",target:t?"_self":"_blank"},o.text)}))};this.renderCustomMessage=function(){var o=cartStore.customMessage.filter((function(o){return!!o.trim()}));if(!o.length){return null}return h("tr",{class:"zonos--row zonos--cart-custom-message"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column",colSpan:2},h("zonos-banner",{intent:"info"},h("zonos-text",{type:"boldLabel"},o.map((function(o,t){return h(Fragment,null,t>0&&h("br",null),e.renderMessageLine(o))}))))))};this.getCartSubtotalSubtitle=function(){var o=e.getInclusivePriceType();if(o==="DUTY_AND_FEE"){return h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Duties and fees included"))}if(o==="TAX"){return h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Taxes included"))}return null};
77
77
  /**
78
78
  * EU 3-EUR cutover (05CHECK-893): for EU remittance quotes that we keep as DAP
79
79
  * (see [[isEuDapRemittance]]), taxes and fees are included in the checkout
80
80
  * total while duties are paid upon delivery. Returns the foreign (presentment)
81
81
  * estimates needed for the dedicated message, or `null` when the selected
82
82
  * quote isn't this case.
83
- */this.getEuDapDetails=function(){var o,t,e,s,n,r;var i=cartStore.selectedLandedCost;var a=i===null||i===void 0?void 0:i.landedCost;if(!a){return null}var l=isEuDapRemittance({deliveryType:(t=(o=cartStore.selectedShippingOption)===null||o===void 0?void 0:o.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.deliveryType,landedCost:a,shipToCountry:(e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country});if(!l){return null}
83
+ */this.getEuDapDetails=function(){var o,e,t,s,n,r;var i=cartStore.selectedLandedCost;var a=i===null||i===void 0?void 0:i.landedCost;if(!a){return null}var l=isEuDapRemittance({deliveryType:(e=(o=cartStore.selectedShippingOption)===null||o===void 0?void 0:o.shippingProfile)===null||e===void 0?void 0:e.serviceLevel.deliveryType,landedCost:a,shipToCountry:(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country});if(!l){return null}
84
84
  // Landed cost amounts are in the source currency; convert to presentment.
85
- var c=i.subtotals.exchangeRate.rate;var u=function(o){return o.reduce((function(o,t){var e=t.amount;return o+e}),0)};
85
+ var c=i.subtotals.exchangeRate.rate;var u=function(o){return o.reduce((function(o,e){var t=e.amount;return o+t}),0)};
86
86
  // Taxes and fees are collected at checkout, so use the checkout session
87
87
  // subtotals (already in presentment currency) — this is what the shopper
88
88
  // actually pays. Duties are not collected (paid on delivery), so they come
89
89
  // from the landed cost estimate converted to presentment.
90
- var d=(s=cartStore.checkoutSession)===null||s===void 0?void 0:s.subtotals;return{dutiesEstimate:u(a.duties)*c,taxesAndFeesEstimate:((n=d===null||d===void 0?void 0:d.taxes)!==null&&n!==void 0?n:0)+((r=d===null||d===void 0?void 0:d.fees)!==null&&r!==void 0?r:0)}}}o.prototype.render=function(){var o=this;var t,e,s,n,r;
90
+ var d=(s=cartStore.checkoutSession)===null||s===void 0?void 0:s.subtotals;return{dutiesEstimate:u(a.duties)*c,taxesAndFeesEstimate:((n=d===null||d===void 0?void 0:d.taxes)!==null&&n!==void 0?n:0)+((r=d===null||d===void 0?void 0:d.fees)!==null&&r!==void 0?r:0)}}}o.prototype.render=function(){var o=this;var e,t,s,n,r;
91
91
  // Since now we are prefetching the landed cost, we need to not show the total that includes the landed cost and shipping
92
92
  var i=cartStore.step==="customer-info"?cartStore.subtotal+cartStore.adjustmentTotal:cartStore.total;
93
93
  // Order-modification payment-only sessions have no landedCost at all
@@ -110,7 +110,7 @@ cartStore.step!=="customer-info"&&
110
110
  // step with no customer-info/shipping step behind them — applying a
111
111
  // promo code here would re-quote against a landed cost these sessions
112
112
  // never went through, with no shipping step to return to.
113
- !a;var m=(r=(n=(s=(e=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find(Boolean))===null||e===void 0?void 0:e.landedCost.appliedAdjustments)===null||s===void 0?void 0:s.find((function(o){var t;return((t=o.adjustment)===null||t===void 0?void 0:t.source)==="PROMO_CODE"})))===null||n===void 0?void 0:n.adjustment)===null||r===void 0?void 0:r.name;var v=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:
113
+ !a;var m=(r=(n=(s=(t=(e=cartStore.landedCostData)===null||e===void 0?void 0:e.find(Boolean))===null||t===void 0?void 0:t.landedCost.appliedAdjustments)===null||s===void 0?void 0:s.find((function(o){var e;return((e=o.adjustment)===null||e===void 0?void 0:e.source)==="PROMO_CODE"})))===null||n===void 0?void 0:n.adjustment)===null||r===void 0?void 0:r.name;var v=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:
114
114
  // Promo code apply button is clicked
115
115
  cartStore.promoCodeApplied=true;
116
116
  // Reset promo code highlight error state
@@ -118,19 +118,19 @@ cartStore.promoCodeError=false;this.loading=true;return[4/*yield*/,stripeStoreAp
118
118
  // Reset promo code highlight error state
119
119
  cartStore.promoCodeError=false;this.loading=true;return[4/*yield*/,stripeStoreRemovePromoCode()];case 1:o.sent();this.loading=false;return[2/*return*/]}}))}))};var z=function(){if(!cartStore.selectedShippingOption||
120
120
  // Should not show shipping info at customer info step
121
- cartStore.step==="customer-info"){return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Shipping")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("No shipping method selected")))}return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},cartStore.selectedShippingOption.displayName),cartStore.selectedShippingOptionTransitTime&&h("zonos-text",{class:"zonos--caption",type:"caption"},cartStore.selectedShippingOptionTransitTime))};var b=function(){var t,e,s;
121
+ cartStore.step==="customer-info"){return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Shipping")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("No shipping method selected")))}return h(Fragment,null,h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},cartStore.selectedShippingOption.displayName),cartStore.selectedShippingOptionTransitTime&&h("zonos-text",{class:"zonos--caption",type:"caption"},cartStore.selectedShippingOptionTransitTime))};var b=function(){var e,t,s;
122
122
  // At the moment, inclusive price only support for US merchant
123
123
  if(hasInclusivePrice()){var n=o.getInclusivePriceType();
124
124
  // This should not happen, put it here to exclude null from the type
125
125
  if(!n){return null}if(n==="TAX"){return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties and fees")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Nothing due at the door"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},cartStore.dutiesTaxesFees!==null?renderCheckoutCurrency({amount:cartStore.dutiesTaxesFees,isForeign:true}):"-")))}if(n==="DUTY_AND_FEE"){return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Taxes"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},cartStore.dutiesTaxesFees!==null?renderCheckoutCurrency({amount:cartStore.dutiesTaxesFees,isForeign:true}):"-")))}return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("The purchase price covers duties, taxes and fees."))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},"-")))}
126
126
  // Domestic US doesn't have duty applied, just taxes and fees
127
- if((e=(t=zonosStore.genericSettings)===null||t===void 0?void 0:t.domesticCountries)===null||e===void 0?void 0:e.includes(((s=stripeStore.stripeAddressEventData)===null||s===void 0?void 0:s.value.address.country)||"US")){return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Taxes and fees"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},cartStore.dutiesTaxesFees!==null||cartStore.dutiesTaxesFeesEstimate!==null?renderCheckoutCurrency({amount:cartStore.dutiesTaxesFees||cartStore.dutiesTaxesFeesEstimate||0,isForeign:true}):"-")))}if(cartStore.landedCostMethod==="DAP"){return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),cartStore.dutiesTaxesFeesEstimate!==null?"".concat(translate("Estimated [amount]",{amount:renderCheckoutCurrency({amount:cartStore.dutiesTaxesFeesEstimate,isForeign:true})})):"-"),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},translate("Due at delivery"))))}return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Nothing due at the door"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},cartStore.dutiesTaxesFees!==null?renderCheckoutCurrency({amount:cartStore.dutiesTaxesFees,isForeign:true}):"-")))};return h(Host,{class:"zonos--cart-subtotal zonos--elements"},h("table",{class:"zonos--cart-table"},h("tr",{class:"zonos--row zonos--cart-subtotal"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Cart subtotal")),h("zonos-text",{class:"zonos--caption",type:"caption"},this.getCartSubtotalSubtitle())),h("td",{class:"zonos--column zonos--cart-subtotal-price"},h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:p,isForeign:true})))),c&&h("tr",{class:"zonos--row zonos--cart-shipping"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},z()),h("td",{class:"zonos--column zonos--cart-subtotal-price"},cartStore.shipping?renderCheckoutCurrency({amount:cartStore.shipping,isForeign:true}):"-")),l&&(u?
127
+ if((t=(e=zonosStore.genericSettings)===null||e===void 0?void 0:e.domesticCountries)===null||t===void 0?void 0:t.includes(((s=stripeStore.stripeAddressEventData)===null||s===void 0?void 0:s.value.address.country)||"US")){return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Taxes and fees"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},cartStore.dutiesTaxesFees!==null||cartStore.dutiesTaxesFeesEstimate!==null?renderCheckoutCurrency({amount:cartStore.dutiesTaxesFees||cartStore.dutiesTaxesFeesEstimate||0,isForeign:true}):"-")))}if(cartStore.landedCostMethod==="DAP"){return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),cartStore.dutiesTaxesFeesEstimate!==null?"".concat(translate("Estimated [amount]",{amount:renderCheckoutCurrency({amount:cartStore.dutiesTaxesFeesEstimate,isForeign:true})})):"-"),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},translate("Due at delivery"))))}return h(Fragment,null,h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties, taxes, and fees")),h("zonos-text",{class:"zonos--caption",type:"caption"},translate("Nothing due at the door"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},cartStore.dutiesTaxesFees!==null?renderCheckoutCurrency({amount:cartStore.dutiesTaxesFees,isForeign:true}):"-")))};return h(Host,{class:"zonos--cart-subtotal zonos--elements"},h("table",{class:"zonos--cart-table"},h("tr",{class:"zonos--row zonos--cart-subtotal"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Cart subtotal")),h("zonos-text",{class:"zonos--caption",type:"caption"},this.getCartSubtotalSubtitle())),h("td",{class:"zonos--column zonos--cart-subtotal-price"},h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:p,isForeign:true})))),c&&h("tr",{class:"zonos--row zonos--cart-shipping"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},z()),h("td",{class:"zonos--column zonos--cart-subtotal-price"},cartStore.shipping?renderCheckoutCurrency({amount:cartStore.shipping,isForeign:true}):"-")),l&&(u?
128
128
  // EU DAP remittance: taxes and fees are collected/included, duties
129
129
  // are estimated and paid upon delivery — show them on two lines.
130
130
  h(Fragment,null,h("tr",{class:"zonos--row zonos--cart-duties"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Taxes and fees"))),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},renderCheckoutCurrency({amount:u.taxesAndFeesEstimate,isForeign:true})))),h("tr",{class:"zonos--row zonos--cart-duties"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Duties")),translate("Estimated [amount]",{amount:renderCheckoutCurrency({amount:u.dutiesEstimate,isForeign:true})})),h("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},h("div",{class:"zonos--cart-duty-tax-price"},translate("Due at delivery"))))):h("tr",{class:"zonos--row zonos--cart-duties"},h("td",{class:"zonos--column"}),b())),f&&h("tr",{class:"zonos--row zonos--cart-promo-code"},h("td",{class:"zonos--column"}),!!m?h(Fragment,null,h("td",{class:"zonos--column zonos--cart-promo-code-col"},this.loading?h("zonos-spinner",{size:16}):h("zonos-badge",{dismissHandler:function(){return g()}},cartStore.promoCode)),h("td",{class:"zonos--column zonos--cart-promo-code-col"})):h("td",{class:"zonos--column zonos--cart-promo-code-col",colSpan:2},h("div",{class:"zonos--cart-promo-code-input-wrapper"},h("zonos-input",{class:"zonos--cart-promo-code-input",inputLabel:translate("Add promotional code"),inputValue:cartStore.promoCode,isError:cartStore.promoCodeError,onInputChange:function(o){return cartStore.promoCode=o.detail.trim()},onKeyDown:function(o){if(o.key==="Enter"){void v()}}}),h("zonos-button",{loading:this.loading,onClick:function(){return v()},variant:"primary"},translate("Apply"))))),!!cartStore.adjustmentTotal&&h("tr",{class:"zonos--row zonos--cart-discount"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("div",{class:"zonos--title-with-icon"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Discounts")))),h("td",{class:"zonos--column zonos--cart-subtotal-price"},h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:cartStore.adjustmentTotal,isForeign:true})))),!!cartStore.storeCredit&&h("tr",{class:"zonos--row zonos--cart-store-credit"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column zonos--cart-subtotal-title"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Store credit"))),h("td",{class:"zonos--column zonos--cart-subtotal-price"},h("zonos-text",{textColor:"green-600",type:"semiBoldLabel"},"-",renderCheckoutCurrency({amount:cartStore.storeCredit,isForeign:true})))),h("tr",{class:"zonos--row zonos--cart-pay-total"},h("td",{class:"zonos--column"}),h("td",{class:"zonos--column"},h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},translate("Order total"))),h("td",{class:"zonos--column zonos--cart-total-price"},h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:d,isForeign:true})))),this.renderCustomMessage()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartSubtotal.style=zonosCartSubtotalCss();var RemoveIcon='<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 SuccessIcon='<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 zonosCheckoutFinishCss=function(){return":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}: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:20px}:host .zonos--finish-details{max-width:536px;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--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}"};
131
131
  /**
132
132
  * Maximum number of retries to pull order info (gap between each retry is 1 second)
133
- */var MAX_RETRIES=30;var ZonosCheckoutFinish=/** @class */function(){function o(o){var t=this;registerInstance(this,o);this.closeClick=createEvent(this,"closeClick",7);
133
+ */var MAX_RETRIES=30;var ZonosCheckoutFinish=/** @class */function(){function o(o){var e=this;registerInstance(this,o);this.closeClick=createEvent(this,"closeClick",7);
134
134
  /**
135
135
  * The border radius style of the dialog
136
136
  */this.borderRadius="ROUNDED";this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=translate("Keep shopping");this.order=null;
@@ -142,32 +142,32 @@ h(Fragment,null,h("tr",{class:"zonos--row zonos--cart-duties"},h("td",{class:"zo
142
142
  * successRedirectUrl (CLOSE_MODAL + successRedirectUrl). Used by the
143
143
  * render method to keep the dialog in a loading state instead of briefly
144
144
  * showing the success notification before navigation.
145
- */this.isImmediateRedirecting=false;this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,t,e,s,n,r,i,a;return __generator(this,(function(l){switch(l.label){case 0:e=storageStore.checkoutSessionId;s=new URLSearchParams;s.set("checkoutSessionId",e||"");return[4/*yield*/,handleFetch("/api/zonos-elements/get-order?".concat(s.toString()))];case 1:n=l.sent(),r=n.baseUrl,i=n.errors,a=n.json;if(i.length||!(a===null||a===void 0?void 0:a.id)){return[2/*return*/,{baseUrl:r,order:null}]}
145
+ */this.isImmediateRedirecting=false;this.pullOrder=function(){return __awaiter(e,void 0,void 0,(function(){var o,e,t,s,n,r,i,a;return __generator(this,(function(l){switch(l.label){case 0:t=storageStore.checkoutSessionId;s=new URLSearchParams;s.set("checkoutSessionId",t||"");return[4/*yield*/,handleFetch("/api/zonos-elements/get-order?".concat(s.toString()))];case 1:n=l.sent(),r=n.baseUrl,i=n.errors,a=n.json;if(i.length||!(a===null||a===void 0?void 0:a.id)){return[2/*return*/,{baseUrl:r,order:null}]}
146
146
  // onOrderSuccess callback may be provided on Zonos.init
147
- return[4/*yield*/,(t=(o=zonosStore.checkoutSettings).onOrderSuccess)===null||t===void 0?void 0:t.call(o,{zonosApiRoute:r,zonosOrder:a})];case 2:
147
+ return[4/*yield*/,(e=(o=zonosStore.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:r,zonosOrder:a})];case 2:
148
148
  // onOrderSuccess callback may be provided on Zonos.init
149
149
  l.sent();return[2/*return*/,{baseUrl:r,order:a}]}}))}))};
150
150
  /**
151
151
  * Metadata for purchase event in GA4
152
- */this.buildPurchaseMetadata=function(o){var e=o.checkoutSessionId,s=o.currency;var n,r,i,a,l,c;var u=cartStore.items.filter((function(o){return o.amount>=0})).map((function(o){return{item_id:o.sku||o.productId||o.name,item_name:o.name,price:o.amount,quantity:o.quantity}}));
152
+ */this.buildPurchaseMetadata=function(o){var t=o.checkoutSessionId,s=o.currency;var n,r,i,a,l,c;var u=cartStore.items.filter((function(o){return o.amount>=0})).map((function(o){return{item_id:o.sku||o.productId||o.name,item_name:o.name,price:o.amount,quantity:o.quantity}}));
153
153
  /**
154
154
  * The value of this parameter should be the sum of all item amounts in the transaction (without shipping and tax).
155
155
  * @ref https://developers.google.com/analytics/devguides/collection/ga4/reference/events?client_type=gtag#parameters_22
156
- */var d=((n=cartStore.checkoutSession)===null||n===void 0?void 0:n.subtotals.items)||((r=t.order)===null||r===void 0?void 0:r.amountSubtotals.items);var h=((i=cartStore.checkoutSession)===null||i===void 0?void 0:i.subtotals.presentmentCurrencyCode)||((a=t.order)===null||a===void 0?void 0:a.currencyCode)||(s===null||s===void 0?void 0:s.toUpperCase());
156
+ */var d=((n=cartStore.checkoutSession)===null||n===void 0?void 0:n.subtotals.items)||((r=e.order)===null||r===void 0?void 0:r.amountSubtotals.items);var h=((i=cartStore.checkoutSession)===null||i===void 0?void 0:i.subtotals.presentmentCurrencyCode)||((a=e.order)===null||a===void 0?void 0:a.currencyCode)||(s===null||s===void 0?void 0:s.toUpperCase());
157
157
  // Cart subtotal amount, can be different on the final checkout session/payment intent, therefore only use it if the order/checkout session can not be found.
158
- var p=u.reduce((function(o,t){return o+t.price*t.quantity}),0);var f=(l=cartStore.items.find(Boolean))===null||l===void 0?void 0:l.currencyCode;var m=((c=t.order)===null||c===void 0?void 0:c.id)||e||(new Date).getTime().toString();if(h&&d){return{currency:h,items:u,transaction_id:m,value:d}}
158
+ var p=u.reduce((function(o,e){return o+e.price*e.quantity}),0);var f=(l=cartStore.items.find(Boolean))===null||l===void 0?void 0:l.currencyCode;var m=((c=e.order)===null||c===void 0?void 0:c.id)||t||(new Date).getTime().toString();if(h&&d){return{currency:h,items:u,transaction_id:m,value:d}}
159
159
  // Use cart currency and subtotal if the order/checkout session can not be found
160
160
  if(f&&p){return{currency:f,items:u,transaction_id:m,value:p}}return{currency:undefined,items:u,transaction_id:m,value:undefined}};this.redirectToUrl=function(o){
161
161
  // reset store and checkout session id before redirecting
162
162
  stripeStoreReset();storageStore.checkoutSessionId=null;
163
163
  // If it is iframed, redirect the parent window
164
- if(window.parent){window.parent.location.href=o}window.location.href=o};this.isRedirectBehavior=function(){var o=zonosStore.checkoutSettings,t=o.successBehavior,e=o.successRedirectUrl;return t==="REDIRECT_TO_SUCCESS_PAGE"||t==="CLOSE_MODAL"&&!!e||!!cartStore.externalConfirmationPageURL};
164
+ if(window.parent){window.parent.location.href=o}window.location.href=o};this.isRedirectBehavior=function(){var o=zonosStore.checkoutSettings,e=o.successBehavior,t=o.successRedirectUrl;return e==="REDIRECT_TO_SUCCESS_PAGE"||e==="CLOSE_MODAL"&&!!t||!!cartStore.externalConfirmationPageURL};
165
165
  /**
166
166
  * It would make more sense to have keep shopping button if the success behavior is not redirecting to a different page
167
- */this.shouldRenderKeepShoppingButton=function(){return!t.isRedirectBehavior()&&t.notificationType==="success"};
167
+ */this.shouldRenderKeepShoppingButton=function(){return!e.isRedirectBehavior()&&e.notificationType==="success"};
168
168
  /**
169
169
  * Should render close button for redirect behavior when the success behavior is redirecting to a different page or when it's an error screen
170
- */this.shouldRenderCloseButtonForRedirectBehavior=function(){return t.isRedirectBehavior()||t.notificationType==="error"};this.redirectToMerchantSuccessPage=function(){var o,e,s,n;var r=cartStore.externalConfirmationPageURL||zonosStore.checkoutSettings.successRedirectUrl;var i=r;var a=new URLSearchParams;var l=(o=t.order)===null||o===void 0?void 0:o.id;var c=((n=(s=(e=t.order)===null||e===void 0?void 0:e.references)===null||s===void 0?void 0:s.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value)||null;if(l){a.set("zOrderNumber",l)}if(c){a.set("orderId",c)}var u=a.toString();var d=i.includes("?");t.isWaitingToRedirect=true;t.redirectToUrl(u?// Some url already has query string, so we need to append the query string with '&' instead of '?'
170
+ */this.shouldRenderCloseButtonForRedirectBehavior=function(){return e.isRedirectBehavior()||e.notificationType==="error"};this.redirectToMerchantSuccessPage=function(){var o,t,s,n;var r=cartStore.externalConfirmationPageURL||zonosStore.checkoutSettings.successRedirectUrl;var i=r;var a=new URLSearchParams;var l=(o=e.order)===null||o===void 0?void 0:o.id;var c=((n=(s=(t=e.order)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value)||null;if(l){a.set("zOrderNumber",l)}if(c){a.set("orderId",c)}var u=a.toString();var d=i.includes("?");e.isWaitingToRedirect=true;e.redirectToUrl(u?// Some url already has query string, so we need to append the query string with '&' instead of '?'
171
171
  "".concat(i).concat(d?"&":"?").concat(u):i)};
172
172
  /**
173
173
  * Immediately redirect to the merchant's successRedirectUrl with the
@@ -175,18 +175,18 @@ if(window.parent){window.parent.location.href=o}window.location.href=o};this.isR
175
175
  * by CLOSE_MODAL when a successRedirectUrl is provided, so the merchant
176
176
  * can look up the order themselves using that query param. The
177
177
  * `zonos` prefix avoids colliding with merchant query params.
178
- */this.redirectToCloseModalSuccessPage=function(){var o=zonosStore.checkoutSettings.successRedirectUrl;var e=storageStore.checkoutSessionId;t.isWaitingToRedirect=true;if(!e){t.redirectToUrl(o);return}
178
+ */this.redirectToCloseModalSuccessPage=function(){var o=zonosStore.checkoutSettings.successRedirectUrl;var t=storageStore.checkoutSessionId;e.isWaitingToRedirect=true;if(!t){e.redirectToUrl(o);return}
179
179
  // Use the URL API so that an existing query string is preserved and a
180
180
  // `#fragment` (if any) keeps `zonosCheckoutSessionId` in the query
181
181
  // rather than appending it after the fragment marker.
182
- try{var s=new URL(o);s.searchParams.set("zonosCheckoutSessionId",e);t.redirectToUrl(s.toString())}catch(s){
182
+ try{var s=new URL(o);s.searchParams.set("zonosCheckoutSessionId",t);e.redirectToUrl(s.toString())}catch(s){
183
183
  // Fallback for relative URLs (which `new URL(...)` rejects without a
184
184
  // base): split on `#` first so the fragment stays at the end.
185
- var n=o.indexOf("#");var r=n===-1?o:o.slice(0,n);var i=n===-1?"":o.slice(n);var a=r.includes("?")?"&":"?";var l="zonosCheckoutSessionId=".concat(encodeURIComponent(e));t.redirectToUrl("".concat(r).concat(a).concat(l).concat(i))}};this.handleSuccessBehavior=function(){return __awaiter(t,void 0,void 0,(function(){var o,t,e,s;return __generator(this,(function(n){switch(n.label){case 0:
185
+ var n=o.indexOf("#");var r=n===-1?o:o.slice(0,n);var i=n===-1?"":o.slice(n);var a=r.includes("?")?"&":"?";var l="zonosCheckoutSessionId=".concat(encodeURIComponent(t));e.redirectToUrl("".concat(r).concat(a).concat(l).concat(i))}};this.handleSuccessBehavior=function(){return __awaiter(e,void 0,void 0,(function(){var o,e,t,s;return __generator(this,(function(n){switch(n.label){case 0:
186
186
  /**
187
187
  * Save placed order info so we can show order info if they try to place the order again
188
188
  */
189
- this.saveOrderIdForDuplicationIssue();o=zonosStore.checkoutSettings,t=o.successBehavior,e=o.successRedirectUrl;s=true;switch(s){case t==="CLOSE_MODAL"&&!!e&&!cartStore.externalConfirmationPageURL:return[3/*break*/,1];case t==="REDIRECT_TO_SUCCESS_PAGE":return[3/*break*/,2];case!!cartStore.externalConfirmationPageURL:return[3/*break*/,2];case t==="CLOSE_MODAL":return[3/*break*/,4];case t==="ZONOS_SUCCESS_PAGE":return[3/*break*/,4]}return[3/*break*/,4];case 1:{
189
+ this.saveOrderIdForDuplicationIssue();o=zonosStore.checkoutSettings,e=o.successBehavior,t=o.successRedirectUrl;s=true;switch(s){case e==="CLOSE_MODAL"&&!!t&&!cartStore.externalConfirmationPageURL:return[3/*break*/,1];case e==="REDIRECT_TO_SUCCESS_PAGE":return[3/*break*/,2];case!!cartStore.externalConfirmationPageURL:return[3/*break*/,2];case e==="CLOSE_MODAL":return[3/*break*/,4];case e==="ZONOS_SUCCESS_PAGE":return[3/*break*/,4]}return[3/*break*/,4];case 1:{
190
190
  // Keep the dialog in a steady loading state instead of briefly
191
191
  // flashing the success/finish screen — navigation happens
192
192
  // immediately, so flashing "Order complete!" for a few hundred ms
@@ -223,7 +223,7 @@ this.isLoading=false;if(!(typeof zonosStore.checkoutSettings.onOrderSuccess==="f
223
223
  */
224
224
  n.sent();n.label=6;case 6:return[3/*break*/,7];case 7:return[2/*return*/]}}))}))};
225
225
  // TODO: This method of pulling orders is temporary. Once we have a working event registry system, we will rely on that to tell us when the order is ready to trigger onOrderSuccess
226
- this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(t,__spreadArray([],o,true),void 0,(function(o){var t,e,s,n,r,i,a,l,c;if(o===void 0){o=0}return __generator(this,(function(u){switch(u.label){case 0:if(o===0){log("=== Start to poll for order info","info")}return[4/*yield*/,this.pullOrder()];case 1:s=u.sent(),n=s.baseUrl,r=s.order;i=window.Zonos.isLegacyCheckout;a=!!((e=(t=r===null||r===void 0?void 0:r.references)===null||t===void 0?void 0:t.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||e===void 0?void 0:e.value);l=storageStore.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||MAX_RETRIES;log("=== Polling order (".concat(o," attemps)"),"info");if(!(
226
+ this.getPullOrder=function(){var o=[];for(var t=0;t<arguments.length;t++){o[t]=arguments[t]}return __awaiter(e,__spreadArray([],o,true),void 0,(function(o){var e,t,s,n,r,i,a,l,c;if(o===void 0){o=0}return __generator(this,(function(u){switch(u.label){case 0:if(o===0){log("=== Start to poll for order info","info")}return[4/*yield*/,this.pullOrder()];case 1:s=u.sent(),n=s.baseUrl,r=s.order;i=window.Zonos.isLegacyCheckout;a=!!((t=(e=r===null||r===void 0?void 0:r.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);l=storageStore.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||MAX_RETRIES;log("=== Polling order (".concat(o," attemps)"),"info");if(!(
227
227
  // Order found and was regular checkout user
228
228
  r&&!i||
229
229
  // Order found, in legacy checkout facade and still haven't found the legacy order number
@@ -241,11 +241,11 @@ return[4/*yield*/,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:
241
241
  // Wait for 1 second before the next attempt
242
242
  u.sent();return[4/*yield*/,this.getPullOrder(o+1)];case 4:u.sent();return[3/*break*/,6];case 5:void sendErrorLog({endpoint:"".concat(n,"/api/zonos-elements/get-order?checkoutSessionId=").concat(l),errors:["Order not found after ".concat(c," attempts")],metadata:{allLogs:allLogs,checkoutSessionId:storageStore.checkoutSessionId||"",storeId:zonosStore.storeId}});u.label=6;case 6:return[2/*return*/]}}))}))};
243
243
  // If user provide override notification text, use it
244
- this.useOverrideSuccessNotification=function(){var o=zonosStore.checkoutSettings,e=o.successPageSubtitleText,s=o.successPageTitleText;if(s){t.notificationTitle=s}if(e){t.notificationMessages=e}};this.checkStripePaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,t,e,s,n,r,i,a,l,c;return __generator(this,(function(u){switch(u.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||stripeStore.clientSecret;if(!(o||this.storybookForceStatus))return[3/*break*/,4];return[4/*yield*/,stripeStoreRetrievePayment({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:t=u.sent(),e=t.currency,s=t.error,n=t.messages,r=t.status;i=r==="requires_action"||s;this.notificationType=i?"error":"success";this.notificationMessages=n||[];this.notificationTitle=i?translate("Payment failed"):translate("You're all set!");log("=== Payment intent retrieve status","info",{clientSecret:o,error:s,messages:n,status:r});a=new URL(window.location.href);a.searchParams.delete("payment_intent_client_secret");a.searchParams.delete("payment_intent");a.searchParams.delete("redirect_status");
244
+ this.useOverrideSuccessNotification=function(){var o=zonosStore.checkoutSettings,t=o.successPageSubtitleText,s=o.successPageTitleText;if(s){e.notificationTitle=s}if(t){e.notificationMessages=t}};this.checkStripePaymentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o,e,t,s,n,r,i,a,l,c;return __generator(this,(function(u){switch(u.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||stripeStore.clientSecret;if(!(o||this.storybookForceStatus))return[3/*break*/,4];return[4/*yield*/,stripeStoreRetrievePayment({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=u.sent(),t=e.currency,s=e.error,n=e.messages,r=e.status;i=r==="requires_action"||s;this.notificationType=i?"error":"success";this.notificationMessages=n||[];this.notificationTitle=i?translate("Payment failed"):translate("You're all set!");log("=== Payment intent retrieve status","info",{clientSecret:o,error:s,messages:n,status:r});a=new URL(window.location.href);a.searchParams.delete("payment_intent_client_secret");a.searchParams.delete("payment_intent");a.searchParams.delete("redirect_status");
245
245
  // Clean up the url if it's a redirect behavior
246
246
  a.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",a.toString());if(!(s&&(n===null||n===void 0?void 0:n.length)))return[3/*break*/,2];submitAnalytics({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:storageStore.checkoutSessionId}});void sendErrorLog({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0],'" status: ').concat(r," - checkout session: ").concat(storageStore.checkoutSessionId)],metadata:{allLogs:allLogs,credentialToken:window.Zonos.zonosApiKey}});return[3/*break*/,4];case 2:
247
247
  // Save new order info in case the user reloads before we get order info
248
- this.saveOrderIdForDuplicationIssue();l=storageStore.checkoutSessionId;submitAnalytics({event:"zonos-checkout-success",metadata:this.buildPurchaseMetadata({checkoutSessionId:l||"",currency:e===null||e===void 0?void 0:e.toUpperCase()})});submitAnalytics({event:"purchase",metadata:this.buildPurchaseMetadata({checkoutSessionId:l||"",currency:e===null||e===void 0?void 0:e.toUpperCase()})});void trackConversionEvent({checkoutSessionId:l,eventName:"checkout_orderCompleted"});c=createCustomEvent("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(c);
248
+ this.saveOrderIdForDuplicationIssue();l=storageStore.checkoutSessionId;submitAnalytics({event:"zonos-checkout-success",metadata:this.buildPurchaseMetadata({checkoutSessionId:l||"",currency:t===null||t===void 0?void 0:t.toUpperCase()})});submitAnalytics({event:"purchase",metadata:this.buildPurchaseMetadata({checkoutSessionId:l||"",currency:t===null||t===void 0?void 0:t.toUpperCase()})});void trackConversionEvent({checkoutSessionId:l,eventName:"checkout_orderCompleted"});c=createCustomEvent("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(c);
249
249
  // wait this to finish before resetting store and checkout session id
250
250
  return[4/*yield*/,this.handleSuccessBehavior()];case 3:
251
251
  // wait this to finish before resetting store and checkout session id
@@ -253,11 +253,11 @@ u.sent();u.label=4;case 4:
253
253
  // Make sure to stop the loading spinner even when there's an error
254
254
  this.isLoading=false;
255
255
  // reset promo when checkout is finished
256
- stripeStoreResetPromoCode();stripeStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;
256
+ stripeStoreResetPromoCode();stripeStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;
257
257
  // override title if notification type is success
258
258
  this.useOverrideSuccessNotification();return[4/*yield*/,this.handleSuccessBehavior()];case 1:o.sent();
259
259
  // reset promo when checkout is finished
260
- stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:
260
+ stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:
261
261
  // render error message if there's an error
262
262
  if(paypalStore.paypalErrorMessage){this.notificationType="error";this.notificationTitle=translate("Payment failed");this.notificationMessages=[paypalStore.paypalErrorMessage];this.isLoading=false;return[2/*return*/]}
263
263
  // show success message right away when order id is already created
@@ -267,35 +267,35 @@ this.useOverrideSuccessNotification();
267
267
  // wait this to finish before resetting store and checkout session id
268
268
  return[4/*yield*/,this.handleSuccessBehavior()];case 1:
269
269
  // wait this to finish before resetting store and checkout session id
270
- t.sent();t.label=2;case 2:
270
+ e.sent();e.label=2;case 2:
271
271
  // reset promo when checkout is finished
272
- stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkStoreCreditOrderStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(e){switch(e.label){case 0:
272
+ stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.checkStoreCreditOrderStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){switch(t.label){case 0:
273
273
  // show success message right away when order id is already created
274
274
  this.isLoading=false;if(!storeCreditStore.orderIdCreated)return[3/*break*/,2];o=storageStore.checkoutSessionId;submitAnalytics({event:"zonos-checkout-success",metadata:this.buildPurchaseMetadata({checkoutSessionId:o||""})});submitAnalytics({event:"purchase",metadata:this.buildPurchaseMetadata({checkoutSessionId:o||""})});void trackConversionEvent({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;
275
275
  // override title if notification type is success
276
- this.useOverrideSuccessNotification();t=createCustomEvent("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(t);
276
+ this.useOverrideSuccessNotification();e=createCustomEvent("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(e);
277
277
  // wait this to finish before resetting store and checkout session id
278
278
  return[4/*yield*/,this.handleSuccessBehavior()];case 1:
279
279
  // wait this to finish before resetting store and checkout session id
280
- e.sent();e.label=2;case 2:
280
+ t.sent();t.label=2;case 2:
281
281
  // reset stores when checkout is finished
282
- stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storeCreditStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.closeClickHandler=function(){t.closeClick.emit()};this.saveOrderIdForDuplicationIssue=function(){var o,e,s,n;var r=jsonParse(localStorage.getItem("zonos--placed-order-info"));var i={cartId:window.Zonos.cartId||null,checkoutSessionId:(r===null||r===void 0?void 0:r.checkoutSessionId)||storageStore.checkoutSessionId||"",orderId:((o=t.order)===null||o===void 0?void 0:o.id)||null,time:(r===null||r===void 0?void 0:r.time)||Date.now(),zonosOrderNumber:((n=(s=(e=t.order)===null||e===void 0?void 0:e.references)===null||s===void 0?void 0:s.find((function(o){return o.key==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value)||null};localStorage.setItem("zonos--placed-order-info",JSON.stringify(i))}}o.prototype.componentDidLoad=function(){
282
+ stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storeCreditStoreReset();storageStore.checkoutSessionId=null;return[2/*return*/]}}))}))};this.closeClickHandler=function(){e.closeClick.emit()};this.saveOrderIdForDuplicationIssue=function(){var o,t,s,n;var r=jsonParse(safeGetItem("local","zonos--placed-order-info"));var i={cartId:window.Zonos.cartId||null,checkoutSessionId:(r===null||r===void 0?void 0:r.checkoutSessionId)||storageStore.checkoutSessionId||"",orderId:((o=e.order)===null||o===void 0?void 0:o.id)||null,time:(r===null||r===void 0?void 0:r.time)||Date.now(),zonosOrderNumber:((n=(s=(t=e.order)===null||t===void 0?void 0:t.references)===null||s===void 0?void 0:s.find((function(o){return o.key==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value)||null};safeSetItem("local","zonos--placed-order-info",JSON.stringify(i))}}o.prototype.componentDidLoad=function(){
283
283
  // Reset local storage for placed order info
284
- localStorage.removeItem("zonos--placed-order-info");if(this.overrideNotification){
284
+ safeRemoveItem("local","zonos--placed-order-info");if(this.overrideNotification){
285
285
  // just show the notification and don't check any of the payment status
286
- this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(cartStore.isStagingMode){void this.checkStagingOrderStatus()}else if(storeCreditStore.orderIdCreated){void this.checkStoreCreditOrderStatus()}else if(paypalStore.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var t=getIsTestMode();return h(Host,{key:"76a3503d5c41cf3138e71b071fdb5e341fad1781",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:this.borderRadius})}},this.isImmediateRedirecting&&h("div",{key:"aab29e86b7d17dde74d873fe97f342e419e1b5cb",class:"loading-wrapper"},h("zonos-spinner",{key:"29526f5d056c117ccd65bd1ed303761c04fdbdf3",size:48})),!this.isLoading&&!this.isImmediateRedirecting&&h("div",{key:"438b210be5c4c78c74d37e5fde8de994e379afa0",class:"zonos--finish-details"},h("div",{key:"1cb133c14660035ea6395adb74d30790b69715f3",class:"zonos--group"},this.notificationType==="success"?h("zonos-icon",{"aria-label":"Order success",content:SuccessIcon,iconColor:"blue-800",size:50}):h("zonos-icon",{"aria-label":"Order failed",content:RemoveIcon,iconColor:"red-800",size:50}),h("zonos-text",{key:"4e5a66524f7833916829c9dd7172225e872bb329",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),h("zonos-text",{key:"773a548cd7757af62b26bbe119e7dd078ab4df5b",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return h(Fragment,null,o,h("br",null))}))),this.shouldRenderCloseButtonForRedirectBehavior()&&h("zonos-button",{key:"ea8c30af05aa57c05155f68b416668db16cfcd1c",
286
+ this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(cartStore.isStagingMode){void this.checkStagingOrderStatus()}else if(storeCreditStore.orderIdCreated){void this.checkStoreCreditOrderStatus()}else if(paypalStore.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=getIsTestMode();return h(Host,{key:"d0e01955edb2c23678d39ef14a18a3b8cd0e2b28",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:this.borderRadius})}},this.isImmediateRedirecting&&h("div",{key:"fdd0468df80703543b942e729a3d90dd2d9f3eee",class:"loading-wrapper"},h("zonos-spinner",{key:"82f8cb7f62ab073a4b39bf6fca67c7e37db94f5e",size:48})),!this.isLoading&&!this.isImmediateRedirecting&&h("div",{key:"1ad8c9a98307a017aca8493404fb9575b9f8eaa0",class:"zonos--finish-details"},h("div",{key:"474a8780c96fbaf2ebb2e7db7f6a6734cb630baa",class:"zonos--group"},this.notificationType==="success"?h("zonos-icon",{"aria-label":"Order success",content:SuccessIcon,iconColor:"blue-800",size:50}):h("zonos-icon",{"aria-label":"Order failed",content:RemoveIcon,iconColor:"red-800",size:50}),h("zonos-text",{key:"4f8ce6ac8ca854cd400db16345433cef732ba9de",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),h("zonos-text",{key:"5ccf3054ba802e69692ba0154390c4fb24e051e6",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return h(Fragment,null,o,h("br",null))}))),this.shouldRenderCloseButtonForRedirectBehavior()&&h("zonos-button",{key:"813fec3a2d1e77487935203baf92010e5d28392d",
287
287
  // Only show loading spinner if it's not an error notification
288
- loading:this.isWaitingToRedirect&&this.notificationType!=="error",onClick:function(){var t;
288
+ loading:this.isWaitingToRedirect&&this.notificationType!=="error",onClick:function(){var e;
289
289
  // Trigger the redirect action if order is ready when user clicks the close button
290
- if((t=o.order)===null||t===void 0?void 0:t.id){o.redirectToMerchantSuccessPage();return}o.closeClickHandler()},size:"md",variant:"primary"},translate("Close")),!window.Zonos.isLegacyCheckout&&this.shouldRenderKeepShoppingButton()&&h("zonos-button",{key:"50120bf3a405a2b6e5433fe1bb744f0b836ac49f",onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},this.notificationActionText)),t&&cartStore.step==="finish"&&this.notificationType==="success"&&h("div",{key:"2794f9deea56b65de81ad92285270388a7089a73",class:"zonos--finish-button-wrapper"},h("zonos-button",{key:"2ba2ef7a26f78cf484d1625428d866cdfadd1b2f",backgroundColor:"gray-0",buttonColor:"gray-1000",onClick:function(){return o.closeClickHandler()},size:"lg",variant:"outline"},"New test cart"),h("zonos-button",{key:"fc689ad6192fb0cc86a9fcaf164660a056df8bc5",onClick:function(){var t=window.location.hostname.includes("dashboard.zonos.com");o.redirectToUrl(t?"/orders/all":"https://dashboard.zonos.com/orders/all")},size:"lg",variant:"primary"},"View order in Dashboard"))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCheckoutFinish.style=zonosCheckoutFinishCss();var ChevronDownIcon$1='<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 Globe='<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 ZonosIconDark='<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>\n<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>\n<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>\n</svg>\n';var ZonosIconLight='<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="#0F1015"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="#0F1015"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="#0F1015"/>\n<path d="M8 58C8 31.4903 29.4903 10 56 10C82.5097 10 104 31.4903 104 58C104 75.468 94.6696 90.7597 80.7129 99.1582C80.3237 99.3924 79.8197 99.2468 79.6079 98.845L77.7391 95.2981C77.5396 94.9194 77.6741 94.4514 78.0396 94.2286C90.245 86.7878 98.4 73.3477 98.4 58C98.4 45.396 92.898 34.0746 84.1712 26.3112L83.8716 26.0447C83.2103 25.4564 82.197 25.5168 81.6102 26.1795L76.2698 32.2113C70.6911 27.8209 63.6496 25.2 56 25.2C37.8851 25.2 23.2 39.8851 23.2 58C23.2 70.6278 30.3366 81.5856 40.7873 87.0659L41.1415 87.2516C41.9239 87.6619 42.8909 87.3604 43.3013 86.578L46.7194 80.0634C46.9121 79.6961 47.353 79.5384 47.7406 79.6861C50.3082 80.6645 53.0932 81.2 56 81.2C68.813 81.2 79.2 70.813 79.2 58C79.2 45.187 68.813 34.8 56 34.8H55.6C54.7163 34.8 54 35.5163 54 36.4V43.8553C54 44.2521 53.7083 44.5864 53.3192 44.6641C47.092 45.909 42.4 51.4066 42.4 58C42.4 62.0871 44.2053 65.7548 47.0553 68.2449C49.4452 70.3329 52.5771 71.6 56 71.6C63.5111 71.6 69.6 65.5111 69.6 58C69.6 51.4066 64.908 45.909 58.6808 44.6641C58.2917 44.5864 58 44.2521 58 43.8553V39.79C58 39.3156 58.411 38.944 58.8801 39.0146C68.1177 40.4042 75.2 48.375 75.2 58C75.2 68.6039 66.6039 77.2 56 77.2C52.7862 77.2 49.7622 76.4119 47.1053 75.0203L46.7512 74.8348C45.9688 74.425 45.0023 74.7267 44.592 75.5088L41.3048 81.7738C41.0894 82.1844 40.5705 82.3272 40.1833 82.0723C32.3591 76.9208 27.2 68.0616 27.2 58C27.2 42.0942 40.0942 29.2 56 29.2C63.3526 29.2 70.0574 31.9526 75.1478 36.4867L75.4473 36.7535C76.1086 37.3425 77.1225 37.2824 77.7095 36.6194L82.416 31.3036C82.7202 30.96 83.251 30.9417 83.5705 31.2711C90.2759 38.1859 94.4 47.6103 94.4 58C94.4 72.7914 86.0375 85.6329 73.7731 92.0487C68.4609 94.8276 62.417 96.4 56 96.4C39.6557 96.4 25.6916 86.188 20.1496 71.7893L20.0065 71.4176C19.6901 70.5954 18.7685 70.1837 17.945 70.4967L11.2754 73.0313C10.8512 73.1925 10.3773 72.9691 10.24 72.5365C8.78535 67.9531 8 63.0699 8 58Z" fill="#0F1015"/>\n<path d="M46.4 58C46.4 52.6981 50.6981 48.4 56 48.4C61.3019 48.4 65.6 52.6981 65.6 58C65.6 63.3019 61.3019 67.6 56 67.6C53.5814 67.6 51.376 66.7082 49.6871 65.2326C47.6696 63.4699 46.4 60.8844 46.4 58Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM74.193 97.1488C73.9943 96.7717 73.5352 96.6173 73.1454 96.7898C67.9011 99.1111 62.0989 100.4 56 100.4C38.9222 100.4 24.2068 90.3041 17.4886 75.7611C17.3101 75.3745 16.8638 75.1867 16.4658 75.3379L9.64462 77.9301C8.82063 78.2433 7.89858 77.831 7.58258 77.008L7.43969 76.6359C5.21709 70.8479 4 64.5637 4 58C4 29.2812 27.2812 6 56 6C84.7188 6 108 29.2812 108 58C108 78.0231 96.6823 95.3996 80.1044 104.087L79.7509 104.273C78.9694 104.682 78.0039 104.382 77.5927 103.601L74.193 97.1488Z" fill="#0F1015"/>\n</svg>\n';var zonosCheckoutFooterCss=function(){return":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:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);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}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper .zonos--checkout-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--checkout-footer .zonos--checkout-footer-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--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}"};var ZonosCheckoutFooter=/** @class */function(){function o(o){registerInstance(this,o);
290
+ if((e=o.order)===null||e===void 0?void 0:e.id){o.redirectToMerchantSuccessPage();return}o.closeClickHandler()},size:"md",variant:"primary"},translate("Close")),!window.Zonos.isLegacyCheckout&&this.shouldRenderKeepShoppingButton()&&h("zonos-button",{key:"ad9969e7e07881f872fa599e1dbfe481df03d51e",onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},this.notificationActionText)),e&&cartStore.step==="finish"&&this.notificationType==="success"&&h("div",{key:"6b520c1b13cb036c15f798557b44f9f386a55d68",class:"zonos--finish-button-wrapper"},h("zonos-button",{key:"4ef2807d00be47ba87c4bf4223505923ab6e194a",backgroundColor:"gray-0",buttonColor:"gray-1000",onClick:function(){return o.closeClickHandler()},size:"lg",variant:"outline"},"New test cart"),h("zonos-button",{key:"7db0f58fb43aefabd168f4a82be7daeef843d7cc",onClick:function(){var e=window.location.hostname.includes("dashboard.zonos.com");o.redirectToUrl(e?"/orders/all":"https://dashboard.zonos.com/orders/all")},size:"lg",variant:"primary"},"View order in Dashboard"))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCheckoutFinish.style=zonosCheckoutFinishCss();var ChevronDownIcon$1='<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 Globe='<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 ZonosIconDark='<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>\n<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>\n<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>\n</svg>\n';var ZonosIconLight='<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="#0F1015"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="#0F1015"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="#0F1015"/>\n<path d="M8 58C8 31.4903 29.4903 10 56 10C82.5097 10 104 31.4903 104 58C104 75.468 94.6696 90.7597 80.7129 99.1582C80.3237 99.3924 79.8197 99.2468 79.6079 98.845L77.7391 95.2981C77.5396 94.9194 77.6741 94.4514 78.0396 94.2286C90.245 86.7878 98.4 73.3477 98.4 58C98.4 45.396 92.898 34.0746 84.1712 26.3112L83.8716 26.0447C83.2103 25.4564 82.197 25.5168 81.6102 26.1795L76.2698 32.2113C70.6911 27.8209 63.6496 25.2 56 25.2C37.8851 25.2 23.2 39.8851 23.2 58C23.2 70.6278 30.3366 81.5856 40.7873 87.0659L41.1415 87.2516C41.9239 87.6619 42.8909 87.3604 43.3013 86.578L46.7194 80.0634C46.9121 79.6961 47.353 79.5384 47.7406 79.6861C50.3082 80.6645 53.0932 81.2 56 81.2C68.813 81.2 79.2 70.813 79.2 58C79.2 45.187 68.813 34.8 56 34.8H55.6C54.7163 34.8 54 35.5163 54 36.4V43.8553C54 44.2521 53.7083 44.5864 53.3192 44.6641C47.092 45.909 42.4 51.4066 42.4 58C42.4 62.0871 44.2053 65.7548 47.0553 68.2449C49.4452 70.3329 52.5771 71.6 56 71.6C63.5111 71.6 69.6 65.5111 69.6 58C69.6 51.4066 64.908 45.909 58.6808 44.6641C58.2917 44.5864 58 44.2521 58 43.8553V39.79C58 39.3156 58.411 38.944 58.8801 39.0146C68.1177 40.4042 75.2 48.375 75.2 58C75.2 68.6039 66.6039 77.2 56 77.2C52.7862 77.2 49.7622 76.4119 47.1053 75.0203L46.7512 74.8348C45.9688 74.425 45.0023 74.7267 44.592 75.5088L41.3048 81.7738C41.0894 82.1844 40.5705 82.3272 40.1833 82.0723C32.3591 76.9208 27.2 68.0616 27.2 58C27.2 42.0942 40.0942 29.2 56 29.2C63.3526 29.2 70.0574 31.9526 75.1478 36.4867L75.4473 36.7535C76.1086 37.3425 77.1225 37.2824 77.7095 36.6194L82.416 31.3036C82.7202 30.96 83.251 30.9417 83.5705 31.2711C90.2759 38.1859 94.4 47.6103 94.4 58C94.4 72.7914 86.0375 85.6329 73.7731 92.0487C68.4609 94.8276 62.417 96.4 56 96.4C39.6557 96.4 25.6916 86.188 20.1496 71.7893L20.0065 71.4176C19.6901 70.5954 18.7685 70.1837 17.945 70.4967L11.2754 73.0313C10.8512 73.1925 10.3773 72.9691 10.24 72.5365C8.78535 67.9531 8 63.0699 8 58Z" fill="#0F1015"/>\n<path d="M46.4 58C46.4 52.6981 50.6981 48.4 56 48.4C61.3019 48.4 65.6 52.6981 65.6 58C65.6 63.3019 61.3019 67.6 56 67.6C53.5814 67.6 51.376 66.7082 49.6871 65.2326C47.6696 63.4699 46.4 60.8844 46.4 58Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM74.193 97.1488C73.9943 96.7717 73.5352 96.6173 73.1454 96.7898C67.9011 99.1111 62.0989 100.4 56 100.4C38.9222 100.4 24.2068 90.3041 17.4886 75.7611C17.3101 75.3745 16.8638 75.1867 16.4658 75.3379L9.64462 77.9301C8.82063 78.2433 7.89858 77.831 7.58258 77.008L7.43969 76.6359C5.21709 70.8479 4 64.5637 4 58C4 29.2812 27.2812 6 56 6C84.7188 6 108 29.2812 108 58C108 78.0231 96.6823 95.3996 80.1044 104.087L79.7509 104.273C78.9694 104.682 78.0039 104.382 77.5927 103.601L74.193 97.1488Z" fill="#0F1015"/>\n</svg>\n';var zonosCheckoutFooterCss=function(){return":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:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);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}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper .zonos--checkout-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--checkout-footer .zonos--checkout-footer-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--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}"};var ZonosCheckoutFooter=/** @class */function(){function o(o){registerInstance(this,o);
291
291
  /**
292
292
  * Override mobile mode
293
- */this.mobile=false;this.showLanguageDialog=false;this.isMobile=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=isCheckoutMobile(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.render=function(){var o=this;var t;
293
+ */this.mobile=false;this.showLanguageDialog=false;this.isMobile=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=isCheckoutMobile(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.render=function(){var o=this;var e;
294
294
  // label resolves against every language, not just the offered ones, so the current
295
295
  // locale always renders even if the merchant later drops it from the selector
296
- var e=(t=languages.find((function(o){return o.code===localizationStore.selectedLocale})))===null||t===void 0?void 0:t.label;
296
+ var t=(e=languages.find((function(o){return o.code===localizationStore.selectedLocale})))===null||e===void 0?void 0:e.label;
297
297
  // reverse color when on desktop. With the coversheet backdrop, the color should be white
298
- var s=this.dataTheme==="LIGHT"&&!this.mobile?"gray-0":"gray-1000";return h(Host,{key:"e233dc26d3869dd123a76a6a20ef7ef20be04ac9",class:classes(["zonos--elements",this.isMobile&&"mobile"])},h("div",{key:"c00938cd7e9a015227e022b7085e0544c8567fc8",class:"zonos--checkout-footer"},h("div",{key:"822887a65cad7554ec8295187166da4d53406b83",class:"zonos--checkout-locale-wrapper"},shouldShowLanguageSelect()&&h(Fragment,{key:"1589f09bff0c417aed71f488b9799c3208c30b6b"},h("zonos-button",{key:"adb4467f16a158d3e6b6410fa0a6e81715d8b4a4",buttonColor:s,class:"zonos--checkout-footer-language-button",icon:h("zonos-icon",{"aria-label":"Language select",content:Globe,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},h("span",{key:"9dcd8064cb9d2bca25756d6e5d2e9d28d39bea04",class:"zonos--checkout-locale-label"},e,h("zonos-icon",{key:"53d267dc3667e8f0af4dd91748a95311e67ae6bb","aria-hidden":"true",class:"zonos--checkout-locale-chevron",content:ChevronDownIcon$1,iconColor:s,size:18}))),h("div",{key:"48b44da80d72aa1cf2c20bd2d1faa3935ac41c0a",class:classes(["zonos--checkout-footer-dialog",this.showLanguageDialog&&"zonos--checkout-footer-dialog-open"])},h("zonos-language-select",{key:"7cc39fa702bb6895556ac35815aea1a87237307b",handleOnClose:function(){return o.toggleLanguageDialog()}})))),h("div",{key:"7ea92dbdf7f70aeda580a8b06b111598e750e883",class:"zonos--checkout-footer-icon-wrapper"},h("a",{key:"9463c3e591b4094e6516e55f127a193e58e63f75",href:"https://zonos.com/docs/legal/zonos-privacy-policy",rel:"noopener noreferrer",target:"_blank"},h("zonos-text",{key:"c09ac7de4a75b9667785eb3d023d838dcb70fded",textColor:s},translate("Privacy policy"))),h("div",{key:"a3b7bccb55163b3dc38a778530ed24afaec42498",class:"zonos--checkout-footer-logo"},h("zonos-text",{key:"da8f3fb699d42192e9dc120f250cbf4029132c0c",textColor:s},translate("Powered by")),h("a",{key:"674f38407c93fe38801dce5475fd635b22449a44",href:"https://zonos.com",rel:"noopener noreferrer",target:"_blank",title:"Zonos website"},h("zonos-icon",{key:"f414178d37e8dc46fa6bb900112d985e9c111841",autoHeight:true,content:s==="gray-1000"?ZonosIconLight:ZonosIconDark,size:108}))))))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:[{handleMobileChange:0}]}},enumerable:false,configurable:true});return o}();ZonosCheckoutFooter.style=zonosCheckoutFooterCss();
298
+ var s=this.dataTheme==="LIGHT"&&!this.mobile?"gray-0":"gray-1000";return h(Host,{key:"e233dc26d3869dd123a76a6a20ef7ef20be04ac9",class:classes(["zonos--elements",this.isMobile&&"mobile"])},h("div",{key:"c00938cd7e9a015227e022b7085e0544c8567fc8",class:"zonos--checkout-footer"},h("div",{key:"822887a65cad7554ec8295187166da4d53406b83",class:"zonos--checkout-locale-wrapper"},shouldShowLanguageSelect()&&h(Fragment,{key:"1589f09bff0c417aed71f488b9799c3208c30b6b"},h("zonos-button",{key:"adb4467f16a158d3e6b6410fa0a6e81715d8b4a4",buttonColor:s,class:"zonos--checkout-footer-language-button",icon:h("zonos-icon",{"aria-label":"Language select",content:Globe,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},h("span",{key:"9dcd8064cb9d2bca25756d6e5d2e9d28d39bea04",class:"zonos--checkout-locale-label"},t,h("zonos-icon",{key:"53d267dc3667e8f0af4dd91748a95311e67ae6bb","aria-hidden":"true",class:"zonos--checkout-locale-chevron",content:ChevronDownIcon$1,iconColor:s,size:18}))),h("div",{key:"48b44da80d72aa1cf2c20bd2d1faa3935ac41c0a",class:classes(["zonos--checkout-footer-dialog",this.showLanguageDialog&&"zonos--checkout-footer-dialog-open"])},h("zonos-language-select",{key:"7cc39fa702bb6895556ac35815aea1a87237307b",handleOnClose:function(){return o.toggleLanguageDialog()}})))),h("div",{key:"7ea92dbdf7f70aeda580a8b06b111598e750e883",class:"zonos--checkout-footer-icon-wrapper"},h("a",{key:"9463c3e591b4094e6516e55f127a193e58e63f75",href:"https://zonos.com/docs/legal/zonos-privacy-policy",rel:"noopener noreferrer",target:"_blank"},h("zonos-text",{key:"c09ac7de4a75b9667785eb3d023d838dcb70fded",textColor:s},translate("Privacy policy"))),h("div",{key:"a3b7bccb55163b3dc38a778530ed24afaec42498",class:"zonos--checkout-footer-logo"},h("zonos-text",{key:"da8f3fb699d42192e9dc120f250cbf4029132c0c",textColor:s},translate("Powered by")),h("a",{key:"674f38407c93fe38801dce5475fd635b22449a44",href:"https://zonos.com",rel:"noopener noreferrer",target:"_blank",title:"Zonos website"},h("zonos-icon",{key:"f414178d37e8dc46fa6bb900112d985e9c111841",autoHeight:true,content:s==="gray-1000"?ZonosIconLight:ZonosIconDark,size:108}))))))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:[{handleMobileChange:0}]}},enumerable:false,configurable:true});return o}();ZonosCheckoutFooter.style=zonosCheckoutFooterCss();
299
299
  /**
300
300
  * Caches live "configured currency → presentment currency" rates used to convert
301
301
  * the EU withdrawal return-shipping cap into the currency the buyer actually pays
@@ -304,12 +304,12 @@ var s=this.dataTheme==="LIGHT"&&!this.mobile?"gray-0":"gray-1000";return h(Host,
304
304
  * `${sourceCurrency}_${targetCurrency}`; a null value means the lookup failed.
305
305
  */var euWithdrawalRateStore=createStore({crossRates:{}}).state;
306
306
  // Tracks in-flight rate lookups so the same pair isn't fetched on every render.
307
- var inFlightRateKeys=new Set;var euWithdrawalCrossRateKey=function(o,t){return"".concat(o,"_").concat(t)};
307
+ var inFlightRateKeys=new Set;var euWithdrawalCrossRateKey=function(o,e){return"".concat(o,"_").concat(e)};
308
308
  /**
309
309
  * Lazily fetch the current configured→presentment rate (fire-and-forget). Guarded
310
310
  * so each pair is fetched at most once; the result lands in the reactive store,
311
311
  * which triggers a re-render that then shows the presentment estimate.
312
- */var ensureEuWithdrawalCrossRate=function(o,t,e){var s=euWithdrawalCrossRateKey(o,t);if(inFlightRateKeys.has(s)||euWithdrawalRateStore.crossRates[s]!==undefined){return}inFlightRateKeys.add(s);void getExchangeRate({country:e,isGuaranteed:false,sourceCurrency:o,targetCurrency:t}).then((function(o){var t;var e=o.exchangeRate;var n;euWithdrawalRateStore.crossRates=Object.assign(Object.assign({},euWithdrawalRateStore.crossRates),(t={},t[s]=(n=e===null||e===void 0?void 0:e.rate)!==null&&n!==void 0?n:null,t))})).finally((function(){inFlightRateKeys.delete(s)}))};
312
+ */var ensureEuWithdrawalCrossRate=function(o,e,t){var s=euWithdrawalCrossRateKey(o,e);if(inFlightRateKeys.has(s)||euWithdrawalRateStore.crossRates[s]!==undefined){return}inFlightRateKeys.add(s);void getExchangeRate({country:t,isGuaranteed:false,sourceCurrency:o,targetCurrency:e}).then((function(o){var e;var t=o.exchangeRate;var n;euWithdrawalRateStore.crossRates=Object.assign(Object.assign({},euWithdrawalRateStore.crossRates),(e={},e[s]=(n=t===null||t===void 0?void 0:t.rate)!==null&&n!==void 0?n:null,e))})).finally((function(){inFlightRateKeys.delete(s)}))};
313
313
  /**
314
314
  * Returns the cap converted into the presentment currency, or null when it can't
315
315
  * be determined yet (rate still loading or unavailable).
@@ -317,14 +317,14 @@ var inFlightRateKeys=new Set;var euWithdrawalCrossRateKey=function(o,t){return""
317
317
  * - When the cap currency is the merchant's native/base currency, reuse the
318
318
  * checkout session's base→presentment rate (no extra request).
319
319
  * - Otherwise fetch the current cap-currency→presentment rate on demand.
320
- */var getPresentmentAmount=function(o,t,e,s){var n,r;var i=(n=cartStore.exchangeRate)===null||n===void 0?void 0:n.sourceCurrencyCode;var a=(r=cartStore.exchangeRate)===null||r===void 0?void 0:r.rate;if(t===i&&a){return o*a}var l=euWithdrawalRateStore.crossRates[euWithdrawalCrossRateKey(t,e)];if(l===undefined){ensureEuWithdrawalCrossRate(t,e,s);return null}return l===null?null:o*l};var formatInCurrency=function(o,t){return"".concat(numberFormat({amount:o,currency:t,targetFormat:null})," ").concat(t)};
320
+ */var getPresentmentAmount=function(o,e,t,s){var n,r;var i=(n=cartStore.exchangeRate)===null||n===void 0?void 0:n.sourceCurrencyCode;var a=(r=cartStore.exchangeRate)===null||r===void 0?void 0:r.rate;if(e===i&&a){return o*a}var l=euWithdrawalRateStore.crossRates[euWithdrawalCrossRateKey(e,t)];if(l===undefined){ensureEuWithdrawalCrossRate(e,t,s);return null}return l===null?null:o*l};var formatInCurrency=function(o,e){return"".concat(numberFormat({amount:o,currency:e,targetFormat:null})," ").concat(e)};
321
321
  /**
322
322
  * Formats the cap for the buyer, e.g. "100 USD (~125 CAD)" — the merchant's
323
323
  * configured amount/currency, plus the estimated amount the buyer will actually
324
324
  * pay in their presentment currency. When the cap is already in the presentment
325
325
  * currency, or the presentment estimate isn't available yet, only the configured
326
326
  * amount is shown.
327
- */var formatMaximum=function(o,t,e){var s=formatInCurrency(o,t);var n=cartStore.currency;if(t===n){return s}var r=getPresentmentAmount(o,t,n,e);if(r==null){return s}return"".concat(s," (~").concat(formatInCurrency(r,n),")")};
327
+ */var formatMaximum=function(o,e,t){var s=formatInCurrency(o,e);var n=cartStore.currency;if(e===n){return s}var r=getPresentmentAmount(o,e,n,t);if(r==null){return s}return"".concat(s," (~").concat(formatInCurrency(r,n),")")};
328
328
  /**
329
329
  * Returns the localized EU withdrawal notice text to render above the Pay button,
330
330
  * or null when it shouldn't be shown. The notice appears only when the merchant
@@ -332,10 +332,10 @@ var inFlightRateKeys=new Set;var euWithdrawalCrossRateKey=function(o,t){return""
332
332
  * the API as affected by the regulation (`genericSettings.withdrawalCountryEnabled`).
333
333
  * When a maximum return-shipping cap is configured the copy includes the amount;
334
334
  * otherwise it uses the no-maximum variant.
335
- */var getEuWithdrawalNoticeText=function(o){var t,e;var s=(t=zonosStore.checkoutSettings.merchantPolicyLinks)===null||t===void 0?void 0:t.euWithdrawalPolicy;if(!s||s.status!=="ENABLED"){return null}
335
+ */var getEuWithdrawalNoticeText=function(o){var e,t;var s=(e=zonosStore.checkoutSettings.merchantPolicyLinks)===null||e===void 0?void 0:e.euWithdrawalPolicy;if(!s||s.status!=="ENABLED"){return null}
336
336
  // The affected-country list is API-controlled (not hardcoded), so an absent or
337
337
  // empty list shows the notice for no country.
338
- var n=(e=zonosStore.genericSettings)===null||e===void 0?void 0:e.withdrawalCountryEnabled;if(!o||!(n===null||n===void 0?void 0:n.some((function(t){return t===o})))){return null}var r=s.maximumReturnShippingEstimate;if(r==null){return translate("If you later choose to exercise your right to withdrawal, you will be responsible for any associated return shipping costs.")}return translate("If you later choose to exercise your right to withdrawal, you will be responsible for any associated return shipping costs, up to a maximum [amount].",{amount:formatMaximum(r,s.currencyCode,o)})};var CheckmarkLineIcon='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var RemoveLineIcon='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var zonosCheckoutPaymentCss=function(){return".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-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-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-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-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-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-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}.mobile.mobile.sc-zonos-checkout-payment-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};var ZonosCheckoutPayment=/** @class */function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.paypalSessionFailed=createEvent(this,"paypalSessionFailed",7);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);
338
+ var n=(t=zonosStore.genericSettings)===null||t===void 0?void 0:t.withdrawalCountryEnabled;if(!o||!(n===null||n===void 0?void 0:n.some((function(e){return e===o})))){return null}var r=s.maximumReturnShippingEstimate;if(r==null){return translate("If you later choose to exercise your right to withdrawal, you will be responsible for any associated return shipping costs.")}return translate("If you later choose to exercise your right to withdrawal, you will be responsible for any associated return shipping costs, up to a maximum [amount].",{amount:formatMaximum(r,s.currencyCode,o)})};var CheckmarkLineIcon='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var RemoveLineIcon='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var zonosCheckoutPaymentCss=function(){return".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-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-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-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-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-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-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}.mobile.mobile.sc-zonos-checkout-payment-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};var ZonosCheckoutPayment=/** @class */function(){function o(o){var e=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.paypalSessionFailed=createEvent(this,"paypalSessionFailed",7);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);
339
339
  /**
340
340
  * Whether or not the continue button is loading
341
341
  */this.continueLoading=false;
@@ -357,11 +357,11 @@ var n=(e=zonosStore.genericSettings)===null||e===void 0?void 0:e.withdrawalCount
357
357
  */this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=stripeStore.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};
358
358
  /**
359
359
  * handler for continue button click
360
- */this.continueClickHandler=function(o){return __awaiter(t,[o],void 0,(function(o){var t,e;var s=this;var n=o.currencyCode;return __generator(this,(function(o){switch(o.label){case 0:
360
+ */this.continueClickHandler=function(o){return __awaiter(e,[o],void 0,(function(o){var e,t;var s=this;var n=o.currencyCode;return __generator(this,(function(o){switch(o.label){case 0:
361
361
  // Skip Stripe payment validation when store credit covers the full order
362
362
  if(!storeCreditStoreCoversFullAmount()&&!this.handleValidate()){this.showErrorBanner=true;
363
363
  // Attempt to submit the form so the missing input error will be shown in Stripe
364
- void((t=stripeStore.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var o;(o=s.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2/*return*/]}
364
+ void((e=stripeStore.stripeElements)===null||e===void 0?void 0:e.submit());setTimeout((function(){var o;(o=s.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2/*return*/]}
365
365
  // Block submit when the merchant requires policy consent and the buyer hasn't accepted.
366
366
  if(isPolicyConsentRequired()&&!policyConsentStore.accepted){policyConsentStore.showError=true;setTimeout((function(){var o;(o=s.ele.querySelector("zonos-policy-consent"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2/*return*/]}
367
367
  // Lock consent state for the rest of the flow so the buyer can't uncheck
@@ -384,41 +384,41 @@ return[4/*yield*/,stripeStoreRecordPolicyConsent()];case 1:
384
384
  // client-side via the checkbox state and `acceptedAt` timestamp.
385
385
  o.sent();stripeStore.checkoutSettlementCurrency=n;
386
386
  // submit google tag when the form is complete
387
- submitAnalytics({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:storageStore.checkoutSessionId,paymentMethod:(e=stripeStore.stripePaymentEventData)===null||e===void 0?void 0:e.value.type}});this.continueClicked.emit();return[2/*return*/]}}))}))};this.copyCardToClipboard=function(o){return __awaiter(t,void 0,void 0,(function(){var t,e;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);return[4/*yield*/,navigator.clipboard.writeText(o)];case 1:s.sent();return[3/*break*/,3];case 2:t=s.sent();e=document.createElement("textarea");e.style.position="fixed";e.style.left="-1000px";e.style.top="-1000px";e.style.width="1px";e.style.height="1px";e.value=o;e.id="zonos-copy-card-number";document.body.appendChild(e);e.select();
387
+ submitAnalytics({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:storageStore.checkoutSessionId,paymentMethod:(t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.value.type}});this.continueClicked.emit();return[2/*return*/]}}))}))};this.copyCardToClipboard=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);return[4/*yield*/,navigator.clipboard.writeText(o)];case 1:s.sent();return[3/*break*/,3];case 2:e=s.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();
388
388
  // Have to use deprecated method execCommand because it's the only way to copy to the clipboard in the iframe
389
389
  // eslint-disable-next-line @typescript-eslint/no-deprecated
390
- document.execCommand("copy");document.body.removeChild(e);return[3/*break*/,3];case 3:window.Zonos.showNotification({message:translate("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2/*return*/]}}))}))};this.placeTestOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,t;var e=this;return __generator(this,(function(s){switch(s.label){case 0:
390
+ document.execCommand("copy");document.body.removeChild(t);return[3/*break*/,3];case 3:window.Zonos.showNotification({message:translate("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2/*return*/]}}))}))};this.placeTestOrder=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t=this;return __generator(this,(function(s){switch(s.label){case 0:
391
391
  // Staging "Place test order" still represents the buyer placing an order,
392
392
  // so apply the same consent gate the real Pay button uses. Consistency
393
393
  // matters here: merchants testing the flow should see the same blockers
394
394
  // a real buyer would hit.
395
- if(isPolicyConsentRequired()&&!policyConsentStore.accepted){policyConsentStore.showError=true;setTimeout((function(){var o;(o=e.ele.querySelector("zonos-policy-consent"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2/*return*/]}o=isPolicyConsentRequired();if(o){policyConsentStore.locked=true}s.label=1;case 1:s.trys.push([1,,4,5]);this.internalContinueLoading=true;
395
+ if(isPolicyConsentRequired()&&!policyConsentStore.accepted){policyConsentStore.showError=true;setTimeout((function(){var o;(o=t.ele.querySelector("zonos-policy-consent"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2/*return*/]}o=isPolicyConsentRequired();if(o){policyConsentStore.locked=true}s.label=1;case 1:s.trys.push([1,,4,5]);this.internalContinueLoading=true;
396
396
  // Don't block the test order on a consent-record failure — failure is logged
397
397
  // inside the helper and surfaced in Vercel logs for observability.
398
398
  return[4/*yield*/,stripeStoreRecordPolicyConsent()];case 2:
399
399
  // Don't block the test order on a consent-record failure — failure is logged
400
400
  // inside the helper and surfaced in Vercel logs for observability.
401
- s.sent();return[4/*yield*/,placeTestOrder()];case 3:t=s.sent().errors;if(t.length){this.stagingOrderCreateErrorMessage=t[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2/*return*/]}this.internalContinueLoading=false;
401
+ s.sent();return[4/*yield*/,placeTestOrder()];case 3:e=s.sent().errors;if(e.length){this.stagingOrderCreateErrorMessage=e[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2/*return*/]}this.internalContinueLoading=false;
402
402
  // continue to the next step
403
403
  cartStoreNextStep();return[3/*break*/,5];case 4:
404
404
  // Release the consent lock on every terminal exit so a failed test order
405
405
  // doesn't leave the checkbox stuck disabled in the merchant's staging UI.
406
- if(o){policyConsentStore.locked=false}return[7/*endfinally*/];case 5:return[2/*return*/]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var t;
406
+ if(o){policyConsentStore.locked=false}return[7/*endfinally*/];case 5:return[2/*return*/]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;
407
407
  // scroll to the top of the page when the payment error is shown
408
- (t=o.ele.querySelector("zonos-banner"))===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.render=function(){var o=this;var t;this.hasStripePaymentError=stripeStore.hasPaymentError;if(!stripeStore.stripeElements){return null}
408
+ (e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=stripeStore.hasPaymentError;if(!stripeStore.stripeElements){return null}
409
409
  // start validate on typing after error banner is shown, and hide it if the form is complete
410
- if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var e=getIsTestMode();var s=cartStore.isStagingMode||getIsStagingMode();var n=((t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.value.type)==="external_paypal";var r=storeCreditStoreCoversFullAmount();var i=function(){var t;if(s){var i=zonosStore.appearance.colorPrimary;var a=i&&isDarkColor(i)?"DARK":"LIGHT";
410
+ if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=getIsTestMode();var s=cartStore.isStagingMode||getIsStagingMode();var n=((e=stripeStore.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var r=storeCreditStoreCoversFullAmount();var i=function(){var e;if(s){var i=zonosStore.appearance.colorPrimary;var a=i&&isDarkColor(i)?"DARK":"LIGHT";
411
411
  // If in mobile, use the theme from the store since the UI is solely by theme
412
412
  var l=o.isMobile?zonosStore.appearance.theme:a;return h(Fragment,null,o.stagingOrderCreateErrorMessage&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),h("zonos-empty-state-payment",{emptyStateText:translate("No payment method needed for staging"),theme:l}),h("zonos-policy-consent",null),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",
413
413
  // use primary type when on mobile mode
414
- variant:o.submitBtnType},translate("Place test order"))))}var c=getEuWithdrawalNoticeText((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country);return h(Fragment,null,o.showErrorBanner&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},stripeStore.customErrorMessage||translate("We couldn't complete your payment. Please verify the payment details and try again.")),paypalStore.paypalErrorMessage&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},paypalStore.paypalErrorMessage),cartStore.customerAuthenticationToken&&storeCreditStore.availableBalance!=null&&storeCreditStore.availableBalance>0&&h("zonos-store-credit",null),r?h("zonos-banner",{intent:"info"},translate("Store credit covers your full order")):h("zonos-payment",null),h("zonos-policy-consent",null),c&&h("zonos-banner",{class:"zonos--eu-withdrawal-notice",intent:"info"},c),h("div",{class:"zonos--group-btn"},(!n||r)&&h(Fragment,null,h("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!cartStore.checkoutSession){log("Checkout session is not found");return[2/*return*/]}return[4/*yield*/,this.continueClickHandler({currencyCode:cartStore.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2/*return*/]}}))}))},size:"lg",
414
+ variant:o.submitBtnType},translate("Place test order"))))}var c=getEuWithdrawalNoticeText((e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country);return h(Fragment,null,o.showErrorBanner&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},stripeStore.customErrorMessage||translate("We couldn't complete your payment. Please verify the payment details and try again.")),paypalStore.paypalErrorMessage&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},paypalStore.paypalErrorMessage),cartStore.customerAuthenticationToken&&storeCreditStore.availableBalance!=null&&storeCreditStore.availableBalance>0&&h("zonos-store-credit",null),r?h("zonos-banner",{intent:"info"},translate("Store credit covers your full order")):h("zonos-payment",null),h("zonos-policy-consent",null),c&&h("zonos-banner",{class:"zonos--eu-withdrawal-notice",intent:"info"},c),h("div",{class:"zonos--group-btn"},(!n||r)&&h(Fragment,null,h("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!cartStore.checkoutSession){log("Checkout session is not found");return[2/*return*/]}return[4/*yield*/,this.continueClickHandler({currencyCode:cartStore.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2/*return*/]}}))}))},size:"lg",
415
415
  // use primary type when on mobile mode
416
- variant:o.submitBtnType},r?translate("Place order"):translate("Pay [orderTotal]",{orderTotal:renderCheckoutCurrency({amount:cartStore.total,isForeign:true})})),!r&&stripeStore.shouldRenderPayInUsdButton&&h("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4/*yield*/,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2/*return*/]}}))}))},size:"lg",variant:"subtle"},translate("Click to pay in USD"))),!r&&h("zonos-paypal-payment",{onPaypalSessionDone:function(t){var e=t.detail.orderId;o.paypalSessionDone.emit(e)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:n?"block":"none"}})),e&&h("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},h("zonos-v-stack",{spacing:16},h("div",null,h("zonos-text",{type:"semiBoldLabel"},translate("Test cards")),h("zonos-text",{textColor:"gray-700"},translate("Click to copy the card number. Use any future expiration date and three number CVC."))),h("zonos-button",{icon:h("zonos-icon",{content:CheckmarkLineIcon}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},translate("Success")," (****4242)"),h("zonos-button",{icon:h("zonos-icon",{content:RemoveLineIcon}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},translate("Failure")," (****0002)")),h("zonos-notification",null)))};return h(Host,{class:classes(["zonos--checkout-payment zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Payment method")),i()))};Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:[{continueLoadingWatcher:0}],hasStripePaymentError:[{stripePaymentErrorWatcher:0}]}},enumerable:false,configurable:true});return o}();ZonosCheckoutPayment.style=zonosCheckoutPaymentCss();
416
+ variant:o.submitBtnType},r?translate("Place order"):translate("Pay [orderTotal]",{orderTotal:renderCheckoutCurrency({amount:cartStore.total,isForeign:true})})),!r&&stripeStore.shouldRenderPayInUsdButton&&h("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4/*yield*/,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2/*return*/]}}))}))},size:"lg",variant:"subtle"},translate("Click to pay in USD"))),!r&&h("zonos-paypal-payment",{onPaypalSessionDone:function(e){var t=e.detail.orderId;o.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:n?"block":"none"}})),t&&h("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},h("zonos-v-stack",{spacing:16},h("div",null,h("zonos-text",{type:"semiBoldLabel"},translate("Test cards")),h("zonos-text",{textColor:"gray-700"},translate("Click to copy the card number. Use any future expiration date and three number CVC."))),h("zonos-button",{icon:h("zonos-icon",{content:CheckmarkLineIcon}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},translate("Success")," (****4242)"),h("zonos-button",{icon:h("zonos-icon",{content:RemoveLineIcon}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},translate("Failure")," (****0002)")),h("zonos-notification",null)))};return h(Host,{class:classes(["zonos--checkout-payment zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Payment method")),i()))};Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:[{continueLoadingWatcher:0}],hasStripePaymentError:[{stripePaymentErrorWatcher:0}]}},enumerable:false,configurable:true});return o}();ZonosCheckoutPayment.style=zonosCheckoutPaymentCss();
417
417
  /**
418
418
  * Reset any done tabs after selected tab to undone. This is to force user to go through all tabs again
419
- */var resetToSelectedTab=function(o){var t=o.selectedTab,e=o.tabList;var s=e[t].index;
419
+ */var resetToSelectedTab=function(o){var e=o.selectedTab,t=o.tabList;var s=t[e].index;
420
420
  // Any tab after the selected tab should be reset
421
- var n=Object.values(e).slice(s-1,Object.keys(e).length).map((function(o){return o.value}));var r=Object.assign({},e);Object.values(r).forEach((function(o){if(n.includes(o.value)){o.isDone=false}}));return r};var TabCheckmark='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>\n</svg>\n';var zonosCheckoutProgressTabsCss=function(){return":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{margin-bottom:32px}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--zonos--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--zonos--color);height:100%;width:var(--zonos--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}"};var ZonosCheckoutProgressTabs=/** @class */function(){function o(o){registerInstance(this,o);
421
+ var n=Object.values(t).slice(s-1,Object.keys(t).length).map((function(o){return o.value}));var r=Object.assign({},t);Object.values(r).forEach((function(o){if(n.includes(o.value)){o.isDone=false}}));return r};var TabCheckmark='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>\n</svg>\n';var zonosCheckoutProgressTabsCss=function(){return":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{margin-bottom:32px}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--zonos--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--zonos--color);height:100%;width:var(--zonos--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}"};var ZonosCheckoutProgressTabs=/** @class */function(){function o(o){registerInstance(this,o);
422
422
  /**
423
423
  * Color of the tab progress bar and label, override the secondary color of the appearance settings
424
424
  */this.tabColor=null;
@@ -429,21 +429,21 @@ var n=Object.values(e).slice(s-1,Object.keys(e).length).map((function(o){return
429
429
  * The total number of steps that's done
430
430
  */this.getTotalSuccessStep=function(){
431
431
  // include the finish step
432
- var o=4;var t=Object.values(cartStore.tabItems).filter((function(o){return o.isDone})).length+1;return"".concat(t/o*100,"%")};this.isTabClickable=function(o){var t=cartStore.tabItems[o];if(!t){return false}
432
+ var o=4;var e=Object.values(cartStore.tabItems).filter((function(o){return o.isDone})).length+1;return"".concat(e/o*100,"%")};this.isTabClickable=function(o){var e=cartStore.tabItems[o];if(!e){return false}
433
433
  // clickable if the tab state is done
434
- if(t.isDone){return true}
434
+ if(e.isDone){return true}
435
435
  // if any of the previous tabs are not done, the tab is not clickable
436
- return Object.values(cartStore.tabItems).slice(0,t.index-1).every((function(o){return o.isDone}))}}
436
+ return Object.values(cartStore.tabItems).slice(0,e.index-1).every((function(o){return o.isDone}))}}
437
437
  /**
438
438
  * Set the tab items data. This is to be used in storybook
439
- */o.prototype.setTabItems=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){cartStore.tabItems=o;return[2/*return*/]}))}))};
439
+ */o.prototype.setTabItems=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){cartStore.tabItems=o;return[2/*return*/]}))}))};
440
440
  /**
441
441
  * Set selected tab. Only set the tab if it's clickable
442
- */o.prototype.setTabSelected=function(o){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){if(this.isTabClickable(o)){cartStore.step=o;t=resetToSelectedTab({selectedTab:o,tabList:cartStore.tabItems});cartStore.tabItems=t}return[2/*return*/]}))}))};o.prototype.render=function(){var o=this;var t=cartStore.step;var e=this.tabColor||zonosStore.appearance.colorSecondary;var s=this.backgroundColor||zonosStore.appearance.colorPrimary||"";
442
+ */o.prototype.setTabSelected=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){if(this.isTabClickable(o)){cartStore.step=o;e=resetToSelectedTab({selectedTab:o,tabList:cartStore.tabItems});cartStore.tabItems=e}return[2/*return*/]}))}))};o.prototype.render=function(){var o=this;var e=cartStore.step;var t=this.tabColor||zonosStore.appearance.colorSecondary;var s=this.backgroundColor||zonosStore.appearance.colorPrimary||"";
443
443
  // If the background color and the tab color are not contrat enough, increase the contrast of the label color
444
- var n=s&&e?getContrastColor({backgroundColor:isColorVariable(s)?window.getComputedStyle(this.ele).getPropertyValue("--zonos-elements-".concat(s.replace("--zonos-elements-",""))):s,color:e}):e;return h(Host,{key:"90dd30f544a4af6c2ed60b28c55c887dfd91151c",class:"zonos--elements",style:{"--zonos--color":n,"--zonos--progress-percent":this.getTotalSuccessStep()}},h("div",{key:"6fbdfc5306c7f266e7ad80f0daefdfe2c747df54",class:"zonos--tab-wrapper"},Object.values(cartStore.tabItems).map((function(e,s){var r=e.value===t;return h("button",{"aria-label":"Tab ".concat(e.label),class:classes(["zonos--tab-item",e.value===t&&"selected",e.isDone&&"done"]),disabled:!o.isTabClickable(e.value),key:e.value,onClick:function(){return o.setTabSelected(e.value)}},h("div",{class:"zonos--tab-index"},h("zonos-text",{class:"zonos--tab-index-label",textColor:r?n:"gray-1000",type:"label"},s+1),h("zonos-icon",{class:"zonos--tab-index-done-icon",content:TabCheckmark,iconColor:r?n:"gray-1000"})),h("zonos-text",{textColor:r?n:"gray-1000",type:"label"},translate(e.label)))}))),h("div",{key:"d797a4c506f42893919ecb30d2ee6a6f64b85ad4",class:"zonos--tab-progress"},h("div",{key:"4c2a229a89f8e3bad1b8385a4311d5796981c834",class:"zonos--progress-bar-fill"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosCheckoutProgressTabs.style=zonosCheckoutProgressTabsCss();var ZonosCurrencyToggle=/** @class */function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.handleToggleChanged=function(o){return __awaiter(this,void 0,void 0,(function(){var t,e;return __generator(this,(function(s){e=(t=cartStore.exchangeRate)===null||t===void 0?void 0:t.targetCurrencyCode;cartStore.displayBaseCurrency=e!==o;return[2/*return*/]}))}))};o.prototype.render=function(){var o=this;var t=cartStore.exchangeRate;var e=t&&t.sourceCurrencyCode!==t.targetCurrencyCode?[{label:t.sourceCurrencyCode,value:t.sourceCurrencyCode},{label:t.targetCurrencyCode,value:t.targetCurrencyCode}]:[];
444
+ var n=s&&t?getContrastColor({backgroundColor:isColorVariable(s)?window.getComputedStyle(this.ele).getPropertyValue("--zonos-elements-".concat(s.replace("--zonos-elements-",""))):s,color:t}):t;return h(Host,{key:"90dd30f544a4af6c2ed60b28c55c887dfd91151c",class:"zonos--elements",style:{"--zonos--color":n,"--zonos--progress-percent":this.getTotalSuccessStep()}},h("div",{key:"6fbdfc5306c7f266e7ad80f0daefdfe2c747df54",class:"zonos--tab-wrapper"},Object.values(cartStore.tabItems).map((function(t,s){var r=t.value===e;return h("button",{"aria-label":"Tab ".concat(t.label),class:classes(["zonos--tab-item",t.value===e&&"selected",t.isDone&&"done"]),disabled:!o.isTabClickable(t.value),key:t.value,onClick:function(){return o.setTabSelected(t.value)}},h("div",{class:"zonos--tab-index"},h("zonos-text",{class:"zonos--tab-index-label",textColor:r?n:"gray-1000",type:"label"},s+1),h("zonos-icon",{class:"zonos--tab-index-done-icon",content:TabCheckmark,iconColor:r?n:"gray-1000"})),h("zonos-text",{textColor:r?n:"gray-1000",type:"label"},translate(t.label)))}))),h("div",{key:"d797a4c506f42893919ecb30d2ee6a6f64b85ad4",class:"zonos--tab-progress"},h("div",{key:"4c2a229a89f8e3bad1b8385a4311d5796981c834",class:"zonos--progress-bar-fill"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosCheckoutProgressTabs.style=zonosCheckoutProgressTabsCss();var ZonosCurrencyToggle=/** @class */function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.handleToggleChanged=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(s){t=(e=cartStore.exchangeRate)===null||e===void 0?void 0:e.targetCurrencyCode;cartStore.displayBaseCurrency=t!==o;return[2/*return*/]}))}))};o.prototype.render=function(){var o=this;var e=cartStore.exchangeRate;var t=e&&e.sourceCurrencyCode!==e.targetCurrencyCode?[{label:e.sourceCurrencyCode,value:e.sourceCurrencyCode},{label:e.targetCurrencyCode,value:e.targetCurrencyCode}]:[];
445
445
  // If there is only one currency, don't show the toggle
446
- if(!e.length){return null}return h(Host,{class:"zonos--currency-toggle zonos--elements"},h("zonos-toggle",{onToggleChanged:function(t){return o.handleToggleChanged(t.detail)},options:e,value:cartStore.displayBaseCurrency?e[0].value:e[1].value}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();
446
+ if(!t.length){return null}return h(Host,{class:"zonos--currency-toggle zonos--elements"},h("zonos-toggle",{onToggleChanged:function(e){return o.handleToggleChanged(e.detail)},options:t,value:cartStore.displayBaseCurrency?t[0].value:t[1].value}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();
447
447
  /**
448
448
  * Merge the fields captured in the completion dialog back into a Stripe shipping address event,
449
449
  * rebuilding the full name from the extracted first name and the provided/known last name and
@@ -451,38 +451,38 @@ if(!e.length){return null}return h(Host,{class:"zonos--currency-toggle zonos--el
451
451
  *
452
452
  * Pure: returns a new event object rather than mutating the input, so it can be unit-tested and
453
453
  * assigned straight to the store.
454
- */var applyAddressCompletion=function(o){var t=o.data,e=o.event;var s,n,r,i;
454
+ */var applyAddressCompletion=function(o){var e=o.data,t=o.event;var s,n,r,i;
455
455
  // Use the same name extraction as the detection step so the two stay in agreement even when
456
456
  // the surname is only available via the combined `name` field.
457
- var a=extractName({firstName:e.value.firstName,lastName:e.value.lastName,name:e.value.name}),l=a.firstName,c=a.lastName;var u=(s=t.firstName)!==null&&s!==void 0?s:l;var d=(n=t.lastName)!==null&&n!==void 0?n:c;return Object.assign(Object.assign({},e),{complete:true,value:Object.assign(Object.assign({},e.value),{address:Object.assign(Object.assign({},e.value.address),{postal_code:(r=t.postal_code)!==null&&r!==void 0?r:e.value.address.postal_code,state:(i=t.state)!==null&&i!==void 0?i:e.value.address.state}),firstName:u,lastName:d,name:"".concat(u," ").concat(d).trim()})})};var shortAddressCodeValidationResult=function(o){var t=o.shippingCountry,e=o.shortAddressCode;
457
+ var a=extractName({firstName:t.value.firstName,lastName:t.value.lastName,name:t.value.name}),l=a.firstName,c=a.lastName;var u=(s=e.firstName)!==null&&s!==void 0?s:l;var d=(n=e.lastName)!==null&&n!==void 0?n:c;return Object.assign(Object.assign({},t),{complete:true,value:Object.assign(Object.assign({},t.value),{address:Object.assign(Object.assign({},t.value.address),{postal_code:(r=e.postal_code)!==null&&r!==void 0?r:t.value.address.postal_code,state:(i=e.state)!==null&&i!==void 0?i:t.value.address.state}),firstName:u,lastName:d,name:"".concat(u," ").concat(d).trim()})})};var shortAddressCodeValidationResult=function(o){var e=o.shippingCountry,t=o.shortAddressCode;
458
458
  // Check to see if we are required to collect short address code for the shipping country or not
459
- var s=shouldRenderShortAddressCodeInput({countryCode:t});
459
+ var s=shouldRenderShortAddressCodeInput({countryCode:e});
460
460
  // If the short address code input is not even rendered, no need to validate anything and allow to proceed. Validate when short address code input is not even rendered would prevent the user from checking out
461
461
  if(!s){return{error:null,valid:true}}
462
462
  /**
463
463
  * If the short address code input is rendered, the input should be filled
464
- */if(!e){return{error:"Short address code is required.",valid:false}}if(t==="SA"){var n=/^[A-Za-z]{4}\s*[0-9]{4}$/.test(e);if(!n){return{error:"Invalid short address code format. Must be 4 letters and 4 numbers.",valid:false}}}
464
+ */if(!t){return{error:"Short address code is required.",valid:false}}if(e==="SA"){var n=/^[A-Za-z]{4}\s*[0-9]{4}$/.test(t);if(!n){return{error:"Invalid short address code format. Must be 4 letters and 4 numbers.",valid:false}}}
465
465
  // Other countries doesn't need to validate short address code in the right format
466
- return{error:null,valid:true}};var isTaxIdRequired=function(o){var t=__spreadArray(["MX","AR"],euCountryCodes,true);return t.includes(o)};var invalid=function(o,t){return{error:o,field:t,valid:false}};var valid=function(){return{error:null,field:null,valid:true}};var taxIdValidationResult=function(o){var t=o.companyName,e=o.shippingCountry,s=o.shouldRequirePeruTaxId,n=o.taxId,r=o.taxIdType;var i=resolveTaxIdSelection({companyName:t,countryCode:e,shouldRequirePeruTaxId:s,taxIdType:r}),a=i.rendered,l=i.selectedType,c=i.typeOptions;
466
+ return{error:null,valid:true}};var isTaxIdRequired=function(o){var e=__spreadArray(["MX","AR"],euCountryCodes,true);return e.includes(o)};var invalid=function(o,e){return{error:o,field:e,valid:false}};var valid=function(){return{error:null,field:null,valid:true}};var taxIdValidationResult=function(o){var e=o.companyName,t=o.shippingCountry,s=o.shouldRequirePeruTaxId,n=o.taxId,r=o.taxIdType;var i=resolveTaxIdSelection({companyName:e,countryCode:t,shouldRequirePeruTaxId:s,taxIdType:r}),a=i.rendered,l=i.selectedType,c=i.typeOptions;
467
467
  // If the tax id input is not even rendered, no need to validate anything and allow to proceed. Validate when tax id input is not even rendered would prevent the user from checking out
468
468
  if(!a){return valid()}
469
469
  // The number field is hidden until a type is chosen.
470
470
  if(c&&!l){return invalid("Tax id type is required","type")}
471
471
  // Spaces and hyphens count as blank only. The original text is left unchanged.
472
- if(isPeruTaxIdActive({countryCode:e,shouldRequirePeruTaxId:s})&&l&&isPeruTaxIdType(l.value)){if(!stripTaxIdSeparators(n)){return invalid("Tax id is required","value")}if(peruTaxIdTypeFromValue(n)!==l.value){return invalid(peruTaxIdFormatError[l.value],"value")}return valid()}
472
+ if(isPeruTaxIdActive({countryCode:t,shouldRequirePeruTaxId:s})&&l&&isPeruTaxIdType(l.value)){if(!stripTaxIdSeparators(n)){return invalid("Tax id is required","value")}if(peruTaxIdTypeFromValue(n)!==l.value){return invalid(peruTaxIdFormatError[l.value],"value")}return valid()}
473
473
  // Cache the result of isTaxIdRequired for reuse
474
- var u=isTaxIdRequired(e);if(!u){
474
+ var u=isTaxIdRequired(t);if(!u){
475
475
  // If the shipping country does not require a tax id, the validation immediately returns valid
476
476
  return valid()}
477
477
  // For all EU countries, tax id is not required if company name is not filled (not business address)
478
- if(euCountryCodes.includes(e)){if(!t.trim()){return valid()}if(!n){return invalid("Tax id is required","value")}return valid()}if(!n){return invalid("Tax id is required","value")}if(e==="AR"){var d=/^[0-9]{2}-?[0-9]{8}-?[0-9]$/.test(n);if(!d){return invalid("Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).","value")}return valid()}
478
+ if(euCountryCodes.includes(t)){if(!e.trim()){return valid()}if(!n){return invalid("Tax id is required","value")}return valid()}if(!n){return invalid("Tax id is required","value")}if(t==="AR"){var d=/^[0-9]{2}-?[0-9]{8}-?[0-9]$/.test(n);if(!d){return invalid("Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).","value")}return valid()}
479
479
  // validate tax id for mexico against the type the shopper selected
480
- if(e==="MX"&&l){var h=l.value==="RFC";var p=h?rfcRegex.test(n):curpRegex.test(n);if(!p){return invalid(h?"Invalid RFC format. Must be 12–13 uppercase letters and numbers.":"Invalid CURP format. Must be 18 uppercase letters and numbers.","value")}return valid()}
480
+ if(t==="MX"&&l){var h=l.value==="RFC";var p=h?rfcRegex.test(n):curpRegex.test(n);if(!p){return invalid(h?"Invalid RFC format. Must be 12–13 uppercase letters and numbers.":"Invalid CURP format. Must be 18 uppercase letters and numbers.","value")}return valid()}
481
481
  // Other countries doesn't need to validate tax id in the right format
482
482
  return valid()};var zonosCustomerInfoCss=function(){return".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}.mobile.mobile.sc-zonos-customer-info-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};
483
483
  /**
484
484
  * Max address field length
485
- */var MAX_CHARACTER_LENGTH_PER_FIELD=35;var ZonosCustomerInfo=/** @class */function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.testContinueClicked=createEvent(this,"testContinueClicked",7);this.storeUnsubscribeList=[];
485
+ */var MAX_CHARACTER_LENGTH_PER_FIELD=35;var ZonosCustomerInfo=/** @class */function(){function o(o){var e=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.testContinueClicked=createEvent(this,"testContinueClicked",7);this.storeUnsubscribeList=[];
486
486
  /**
487
487
  * Whether or not the continue button is loading
488
488
  */this.continueLoading=false;
@@ -534,7 +534,7 @@ return valid()};var zonosCustomerInfoCss=function(){return".sc-zonos-customer-in
534
534
  */this.recordedFormTypeUsed=false;this.selectedCountryCode=localizationStore.selectedCountryCode;this.genericSettings=zonosStore.genericSettings;this.addressFormRenderType=cartStore.addressFormRenderType;this.exceededCharacterLimitErrorFieldList=[];
535
535
  /**
536
536
  * Handler for invalid characters in the address
537
- */this.handleInvalidCharacters=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:
537
+ */this.handleInvalidCharacters=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:
538
538
  // Do nothing if the allowed character sets is ALL
539
539
  if(zonosStore.checkoutSettings.allowedCharacterSets==="ALL"){return[2/*return*/,{hasInvalidCharacters:false}]}
540
540
  // Check if the address contains Non-Latin characters
@@ -542,78 +542,78 @@ this.invalidShippingCharacterList=stripeStore.stripeAddressEventData?this.checkI
542
542
  // if the shipping is the same as billing, we don't need to check the billing address
543
543
  this.invalidBillingCharacterList=!stripeStore.stripeShippingSameAsBilling?this.checkInvalidCharacters(stripeStore.stripeBillingAddressEventData):null;o=!!this.invalidShippingCharacterList||!!this.invalidBillingCharacterList;if(!o)return[3/*break*/,2];
544
544
  // open the dialog
545
- this.openAddressValidationDialog=true;this.isValidatingAddress=true;return[4/*yield*/,stripeStoreTranslateAddressToLatin({addressInvalidCharactersList:this.invalidShippingCharacterList,billingAddressInvalidCharactersList:this.invalidBillingCharacterList})];case 1:t.sent();this.isValidatingAddress=false;t.label=2;case 2:return[2/*return*/,{hasInvalidCharacters:o}]}}))}))};this.transformTranslatedAddressToStripeEvent=function(o){var t=o.submitData,e=o.type;var s=e==="shippingAddress"?stripeStore.stripeAddressEventData:stripeStore.stripeBillingAddressEventData;var n=t[e];
545
+ this.openAddressValidationDialog=true;this.isValidatingAddress=true;return[4/*yield*/,stripeStoreTranslateAddressToLatin({addressInvalidCharactersList:this.invalidShippingCharacterList,billingAddressInvalidCharactersList:this.invalidBillingCharacterList})];case 1:e.sent();this.isValidatingAddress=false;e.label=2;case 2:return[2/*return*/,{hasInvalidCharacters:o}]}}))}))};this.transformTranslatedAddressToStripeEvent=function(o){var e=o.submitData,t=o.type;var s=t==="shippingAddress"?stripeStore.stripeAddressEventData:stripeStore.stripeBillingAddressEventData;var n=e[t];
546
546
  // this should never happen as they can only go to this step if the address is complete
547
547
  if(!s||!n){return}var r=extractName({name:n.name}),i=r.firstName,a=r.lastName;var l=Object.assign(Object.assign({},s),{complete:true,value:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value),{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{city:n.city||(s===null||s===void 0?void 0:s.value.address.city)||"",line1:n.line1,line2:n.line2,postal_code:n.postal_code,state:n.state}),firstName:i,
548
548
  // get all the names after
549
549
  lastName:a,name:n.name})});
550
550
  // overwrite the address object with the new data
551
- if(e==="shippingAddress"){stripeStore.stripeAddressEventData=l}else{stripeStore.stripeBillingAddressEventData=l}};
551
+ if(t==="shippingAddress"){stripeStore.stripeAddressEventData=l}else{stripeStore.stripeBillingAddressEventData=l}};
552
552
  /**
553
553
  * handler for continue button click
554
- */this.continueClickHandler=function(){return __awaiter(t,void 0,void 0,(function(){var o,t;var e=this;return __generator(this,(function(s){switch(s.label){case 0:(o=this.testContinueClicked)===null||o===void 0?void 0:o.emit({billingAddress:stripeStore.stripeBillingAddressEventData,sameAsBilling:stripeStore.stripeShippingSameAsBilling,shippingAddress:stripeStore.stripeAddressEventData});if(!this.handleValidate()){
554
+ */this.continueClickHandler=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t=this;return __generator(this,(function(s){switch(s.label){case 0:(o=this.testContinueClicked)===null||o===void 0?void 0:o.emit({billingAddress:stripeStore.stripeBillingAddressEventData,sameAsBilling:stripeStore.stripeShippingSameAsBilling,shippingAddress:stripeStore.stripeAddressEventData});if(!this.handleValidate()){
555
555
  // scroll to the top zonos-banner
556
- setTimeout((function(){var o;(o=e.el.querySelector("zonos-banner.zonos--error-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center"})}),50);this.showErrorBanner=true;return[2/*return*/]}this.showErrorBanner=false;
556
+ setTimeout((function(){var o;(o=t.el.querySelector("zonos-banner.zonos--error-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center"})}),50);this.showErrorBanner=true;return[2/*return*/]}this.showErrorBanner=false;
557
557
  // Stripe reports the address complete, but Link's single name input (and, for some
558
558
  // countries, a missing state/postal code) can leave Zonos short of what it needs to ship
559
559
  // internationally. Capture only those missing fields before proceeding. Custom ('zonos')
560
560
  // address forms enforce their own required fields, so this only applies to the Stripe form.
561
- if(this.addressFormRenderType!=="zonos"){t=getMissingRequiredShippingFields({countryField:stripeStore.stripeAddressEventData?getCountryField(stripeStore.stripeAddressEventData.value.address.country):null,event:stripeStore.stripeAddressEventData});if(t.length){this.missingShippingFields=t;this.openCompletionDialog=true;return[2/*return*/]}}return[4/*yield*/,this.continueAfterValidation()];case 1:s.sent();return[2/*return*/]}}))}))};
561
+ if(this.addressFormRenderType!=="zonos"){e=getMissingRequiredShippingFields({countryField:stripeStore.stripeAddressEventData?getCountryField(stripeStore.stripeAddressEventData.value.address.country):null,event:stripeStore.stripeAddressEventData});if(e.length){this.missingShippingFields=e;this.openCompletionDialog=true;return[2/*return*/]}}return[4/*yield*/,this.continueAfterValidation()];case 1:s.sent();return[2/*return*/]}}))}))};
562
562
  /**
563
563
  * Continue past the customer step once the address is validated and complete. Runs the
564
564
  * non-Latin character check (which may open the translate dialog) before emitting.
565
- */this.continueAfterValidation=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(t){switch(t.label){case 0:return[4/*yield*/,this.handleInvalidCharacters()];case 1:o=t.sent().hasInvalidCharacters;if(o){return[2/*return*/]}this.continueClicked.emit({billingAddress:stripeStore.stripeBillingAddressEventData,sameAsBilling:stripeStore.stripeShippingSameAsBilling,shippingAddress:stripeStore.stripeAddressEventData});return[2/*return*/]}}))}))};this.completionSubmitHandler=function(o){var e=stripeStore.stripeAddressEventData;if(e){
565
+ */this.continueAfterValidation=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,this.handleInvalidCharacters()];case 1:o=e.sent().hasInvalidCharacters;if(o){return[2/*return*/]}this.continueClicked.emit({billingAddress:stripeStore.stripeBillingAddressEventData,sameAsBilling:stripeStore.stripeShippingSameAsBilling,shippingAddress:stripeStore.stripeAddressEventData});return[2/*return*/]}}))}))};this.completionSubmitHandler=function(o){var t=stripeStore.stripeAddressEventData;if(t){
566
566
  // Merge the captured fields back into the stored shipping address event.
567
- stripeStore.stripeAddressEventData=applyAddressCompletion({data:o,event:e})}t.openCompletionDialog=false;void t.continueAfterValidation().catch(logError)};
567
+ stripeStore.stripeAddressEventData=applyAddressCompletion({data:o,event:t})}e.openCompletionDialog=false;void e.continueAfterValidation().catch(logError)};
568
568
  /**
569
569
  * Validate the custom address form, turn the flag showError to false if the form is valid, or vice versa
570
- */this.validateCustomAddressForm=function(o){var t=stripeStore.stripeShippingSameAsBilling||o==="shipping";var e=t?stripeStore.customAddressErrors:stripeStore.customBillingAddressErrors;var s=e.city,n=e.firstName,r=e.lastName,i=e.line1,a=e.phone,l=e.postalCode,c=e.state;
570
+ */this.validateCustomAddressForm=function(o){var e=stripeStore.stripeShippingSameAsBilling||o==="shipping";var t=e?stripeStore.customAddressErrors:stripeStore.customBillingAddressErrors;var s=t.city,n=t.firstName,r=t.lastName,i=t.line1,a=t.phone,l=t.postalCode,c=t.state;
571
571
  // check to see if there is any form error or not.
572
572
  var u=false;if(s||n||r||i||a||l||c){u=true}
573
573
  // show error if there is any form error
574
- if(t){stripeStore.customAddressErrors=Object.assign(Object.assign({},e),{showError:u})}else{stripeStore.customBillingAddressErrors=Object.assign(Object.assign({},e),{showError:u})}return{isValid:!u}};
574
+ if(e){stripeStore.customAddressErrors=Object.assign(Object.assign({},t),{showError:u})}else{stripeStore.customBillingAddressErrors=Object.assign(Object.assign({},t),{showError:u})}return{isValid:!u}};
575
575
  /**
576
576
  * Make sure all fields in the address are within the character limit
577
- */this.validateAddressLength=function(o){var t=o.address,e=o.type;if(!t){return[]}var s=t.value.address,n=s.city,r=s.line1,i=s.postal_code,a=s.state;var l=t.value,c=l.firstName,u=l.lastName,d=l.name;var h=extractName({firstName:c,lastName:u,name:d}),p=h.firstName,f=h.lastName;var m=n.length;var v=r.length;var g=i.length;var z=a.length;var b=p.length;var y=f.length;var C=e==="shipping"?"shipping":"billing";var x=[];if(m>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"City",value:n})}if(v>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"Address line 1",value:r})}if(g>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"Zip",value:i})}if(z>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"State/Province/Region/Prefecture",value:a})}if(b>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"First name",value:p})}if(y>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"Last name",value:f})}return x};this.handleValidate=function(){var o,e;var s=stripeStore.stripeAddressEventData;var n=stripeStore.stripeBillingAddressEventData;var r=stripeStore.stripeLinkEventData;
577
+ */this.validateAddressLength=function(o){var e=o.address,t=o.type;if(!e){return[]}var s=e.value.address,n=s.city,r=s.line1,i=s.postal_code,a=s.state;var l=e.value,c=l.firstName,u=l.lastName,d=l.name;var h=extractName({firstName:c,lastName:u,name:d}),p=h.firstName,f=h.lastName;var m=n.length;var v=r.length;var g=i.length;var z=a.length;var b=p.length;var y=f.length;var C=t==="shipping"?"shipping":"billing";var x=[];if(m>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"City",value:n})}if(v>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"Address line 1",value:r})}if(g>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"Zip",value:i})}if(z>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"State/Province/Region/Prefecture",value:a})}if(b>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"First name",value:p})}if(y>MAX_CHARACTER_LENGTH_PER_FIELD){x.push({addressType:C,fieldLabel:"Last name",value:f})}return x};this.handleValidate=function(){var o,t;var s=stripeStore.stripeAddressEventData;var n=stripeStore.stripeBillingAddressEventData;var r=stripeStore.stripeLinkEventData;
578
578
  // if the shipping is different from billing, we need to make sure the billing address is valid and disable the button if it's not
579
579
  var i=stripeStore.stripeShippingSameAsBilling?!!(s===null||s===void 0?void 0:s.complete):!!(n===null||n===void 0?void 0:n.complete);var a=!!(s===null||s===void 0?void 0:s.complete);var l=!!(r===null||r===void 0?void 0:r.complete);
580
580
  // display errors on fields that are invalid
581
- void((o=stripeStore.stripeAddressElement)===null||o===void 0?void 0:o.getValue());void((e=stripeStore.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());
581
+ void((o=stripeStore.stripeAddressElement)===null||o===void 0?void 0:o.getValue());void((t=stripeStore.stripeBillingAddressElement)===null||t===void 0?void 0:t.getValue());
582
582
  // if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
583
- var c=t.addressFormRenderType==="zonos"?t.validateCustomAddressForm("billing").isValid:i;
583
+ var c=e.addressFormRenderType==="zonos"?e.validateCustomAddressForm("billing").isValid:i;
584
584
  // if the custom address form is enabled, use the custom address form validation result, otherwise use the stripe validation result
585
- var u=t.addressFormRenderType==="zonos"?t.validateCustomAddressForm("shipping").isValid:a;if(!l&&(r===null||r===void 0?void 0:r.empty)){t.isEmailError=true}log("==> isValidBilling","info",c,{address:stripeStore.stripeBillingAddressEventData,errors:stripeStore.customBillingAddressErrors});log("==> isValidShipping","info",u,{address:stripeStore.stripeAddressEventData,errors:stripeStore.customAddressErrors});log("==> isValidLink","info",l);
585
+ var u=e.addressFormRenderType==="zonos"?e.validateCustomAddressForm("shipping").isValid:a;if(!l&&(r===null||r===void 0?void 0:r.empty)){e.isEmailError=true}log("==> isValidBilling","info",c,{address:stripeStore.stripeBillingAddressEventData,errors:stripeStore.customBillingAddressErrors});log("==> isValidShipping","info",u,{address:stripeStore.stripeAddressEventData,errors:stripeStore.customAddressErrors});log("==> isValidLink","info",l);
586
586
  // validate tax id input if it's required for specific countries, optional otherwise
587
- var d=taxIdValidationResult({companyName:stripeStore.companyName,shippingCountry:t.shippingCountry,shouldRequirePeruTaxId:getShouldRequirePeruTaxId(),taxId:stripeStore.taxId,taxIdType:stripeStore.taxIdType}),h=d.error,p=d.field,f=d.valid;var m=shortAddressCodeValidationResult({shippingCountry:t.shippingCountry,shortAddressCode:stripeStore.shortAddressCode}),v=m.error,g=m.valid;t.taxIdErrorMessage=!f?translate(h):"";t.taxIdErrorField=p||"";t.shortAddressCodeErrorMessage=!g?translate(v):"";var z=t.validateAddressLength({address:stripeStore.stripeAddressEventData,type:"shipping"});var b=t.validateAddressLength({address:stripeStore.stripeBillingAddressEventData,type:"billing"});t.exceededCharacterLimitErrorFieldList=__spreadArray(__spreadArray([],z,true),b,true);if(!c||!u||!l||!f||!g||t.exceededCharacterLimitErrorFieldList.length>0){return false}return true};this.handleEmailValidation=function(){var o;if(!t.isEmailError){return}if(!((o=stripeStore.stripeLinkEventData)===null||o===void 0?void 0:o.empty)){t.isEmailError=false}};this.prepareAddressObject=function(o){var t;var e=o.value;return{city:e.address.city||"",country:e.address.country,email:((t=stripeStore.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"",line1:e.address.line1||"",line2:e.address.line2||"",name:e.name||"",phone:e.phone||"",postal_code:e.address.postal_code||"",state:e.address.state||""}};this.renderExceededCharacterLimitError=function(o){var e=t.exceededCharacterLimitErrorFieldList.filter((function(t){var e=t.addressType;return e===o}));if(!e.length){return null}return h("zonos-banner",{class:"zonos--error-banner",intent:"error",slot:"below-title"},h("ul",null,e.map((function(o){var t=o.fieldLabel,e=o.value;var s=t==="Address line 1";if(s){return h("li",{key:t},translate("[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.",{currentLength:e.length,fieldLabel:t,maxLength:MAX_CHARACTER_LENGTH_PER_FIELD}))}return h("li",{key:t},translate("[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.",{currentLength:e.length,fieldLabel:t,maxLength:MAX_CHARACTER_LENGTH_PER_FIELD}))}))))};this.renderAddressComponent=function(o){if(!t.selectedCountryCode){void sendErrorLog({endpoint:"NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT",errors:["No country selected when rendering address component"],metadata:{type:o},shouldPostReleaseErrorReporting:true})}
587
+ var d=taxIdValidationResult({companyName:stripeStore.companyName,shippingCountry:e.shippingCountry,shouldRequirePeruTaxId:getShouldRequirePeruTaxId(),taxId:stripeStore.taxId,taxIdType:stripeStore.taxIdType}),h=d.error,p=d.field,f=d.valid;var m=shortAddressCodeValidationResult({shippingCountry:e.shippingCountry,shortAddressCode:stripeStore.shortAddressCode}),v=m.error,g=m.valid;e.taxIdErrorMessage=!f?translate(h):"";e.taxIdErrorField=p||"";e.shortAddressCodeErrorMessage=!g?translate(v):"";var z=e.validateAddressLength({address:stripeStore.stripeAddressEventData,type:"shipping"});var b=e.validateAddressLength({address:stripeStore.stripeBillingAddressEventData,type:"billing"});e.exceededCharacterLimitErrorFieldList=__spreadArray(__spreadArray([],z,true),b,true);if(!c||!u||!l||!f||!g||e.exceededCharacterLimitErrorFieldList.length>0){return false}return true};this.handleEmailValidation=function(){var o;if(!e.isEmailError){return}if(!((o=stripeStore.stripeLinkEventData)===null||o===void 0?void 0:o.empty)){e.isEmailError=false}};this.prepareAddressObject=function(o){var e;var t=o.value;return{city:t.address.city||"",country:t.address.country,email:((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.value.email)||"",line1:t.address.line1||"",line2:t.address.line2||"",name:t.name||"",phone:t.phone||"",postal_code:t.address.postal_code||"",state:t.address.state||""}};this.renderExceededCharacterLimitError=function(o){var t=e.exceededCharacterLimitErrorFieldList.filter((function(e){var t=e.addressType;return t===o}));if(!t.length){return null}return h("zonos-banner",{class:"zonos--error-banner",intent:"error",slot:"below-title"},h("ul",null,t.map((function(o){var e=o.fieldLabel,t=o.value;var s=e==="Address line 1";if(s){return h("li",{key:e},translate("[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.",{currentLength:t.length,fieldLabel:e,maxLength:MAX_CHARACTER_LENGTH_PER_FIELD}))}return h("li",{key:e},translate("[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.",{currentLength:t.length,fieldLabel:e,maxLength:MAX_CHARACTER_LENGTH_PER_FIELD}))}))))};this.renderAddressComponent=function(o){if(!e.selectedCountryCode){void sendErrorLog({endpoint:"NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT",errors:["No country selected when rendering address component"],metadata:{type:o},shouldPostReleaseErrorReporting:true})}
588
588
  // Only use the default address for shipping address
589
- var e=o==="shipping"?t.defaultAddress:[];
589
+ var t=o==="shipping"?e.defaultAddress:[];
590
590
  // Should only record the form type used once
591
- if(o==="shipping"&&storageStore.checkoutSessionId&&!t.recordedFormTypeUsed){void updateCheckoutSessionAttributes({attributes:[{key:"ZONOS_FORM_TYPE_USING",value:t.addressFormRenderType==="zonos"?"custom":"stripe"}],checkoutSessionId:storageStore.checkoutSessionId});t.recordedFormTypeUsed=true}
591
+ if(o==="shipping"&&storageStore.checkoutSessionId&&!e.recordedFormTypeUsed){void updateCheckoutSessionAttributes({attributes:[{key:"ZONOS_FORM_TYPE_USING",value:e.addressFormRenderType==="zonos"?"custom":"stripe"}],checkoutSessionId:storageStore.checkoutSessionId});e.recordedFormTypeUsed=true}
592
592
  // Render custom address component if the custom address form is enabled
593
- if(t.addressFormRenderType==="zonos"){return h("zonos-custom-address",{defaultAddress:e,shortAddressCodeErrorMessage:t.shortAddressCodeErrorMessage,taxIdErrorField:t.taxIdErrorField,taxIdErrorMessage:t.taxIdErrorMessage,titleText:translate(o==="shipping"?"Shipping address":"Billing address"),type:o},t.renderExceededCharacterLimitError(o))}
593
+ if(e.addressFormRenderType==="zonos"){return h("zonos-custom-address",{defaultAddress:t,shortAddressCodeErrorMessage:e.shortAddressCodeErrorMessage,taxIdErrorField:e.taxIdErrorField,taxIdErrorMessage:e.taxIdErrorMessage,titleText:translate(o==="shipping"?"Shipping address":"Billing address"),type:o},e.renderExceededCharacterLimitError(o))}
594
594
  // Render Stripe address component by default
595
- return h("zonos-address",{defaultAddress:e,shortAddressCodeErrorMessage:t.shortAddressCodeErrorMessage,taxIdErrorField:t.taxIdErrorField,taxIdErrorMessage:t.taxIdErrorMessage,titleText:translate(o==="shipping"?"Shipping address":"Billing address"),type:o},t.renderExceededCharacterLimitError(o))}}o.prototype.watchShowErrorBanner=function(){
595
+ return h("zonos-address",{defaultAddress:t,shortAddressCodeErrorMessage:e.shortAddressCodeErrorMessage,taxIdErrorField:e.taxIdErrorField,taxIdErrorMessage:e.taxIdErrorMessage,titleText:translate(o==="shipping"?"Shipping address":"Billing address"),type:o},e.renderExceededCharacterLimitError(o))}}o.prototype.watchShowErrorBanner=function(){
596
596
  // start validate on typing after error banner is shown, and hide it if the form is complete
597
597
  if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}};o.prototype.checkInvalidCharacters=function(o){if(!o){return null}
598
598
  // Do nothing if the allowed character sets is ALL or the address is incomplete
599
- if(!o.complete||zonosStore.checkoutSettings.allowedCharacterSets==="ALL"){return null}var t=o.value,e=t.address,s=t.firstName,n=t.lastName,r=t.name;var i=e.city,a=e.country,l=e.line1,c=e.line2,u=e.postal_code,d=e.state;var h=containsNonLatinChars({city:i,country:a,line1:l,line2:c||"",name:r||"".concat(s," ").concat(n),postal_code:u,state:d});if(!Object.keys(h).length){return null}return h};o.prototype.watchShouldEnabledCustomAddress=function(){var o,t,e;var s=this.shouldUseCustomAddressFormOverride||!!((o=this.genericSettings)===null||o===void 0?void 0:o.shouldEnabledCustomAddress);var n=!!this.selectedCountryCode&&s&&!!((e=(t=this.genericSettings)===null||t===void 0?void 0:t.countryCustomAddressEnabled)===null||e===void 0?void 0:e.includes(this.selectedCountryCode));
599
+ if(!o.complete||zonosStore.checkoutSettings.allowedCharacterSets==="ALL"){return null}var e=o.value,t=e.address,s=e.firstName,n=e.lastName,r=e.name;var i=t.city,a=t.country,l=t.line1,c=t.line2,u=t.postal_code,d=t.state;var h=containsNonLatinChars({city:i,country:a,line1:l,line2:c||"",name:r||"".concat(s," ").concat(n),postal_code:u,state:d});if(!Object.keys(h).length){return null}return h};o.prototype.watchShouldEnabledCustomAddress=function(){var o,e,t;var s=this.shouldUseCustomAddressFormOverride||!!((o=this.genericSettings)===null||o===void 0?void 0:o.shouldEnabledCustomAddress);var n=!!this.selectedCountryCode&&s&&!!((t=(e=this.genericSettings)===null||e===void 0?void 0:e.countryCustomAddressEnabled)===null||t===void 0?void 0:t.includes(this.selectedCountryCode));
600
600
  // Update the address form render type in the cart store
601
601
  cartStore.addressFormRenderType=n?"zonos":"stripe"};o.prototype.disconnectedCallback=function(){
602
602
  // unsubscribe from store subscriptions
603
- try{this.storeUnsubscribeList.forEach((function(o){return o()}))}catch(o){}};o.prototype.componentWillLoad=function(){var o=this;this.storeUnsubscribeList=[zonosStoreOnChange("genericSettings",(function(){o.genericSettings=zonosStore.genericSettings})),localizationStoreOnChange("selectedCountryCode",(function(){o.selectedCountryCode=localizationStore.selectedCountryCode})),cartStoreOnChange("addressFormRenderType",(function(){o.addressFormRenderType=cartStore.addressFormRenderType}))];this.watchShouldEnabledCustomAddress()};o.prototype.render=function(){var o=this;var t,e,s,n,r,i;if(!stripeStore.stripeElements){return null}
603
+ try{this.storeUnsubscribeList.forEach((function(o){return o()}))}catch(o){}};o.prototype.componentWillLoad=function(){var o=this;this.storeUnsubscribeList=[zonosStoreOnChange("genericSettings",(function(){o.genericSettings=zonosStore.genericSettings})),localizationStoreOnChange("selectedCountryCode",(function(){o.selectedCountryCode=localizationStore.selectedCountryCode})),cartStoreOnChange("addressFormRenderType",(function(){o.addressFormRenderType=cartStore.addressFormRenderType}))];this.watchShouldEnabledCustomAddress()};o.prototype.render=function(){var o=this;var e,t,s,n,r,i;if(!stripeStore.stripeElements){return null}
604
604
  // init the shipping country when shipping address is available
605
- if(!this.shippingCountry&&stripeStore.stripeAddressEventData){this.shippingCountry=(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country}if(stripeStore.stripeAddressEventData&&this.shippingCountry!==stripeStore.stripeAddressEventData.value.address.country){
605
+ if(!this.shippingCountry&&stripeStore.stripeAddressEventData){this.shippingCountry=(e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country}if(stripeStore.stripeAddressEventData&&this.shippingCountry!==stripeStore.stripeAddressEventData.value.address.country){
606
606
  // reset the shipping country if it's different from the current shipping address
607
607
  this.shippingCountry=stripeStore.stripeAddressEventData.value.address.country}var a=!stripeStore.stripeShippingSameAsBilling;
608
608
  // Get theme for the update dialog, inherit from the theme, no from this component theme
609
609
  var l=getZonosStoreTheme(zonosStore.appearance.theme);
610
610
  // Attempt to get the email from email from customer profile's locations, if not provided, just use the email from root customer profile
611
- var c=((e=this.defaultAddress.find(Boolean))===null||e===void 0?void 0:e.email)||((r=(n=(s=stripeStore.customerProfile)===null||s===void 0?void 0:s.locations)===null||n===void 0?void 0:n.find(Boolean))===null||r===void 0?void 0:r.email)||((i=stripeStore.customerProfile)===null||i===void 0?void 0:i.email);return h(Host,{class:classes(["zonos--customer-info zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Customer information")),this.showErrorBanner&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("Missing required fields. Make sure all fields are completed.")),h("zonos-link-authentication",{defaultEmail:c,isEmailError:this.isEmailError,onLinkAuthenticationChange:this.handleEmailValidation,titleText:translate("Contact")}),this.renderAddressComponent("shipping"),h("zonos-checkbox",{class:"zonos--shipping-same-as-billing-cbx",isChecked:stripeStore.stripeShippingSameAsBilling,label:translate("Shipping address same as billing"),onCheckboxSelected:function(o){stripeStore.stripeShippingSameAsBilling=o.detail}}),h("zonos-collapse",{collapsed:!a},this.renderAddressComponent("billing")),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:this.submitBtnColor,bold:true,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",
611
+ var c=((t=this.defaultAddress.find(Boolean))===null||t===void 0?void 0:t.email)||((r=(n=(s=stripeStore.customerProfile)===null||s===void 0?void 0:s.locations)===null||n===void 0?void 0:n.find(Boolean))===null||r===void 0?void 0:r.email)||((i=stripeStore.customerProfile)===null||i===void 0?void 0:i.email);return h(Host,{class:classes(["zonos--customer-info zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Customer information")),this.showErrorBanner&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("Missing required fields. Make sure all fields are completed.")),h("zonos-link-authentication",{defaultEmail:c,isEmailError:this.isEmailError,onLinkAuthenticationChange:this.handleEmailValidation,titleText:translate("Contact")}),this.renderAddressComponent("shipping"),h("zonos-checkbox",{class:"zonos--shipping-same-as-billing-cbx",isChecked:stripeStore.stripeShippingSameAsBilling,label:translate("Shipping address same as billing"),onCheckboxSelected:function(o){stripeStore.stripeShippingSameAsBilling=o.detail}}),h("zonos-collapse",{collapsed:!a},this.renderAddressComponent("billing")),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:this.submitBtnColor,bold:true,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",
612
612
  // use primary type when on mobile mode
613
- variant:this.submitBtnType},translate("Continue to shipping")))),stripeStore.stripeAddressEventData&&h("zonos-address-update-dialog",{billingAddress:!stripeStore.stripeShippingSameAsBilling&&stripeStore.stripeBillingAddressEventData?this.prepareAddressObject(stripeStore.stripeBillingAddressEventData):null,"data-theme":l,dialogLoading:this.isValidatingAddress,dialogOpen:this.openAddressValidationDialog,isMobile:this.isMobile,onCloseUpdateDialog:function(){return o.openAddressValidationDialog=false},onContinueClicked:function(t){var e=t.detail;o.transformTranslatedAddressToStripeEvent({submitData:e,type:"shippingAddress"});o.transformTranslatedAddressToStripeEvent({submitData:e,type:"billingAddress"})},shippingAddress:this.prepareAddressObject(stripeStore.stripeAddressEventData),translatedBillingAddress:stripeStore.translatedAddress.billingAddress,translatedShippingAddress:stripeStore.translatedAddress.address}),stripeStore.stripeAddressEventData&&h("zonos-address-completion-dialog",{continueLoading:this.continueLoading,"data-theme":l,dialogOpen:this.openCompletionDialog,isMobile:this.isMobile,missingFields:this.missingShippingFields,onCloseCompletionDialog:function(){return o.openCompletionDialog=false},onCompletionSubmit:function(t){return o.completionSubmitHandler(t.detail)},shippingAddress:this.prepareAddressObject(stripeStore.stripeAddressEventData),submitBtnColor:this.submitBtnColor,submitBtnType:this.submitBtnType}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showErrorBanner:[{watchShowErrorBanner:0}],shouldUseCustomAddressFormOverride:[{watchShouldEnabledCustomAddress:0}],genericSettings:[{watchShouldEnabledCustomAddress:0}],selectedCountryCode:[{watchShouldEnabledCustomAddress:0}]}},enumerable:false,configurable:true});return o}();ZonosCustomerInfo.style=zonosCustomerInfoCss();var zonosRestStateCss=function(){return":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%;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:20px}:host .zonos--restState-image{width:124px;height:124px;margin-bottom:15px}:host .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:8px}"};var ZonosRestState=/** @class */function(){function o(o){var t=this;registerInstance(this,o);
613
+ variant:this.submitBtnType},translate("Continue to shipping")))),stripeStore.stripeAddressEventData&&h("zonos-address-update-dialog",{billingAddress:!stripeStore.stripeShippingSameAsBilling&&stripeStore.stripeBillingAddressEventData?this.prepareAddressObject(stripeStore.stripeBillingAddressEventData):null,"data-theme":l,dialogLoading:this.isValidatingAddress,dialogOpen:this.openAddressValidationDialog,isMobile:this.isMobile,onCloseUpdateDialog:function(){return o.openAddressValidationDialog=false},onContinueClicked:function(e){var t=e.detail;o.transformTranslatedAddressToStripeEvent({submitData:t,type:"shippingAddress"});o.transformTranslatedAddressToStripeEvent({submitData:t,type:"billingAddress"})},shippingAddress:this.prepareAddressObject(stripeStore.stripeAddressEventData),translatedBillingAddress:stripeStore.translatedAddress.billingAddress,translatedShippingAddress:stripeStore.translatedAddress.address}),stripeStore.stripeAddressEventData&&h("zonos-address-completion-dialog",{continueLoading:this.continueLoading,"data-theme":l,dialogOpen:this.openCompletionDialog,isMobile:this.isMobile,missingFields:this.missingShippingFields,onCloseCompletionDialog:function(){return o.openCompletionDialog=false},onCompletionSubmit:function(e){return o.completionSubmitHandler(e.detail)},shippingAddress:this.prepareAddressObject(stripeStore.stripeAddressEventData),submitBtnColor:this.submitBtnColor,submitBtnType:this.submitBtnType}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showErrorBanner:[{watchShowErrorBanner:0}],shouldUseCustomAddressFormOverride:[{watchShouldEnabledCustomAddress:0}],genericSettings:[{watchShouldEnabledCustomAddress:0}],selectedCountryCode:[{watchShouldEnabledCustomAddress:0}]}},enumerable:false,configurable:true});return o}();ZonosCustomerInfo.style=zonosCustomerInfoCss();var zonosRestStateCss=function(){return":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%;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:20px}:host .zonos--restState-image{width:124px;height:124px;margin-bottom:15px}:host .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:8px}"};var ZonosRestState=/** @class */function(){function o(o){var e=this;registerInstance(this,o);
614
614
  /**
615
615
  * Whether or not the image failed to load
616
- */this.isErrorImageLoad=false;this.getImageRestState=function(){var o=getAssetPath("./assets/".concat(t.restStateType,".png"));return o}}o.prototype.render=function(){var o=this;var t=this.getImageRestState();return h(Host,{key:"c59d087ef1e9d319835387dafd6044df02fbada4",class:classes(["zonos--elements zonos--restState"]),style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"66c517e9e27d02039bb8d94084d27d7bdb63acbc",class:"zonos--restState-image"},h("img",{key:"c2591b221940f1526f57eefea0a1624826188465",alt:this.restStateType,onError:function(){o.isErrorImageLoad=true},src:t})),h("div",{key:"12831552ca7bc7c5caed1b8337e302bd757ce066",class:"content"},h("zonos-text",{key:"8d59853bd8670442b50dff2209bcadc66ceee908",class:"title",type:"boldSubheader"},this.restStateTitle),h("zonos-text",{key:"9c0c37ca8b9b4b7db7567b962cfe2547e16c515b",class:"subtitle"},this.restStateSubtitle)),h("div",{key:"29487c0cf698f4f593f7b93a923810edcec1c800",class:"action"},h("slot",{key:"fc0a95a5691a15ffa2d83a7b51713209fb6ec095"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosRestState.style=zonosRestStateCss();var ChevronDownIcon='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ChevronUpIcon$1='<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 zonosReviewCss=function(){return":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}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-pack:justify;justify-content:space-between;padding:4px 0;margin-bottom:8px;background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:8px}:host(.mobile) .zonos--total-pay{margin:0}"};var ZonosReview=/** @class */function(){function o(o){registerInstance(this,o);
616
+ */this.isErrorImageLoad=false;this.getImageRestState=function(){var o=getAssetPath("./assets/".concat(e.restStateType,".png"));return o}}o.prototype.render=function(){var o=this;var e=this.getImageRestState();return h(Host,{key:"c59d087ef1e9d319835387dafd6044df02fbada4",class:classes(["zonos--elements zonos--restState"]),style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"66c517e9e27d02039bb8d94084d27d7bdb63acbc",class:"zonos--restState-image"},h("img",{key:"c2591b221940f1526f57eefea0a1624826188465",alt:this.restStateType,onError:function(){o.isErrorImageLoad=true},src:e})),h("div",{key:"12831552ca7bc7c5caed1b8337e302bd757ce066",class:"content"},h("zonos-text",{key:"8d59853bd8670442b50dff2209bcadc66ceee908",class:"title",type:"boldSubheader"},this.restStateTitle),h("zonos-text",{key:"9c0c37ca8b9b4b7db7567b962cfe2547e16c515b",class:"subtitle"},this.restStateSubtitle)),h("div",{key:"29487c0cf698f4f593f7b93a923810edcec1c800",class:"action"},h("slot",{key:"fc0a95a5691a15ffa2d83a7b51713209fb6ec095"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosRestState.style=zonosRestStateCss();var ChevronDownIcon='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ChevronUpIcon$1='<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 zonosReviewCss=function(){return":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}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-pack:justify;justify-content:space-between;padding:4px 0;margin-bottom:8px;background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:8px}:host(.mobile) .zonos--total-pay{margin:0}"};var ZonosReview=/** @class */function(){function o(o){registerInstance(this,o);
617
617
  /**
618
618
  * Whether or not the component is being rendered with mobile styles
619
619
  */this.mobile=false;
@@ -621,9 +621,9 @@ variant:this.submitBtnType},translate("Continue to shipping")))),stripeStore.str
621
621
  * Whether or not to show the collapse icon
622
622
  * This is controled from the collapsed state of the zonos-collapse component
623
623
  * to show the collapse icon
624
- */this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.render=function(){var o=this;var t=cartStore.step==="customer-info"?cartStore.subtotal+cartStore.adjustmentTotal:cartStore.total;var e=cartStoreHasOneEligibleItem()?t:0;var s=this.isMobile?"boldSubheader":"semiBoldLabel";var n=this.isMobile?"boldSubheader":"secondaryPageHeader";var r=this.isMobile?"gray-1000":"gray-800";var i=function(){
624
+ */this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=isCheckoutMobile(this.mobile)};o.prototype.render=function(){var o=this;var e=cartStore.step==="customer-info"?cartStore.subtotal+cartStore.adjustmentTotal:cartStore.total;var t=cartStoreHasOneEligibleItem()?e:0;var s=this.isMobile?"boldSubheader":"semiBoldLabel";var n=this.isMobile?"boldSubheader":"secondaryPageHeader";var r=this.isMobile?"gray-1000":"gray-800";var i=function(){
625
625
  // only display the collapse icon if the component is being rendered with mobile styles
626
- if(!o.isMobile){return null}if(!o.collapsed){return h("zonos-icon",{"aria-label":"Collapse expanded section",content:ChevronDownIcon,iconColor:"gray-1200"})}return h("zonos-icon",{"aria-label":"Expand collapsed section",content:ChevronUpIcon$1,iconColor:"gray-1200"})};return h(Host,{class:classes(["zonos--review zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--title"},h("zonos-text",{textColor:r,type:s},translate("Pay [organizationName]",{organizationName:zonosStore.organizationName})),i()),h("div",{class:"zonos--total-pay"},h("zonos-text",{type:n},renderCheckoutCurrency({amount:e,isForeign:true}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosReview.style=zonosReviewCss();var ChevronUpIcon='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var zonosShippingCss=function(){return'.sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-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-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.mobile.mobile.sc-zonos-shipping-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{-ms-scroll-chaining:chained;overscroll-behavior:auto}'};var ZonosShipping=/** @class */function(){function o(o){var t=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.storeUnsubscribeList=[];
626
+ if(!o.isMobile){return null}if(!o.collapsed){return h("zonos-icon",{"aria-label":"Collapse expanded section",content:ChevronDownIcon,iconColor:"gray-1200"})}return h("zonos-icon",{"aria-label":"Expand collapsed section",content:ChevronUpIcon$1,iconColor:"gray-1200"})};return h(Host,{class:classes(["zonos--review zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--title"},h("zonos-text",{textColor:r,type:s},translate("Pay [organizationName]",{organizationName:zonosStore.organizationName})),i()),h("div",{class:"zonos--total-pay"},h("zonos-text",{type:n},renderCheckoutCurrency({amount:t,isForeign:true}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosReview.style=zonosReviewCss();var ChevronUpIcon='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var zonosShippingCss=function(){return'.sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-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-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.mobile.mobile.sc-zonos-shipping-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{-ms-scroll-chaining:chained;overscroll-behavior:auto}'};var ZonosShipping=/** @class */function(){function o(o){var e=this;registerInstance(this,o);this.continueClicked=createEvent(this,"continueClicked",7);this.storeUnsubscribeList=[];
627
627
  /**
628
628
  * Whether or not the continue button is loading
629
629
  */this.continueLoading=false;this.selectedShippingMethod=null;this.collapsedDAPOptions=true;
@@ -633,48 +633,48 @@ if(!o.isMobile){return null}if(!o.collapsed){return h("zonos-icon",{"aria-label"
633
633
  /**
634
634
  * Show error banner when the form is not complete, and user clicks on `Submit` button
635
635
  * @default false
636
- */this.showErrorBanner=false;this.serviceLevelsDDP=[];this.serviceLevelsDAP=[];this.serviceLevelsOther=[];this.serviceLevelsAll=[];this.displayBaseCurrency=false;this.shippingData=[];this.handleRadioSelected=function(o){return __awaiter(t,void 0,void 0,(function(){var t,e;var s=this;return __generator(this,(function(n){switch(n.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2/*return*/]}e=((t=cartStore.shippingData)===null||t===void 0?void 0:t.find((function(o){var t;return o.id===((t=s.selectedShippingMethod)===null||t===void 0?void 0:t.shipmentRatingId)})))||null;if(!e){return[2/*return*/]}this.isSelecting=true;
636
+ */this.showErrorBanner=false;this.serviceLevelsDDP=[];this.serviceLevelsDAP=[];this.serviceLevelsOther=[];this.serviceLevelsAll=[];this.displayBaseCurrency=false;this.shippingData=[];this.handleRadioSelected=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;var s=this;return __generator(this,(function(n){switch(n.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2/*return*/]}t=((e=cartStore.shippingData)===null||e===void 0?void 0:e.find((function(o){var e;return o.id===((e=s.selectedShippingMethod)===null||e===void 0?void 0:e.shipmentRatingId)})))||null;if(!t){return[2/*return*/]}this.isSelecting=true;
637
637
  // update the address async if we already got landed cost data
638
638
  return[4/*yield*/,stripeStoreAsyncAddressUpdate()];case 1:
639
639
  // update the address async if we already got landed cost data
640
640
  n.sent();
641
641
  // save selected shipping option to store
642
- return[4/*yield*/,cartStoreUpdateSelectedShippingOption({applySubtotalsOnly:false,landedCostId:o.detail.landedCostId,selectedShippingOption:e})];case 2:
642
+ return[4/*yield*/,cartStoreUpdateSelectedShippingOption({applySubtotalsOnly:false,landedCostId:o.detail.landedCostId,selectedShippingOption:t})];case 2:
643
643
  // save selected shipping option to store
644
- n.sent();this.isSelecting=false;return[2/*return*/]}}))}))};this.handleValidate=function(){return!!t.selectedShippingMethod};this.isOutdatedShippingData=function(){var o;var e=!!((o=cartStore.shippingData)===null||o===void 0?void 0:o.some((function(o){var e;var s=(e=t.serviceLevelsAll)===null||e===void 0?void 0:e.find((function(t){return t.shipmentRatingId===o.id}));if(!s){return true}})));return e};
644
+ n.sent();this.isSelecting=false;return[2/*return*/]}}))}))};this.handleValidate=function(){return!!e.selectedShippingMethod};this.isOutdatedShippingData=function(){var o;var t=!!((o=cartStore.shippingData)===null||o===void 0?void 0:o.some((function(o){var t;var s=(t=e.serviceLevelsAll)===null||t===void 0?void 0:t.find((function(e){return e.shipmentRatingId===o.id}));if(!s){return true}})));return t};
645
645
  /**
646
646
  * handler for continue button click
647
- */this.continueClickHandler=function(){var o,e;
647
+ */this.continueClickHandler=function(){var o,t;
648
648
  // show error banner if the form is not complete
649
- if(!t.handleValidate()){t.showErrorBanner=true;return}
649
+ if(!e.handleValidate()){e.showErrorBanner=true;return}
650
650
  // submit google tag when the form is complete
651
- submitAnalytics({event:"zonos-checkout-shipping-info",metadata:{checkoutSessionId:storageStore.checkoutSessionId,serviceLevelId:(o=t.selectedShippingMethod)===null||o===void 0?void 0:o.value}});var s=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:s,eventName:"checkout_shippingInfoCompleted",metadata:{serviceLevelId:(e=t.selectedShippingMethod)===null||e===void 0?void 0:e.value}});t.showErrorBanner=false;t.continueClicked.emit()};this.getLandedCostMethodLabelSuffix=function(o){var t,e,s;switch(true){
651
+ submitAnalytics({event:"zonos-checkout-shipping-info",metadata:{checkoutSessionId:storageStore.checkoutSessionId,serviceLevelId:(o=e.selectedShippingMethod)===null||o===void 0?void 0:o.value}});var s=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:s,eventName:"checkout_shippingInfoCompleted",metadata:{serviceLevelId:(t=e.selectedShippingMethod)===null||t===void 0?void 0:t.value}});e.showErrorBanner=false;e.continueClicked.emit()};this.getLandedCostMethodLabelSuffix=function(o){var e,t,s;switch(true){
652
652
  // DAP description for non-US countries only
653
- case o==="DAP"&&!((e=(t=zonosStore.genericSettings)===null||t===void 0?void 0:t.domesticCountries)===null||e===void 0?void 0:e.includes(((s=stripeStore.stripeAddressEventData)===null||s===void 0?void 0:s.value.address.country)||"US")):return translate(" (Duties due at door)");default:return""}};this.initServiceLevels=function(){var o;t.collapsedDAPOptions=true;var e=((o=cartStore.shippingData)===null||o===void 0?void 0:o.flatMap((function(o){var e;var s=cartStoreGetShippingTransitInfo(o);var n=s?"".concat(s.minTransit,"-").concat(s.maxTransit," ").concat(s.unit):"";var r=(e=cartStore.landedCostData)===null||e===void 0?void 0:e.filter((function(t){var e;return((e=t.landedCost)===null||e===void 0?void 0:e.shipmentRating.id)===o.id}));return(r===null||r===void 0?void 0:r.map((function(e){var s;var r=e.subtotals.shipping;
653
+ case o==="DAP"&&!((t=(e=zonosStore.genericSettings)===null||e===void 0?void 0:e.domesticCountries)===null||t===void 0?void 0:t.includes(((s=stripeStore.stripeAddressEventData)===null||s===void 0?void 0:s.value.address.country)||"US")):return translate(" (Duties due at door)");default:return""}};this.initServiceLevels=function(){var o;e.collapsedDAPOptions=true;var t=((o=cartStore.shippingData)===null||o===void 0?void 0:o.flatMap((function(o){var t;var s=cartStoreGetShippingTransitInfo(o);var n=s?"".concat(s.minTransit,"-").concat(s.maxTransit," ").concat(s.unit):"";var r=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.filter((function(e){var t;return((t=e.landedCost)===null||t===void 0?void 0:t.shipmentRating.id)===o.id}));return(r===null||r===void 0?void 0:r.map((function(t){var s;var r=t.subtotals.shipping;
654
654
  /**
655
655
  * For some service levels, the landed cost that's DAP and we do remittance on behalf of the merchant, these landed cost should be treated as DDP
656
- */var i=cartStoreGetMethod(e.landedCost,(s=o.shippingProfile)===null||s===void 0?void 0:s.serviceLevel.deliveryType);var a={amount:r,label:"".concat(o.displayName).concat(t.getLandedCostMethodLabelSuffix(i)),landedCostId:e.landedCostId,method:i,price:renderCheckoutCurrency({amount:r,isForeign:true}),shipmentRatingId:o.id,sublabel:n,value:e.landedCostId};return a})))||[]})))||[];var s=e.filter((function(o){return o.method==="DDP"}));var n=e.filter((function(o){return o.method==="DAP"}));var r=e.filter((function(o){return o.method!=="DAP"&&o.method!=="DDP"}));t.serviceLevelsDDP=sortServiceLevelOptionsByAmount(s);t.serviceLevelsDAP=sortServiceLevelOptionsByAmount(n);t.serviceLevelsOther=sortServiceLevelOptionsByAmount(r);t.serviceLevelsAll=__spreadArray(__spreadArray(__spreadArray([],t.serviceLevelsDDP,true),t.serviceLevelsDAP,true),t.serviceLevelsOther,true);var i=__spreadArray(__spreadArray([],t.serviceLevelsDDP,true),t.serviceLevelsOther,true);
656
+ */var i=cartStoreGetMethod(t.landedCost,(s=o.shippingProfile)===null||s===void 0?void 0:s.serviceLevel.deliveryType);var a={amount:r,label:"".concat(o.displayName).concat(e.getLandedCostMethodLabelSuffix(i)),landedCostId:t.landedCostId,method:i,price:renderCheckoutCurrency({amount:r,isForeign:true}),shipmentRatingId:o.id,sublabel:n,value:t.landedCostId};return a})))||[]})))||[];var s=t.filter((function(o){return o.method==="DDP"}));var n=t.filter((function(o){return o.method==="DAP"}));var r=t.filter((function(o){return o.method!=="DAP"&&o.method!=="DDP"}));e.serviceLevelsDDP=sortServiceLevelOptionsByAmount(s);e.serviceLevelsDAP=sortServiceLevelOptionsByAmount(n);e.serviceLevelsOther=sortServiceLevelOptionsByAmount(r);e.serviceLevelsAll=__spreadArray(__spreadArray(__spreadArray([],e.serviceLevelsDDP,true),e.serviceLevelsDAP,true),e.serviceLevelsOther,true);var i=__spreadArray(__spreadArray([],e.serviceLevelsDDP,true),e.serviceLevelsOther,true);
657
657
  // Show DAP by default if there is no DDP
658
- if(!i.length){t.collapsedDAPOptions=false}};this.isCurrencyToggled=function(){if(t.displayBaseCurrency!==cartStore.displayBaseCurrency){t.displayBaseCurrency=cartStore.displayBaseCurrency;return true}return false};this.preselectFirstShippingMethod=function(){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(e){this.initServiceLevels();o=this.serviceLevelsAll.find((function(o){var t;return o.shipmentRatingId===((t=cartStore.selectedShippingOption)===null||t===void 0?void 0:t.id)}))||null;if(o){
658
+ if(!i.length){e.collapsedDAPOptions=false}};this.isCurrencyToggled=function(){if(e.displayBaseCurrency!==cartStore.displayBaseCurrency){e.displayBaseCurrency=cartStore.displayBaseCurrency;return true}return false};this.preselectFirstShippingMethod=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){this.initServiceLevels();o=this.serviceLevelsAll.find((function(o){var e;return o.shipmentRatingId===((e=cartStore.selectedShippingOption)===null||e===void 0?void 0:e.id)}))||null;if(o){
659
659
  // keep the selected shipping method
660
- void this.handleRadioSelected({detail:o});return[2/*return*/]}t=this.serviceLevelsAll.find(Boolean);if(t){
660
+ void this.handleRadioSelected({detail:o});return[2/*return*/]}e=this.serviceLevelsAll.find(Boolean);if(e){
661
661
  // preselect the first shipping method
662
- void this.handleRadioSelected({detail:t})}return[2/*return*/]}))}))}}o.prototype.disconnectedCallback=function(){
662
+ void this.handleRadioSelected({detail:e})}return[2/*return*/]}))}))}}o.prototype.disconnectedCallback=function(){
663
663
  // unsubscribe from store subscriptions
664
664
  this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.componentWillLoad=function(){var o=this;this.storeUnsubscribeList=[cartStoreOnChange("shippingData",(function(){if(o.isOutdatedShippingData()){
665
665
  // re-init service levels if the shipping data is outdated (promo code applied)
666
666
  void o.preselectFirstShippingMethod()}})),cartStoreOnChange("landedCostData",(function(){if(o.isOutdatedShippingData()){
667
667
  // re-init service levels if the shipping data is outdated (promo code applied)
668
- void o.preselectFirstShippingMethod()}}))];void this.preselectFirstShippingMethod()};o.prototype.render=function(){var o=this;var t;
668
+ void o.preselectFirstShippingMethod()}}))];void this.preselectFirstShippingMethod()};o.prototype.render=function(){var o=this;var e;
669
669
  // re-init service levels if the currency is toggled
670
- if(this.isCurrencyToggled()){this.initServiceLevels()}var e=__spreadArray(__spreadArray([],this.serviceLevelsDDP,true),this.serviceLevelsOther,true);
670
+ if(this.isCurrencyToggled()){this.initServiceLevels()}var t=__spreadArray(__spreadArray([],this.serviceLevelsDDP,true),this.serviceLevelsOther,true);
671
671
  // EU 3-EUR cutover (05CHECK-893): when we collect and remit taxes for an EU
672
672
  // POSTAL DAP quote, only duties (not taxes) are charged upon delivery. The
673
673
  // delivery type lives on the shipment rating, so match it by id.
674
- var s=!!((t=cartStore.landedCostData)===null||t===void 0?void 0:t.some((function(o){var t,e,s,n;return isEuDapRemittance({deliveryType:(s=(e=(t=cartStore.shippingData)===null||t===void 0?void 0:t.find((function(t){return t.id===o.landedCost.shipmentRating.id})))===null||e===void 0?void 0:e.shippingProfile)===null||s===void 0?void 0:s.serviceLevel.deliveryType,landedCost:o.landedCost,shipToCountry:(n=stripeStore.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country})})));
674
+ var s=!!((e=cartStore.landedCostData)===null||e===void 0?void 0:e.some((function(o){var e,t,s,n;return isEuDapRemittance({deliveryType:(s=(t=(e=cartStore.shippingData)===null||e===void 0?void 0:e.find((function(e){return e.id===o.landedCost.shipmentRating.id})))===null||t===void 0?void 0:t.shippingProfile)===null||s===void 0?void 0:s.serviceLevel.deliveryType,landedCost:o.landedCost,shipToCountry:(n=stripeStore.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country})})));
675
675
  // start validate on typing after error banner is shown, and hide it if the form is complete
676
- if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=function(){var t;
676
+ if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=function(){var e;
677
677
  // Render all service levels for US since domestic shipping doesn't have DDP/DAP
678
- if(((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country)==="US"){return h("zonos-shipping-rich-radio",{isMobile:o.isMobile,items:o.serviceLevelsAll,onRadioSelected:function(t){return o.handleRadioSelected(t)},selectedItem:o.selectedShippingMethod})}return h(Fragment,null,h("zonos-shipping-rich-radio",{isMobile:o.isMobile,items:e,onRadioSelected:function(t){return o.handleRadioSelected(t)},selectedItem:o.selectedShippingMethod}),!!e.length&&!!o.serviceLevelsDAP.length&&h("button",{class:classes(["zonos--shipping-options-collapse-trigger",o.collapsedDAPOptions&&"collapsed"]),onClick:function(){o.collapsedDAPOptions=!o.collapsedDAPOptions}},h("div",{class:"zonos--title-wrapper"},h("zonos-text",{type:"label"},"".concat(translate(o.collapsedDAPOptions?"Show non-prepaid options":"Hide non-prepaid options")," ")),h("zonos-icon",{content:ChevronUpIcon}))),h("zonos-collapse",{collapsed:o.collapsedDAPOptions},h("div",{class:"zonos--dap-wrapper"},h("zonos-banner",{bannerTitle:translate(s?"Duties will be charged upon delivery.":"Duties and taxes will be charged upon delivery."),intent:"warning"},translate("You may incur additional fees from the shipping carrier by not prepaying.")),h("zonos-shipping-rich-radio",{isMobile:o.isMobile,items:o.serviceLevelsDAP,onRadioSelected:function(t){return o.handleRadioSelected(t)},selectedItem:o.selectedShippingMethod}))))};return h(Host,{class:classes(["zonos--shipping zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Delivery options")),this.showErrorBanner&&!!this.serviceLevelsAll.length&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("No shipping method selected")),h("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},translate("Shipping method")),!this.serviceLevelsAll.length?h("zonos-banner",{bannerTitle:cartStore.customQuotingError?cartStore.customQuotingError:translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'),class:"zonos--shipping-method-error",intent:"error"}):h("div",{class:"zonos--shipping-options-wrapper"},n()),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:this.submitBtnColor,bold:true,loading:this.continueLoading||this.isSelecting,onClick:function(){return o.continueClickHandler()},size:"lg",
678
+ if(((e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value.address.country)==="US"){return h("zonos-shipping-rich-radio",{isMobile:o.isMobile,items:o.serviceLevelsAll,onRadioSelected:function(e){return o.handleRadioSelected(e)},selectedItem:o.selectedShippingMethod})}return h(Fragment,null,h("zonos-shipping-rich-radio",{isMobile:o.isMobile,items:t,onRadioSelected:function(e){return o.handleRadioSelected(e)},selectedItem:o.selectedShippingMethod}),!!t.length&&!!o.serviceLevelsDAP.length&&h("button",{class:classes(["zonos--shipping-options-collapse-trigger",o.collapsedDAPOptions&&"collapsed"]),onClick:function(){o.collapsedDAPOptions=!o.collapsedDAPOptions}},h("div",{class:"zonos--title-wrapper"},h("zonos-text",{type:"label"},"".concat(translate(o.collapsedDAPOptions?"Show non-prepaid options":"Hide non-prepaid options")," ")),h("zonos-icon",{content:ChevronUpIcon}))),h("zonos-collapse",{collapsed:o.collapsedDAPOptions},h("div",{class:"zonos--dap-wrapper"},h("zonos-banner",{bannerTitle:translate(s?"Duties will be charged upon delivery.":"Duties and taxes will be charged upon delivery."),intent:"warning"},translate("You may incur additional fees from the shipping carrier by not prepaying.")),h("zonos-shipping-rich-radio",{isMobile:o.isMobile,items:o.serviceLevelsDAP,onRadioSelected:function(e){return o.handleRadioSelected(e)},selectedItem:o.selectedShippingMethod}))))};return h(Host,{class:classes(["zonos--shipping zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Delivery options")),this.showErrorBanner&&!!this.serviceLevelsAll.length&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("No shipping method selected")),h("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},translate("Shipping method")),!this.serviceLevelsAll.length?h("zonos-banner",{bannerTitle:cartStore.customQuotingError?cartStore.customQuotingError:translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'),class:"zonos--shipping-method-error",intent:"error"}):h("div",{class:"zonos--shipping-options-wrapper"},n()),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:this.submitBtnColor,bold:true,loading:this.continueLoading||this.isSelecting,onClick:function(){return o.continueClickHandler()},size:"lg",
679
679
  // use primary type when on mobile mode
680
680
  variant:this.submitBtnType},translate("Go to payment")))))};return o}();ZonosShipping.style=zonosShippingCss();export{ZonosCartItems as zonos_cart_items,ZonosCartRestrictedItems as zonos_cart_restricted_items,ZonosCartSubtotal as zonos_cart_subtotal,ZonosCheckoutFinish as zonos_checkout_finish,ZonosCheckoutFooter as zonos_checkout_footer,ZonosCheckoutPayment as zonos_checkout_payment,ZonosCheckoutProgressTabs as zonos_checkout_progress_tabs,ZonosCurrencyToggle as zonos_currency_toggle,ZonosCustomerInfo as zonos_customer_info,ZonosRestState as zonos_rest_state,ZonosReview as zonos_review,ZonosShipping as zonos_shipping};