@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
@@ -3,13 +3,133 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-72767498.js');
6
- const cart = require('./cart-ecc80eb0.js');
7
- const zonosStore = require('./zonosStore-49d4c92a.js');
6
+ const cart = require('./cart-89d9fff4.js');
7
+ const zonosStore = require('./zonosStore-138c5555.js');
8
+ const submitGtag = require('./submitGtag-24740560.js');
8
9
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
9
10
  const classes = require('./classes-b7918f56.js');
10
- const getBorderRadius = require('./getBorderRadius-834c321d.js');
11
- const isDarkColor = require('./isDarkColor-924e6a7a.js');
12
- const submitGtag = require('./submitGtag-907e71d3.js');
11
+ const getBorderRadius = require('./getBorderRadius-d8f18958.js');
12
+ const isDarkColor = require('./isDarkColor-57860b44.js');
13
+
14
+ const isShippableCountry = (showLog = true) => {
15
+ if (!cart.localizationStore.localizationLoaded) {
16
+ return false;
17
+ }
18
+ // if localization is loaded and the localization is not a shippable country, keep the original click event
19
+ if (!cart.localizationStore.isShippableCountry) {
20
+ if (showLog) {
21
+ cart.log(`Checkout: not shippable country`);
22
+ }
23
+ return false;
24
+ }
25
+ return true;
26
+ };
27
+
28
+ /**
29
+ * 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
30
+ * @note Only works on default bigcommerce checkout page
31
+ */
32
+ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShippingAddressSessionFound, }) => {
33
+ if (!window.Zonos.isBigCommerce) {
34
+ return;
35
+ }
36
+ const observer = new MutationObserver(async () => {
37
+ const domesticRedirectedButton = document.querySelector(domesticRedirectedBtnSelector);
38
+ const shippingAddressSession = cart.stripeStoreGetDomesticShippingSession();
39
+ // append a hidden button to the body if the shipping address session is found
40
+ if (!domesticRedirectedButton && shippingAddressSession) {
41
+ // create a hidden button to trigger the click event
42
+ const button = document.createElement('button');
43
+ button.style.display = 'none';
44
+ button.id = 'zonos--domestic-redirected-checkout-button';
45
+ document.body.appendChild(button);
46
+ onShippingAddressSessionFound === null || onShippingAddressSessionFound === void 0 ? void 0 : onShippingAddressSessionFound(shippingAddressSession);
47
+ // disconnect the observer after we found the shipping continue button
48
+ observer.disconnect();
49
+ return;
50
+ }
51
+ const shipToCountryElement = document.querySelector('select[name="shippingAddress.countryCode"]');
52
+ // make sure the continue button is available
53
+ const shippingCountinueBtnEle = document.querySelector('#checkout-shipping-continue');
54
+ if (!shipToCountryElement || !shippingCountinueBtnEle) {
55
+ // do nothing if shipping country and the continue button is not found
56
+ return;
57
+ }
58
+ // disconnect the observer after we found the shipping continue button
59
+ observer.disconnect();
60
+ shippingCountinueBtnEle.addEventListener('click', async (e) => {
61
+ var _a, _b;
62
+ const shippingCountry = shipToCountryElement.value;
63
+ if (!shippingCountry) {
64
+ // do nothing if shipping country is not found
65
+ return;
66
+ }
67
+ // update the country code in localization store and check if it's shippable
68
+ cart.localizationStoreUpdateSelectedCountryCode(shippingCountry);
69
+ // do nothing if the country is still domestic
70
+ if (!isShippableCountry(false)) {
71
+ // cleanup the domestic shipping session if it's domestic because we will open the intl checkout after redirecting
72
+ cart.stripeStoreCleanupDomesticShippingSession();
73
+ return;
74
+ }
75
+ // get value of shipping address state
76
+ const shipToFormElement = document.querySelector('form');
77
+ if (!shipToFormElement) {
78
+ return;
79
+ }
80
+ const formData = new FormData(shipToFormElement);
81
+ const shipAddress1Element = document.querySelector('input#addressLine1Input');
82
+ const shippingAddress = {
83
+ address1: (_a = formData.get('shippingAddress.address1')) !== null && _a !== void 0 ? _a :
84
+ // in Canada, the address1 is not included in the form, try to get value from input id instead.
85
+ (shipAddress1Element && shipAddress1Element.value),
86
+ address2: formData.get('shippingAddress.address2'),
87
+ city: formData.get('shippingAddress.city'),
88
+ countryCode: formData.get('shippingAddress.countryCode'),
89
+ firstName: formData.get('shippingAddress.firstName'),
90
+ lastName: formData.get('shippingAddress.lastName'),
91
+ phone: formData.get('shippingAddress.phone'),
92
+ postalCode: formData.get('shippingAddress.postalCode'),
93
+ stateOrProvince: (_b = formData.get('shippingAddress.stateOrProvince')) !== null && _b !== void 0 ? _b : formData.get('shippingAddress.stateOrProvinceCode'),
94
+ };
95
+ if (Object.values(shippingAddress).some(value => value === undefined || value === null)) {
96
+ cart.logError('One or more shipping address field is missing', Object.entries(shippingAddress));
97
+ void submitGtag.sendErrorLog({
98
+ endpoint: 'No endpoint, domestic checkout form missing fields',
99
+ errors: [
100
+ 'Bigcommerce: One or more shipping address field is missing in the domestic checkout form',
101
+ JSON.stringify(Object.entries(shippingAddress)),
102
+ ],
103
+ metadata: {
104
+ domain: window.location.hostname,
105
+ storeId: zonosStore.zonosStore.storeId,
106
+ },
107
+ });
108
+ return;
109
+ }
110
+ // save the shipping address to session storage
111
+ cart.stripeStoreSaveDomesticShippingSession({
112
+ address1: shippingAddress.address1,
113
+ address2: shippingAddress.address2,
114
+ city: shippingAddress.city,
115
+ countryCode: shippingAddress.countryCode,
116
+ firstName: shippingAddress.firstName,
117
+ lastName: shippingAddress.lastName,
118
+ phone: shippingAddress.phone,
119
+ postalCode: shippingAddress.postalCode,
120
+ state: shippingAddress.stateOrProvince,
121
+ });
122
+ e.preventDefault();
123
+ e.stopPropagation();
124
+ // redirect to home page, home page then will open the checkout dialog if having domestic shipping session
125
+ window.location.href = '/';
126
+ });
127
+ });
128
+ observer.observe(document.body, {
129
+ childList: true,
130
+ subtree: true,
131
+ });
132
+ };
13
133
 
14
134
  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>`;
15
135
 
@@ -37,19 +157,6 @@ const ZonosCheckout = class {
37
157
  overrideTheme: this.isMobile ? theme : undefined,
38
158
  });
39
159
  };
40
- this.isShippableCountry = (showLog = true) => {
41
- if (!cart.localizationStore.localizationLoaded) {
42
- return false;
43
- }
44
- // if localization is loaded and the localization is not a shippable country, keep the original click event
45
- if (!cart.localizationStore.isShippableCountry) {
46
- if (showLog) {
47
- cart.log(`Checkout: not shippable country`);
48
- }
49
- return false;
50
- }
51
- return true;
52
- };
53
160
  this.getCurrentLocalePageEnum = () => {
54
161
  switch (cart.cartStore.step) {
55
162
  case 'customer-info':
@@ -76,6 +183,7 @@ const ZonosCheckout = class {
76
183
  this.isMobile = false;
77
184
  this.zonosReviewRef = undefined;
78
185
  this.storybookPaymentStatusOverride = undefined;
186
+ this.domesticRedirectedBtnSelector = '#zonos--domestic-redirected-checkout-button';
79
187
  }
80
188
  /**
81
189
  * Init cart info handler event
@@ -121,7 +229,8 @@ const ZonosCheckout = class {
121
229
  // do nothing if button element is not found
122
230
  return;
123
231
  }
124
- const buttonAnchorElements = document.querySelectorAll(buttonAnchorSelector);
232
+ // also attach event to hidden button if user was redirected with shipping address session
233
+ const buttonAnchorElements = document.querySelectorAll(`${buttonAnchorSelector}, ${this.domesticRedirectedBtnSelector}`);
125
234
  // only attach event once, and looping through all of the button elements
126
235
  buttonAnchorElements.forEach(button => {
127
236
  const isEventAttached = button.getAttribute('data-zonos-checkout-attached');
@@ -131,7 +240,7 @@ const ZonosCheckout = class {
131
240
  }
132
241
  button.addEventListener('click', async (e) => {
133
242
  // do nothing if it's not shippable country
134
- if (!this.isShippableCountry()) {
243
+ if (!isShippableCountry()) {
135
244
  return;
136
245
  }
137
246
  e.preventDefault();
@@ -147,6 +256,7 @@ const ZonosCheckout = class {
147
256
  throw new Error('Error building cart');
148
257
  }
149
258
  submitGtag.submitGtag('zonos-checkout-start');
259
+ void submitGtag.trackConversionEvent('checkout_open');
150
260
  }
151
261
  catch (err) {
152
262
  // stop loading
@@ -161,6 +271,14 @@ const ZonosCheckout = class {
161
271
  });
162
272
  button.removeAttribute('disabled');
163
273
  button.setAttribute('data-zonos-checkout-attached', 'true');
274
+ // if this button is the hidden button, trigger the click event
275
+ if (button.matches(this.domesticRedirectedBtnSelector)) {
276
+ button.dispatchEvent(new CustomEvent('click'));
277
+ // cleanup shipping session after button is clicked
278
+ cart.stripeStoreCleanupDomesticShippingSession();
279
+ // remove the button after it's clicked
280
+ button.remove();
281
+ }
164
282
  });
165
283
  }
166
284
  appearanceSettingsOverrideChanged() {
@@ -176,6 +294,25 @@ const ZonosCheckout = class {
176
294
  async init() {
177
295
  cart.stripeStore.stripe = window.Zonos.stripe;
178
296
  this.stripe = window.Zonos.stripe;
297
+ // check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
298
+ watchBigcommerceDomesticCheckout({
299
+ domesticRedirectedBtnSelector: this.domesticRedirectedBtnSelector,
300
+ onShippingAddressSessionFound: shippingAddressSession => {
301
+ // prefilled the default address if shipping address session is found for checkout on open
302
+ this.defaultAddress = {
303
+ address: {
304
+ city: shippingAddressSession.city,
305
+ country: shippingAddressSession.countryCode,
306
+ line1: shippingAddressSession.address1,
307
+ line2: shippingAddressSession.address2,
308
+ postal_code: shippingAddressSession.postalCode,
309
+ state: shippingAddressSession.state,
310
+ },
311
+ name: `${shippingAddressSession.firstName} ${shippingAddressSession.lastName}`,
312
+ phone: shippingAddressSession.phone,
313
+ };
314
+ },
315
+ });
179
316
  const hideInternationalOrderInterval = setInterval(() => {
180
317
  const internationalSelector = window.Zonos.internationalHideSelector;
181
318
  if (!internationalSelector) {
@@ -184,7 +321,7 @@ const ZonosCheckout = class {
184
321
  return;
185
322
  }
186
323
  // hide the selector if it's international
187
- const isInternationalOrder = this.isShippableCountry(false);
324
+ const isInternationalOrder = isShippableCountry(false);
188
325
  const selector = document.querySelectorAll(internationalSelector);
189
326
  if (!isInternationalOrder) {
190
327
  // show the selector when it's domestic
@@ -22,7 +22,7 @@ const ZonosComponent = class {
22
22
  return format(this.first, this.middle, this.last);
23
23
  }
24
24
  render() {
25
- return index.h("div", { key: 'cf376a9b1970bd04cdadf820112c081666c8bef2' }, "Hello, World! I'm ", this.getText());
25
+ return index.h("div", { key: '3b7429a0c03b00f0a80e15a94bebd08aedaafe51' }, "Hello, World! I'm ", this.getText());
26
26
  }
27
27
  };
28
28
  ZonosComponent.style = ZonosComponentStyle0;
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-72767498.js');
6
- const cart = require('./cart-ecc80eb0.js');
7
- const zonosStore = require('./zonosStore-49d4c92a.js');
8
- require('./isDarkColor-924e6a7a.js');
9
- require('./getBorderRadius-834c321d.js');
6
+ const cart = require('./cart-89d9fff4.js');
7
+ const zonosStore = require('./zonosStore-138c5555.js');
8
+ require('./isDarkColor-57860b44.js');
9
+ require('./getBorderRadius-d8f18958.js');
10
10
 
11
11
  const getZonosSettings = async () => {
12
12
  const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/zonos-settings`;
@@ -39,13 +39,16 @@ const initCheckout = (config) => {
39
39
  injectCheckoutElement();
40
40
  };
41
41
 
42
- const injectHelloComponent = (triggerAnchorElement) => {
42
+ const injectHelloComponent = (anchorElementSelector) => {
43
+ const triggerAnchorElement = document.querySelector(anchorElementSelector);
43
44
  // append checkout component if doesn't exist
44
45
  const helloElement = document.querySelector('zonos-hello');
45
46
  if (!helloElement && triggerAnchorElement) {
46
47
  const newHelloElement = document.createElement('zonos-hello');
47
48
  triggerAnchorElement.appendChild(newHelloElement);
49
+ return true;
48
50
  }
51
+ return false;
49
52
  };
50
53
  const initHello = async (helloSettings) => {
51
54
  const { anchorElementSelector } = helloSettings;
@@ -54,9 +57,26 @@ const initHello = async (helloSettings) => {
54
57
  cart.logError(`Selector anchorElementSelector "${helloSettings.anchorElementSelector}" is not a valid selector.`);
55
58
  return;
56
59
  }
57
- const triggerElement = document.querySelector(anchorElementSelector);
58
60
  cart.log('Hello init complete');
59
- injectHelloComponent(triggerElement);
61
+ const isHelloInjected = injectHelloComponent(anchorElementSelector);
62
+ // keep watching for the anchor element to be added to the DOM, then inject hello component
63
+ if (!isHelloInjected) {
64
+ const observer = new MutationObserver(() => {
65
+ const injected = injectHelloComponent(anchorElementSelector);
66
+ if (injected) {
67
+ // disconnect observer if hello is successfully injected
68
+ observer.disconnect();
69
+ }
70
+ });
71
+ observer.observe(document.body, {
72
+ childList: true,
73
+ subtree: true,
74
+ });
75
+ // 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
76
+ setTimeout(() => {
77
+ observer.disconnect();
78
+ }, 5000);
79
+ }
60
80
  };
61
81
 
62
82
  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}";
@@ -210,7 +230,7 @@ const ZonosController = class {
210
230
  zonosStore.zonosStore.organizationName = organizationName;
211
231
  }
212
232
  render() {
213
- return index.h(index.Host, { key: '5650218b8eef4246ff1b131fcd1a06319800c2e3', class: "zonos--elements" });
233
+ return index.h(index.Host, { key: 'a220a3ebe75df167eefc892c59efdcaf05a53601', class: "zonos--elements" });
214
234
  }
215
235
  };
216
236
  ZonosController.style = ZonosControllerStyle0;
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-72767498.js');
6
- const cart = require('./cart-ecc80eb0.js');
7
- const zonosStore = require('./zonosStore-49d4c92a.js');
6
+ const cart = require('./cart-89d9fff4.js');
7
+ const zonosStore = require('./zonosStore-138c5555.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- require('./isDarkColor-924e6a7a.js');
10
- require('./getBorderRadius-834c321d.js');
9
+ require('./isDarkColor-57860b44.js');
10
+ require('./getBorderRadius-d8f18958.js');
11
11
 
12
12
  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}";
13
13
  const ZonosCountryFlagStyle0 = zonosCountryFlagCss;
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-72767498.js');
6
- const cart = require('./cart-ecc80eb0.js');
7
- const zonosStore = require('./zonosStore-49d4c92a.js');
8
- const isDarkColor = require('./isDarkColor-924e6a7a.js');
6
+ const cart = require('./cart-89d9fff4.js');
7
+ const zonosStore = require('./zonosStore-138c5555.js');
8
+ const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
+ const isDarkColor = require('./isDarkColor-57860b44.js');
9
10
  const ILanguage = require('./ILanguage-d247b45b.js');
10
- require('./getBorderRadius-834c321d.js');
11
+ require('./getBorderRadius-d8f18958.js');
11
12
 
12
13
  /**
13
14
  * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)
@@ -1812,6 +1813,11 @@ const ZonosCountrySelect = class {
1812
1813
  this.handleOnClose = () => { };
1813
1814
  this.inputValue = '';
1814
1815
  }
1816
+ componentDidRender() {
1817
+ var _a, _b;
1818
+ // focus the input on render
1819
+ (_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();
1820
+ }
1815
1821
  render() {
1816
1822
  const { shippingZoneCountries } = cart.localizationStore;
1817
1823
  const countries = shippingZoneCountries
@@ -1824,10 +1830,11 @@ const ZonosCountrySelect = class {
1824
1830
  const filteredCountries = this.inputValue
1825
1831
  ? fuseObject.map(country => country.item)
1826
1832
  : countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
1827
- return (index.h(index.Host, { key: 'fb1115a06814daaf8ebb7d9e282fdd1bd944121f', class: "zonos--elements", style: {
1833
+ return (index.h(index.Host, { key: '2b8e15643f92ac489706aff7623b1d1efdebce70', class: "zonos--elements", style: {
1828
1834
  '--font-family': zonosStore.zonosStoreFontFamily(),
1829
- } }, index.h("div", { key: 'eb9eb7dba8f170c6190fd29e670b002ecb39a849', class: "zonos--country-select" }, index.h("zonos-v-stack", { key: '4667474f03efbad9fbb0ea4153d16b49a7f2803f', class: "zonos--country-select-header", spacing: 8 }, index.h("zonos-select-dialog-header", { key: 'c2777f838d9d376878e1218868ed8df0d28dc5f2', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, index.h("input", { key: '1e41b3888bce97a94ff88c4b3b3389cc8d4de096', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), index.h("div", { key: 'ba89ae931e2a0e564112d9989d8074674906a297', class: "zonos--country-select-content" }, filteredCountries.map(country => (index.h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), index.h("zonos-text", { color: "gray-800" }, country.displayName), country.code === cart.localizationStore.selectedCountryCode && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
1835
+ } }, index.h("div", { key: '06b0c7765d8144ca102c9033e74cf1edb14743ac', class: "zonos--country-select" }, index.h("zonos-v-stack", { key: 'f2af99575f518acb753448f7cb1f7aecd790de9d', class: "zonos--country-select-header", spacing: 8 }, index.h("zonos-select-dialog-header", { key: '296b92c476439aace00f6817b452a3fd3e1d353d', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, index.h("input", { key: 'd988b856392f88a66bcc3016ccf55107bda4a411', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), index.h("div", { key: '4376bec824141dd7d2dbfb84f465ac4a48e1d050', class: "zonos--country-select-content" }, filteredCountries.map(country => (index.h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), index.h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === cart.localizationStore.selectedCountryCode && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
1830
1836
  }
1837
+ get ele() { return index.getElement(this); }
1831
1838
  };
1832
1839
  ZonosCountrySelect.style = ZonosCountrySelectStyle0;
1833
1840
 
@@ -1841,9 +1848,10 @@ const ZonosCustomMessage = class {
1841
1848
  this.message = '';
1842
1849
  }
1843
1850
  render() {
1844
- return (index.h(index.Host, { key: '6c16aa29406415995c2289c2fe3d22dbe08fbd23', class: "zonos--elements", style: {
1851
+ const messageWithLinks = formatStringWithLinks.formatStringWithLinks(this.message);
1852
+ return (index.h(index.Host, { key: '73091a3267f0989e8820800054aebc75168dc5d6', class: "zonos--elements", style: {
1845
1853
  '--font-family': zonosStore.zonosStoreFontFamily(),
1846
- } }, this.message && (index.h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Custom message", content: this.icon }), index.h("zonos-text", null, this.message))))));
1854
+ } }, this.message && (index.h("zonos-card", { class: "zonos--custom-message", spacing: "12px" }, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Custom message icon", content: this.icon }), index.h("zonos-text", { innerHTML: messageWithLinks }))))));
1847
1855
  }
1848
1856
  };
1849
1857
  ZonosCustomMessage.style = ZonosCustomMessageStyle0;
@@ -1875,9 +1883,9 @@ const ZonosHelloDialogFooter = class {
1875
1883
  const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
1876
1884
  const footerTheme = primaryColor && isDarkColor.isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
1877
1885
  const language = (_b = ILanguage.languages.find(x => x.code === cart.localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
1878
- return (index.h(index.Host, { key: 'a3a6ab0e4af4981cc83802be1433c3c41da58c19', class: "zonos--elements" }, index.h("div", { key: 'fdea45d1b4d83055a3d17918a5ae78f43a7e0042', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
1886
+ return (index.h(index.Host, { key: 'f97688788d9f6d1a640f054a2a22dbae6955b83c', class: "zonos--elements" }, index.h("div", { key: '3539323f9044acef3890fc072bdd981e2495fc18', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
1879
1887
  '--primary-color': (_c = this.appearanceSettings) === null || _c === void 0 ? void 0 : _c.colorPrimary,
1880
- } }, index.h("a", { key: '4d4e995052049238d4c522ff8501dddbe25e29d5', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: '4ca16c024473660f74cfc7a3d506b8ba4ebf7362', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), index.h("div", { key: 'dd1da686f8345431c3805898f374e5fb22e27289', class: "zonos--hello-locale-wrapper" }, index.h("zonos-button", { key: 'd5c34c75c5006710ff6d0426d43f07a5ade41827', buttonColor: "gray-1200", icon: index.h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), index.h("zonos-button", { key: '43759ce87473b10e078f14dce529db502a5edd4d', buttonColor: "gray-1200", icon: index.h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: cart.localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, cart.localizationStore.selectedCountryCode)))));
1888
+ } }, index.h("a", { key: '5e30052240f87211c6f0092ef6a27c217f3ecefb', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: 'c60142bcd26086c2944ac3464885ca1f96e5cfbe', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), index.h("div", { key: '67297b4c557ee5b49a4406a459588f2924183195', class: "zonos--hello-locale-wrapper" }, index.h("zonos-button", { key: '9348bff826187730f36d191f7e01f516f2b9785c', buttonColor: "gray-1200", icon: index.h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), index.h("zonos-button", { key: 'ecf1a8639e8e92a07a0e774abb560de53c19587c', buttonColor: "gray-1200", icon: index.h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: cart.localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, cart.localizationStore.selectedCountryCode)))));
1881
1889
  }
1882
1890
  };
1883
1891
  ZonosHelloDialogFooter.style = ZonosHelloDialogFooterStyle0;
@@ -19,7 +19,7 @@ const patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["zonos-checkout.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-button_3.cjs",[[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.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-country-select_3.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-badge_2.cjs",[[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.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-card_2.cjs",[[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.cjs",[[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.cjs",[[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);
22
+ return index.bootstrapLazy([["zonos-checkout.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[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.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3.cjs",[[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.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[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.cjs",[[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.cjs",[[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.cjs",[[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);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -3,12 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-72767498.js');
6
- const cart = require('./cart-ecc80eb0.js');
7
- const zonosStore = require('./zonosStore-49d4c92a.js');
6
+ const cart = require('./cart-89d9fff4.js');
7
+ const zonosStore = require('./zonosStore-138c5555.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
+ const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
10
- require('./isDarkColor-924e6a7a.js');
11
- require('./getBorderRadius-834c321d.js');
11
+ require('./isDarkColor-57860b44.js');
12
+ require('./getBorderRadius-d8f18958.js');
12
13
 
13
14
  const getHasMoreSpaceAbove = (ref) => {
14
15
  const componentRect = ref.getBoundingClientRect();
@@ -116,18 +117,19 @@ const ZonosHelloDialog = class {
116
117
  const animateFromBottom = this.dialogRef && getHasMoreSpaceAbove(this.dialogRef);
117
118
  const { customMessages } = cart.localizationStore;
118
119
  const welcomeMessage = `${cart.translate('Welcome to')} ${zonosStore.zonosStore.organizationName}!`;
119
- const defaultMessage = ((_a = customMessages.find(x => x.pageName === 'hello_default')) === null || _a === void 0 ? void 0 : _a.message) ||
120
+ const defaultMessageStr = ((_a = customMessages.find(x => x.pageName === 'hello_default')) === null || _a === void 0 ? void 0 : _a.message) ||
120
121
  cart.translate('Know about duties and taxes before you buy. Shop with confidence!');
122
+ const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
121
123
  const currentPage = this.getCurrentPageEnum();
122
124
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
123
- return (index.h(index.Host, { key: '303f914b4511500edcd8d041ccfd52f0c48a7a85', class: "zonos--elements" }, index.h("div", { key: 'f52025ee53c0cdbbf20ecbb874e5639194b6507b', "aria-hidden": "true", class: classes.classes([
125
+ return (index.h(index.Host, { key: 'd5ac86955cf9f9a22e47fe2154dee6e10f6a9361', class: "zonos--elements" }, index.h("div", { key: 'd34dd3f937330cd5fdd2d7a11dc321c215983146', "aria-hidden": "true", class: classes.classes([
124
126
  'zonos--hello-dialog',
125
127
  animateLeft && 'zonos--hello-dialog-animate-from-left',
126
128
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
127
129
  !!this.mobileLocationOverride &&
128
130
  'zonos--hello-dialog-mobile-override',
129
131
  this.isOpen && 'zonos--hello-dialog-open',
130
- ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", null, index.h("div", { class: "zonos--hello-dialog-content" }, index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { spacing: 24 }, index.h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { textColor: "gray-800" }, defaultMessage)), index.h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
132
+ ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", null, index.h("div", { class: "zonos--hello-dialog-content" }, index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { spacing: 24 }, index.h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
131
133
  var _a;
132
134
  return item && (index.h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (index.h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
133
135
  }), index.h("zonos-card", { spacing: "12px" }, index.h("zonos-v-stack", { spacing: 12 }, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: BagIcon }), index.h("zonos-text", null, dutyDeMinimisMessage)), index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", null, index.h("zonos-country-select", { handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", null, index.h("zonos-language-select", { handleOnClose: () => this.setShowLanguageSelect(false) }))))));
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-72767498.js');
6
- const zonosStore = require('./zonosStore-49d4c92a.js');
7
- const cart = require('./cart-ecc80eb0.js');
6
+ const zonosStore = require('./zonosStore-138c5555.js');
7
+ const cart = require('./cart-89d9fff4.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
10
- require('./isDarkColor-924e6a7a.js');
11
- require('./getBorderRadius-834c321d.js');
10
+ require('./isDarkColor-57860b44.js');
11
+ require('./getBorderRadius-d8f18958.js');
12
12
 
13
13
  var root = zonosStore._root;
14
14
 
@@ -559,7 +559,6 @@ const ZonosHello = class {
559
559
  this.reloadHelloData = async () => {
560
560
  await this.handleItemRestrictions();
561
561
  this.triggerShowPeekMessage();
562
- void this.displayCurrency();
563
562
  };
564
563
  this.handleProductCountChange = debounce_1(() => {
565
564
  const { productTitleElementSelector } = zonosStore.zonosStore.helloSettings;
@@ -582,6 +581,14 @@ const ZonosHello = class {
582
581
  subtree: true,
583
582
  });
584
583
  };
584
+ this.watchPriceChange = () => {
585
+ const observer = new MutationObserver(() => void this.displayCurrency());
586
+ observer.observe(document.body, {
587
+ attributes: true,
588
+ childList: true,
589
+ subtree: true,
590
+ });
591
+ };
585
592
  this.updateHelloOnPageChange = () => {
586
593
  // If the product count changes on the same url (loading more products), update the peek message and item restrictions
587
594
  this.watchProductCountChange();
@@ -653,6 +660,7 @@ const ZonosHello = class {
653
660
  if (zonosStore.zonosStore.loadedConfig) {
654
661
  this.helloRef.setAttribute('data-zonos-hello-loaded', '');
655
662
  this.updateHelloOnPageChange();
663
+ this.watchPriceChange();
656
664
  clearInterval(initInterval);
657
665
  }
658
666
  }, 100);
@@ -674,21 +682,28 @@ const ZonosHello = class {
674
682
  * @returns string
675
683
  */
676
684
  async convertAndFormat(value) {
677
- cart.currencyConvertAndFormat(value);
685
+ return cart.currencyConvertAndFormat(value);
678
686
  }
679
687
  /**
680
688
  * This method will convert the currency and return the converted value
681
689
  * @returns number
682
690
  */
683
691
  async convert(value) {
684
- cart.currencyConvert(value);
692
+ return cart.currencyConvert(value);
685
693
  }
686
694
  /**
687
695
  * This method will format the currency and return the formatted string
688
696
  * @returns number
689
697
  */
690
698
  async format(value) {
691
- cart.currencyFormat(value);
699
+ return cart.currencyFormat(value);
700
+ }
701
+ /**
702
+ * This method show the hello dialog
703
+ * @returns void
704
+ */
705
+ async openHelloDialog(value) {
706
+ this.changeShowDialog(value);
692
707
  }
693
708
  handleResize() {
694
709
  debounce_1(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
@@ -725,7 +740,7 @@ const ZonosHello = class {
725
740
  !!this.allRestrictedItems.length &&
726
741
  'zonos--hello-has-restrictions',
727
742
  ]), onClick: () => {
728
- this.changeShowDialog(!this.showDialog);
743
+ void this.changeShowDialog(!this.showDialog);
729
744
  }, onMouseEnter: () => this.enableShowPeekMessage(), onMouseLeave: () => (this.showPeekMessage = false), ref: el => el && (this.helloRef = el) }, index.h("zonos-text", { class: "zonos--hello-message" }, this.peekMessage), selectedCountryCode && (index.h("div", { class: "zonos--hello-country-flag-wrapper" }, index.h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode })))), index.h("div", { class: classes.classes([
730
745
  'zonos--hello-dialog-wrapper',
731
746
  this.mobileLocationOverride &&
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-72767498.js');
6
+
7
+ 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)}";
8
+ const ZonosLinkStyle0 = zonosLinkCss;
9
+
10
+ const ZonosLink = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.href = '';
14
+ this.rel = undefined;
15
+ this.target = undefined;
16
+ this.linkTitle = undefined;
17
+ }
18
+ render() {
19
+ return (index.h(index.Host, { key: '99bf9ff46cf84f424739b76d3da8a8c770c0a88f', class: "zonos--elements" }, index.h("a", { key: 'bd3553a33f27b4815a7b0573a34862093242b456', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: 'ad80829c1ca5cd9b0e2dd62542025eeecf436196' }))));
20
+ }
21
+ };
22
+ ZonosLink.style = ZonosLinkStyle0;
23
+
24
+ exports.zonos_link = ZonosLink;