@zonos/elements 1.3.7-alpha.0 → 1.3.7-alpha.1

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 (284) hide show
  1. package/dist/cjs/{cart-ecc80eb0.js → cart-89d9fff4.js} +150 -95
  2. package/dist/cjs/formatStringWithLinks-52341fc7.js +17 -0
  3. package/dist/cjs/{getBorderRadius-834c321d.js → getBorderRadius-d8f18958.js} +1 -1
  4. package/dist/cjs/{isDarkColor-924e6a7a.js → isDarkColor-57860b44.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/submitGtag-24740560.js +55 -0
  7. package/dist/cjs/zonos-address_4.cjs.entry.js +20 -14
  8. package/dist/cjs/zonos-badge_2.cjs.entry.js +6 -6
  9. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-button_3.cjs.entry.js +8 -8
  11. package/dist/cjs/zonos-card_2.cjs.entry.js +8 -8
  12. package/dist/cjs/zonos-cart-items_9.cjs.entry.js +35 -33
  13. package/dist/cjs/zonos-checkout.cjs.entry.js +158 -21
  14. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-controller.cjs.entry.js +28 -8
  16. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-country-select_3.cjs.entry.js +18 -10
  18. package/dist/cjs/zonos-elements.cjs.js +1 -1
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -7
  20. package/dist/cjs/zonos-hello.cjs.entry.js +24 -9
  21. package/dist/cjs/zonos-link.cjs.entry.js +24 -0
  22. package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
  23. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
  25. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +5 -5
  26. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  28. package/dist/cjs/{zonosStore-49d4c92a.js → zonosStore-138c5555.js} +5 -3
  29. package/dist/collection/collection-manifest.json +1 -0
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -6
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +19 -10
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +39 -18
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -0
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +1 -6
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -0
  39. package/dist/collection/components/common/component-template/zonos-link/zonos-link.css +54 -0
  40. package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +97 -0
  41. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  42. package/dist/collection/components/common/zonos-button/zonos-button.css +2 -0
  43. package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
  44. package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
  45. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  46. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +13 -6
  47. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +8 -2
  48. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -2
  49. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  50. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  51. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  52. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  53. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
  54. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  55. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  56. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  57. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +50 -11
  58. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  59. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -3
  60. package/dist/collection/components/main/zonos-controller.js +1 -1
  61. package/dist/collection/components/store/checkout/cart.js +2 -2
  62. package/dist/collection/components/store/checkout/stripe.js +26 -4
  63. package/dist/collection/components/store/hello/localization.js +7 -6
  64. package/dist/collection/components/store/zonosStore.js +5 -3
  65. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  66. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  67. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  68. package/dist/collection/components/utils/api/trackConversionEvent.js +22 -0
  69. package/dist/collection/components/utils/checkout/isShippableCountry.js +15 -0
  70. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +111 -0
  71. package/dist/collection/components/utils/formatStringWithLinks.js +13 -0
  72. package/dist/collection/components/utils/handleFetch.js +1 -1
  73. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +25 -28
  74. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +2 -1
  75. package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +8 -6
  76. package/dist/collection/components/utils/hello/initHello.js +23 -3
  77. package/dist/collection/components/utils/logging/log.js +20 -9
  78. package/dist/collection/components/utils/logging/logError.js +2 -1
  79. package/dist/collection/components/utils/logging/sendErrorLog.js +12 -0
  80. package/dist/collection/scripts/checkIfLoadVersionDomain.js +35 -0
  81. package/dist/collection/scripts/zonosBase.js +21 -31
  82. package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
  83. package/dist/collection/types/generated/graphql.customer.types.js +1 -4
  84. package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
  85. package/dist/components/stripe.js +145 -93
  86. package/dist/components/trackConversionEvent.js +24 -0
  87. package/dist/components/zonos-address2.js +1 -1
  88. package/dist/components/zonos-badge2.js +3 -3
  89. package/dist/components/zonos-button2.js +5 -5
  90. package/dist/components/zonos-card2.js +2 -2
  91. package/dist/components/zonos-cart-subtotal2.js +1 -6
  92. package/dist/components/zonos-checkbox2.js +3 -3
  93. package/dist/components/zonos-checkout-finish2.js +32 -12
  94. package/dist/components/zonos-checkout-payment2.js +1 -1
  95. package/dist/components/zonos-checkout.js +157 -18
  96. package/dist/components/zonos-collapse2.js +13 -6
  97. package/dist/components/zonos-component.js +1 -1
  98. package/dist/components/zonos-controller.js +25 -5
  99. package/dist/components/zonos-country-select2.js +9 -3
  100. package/dist/components/zonos-custom-message2.js +18 -3
  101. package/dist/components/zonos-customer-info2.js +3 -1
  102. package/dist/components/zonos-dialog2.js +3 -3
  103. package/dist/components/zonos-hello-dialog-footer2.js +2 -2
  104. package/dist/components/zonos-hello-dialog2.js +6 -5
  105. package/dist/components/zonos-hello.js +23 -7
  106. package/dist/components/zonos-language-select2.js +3 -3
  107. package/dist/components/zonos-link-authentication2.js +1 -1
  108. package/dist/components/zonos-link.d.ts +11 -0
  109. package/dist/components/zonos-link.js +43 -0
  110. package/dist/components/zonos-logo.js +2 -2
  111. package/dist/components/zonos-payment2.js +1 -1
  112. package/dist/components/zonos-review2.js +1 -6
  113. package/dist/components/zonos-select-dialog-header2.js +2 -2
  114. package/dist/components/zonos-shipping-rich-radio2.js +1 -1
  115. package/dist/components/zonos-shipping2.js +7 -2
  116. package/dist/components/zonos-tooltip2.js +2 -2
  117. package/dist/components/zonos-v-stack2.js +2 -2
  118. package/dist/components/zonosStore.js +5 -3
  119. package/dist/esm/{cart-2a0a6871.js → cart-1bbb7662.js} +148 -96
  120. package/dist/esm/formatStringWithLinks-9e819405.js +15 -0
  121. package/dist/esm/{getBorderRadius-0c7dfcf0.js → getBorderRadius-19787feb.js} +1 -1
  122. package/dist/esm/{isDarkColor-d0a57fd2.js → isDarkColor-2344e7a5.js} +1 -1
  123. package/dist/esm/loader.js +1 -1
  124. package/dist/esm/submitGtag-d3d11f1a.js +51 -0
  125. package/dist/esm/zonos-address_4.entry.js +20 -14
  126. package/dist/esm/zonos-badge_2.entry.js +6 -6
  127. package/dist/esm/zonos-banner.entry.js +1 -1
  128. package/dist/esm/zonos-button_3.entry.js +8 -8
  129. package/dist/esm/zonos-card_2.entry.js +8 -8
  130. package/dist/esm/zonos-cart-items_9.entry.js +35 -33
  131. package/dist/esm/zonos-checkout.entry.js +158 -21
  132. package/dist/esm/zonos-component.entry.js +1 -1
  133. package/dist/esm/zonos-controller.entry.js +28 -8
  134. package/dist/esm/zonos-country-flag.entry.js +4 -4
  135. package/dist/esm/zonos-country-select_3.entry.js +19 -11
  136. package/dist/esm/zonos-elements.js +1 -1
  137. package/dist/esm/zonos-hello-dialog.entry.js +9 -7
  138. package/dist/esm/zonos-hello.entry.js +24 -9
  139. package/dist/esm/zonos-link.entry.js +20 -0
  140. package/dist/esm/zonos-logo.entry.js +3 -3
  141. package/dist/esm/zonos-notification.entry.js +1 -1
  142. package/dist/esm/zonos-payment.entry.js +5 -5
  143. package/dist/esm/zonos-select-dialog-header_2.entry.js +5 -5
  144. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  145. package/dist/esm/zonos-text.entry.js +1 -1
  146. package/dist/esm/{zonosStore-dec6bd7e.js → zonosStore-00bce01b.js} +5 -3
  147. package/dist/esm-es5/{cart-2a0a6871.js → cart-1bbb7662.js} +1 -1
  148. package/dist/esm-es5/formatStringWithLinks-9e819405.js +1 -0
  149. package/dist/esm-es5/{getBorderRadius-0c7dfcf0.js → getBorderRadius-19787feb.js} +1 -1
  150. package/dist/esm-es5/{isDarkColor-d0a57fd2.js → isDarkColor-2344e7a5.js} +1 -1
  151. package/dist/esm-es5/loader.js +1 -1
  152. package/dist/esm-es5/submitGtag-d3d11f1a.js +1 -0
  153. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  154. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  155. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  156. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  157. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  158. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
  159. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  160. package/dist/esm-es5/zonos-component.entry.js +1 -1
  161. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  162. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  163. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  164. package/dist/esm-es5/zonos-elements.js +1 -1
  165. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  166. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  167. package/dist/esm-es5/zonos-link.entry.js +1 -0
  168. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  169. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  170. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  171. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  172. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  173. package/dist/esm-es5/zonos-text.entry.js +1 -1
  174. package/dist/esm-es5/{zonosStore-dec6bd7e.js → zonosStore-00bce01b.js} +1 -1
  175. package/dist/scripts/checkIfLoadVersionDomain.js +1 -0
  176. package/dist/scripts/loadStripe.js +1 -1
  177. package/dist/scripts/loadZonos.js +1 -1
  178. package/dist/scripts/stripe.js +1 -1
  179. package/dist/scripts/zonos.js +1 -1
  180. package/dist/scripts/zonosBase.js +1 -1
  181. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -1
  182. package/dist/types/components/common/component-template/zonos-link/zonos-link.d.ts +19 -0
  183. package/dist/types/components/common/zonos-collapse/zonos-collapse.d.ts +1 -0
  184. package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +2 -0
  185. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -3
  186. package/dist/types/components/store/checkout/cart.d.ts +6 -3
  187. package/dist/types/components/store/checkout/stripe.d.ts +22 -1
  188. package/dist/types/components/store/hello/localization.d.ts +1 -1
  189. package/dist/types/components/store/zonosStore.d.ts +1 -0
  190. package/dist/types/components/utils/api/trackConversionEvent.d.ts +3 -0
  191. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +1 -0
  192. package/dist/types/components/utils/checkout/watchBigcommerceDomesticCheckout.d.ts +20 -0
  193. package/dist/types/components/utils/formatStringWithLinks.d.ts +1 -0
  194. package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -1
  195. package/dist/types/components/utils/logging/log.d.ts +1 -1
  196. package/dist/types/components/utils/logging/sendErrorLog.d.ts +7 -0
  197. package/dist/types/components.d.ts +53 -3
  198. package/dist/types/scripts/checkIfLoadVersionDomain.d.ts +13 -0
  199. package/dist/types/scripts/zonosBase.d.ts +2 -0
  200. package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
  201. package/dist/types/types/generated/graphql.customer.types.d.ts +8 -53
  202. package/dist/types/types/generated/graphql.customer.types.ts +18 -62
  203. package/dist/types/types/generated/graphql.frontend.types.d.ts +8 -0
  204. package/dist/types/types/generated/graphql.frontend.types.ts +18 -0
  205. package/dist/zonos-elements/p-0318632a.entry.js +1 -0
  206. package/dist/zonos-elements/p-066c5893.system.js +1 -1
  207. package/dist/zonos-elements/p-07966463.entry.js +1 -0
  208. package/dist/zonos-elements/p-0c0aa552.js +1 -0
  209. package/dist/zonos-elements/p-127b480c.entry.js +1 -0
  210. package/dist/zonos-elements/p-135ab559.system.entry.js +1 -0
  211. package/dist/zonos-elements/{p-e855966f.system.entry.js → p-143dc0d9.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-55970b10.system.entry.js → p-14d27ce1.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-a93c594f.entry.js → p-15a80c4a.entry.js} +1 -1
  214. package/dist/zonos-elements/p-17e87be1.entry.js +1 -0
  215. package/dist/zonos-elements/{p-a95c034c.entry.js → p-1e0dd491.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-34efed1d.entry.js → p-279d1c5f.entry.js} +1 -1
  217. package/dist/zonos-elements/p-2d6557ee.system.js +1 -0
  218. package/dist/zonos-elements/p-314be538.system.entry.js +1 -0
  219. package/dist/zonos-elements/{p-79b910bf.system.entry.js → p-328b7f6f.system.entry.js} +1 -1
  220. package/dist/zonos-elements/p-354603b3.system.entry.js +1 -0
  221. package/dist/zonos-elements/{p-591eb6dd.system.js → p-49f6a985.system.js} +1 -1
  222. package/dist/zonos-elements/p-57b65321.system.entry.js +1 -0
  223. package/dist/zonos-elements/{p-5b44abc8.system.js → p-58c1ddef.system.js} +1 -1
  224. package/dist/zonos-elements/{p-06652d87.system.entry.js → p-58e2f6a1.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-7d1d862f.system.entry.js → p-5ee03db0.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-88a55076.system.entry.js → p-61e5cf29.system.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-67737613.system.entry.js → p-799d8a17.system.entry.js} +1 -1
  228. package/dist/zonos-elements/p-7a32526c.entry.js +1 -0
  229. package/dist/zonos-elements/p-7b87b82f.js +1 -0
  230. package/dist/zonos-elements/{p-e2770968.system.entry.js → p-7c45ce37.system.entry.js} +1 -1
  231. package/dist/zonos-elements/p-84f4f00f.entry.js +1 -0
  232. package/dist/zonos-elements/{p-2d2e1831.entry.js → p-857cfe35.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-dfd3edcf.entry.js → p-87e9c42f.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-ec4d08b3.system.js → p-91797d4e.system.js} +1 -1
  235. package/dist/zonos-elements/{p-34c03be2.js → p-95e0fc06.js} +1 -1
  236. package/dist/zonos-elements/{p-afe40057.entry.js → p-a3cc0f84.entry.js} +1 -1
  237. package/dist/zonos-elements/p-a5f12396.entry.js +1 -0
  238. package/dist/zonos-elements/p-a87561b8.js +1 -0
  239. package/dist/zonos-elements/{p-e161a08c.entry.js → p-ac0a7b8f.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-9878a770.js → p-ae82a9ae.js} +1 -1
  241. package/dist/zonos-elements/p-b0462325.system.entry.js +1 -0
  242. package/dist/zonos-elements/{p-1f85a98c.system.entry.js → p-b2c0ec71.system.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-549c181b.system.js → p-b4725505.system.js} +1 -1
  244. package/dist/zonos-elements/p-bef54fb1.entry.js +1 -0
  245. package/dist/zonos-elements/{p-0c72fb79.system.entry.js → p-c0d431f6.system.entry.js} +1 -1
  246. package/dist/zonos-elements/p-d054788b.system.js +1 -0
  247. package/dist/zonos-elements/{p-375c472a.system.entry.js → p-d407c93a.system.entry.js} +1 -1
  248. package/dist/zonos-elements/p-e55dd932.js +1 -0
  249. package/dist/zonos-elements/p-ec37439e.entry.js +1 -0
  250. package/dist/zonos-elements/p-edace42b.entry.js +1 -0
  251. package/dist/zonos-elements/{p-cc63a29f.system.entry.js → p-f478c814.system.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-8aeb4679.system.entry.js → p-f6eaef7b.system.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-c7098c3b.entry.js → p-f7c36fcc.entry.js} +1 -1
  254. package/dist/zonos-elements/p-f862b97f.system.entry.js +1 -0
  255. package/dist/zonos-elements/p-fd642725.entry.js +1 -0
  256. package/dist/zonos-elements/p-fdb72530.system.entry.js +1 -0
  257. package/dist/zonos-elements/{p-a4de3fb2.entry.js → p-ff64ddc5.entry.js} +1 -1
  258. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  259. package/package.json +1 -1
  260. package/dist/cjs/submitGtag-907e71d3.js +0 -21
  261. package/dist/collection/scripts/extractZonosQaUrl.js +0 -26
  262. package/dist/esm/submitGtag-a38aed23.js +0 -19
  263. package/dist/esm-es5/submitGtag-a38aed23.js +0 -1
  264. package/dist/types/scripts/extractZonosQaUrl.d.ts +0 -11
  265. package/dist/zonos-elements/p-0057e374.entry.js +0 -1
  266. package/dist/zonos-elements/p-290c3670.entry.js +0 -1
  267. package/dist/zonos-elements/p-2f1e1cbb.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-33080cde.system.entry.js +0 -1
  269. package/dist/zonos-elements/p-561e44d6.entry.js +0 -1
  270. package/dist/zonos-elements/p-5c4dc123.js +0 -1
  271. package/dist/zonos-elements/p-656c836b.entry.js +0 -1
  272. package/dist/zonos-elements/p-8d645a00.entry.js +0 -1
  273. package/dist/zonos-elements/p-a219689f.entry.js +0 -1
  274. package/dist/zonos-elements/p-a3d72a33.entry.js +0 -1
  275. package/dist/zonos-elements/p-b10ff468.entry.js +0 -1
  276. package/dist/zonos-elements/p-b6992dc2.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-bce46c41.js +0 -1
  278. package/dist/zonos-elements/p-c56d4a44.entry.js +0 -1
  279. package/dist/zonos-elements/p-cbb1e700.system.js +0 -1
  280. package/dist/zonos-elements/p-cd8bd5e9.system.entry.js +0 -1
  281. package/dist/zonos-elements/p-d36faf87.system.entry.js +0 -1
  282. package/dist/zonos-elements/p-e2c6ad57.entry.js +0 -1
  283. package/dist/zonos-elements/p-ea93943a.system.entry.js +0 -1
  284. package/dist/zonos-elements/p-f455e08c.js +0 -1
@@ -1,11 +1,131 @@
1
1
  import { r as registerInstance, h, F as Fragment, H as Host } from './index-b5be4dc3.js';
2
- import { i as initStripeElements, l as localizationStore, a as log, c as cartStore, b as cartStoreUpdateItems, d as cartStoreReset, s as stripeStore, e as stripeStoreInitCheckoutSession, f as cartStoreUpdateToErrorState, g as stripeStorePrefetchLandedCost, h as cartStoreNextStep, j as stripeStoreConfirmPayment, k as stripeStoreReset, m as cartStorePreviousStep, t as translate } from './cart-2a0a6871.js';
3
- import { z as zonosStore, m as mergeConfig } from './zonosStore-dec6bd7e.js';
2
+ import { l as localizationStore, a as log, s as stripeStoreGetDomesticShippingSession, b as localizationStoreUpdateSelectedCountryCode, c as stripeStoreCleanupDomesticShippingSession, d as logError, e as stripeStoreSaveDomesticShippingSession, i as initStripeElements, f as cartStore, g as cartStoreUpdateItems, h as cartStoreReset, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreUpdateToErrorState, n as stripeStorePrefetchLandedCost, o as cartStoreNextStep, p as stripeStoreConfirmPayment, q as stripeStoreReset, r as cartStorePreviousStep, t as translate } from './cart-1bbb7662.js';
3
+ import { z as zonosStore, m as mergeConfig } from './zonosStore-00bce01b.js';
4
+ import { s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-d3d11f1a.js';
4
5
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
5
6
  import { c as classes } from './classes-0d95c529.js';
6
- import { g as getBorderRadius } from './getBorderRadius-0c7dfcf0.js';
7
- import { i as isDarkColor } from './isDarkColor-d0a57fd2.js';
8
- import { s as submitGtag } from './submitGtag-a38aed23.js';
7
+ import { g as getBorderRadius } from './getBorderRadius-19787feb.js';
8
+ import { i as isDarkColor } from './isDarkColor-2344e7a5.js';
9
+
10
+ const isShippableCountry = (showLog = true) => {
11
+ if (!localizationStore.localizationLoaded) {
12
+ return false;
13
+ }
14
+ // if localization is loaded and the localization is not a shippable country, keep the original click event
15
+ if (!localizationStore.isShippableCountry) {
16
+ if (showLog) {
17
+ log(`Checkout: not shippable country`);
18
+ }
19
+ return false;
20
+ }
21
+ return true;
22
+ };
23
+
24
+ /**
25
+ * Watch for changes in domestic checkout step, this is to redirect user to home page and open checkout if user enters the ship to country that's in the shipping zone
26
+ * @note Only works on default bigcommerce checkout page
27
+ */
28
+ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShippingAddressSessionFound, }) => {
29
+ if (!window.Zonos.isBigCommerce) {
30
+ return;
31
+ }
32
+ const observer = new MutationObserver(async () => {
33
+ const domesticRedirectedButton = document.querySelector(domesticRedirectedBtnSelector);
34
+ const shippingAddressSession = stripeStoreGetDomesticShippingSession();
35
+ // append a hidden button to the body if the shipping address session is found
36
+ if (!domesticRedirectedButton && shippingAddressSession) {
37
+ // create a hidden button to trigger the click event
38
+ const button = document.createElement('button');
39
+ button.style.display = 'none';
40
+ button.id = 'zonos--domestic-redirected-checkout-button';
41
+ document.body.appendChild(button);
42
+ onShippingAddressSessionFound === null || onShippingAddressSessionFound === void 0 ? void 0 : onShippingAddressSessionFound(shippingAddressSession);
43
+ // disconnect the observer after we found the shipping continue button
44
+ observer.disconnect();
45
+ return;
46
+ }
47
+ const shipToCountryElement = document.querySelector('select[name="shippingAddress.countryCode"]');
48
+ // make sure the continue button is available
49
+ const shippingCountinueBtnEle = document.querySelector('#checkout-shipping-continue');
50
+ if (!shipToCountryElement || !shippingCountinueBtnEle) {
51
+ // do nothing if shipping country and the continue button is not found
52
+ return;
53
+ }
54
+ // disconnect the observer after we found the shipping continue button
55
+ observer.disconnect();
56
+ shippingCountinueBtnEle.addEventListener('click', async (e) => {
57
+ var _a, _b;
58
+ const shippingCountry = shipToCountryElement.value;
59
+ if (!shippingCountry) {
60
+ // do nothing if shipping country is not found
61
+ return;
62
+ }
63
+ // update the country code in localization store and check if it's shippable
64
+ localizationStoreUpdateSelectedCountryCode(shippingCountry);
65
+ // do nothing if the country is still domestic
66
+ if (!isShippableCountry(false)) {
67
+ // cleanup the domestic shipping session if it's domestic because we will open the intl checkout after redirecting
68
+ stripeStoreCleanupDomesticShippingSession();
69
+ return;
70
+ }
71
+ // get value of shipping address state
72
+ const shipToFormElement = document.querySelector('form');
73
+ if (!shipToFormElement) {
74
+ return;
75
+ }
76
+ const formData = new FormData(shipToFormElement);
77
+ const shipAddress1Element = document.querySelector('input#addressLine1Input');
78
+ const shippingAddress = {
79
+ address1: (_a = formData.get('shippingAddress.address1')) !== null && _a !== void 0 ? _a :
80
+ // in Canada, the address1 is not included in the form, try to get value from input id instead.
81
+ (shipAddress1Element && shipAddress1Element.value),
82
+ address2: formData.get('shippingAddress.address2'),
83
+ city: formData.get('shippingAddress.city'),
84
+ countryCode: formData.get('shippingAddress.countryCode'),
85
+ firstName: formData.get('shippingAddress.firstName'),
86
+ lastName: formData.get('shippingAddress.lastName'),
87
+ phone: formData.get('shippingAddress.phone'),
88
+ postalCode: formData.get('shippingAddress.postalCode'),
89
+ stateOrProvince: (_b = formData.get('shippingAddress.stateOrProvince')) !== null && _b !== void 0 ? _b : formData.get('shippingAddress.stateOrProvinceCode'),
90
+ };
91
+ if (Object.values(shippingAddress).some(value => value === undefined || value === null)) {
92
+ logError('One or more shipping address field is missing', Object.entries(shippingAddress));
93
+ void sendErrorLog({
94
+ endpoint: 'No endpoint, domestic checkout form missing fields',
95
+ errors: [
96
+ 'Bigcommerce: One or more shipping address field is missing in the domestic checkout form',
97
+ JSON.stringify(Object.entries(shippingAddress)),
98
+ ],
99
+ metadata: {
100
+ domain: window.location.hostname,
101
+ storeId: zonosStore.storeId,
102
+ },
103
+ });
104
+ return;
105
+ }
106
+ // save the shipping address to session storage
107
+ stripeStoreSaveDomesticShippingSession({
108
+ address1: shippingAddress.address1,
109
+ address2: shippingAddress.address2,
110
+ city: shippingAddress.city,
111
+ countryCode: shippingAddress.countryCode,
112
+ firstName: shippingAddress.firstName,
113
+ lastName: shippingAddress.lastName,
114
+ phone: shippingAddress.phone,
115
+ postalCode: shippingAddress.postalCode,
116
+ state: shippingAddress.stateOrProvince,
117
+ });
118
+ e.preventDefault();
119
+ e.stopPropagation();
120
+ // redirect to home page, home page then will open the checkout dialog if having domestic shipping session
121
+ window.location.href = '/';
122
+ });
123
+ });
124
+ observer.observe(document.body, {
125
+ childList: true,
126
+ subtree: true,
127
+ });
128
+ };
9
129
 
10
130
  const LeftArrow = `<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
11
131
 
@@ -33,19 +153,6 @@ const ZonosCheckout = class {
33
153
  overrideTheme: this.isMobile ? theme : undefined,
34
154
  });
35
155
  };
36
- this.isShippableCountry = (showLog = true) => {
37
- if (!localizationStore.localizationLoaded) {
38
- return false;
39
- }
40
- // if localization is loaded and the localization is not a shippable country, keep the original click event
41
- if (!localizationStore.isShippableCountry) {
42
- if (showLog) {
43
- log(`Checkout: not shippable country`);
44
- }
45
- return false;
46
- }
47
- return true;
48
- };
49
156
  this.getCurrentLocalePageEnum = () => {
50
157
  switch (cartStore.step) {
51
158
  case 'customer-info':
@@ -72,6 +179,7 @@ const ZonosCheckout = class {
72
179
  this.isMobile = false;
73
180
  this.zonosReviewRef = undefined;
74
181
  this.storybookPaymentStatusOverride = undefined;
182
+ this.domesticRedirectedBtnSelector = '#zonos--domestic-redirected-checkout-button';
75
183
  }
76
184
  /**
77
185
  * Init cart info handler event
@@ -117,7 +225,8 @@ const ZonosCheckout = class {
117
225
  // do nothing if button element is not found
118
226
  return;
119
227
  }
120
- const buttonAnchorElements = document.querySelectorAll(buttonAnchorSelector);
228
+ // also attach event to hidden button if user was redirected with shipping address session
229
+ const buttonAnchorElements = document.querySelectorAll(`${buttonAnchorSelector}, ${this.domesticRedirectedBtnSelector}`);
121
230
  // only attach event once, and looping through all of the button elements
122
231
  buttonAnchorElements.forEach(button => {
123
232
  const isEventAttached = button.getAttribute('data-zonos-checkout-attached');
@@ -127,7 +236,7 @@ const ZonosCheckout = class {
127
236
  }
128
237
  button.addEventListener('click', async (e) => {
129
238
  // do nothing if it's not shippable country
130
- if (!this.isShippableCountry()) {
239
+ if (!isShippableCountry()) {
131
240
  return;
132
241
  }
133
242
  e.preventDefault();
@@ -143,6 +252,7 @@ const ZonosCheckout = class {
143
252
  throw new Error('Error building cart');
144
253
  }
145
254
  submitGtag('zonos-checkout-start');
255
+ void trackConversionEvent('checkout_open');
146
256
  }
147
257
  catch (err) {
148
258
  // stop loading
@@ -157,6 +267,14 @@ const ZonosCheckout = class {
157
267
  });
158
268
  button.removeAttribute('disabled');
159
269
  button.setAttribute('data-zonos-checkout-attached', 'true');
270
+ // if this button is the hidden button, trigger the click event
271
+ if (button.matches(this.domesticRedirectedBtnSelector)) {
272
+ button.dispatchEvent(new CustomEvent('click'));
273
+ // cleanup shipping session after button is clicked
274
+ stripeStoreCleanupDomesticShippingSession();
275
+ // remove the button after it's clicked
276
+ button.remove();
277
+ }
160
278
  });
161
279
  }
162
280
  appearanceSettingsOverrideChanged() {
@@ -172,6 +290,25 @@ const ZonosCheckout = class {
172
290
  async init() {
173
291
  stripeStore.stripe = window.Zonos.stripe;
174
292
  this.stripe = window.Zonos.stripe;
293
+ // check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
294
+ watchBigcommerceDomesticCheckout({
295
+ domesticRedirectedBtnSelector: this.domesticRedirectedBtnSelector,
296
+ onShippingAddressSessionFound: shippingAddressSession => {
297
+ // prefilled the default address if shipping address session is found for checkout on open
298
+ this.defaultAddress = {
299
+ address: {
300
+ city: shippingAddressSession.city,
301
+ country: shippingAddressSession.countryCode,
302
+ line1: shippingAddressSession.address1,
303
+ line2: shippingAddressSession.address2,
304
+ postal_code: shippingAddressSession.postalCode,
305
+ state: shippingAddressSession.state,
306
+ },
307
+ name: `${shippingAddressSession.firstName} ${shippingAddressSession.lastName}`,
308
+ phone: shippingAddressSession.phone,
309
+ };
310
+ },
311
+ });
175
312
  const hideInternationalOrderInterval = setInterval(() => {
176
313
  const internationalSelector = window.Zonos.internationalHideSelector;
177
314
  if (!internationalSelector) {
@@ -180,7 +317,7 @@ const ZonosCheckout = class {
180
317
  return;
181
318
  }
182
319
  // hide the selector if it's international
183
- const isInternationalOrder = this.isShippableCountry(false);
320
+ const isInternationalOrder = isShippableCountry(false);
184
321
  const selector = document.querySelectorAll(internationalSelector);
185
322
  if (!isInternationalOrder) {
186
323
  // show the selector when it's domestic
@@ -18,7 +18,7 @@ const ZonosComponent = class {
18
18
  return format(this.first, this.middle, this.last);
19
19
  }
20
20
  render() {
21
- return h("div", { key: 'cf376a9b1970bd04cdadf820112c081666c8bef2' }, "Hello, World! I'm ", this.getText());
21
+ return h("div", { key: '3b7429a0c03b00f0a80e15a94bebd08aedaafe51' }, "Hello, World! I'm ", this.getText());
22
22
  }
23
23
  };
24
24
  ZonosComponent.style = ZonosComponentStyle0;
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-b5be4dc3.js';
2
- import { n as handleFetch, o as logError, p as isValidSelector, a as log, s as stripeStore, q as initLocalizationStore, r as localizationStoreUpdateSelectedCountryCode } from './cart-2a0a6871.js';
3
- import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-dec6bd7e.js';
4
- import './isDarkColor-d0a57fd2.js';
5
- import './getBorderRadius-0c7dfcf0.js';
2
+ import { u as handleFetch, d as logError, v as isValidSelector, a as log, j as stripeStore, w as initLocalizationStore, b as localizationStoreUpdateSelectedCountryCode } from './cart-1bbb7662.js';
3
+ import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-00bce01b.js';
4
+ import './isDarkColor-2344e7a5.js';
5
+ import './getBorderRadius-19787feb.js';
6
6
 
7
7
  const getZonosSettings = async () => {
8
8
  const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-settings`;
@@ -35,13 +35,16 @@ const initCheckout = (config) => {
35
35
  injectCheckoutElement();
36
36
  };
37
37
 
38
- const injectHelloComponent = (triggerAnchorElement) => {
38
+ const injectHelloComponent = (anchorElementSelector) => {
39
+ const triggerAnchorElement = document.querySelector(anchorElementSelector);
39
40
  // append checkout component if doesn't exist
40
41
  const helloElement = document.querySelector('zonos-hello');
41
42
  if (!helloElement && triggerAnchorElement) {
42
43
  const newHelloElement = document.createElement('zonos-hello');
43
44
  triggerAnchorElement.appendChild(newHelloElement);
45
+ return true;
44
46
  }
47
+ return false;
45
48
  };
46
49
  const initHello = async (helloSettings) => {
47
50
  const { anchorElementSelector } = helloSettings;
@@ -50,9 +53,26 @@ const initHello = async (helloSettings) => {
50
53
  logError(`Selector anchorElementSelector "${helloSettings.anchorElementSelector}" is not a valid selector.`);
51
54
  return;
52
55
  }
53
- const triggerElement = document.querySelector(anchorElementSelector);
54
56
  log('Hello init complete');
55
- injectHelloComponent(triggerElement);
57
+ const isHelloInjected = injectHelloComponent(anchorElementSelector);
58
+ // keep watching for the anchor element to be added to the DOM, then inject hello component
59
+ if (!isHelloInjected) {
60
+ const observer = new MutationObserver(() => {
61
+ const injected = injectHelloComponent(anchorElementSelector);
62
+ if (injected) {
63
+ // disconnect observer if hello is successfully injected
64
+ observer.disconnect();
65
+ }
66
+ });
67
+ observer.observe(document.body, {
68
+ childList: true,
69
+ subtree: true,
70
+ });
71
+ // kill observer after 5 seconds if the hello still not injected, if the hello still not injected after 10 seconds, it's likely that the selector the user doesn't want to use hello
72
+ setTimeout(() => {
73
+ observer.disconnect();
74
+ }, 5000);
75
+ }
56
76
  };
57
77
 
58
78
  const zonosControllerCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{visibility:hidden;opacity:0;height:0}";
@@ -206,7 +226,7 @@ const ZonosController = class {
206
226
  zonosStore.organizationName = organizationName;
207
227
  }
208
228
  render() {
209
- return h(Host, { key: '5650218b8eef4246ff1b131fcd1a06319800c2e3', class: "zonos--elements" });
229
+ return h(Host, { key: 'a220a3ebe75df167eefc892c59efdcaf05a53601', class: "zonos--elements" });
210
230
  }
211
231
  };
212
232
  ZonosController.style = ZonosControllerStyle0;
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-b5be4dc3.js';
2
- import { l as localizationStore } from './cart-2a0a6871.js';
3
- import { d as zonosStoreFontFamily } from './zonosStore-dec6bd7e.js';
2
+ import { l as localizationStore } from './cart-1bbb7662.js';
3
+ import { d as zonosStoreFontFamily } from './zonosStore-00bce01b.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import './isDarkColor-d0a57fd2.js';
6
- import './getBorderRadius-0c7dfcf0.js';
5
+ import './isDarkColor-2344e7a5.js';
6
+ import './getBorderRadius-19787feb.js';
7
7
 
8
8
  const zonosCountryFlagCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
9
9
  const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
@@ -1,9 +1,10 @@
1
- import { r as registerInstance, h, H as Host } from './index-b5be4dc3.js';
2
- import { r as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-2a0a6871.js';
3
- import { d as zonosStoreFontFamily } from './zonosStore-dec6bd7e.js';
4
- import { i as isDarkColor } from './isDarkColor-d0a57fd2.js';
1
+ import { r as registerInstance, h, H as Host, d as getElement } from './index-b5be4dc3.js';
2
+ import { b as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-1bbb7662.js';
3
+ import { d as zonosStoreFontFamily } from './zonosStore-00bce01b.js';
4
+ import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
+ import { i as isDarkColor } from './isDarkColor-2344e7a5.js';
5
6
  import { l as languages } from './ILanguage-97790bee.js';
6
- import './getBorderRadius-0c7dfcf0.js';
7
+ import './getBorderRadius-19787feb.js';
7
8
 
8
9
  /**
9
10
  * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)
@@ -1808,6 +1809,11 @@ const ZonosCountrySelect = class {
1808
1809
  this.handleOnClose = () => { };
1809
1810
  this.inputValue = '';
1810
1811
  }
1812
+ componentDidRender() {
1813
+ var _a, _b;
1814
+ // focus the input on render
1815
+ (_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-select-input')) === null || _b === void 0 ? void 0 : _b.focus();
1816
+ }
1811
1817
  render() {
1812
1818
  const { shippingZoneCountries } = localizationStore;
1813
1819
  const countries = shippingZoneCountries
@@ -1820,10 +1826,11 @@ const ZonosCountrySelect = class {
1820
1826
  const filteredCountries = this.inputValue
1821
1827
  ? fuseObject.map(country => country.item)
1822
1828
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
1823
- return (h(Host, { key: 'fb1115a06814daaf8ebb7d9e282fdd1bd944121f', class: "zonos--elements", style: {
1829
+ return (h(Host, { key: '2b8e15643f92ac489706aff7623b1d1efdebce70', class: "zonos--elements", style: {
1824
1830
  '--font-family': zonosStoreFontFamily(),
1825
- } }, h("div", { key: 'eb9eb7dba8f170c6190fd29e670b002ecb39a849', class: "zonos--country-select" }, h("zonos-v-stack", { key: '4667474f03efbad9fbb0ea4153d16b49a7f2803f', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'c2777f838d9d376878e1218868ed8df0d28dc5f2', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '1e41b3888bce97a94ff88c4b3b3389cc8d4de096', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: 'ba89ae931e2a0e564112d9989d8074674906a297', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { color: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
1831
+ } }, h("div", { key: '06b0c7765d8144ca102c9033e74cf1edb14743ac', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'f2af99575f518acb753448f7cb1f7aecd790de9d', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '296b92c476439aace00f6817b452a3fd3e1d353d', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: 'd988b856392f88a66bcc3016ccf55107bda4a411', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '4376bec824141dd7d2dbfb84f465ac4a48e1d050', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
1826
1832
  }
1833
+ get ele() { return getElement(this); }
1827
1834
  };
1828
1835
  ZonosCountrySelect.style = ZonosCountrySelectStyle0;
1829
1836
 
@@ -1837,9 +1844,10 @@ const ZonosCustomMessage = class {
1837
1844
  this.message = '';
1838
1845
  }
1839
1846
  render() {
1840
- return (h(Host, { key: '6c16aa29406415995c2289c2fe3d22dbe08fbd23', class: "zonos--elements", style: {
1847
+ const messageWithLinks = formatStringWithLinks(this.message);
1848
+ return (h(Host, { key: '73091a3267f0989e8820800054aebc75168dc5d6', class: "zonos--elements", style: {
1841
1849
  '--font-family': zonosStoreFontFamily(),
1842
- } }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message", content: this.icon }), h("zonos-text", null, this.message))))));
1850
+ } }, this.message && (h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { innerHTML: messageWithLinks }))))));
1843
1851
  }
1844
1852
  };
1845
1853
  ZonosCustomMessage.style = ZonosCustomMessageStyle0;
@@ -1871,9 +1879,9 @@ const ZonosHelloDialogFooter = class {
1871
1879
  const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
1872
1880
  const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
1873
1881
  const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
1874
- return (h(Host, { key: 'a3a6ab0e4af4981cc83802be1433c3c41da58c19', class: "zonos--elements" }, h("div", { key: 'fdea45d1b4d83055a3d17918a5ae78f43a7e0042', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
1882
+ return (h(Host, { key: 'f97688788d9f6d1a640f054a2a22dbae6955b83c', class: "zonos--elements" }, h("div", { key: '3539323f9044acef3890fc072bdd981e2495fc18', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
1875
1883
  '--primary-color': (_c = this.appearanceSettings) === null || _c === void 0 ? void 0 : _c.colorPrimary,
1876
- } }, h("a", { key: '4d4e995052049238d4c522ff8501dddbe25e29d5', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '4ca16c024473660f74cfc7a3d506b8ba4ebf7362', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: 'dd1da686f8345431c3805898f374e5fb22e27289', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'd5c34c75c5006710ff6d0426d43f07a5ade41827', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '43759ce87473b10e078f14dce529db502a5edd4d', buttonColor: "gray-1200", icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
1884
+ } }, h("a", { key: '5e30052240f87211c6f0092ef6a27c217f3ecefb', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'c60142bcd26086c2944ac3464885ca1f96e5cfbe', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: '67297b4c557ee5b49a4406a459588f2924183195', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '9348bff826187730f36d191f7e01f516f2b9785c', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'ecf1a8639e8e92a07a0e774abb560de53c19587c', buttonColor: "gray-1200", icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
1877
1885
  }
1878
1886
  };
1879
1887
  ZonosHelloDialogFooter.style = ZonosHelloDialogFooterStyle0;
@@ -16,5 +16,5 @@ const patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-button_3",[[1,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-country-select_3",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge_2",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-card_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-address_4",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32]}]]],["zonos-cart-items_9",[[1,"zonos-checkout-footer",{"showDialog":[32]},[[4,"click","handleGlobalClick"]]],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}]]]], options);
19
+ return bootstrapLazy([["zonos-checkout",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged"],"mobile":["handleMobileChange"]}]]],["zonos-hello",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]]]]],["zonos-controller",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-badge_2",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3",[[1,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-address_4",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_9",[[1,"zonos-checkout-footer",{"showDialog":[32]},[[4,"click","handleGlobalClick"]]],[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"footerRightAction":[16],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}]]]], options);
20
20
  });
@@ -1,10 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-b5be4dc3.js';
2
- import { z as currencyFormat, l as localizationStore, t as translate } from './cart-2a0a6871.js';
3
- import { z as zonosStore } from './zonosStore-dec6bd7e.js';
2
+ import { C as currencyFormat, l as localizationStore, t as translate } from './cart-1bbb7662.js';
3
+ import { z as zonosStore } from './zonosStore-00bce01b.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
+ import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
6
- import './isDarkColor-d0a57fd2.js';
7
- import './getBorderRadius-0c7dfcf0.js';
7
+ import './isDarkColor-2344e7a5.js';
8
+ import './getBorderRadius-19787feb.js';
8
9
 
9
10
  const getHasMoreSpaceAbove = (ref) => {
10
11
  const componentRect = ref.getBoundingClientRect();
@@ -112,18 +113,19 @@ const ZonosHelloDialog = class {
112
113
  const animateFromBottom = this.dialogRef && getHasMoreSpaceAbove(this.dialogRef);
113
114
  const { customMessages } = localizationStore;
114
115
  const welcomeMessage = `${translate('Welcome to')} ${zonosStore.organizationName}!`;
115
- const defaultMessage = ((_a = customMessages.find(x => x.pageName === 'hello_default')) === null || _a === void 0 ? void 0 : _a.message) ||
116
+ const defaultMessageStr = ((_a = customMessages.find(x => x.pageName === 'hello_default')) === null || _a === void 0 ? void 0 : _a.message) ||
116
117
  translate('Know about duties and taxes before you buy. Shop with confidence!');
118
+ const defaultMessage = formatStringWithLinks(defaultMessageStr);
117
119
  const currentPage = this.getCurrentPageEnum();
118
120
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
119
- return (h(Host, { key: '303f914b4511500edcd8d041ccfd52f0c48a7a85', class: "zonos--elements" }, h("div", { key: 'f52025ee53c0cdbbf20ecbb874e5639194b6507b', "aria-hidden": "true", class: classes([
121
+ return (h(Host, { key: 'd5ac86955cf9f9a22e47fe2154dee6e10f6a9361', class: "zonos--elements" }, h("div", { key: 'd34dd3f937330cd5fdd2d7a11dc321c215983146', "aria-hidden": "true", class: classes([
120
122
  'zonos--hello-dialog',
121
123
  animateLeft && 'zonos--hello-dialog-animate-from-left',
122
124
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
123
125
  !!this.mobileLocationOverride &&
124
126
  'zonos--hello-dialog-mobile-override',
125
127
  this.isOpen && 'zonos--hello-dialog-open',
126
- ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", null, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { textColor: "gray-800" }, defaultMessage)), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
128
+ ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", null, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
127
129
  var _a;
128
130
  return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
129
131
  }), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: BagIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", null, h("zonos-country-select", { handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", null, h("zonos-language-select", { handleOnClose: () => this.setShowLanguageSelect(false) }))))));
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-b5be4dc3.js';
2
- import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore-dec6bd7e.js';
3
- import { n as handleFetch, o as logError, l as localizationStore, p as isValidSelector, t as translate, u as getZCountryUrlParam, v as setZCountryUrlParam, a as log, w as currencyDisplay, x as currencyConvertAndFormat, y as currencyConvert, z as currencyFormat } from './cart-2a0a6871.js';
2
+ import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore-00bce01b.js';
3
+ import { u as handleFetch, d as logError, l as localizationStore, v as isValidSelector, t as translate, x as getZCountryUrlParam, y as setZCountryUrlParam, a as log, z as currencyDisplay, A as currencyConvertAndFormat, B as currencyConvert, C as currencyFormat } from './cart-1bbb7662.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
6
- import './isDarkColor-d0a57fd2.js';
7
- import './getBorderRadius-0c7dfcf0.js';
6
+ import './isDarkColor-2344e7a5.js';
7
+ import './getBorderRadius-19787feb.js';
8
8
 
9
9
  var root = _root;
10
10
 
@@ -555,7 +555,6 @@ const ZonosHello = class {
555
555
  this.reloadHelloData = async () => {
556
556
  await this.handleItemRestrictions();
557
557
  this.triggerShowPeekMessage();
558
- void this.displayCurrency();
559
558
  };
560
559
  this.handleProductCountChange = debounce_1(() => {
561
560
  const { productTitleElementSelector } = zonosStore.helloSettings;
@@ -578,6 +577,14 @@ const ZonosHello = class {
578
577
  subtree: true,
579
578
  });
580
579
  };
580
+ this.watchPriceChange = () => {
581
+ const observer = new MutationObserver(() => void this.displayCurrency());
582
+ observer.observe(document.body, {
583
+ attributes: true,
584
+ childList: true,
585
+ subtree: true,
586
+ });
587
+ };
581
588
  this.updateHelloOnPageChange = () => {
582
589
  // If the product count changes on the same url (loading more products), update the peek message and item restrictions
583
590
  this.watchProductCountChange();
@@ -649,6 +656,7 @@ const ZonosHello = class {
649
656
  if (zonosStore.loadedConfig) {
650
657
  this.helloRef.setAttribute('data-zonos-hello-loaded', '');
651
658
  this.updateHelloOnPageChange();
659
+ this.watchPriceChange();
652
660
  clearInterval(initInterval);
653
661
  }
654
662
  }, 100);
@@ -670,21 +678,28 @@ const ZonosHello = class {
670
678
  * @returns string
671
679
  */
672
680
  async convertAndFormat(value) {
673
- currencyConvertAndFormat(value);
681
+ return currencyConvertAndFormat(value);
674
682
  }
675
683
  /**
676
684
  * This method will convert the currency and return the converted value
677
685
  * @returns number
678
686
  */
679
687
  async convert(value) {
680
- currencyConvert(value);
688
+ return currencyConvert(value);
681
689
  }
682
690
  /**
683
691
  * This method will format the currency and return the formatted string
684
692
  * @returns number
685
693
  */
686
694
  async format(value) {
687
- currencyFormat(value);
695
+ return currencyFormat(value);
696
+ }
697
+ /**
698
+ * This method show the hello dialog
699
+ * @returns void
700
+ */
701
+ async openHelloDialog(value) {
702
+ this.changeShowDialog(value);
688
703
  }
689
704
  handleResize() {
690
705
  debounce_1(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
@@ -721,7 +736,7 @@ const ZonosHello = class {
721
736
  !!this.allRestrictedItems.length &&
722
737
  'zonos--hello-has-restrictions',
723
738
  ]), onClick: () => {
724
- this.changeShowDialog(!this.showDialog);
739
+ void this.changeShowDialog(!this.showDialog);
725
740
  }, onMouseEnter: () => this.enableShowPeekMessage(), onMouseLeave: () => (this.showPeekMessage = false), ref: el => el && (this.helloRef = el) }, h("zonos-text", { class: "zonos--hello-message" }, this.peekMessage), selectedCountryCode && (h("div", { class: "zonos--hello-country-flag-wrapper" }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode })))), h("div", { class: classes([
726
741
  'zonos--hello-dialog-wrapper',
727
742
  this.mobileLocationOverride &&
@@ -0,0 +1,20 @@
1
+ import { r as registerInstance, h, H as Host } from './index-b5be4dc3.js';
2
+
3
+ const zonosLinkCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host a{padding-bottom:2px;color:var(--amino-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--amino-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--amino-primary);-webkit-box-shadow:0 1px 0 var(--amino-primary);box-shadow:0 1px 0 var(--amino-primary)}";
4
+ const ZonosLinkStyle0 = zonosLinkCss;
5
+
6
+ const ZonosLink = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.href = '';
10
+ this.rel = undefined;
11
+ this.target = undefined;
12
+ this.linkTitle = undefined;
13
+ }
14
+ render() {
15
+ return (h(Host, { key: '99bf9ff46cf84f424739b76d3da8a8c770c0a88f', class: "zonos--elements" }, h("a", { key: 'bd3553a33f27b4815a7b0573a34862093242b456', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: 'ad80829c1ca5cd9b0e2dd62542025eeecf436196' }))));
16
+ }
17
+ };
18
+ ZonosLink.style = ZonosLinkStyle0;
19
+
20
+ export { ZonosLink as zonos_link };