@zonos/elements 1.3.201 → 1.3.203

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 (308) hide show
  1. package/dist/cjs/VarianceTest-0cb1e118.js +12 -0
  2. package/dist/cjs/cart-0d91ad0b.js +1955 -0
  3. package/dist/cjs/{debounce-d393fafe.js → debounce-94e1b7ff.js} +1 -1
  4. package/dist/cjs/{getBorderRadius-3d0a563e.js → getBorderRadius-8d3b1049.js} +1 -1
  5. package/dist/cjs/index.cjs.js +10 -8
  6. package/dist/cjs/{isDarkColor-92a10a85.js → isDarkColor-bcf49625.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{cart-e73cde62.js → localization-2f17c95f.js} +74 -1941
  9. package/dist/cjs/{paypal-39bbbd1a.js → paypal-9953115b.js} +10 -9
  10. package/dist/cjs/zonos-address_11.cjs.entry.js +98 -72
  11. package/dist/cjs/zonos-badge.cjs.entry.js +2 -1
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -1
  13. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -3
  14. package/dist/cjs/zonos-card.cjs.entry.js +3 -2
  15. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_14.cjs.entry.js} +105 -82
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +395 -50
  17. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -1
  18. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-controller.cjs.entry.js +13 -11
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -5
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +13 -13
  22. package/dist/cjs/zonos-elements.cjs.js +1 -1
  23. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +10 -8
  24. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +41 -42
  25. package/dist/cjs/zonos-hello.cjs.entry.js +30 -31
  26. package/dist/cjs/zonos-input.cjs.entry.js +3 -2
  27. package/dist/cjs/zonos-language-select_2.cjs.entry.js +8 -9
  28. package/dist/cjs/zonos-logo.cjs.entry.js +4 -3
  29. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -2
  30. package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -7
  31. package/dist/cjs/zonos-text.cjs.entry.js +2 -1
  32. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -3
  33. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -3
  35. package/dist/cjs/{zonosStore-c466b127.js → zonosStore-9264749e.js} +15 -5
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +18 -17
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +235 -15
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +9 -4
  41. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.css +62 -0
  42. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +90 -0
  43. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  44. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  45. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  46. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  47. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  48. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  49. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  50. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  51. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  52. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  53. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  54. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  55. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  56. package/dist/collection/components/main/zonos-controller.js +3 -3
  57. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  58. package/dist/collection/components/store/checkout/cart.js +28 -18
  59. package/dist/collection/components/store/checkout/paypal.js +2 -1
  60. package/dist/collection/components/store/checkout/stripe.js +16 -11
  61. package/dist/collection/components/store/hello/localization.js +5 -5
  62. package/dist/collection/components/store/storageStore.js +32 -0
  63. package/dist/collection/components/store/zonosStore.js +12 -6
  64. package/dist/collection/components/stripe/zonos-address/zonos-address.js +18 -6
  65. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  66. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +19 -7
  67. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -3
  68. package/dist/collection/components/utils/api/getCheckoutSession.js +3 -3
  69. package/dist/collection/components/utils/api/placeTestOrder.js +2 -1
  70. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +3 -2
  71. package/dist/collection/components/utils/api/selectVarianceTest.js +20 -0
  72. package/dist/collection/components/utils/buildCartUrl.js +44 -0
  73. package/dist/collection/components/utils/getLegacyQueryParams.js +42 -0
  74. package/dist/collection/components/utils/varianceTest/filterExpiredTests.js +6 -0
  75. package/dist/collection/components/utils/varianceTest/filterValidTests.js +23 -0
  76. package/dist/collection/components/utils/varianceTest/getSelectedTestVariant.js +6 -0
  77. package/dist/collection/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.js +14 -0
  78. package/dist/collection/components/utils/varianceTest/isInAvailableTestKey.js +4 -0
  79. package/dist/collection/components/utils/varianceTest/isTestEnabled.js +4 -0
  80. package/dist/collection/components/utils/varianceTest/isTestKeysAllVariantSelected.js +6 -0
  81. package/dist/collection/components/utils/varianceTest/mergeTest.js +13 -0
  82. package/dist/collection/scripts/_getZonosQaUrl.js +2 -2
  83. package/dist/collection/types/checkout/api/VarianceTest.js +8 -0
  84. package/dist/collection/types/generated/graphql.internal.types.js +26 -7
  85. package/dist/collection/types/index.js +1 -0
  86. package/dist/esm/VarianceTest-fef2d958.js +10 -0
  87. package/dist/esm/cart-db61eb95.js +1918 -0
  88. package/dist/esm/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
  89. package/dist/esm/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
  90. package/dist/esm/index.js +9 -8
  91. package/dist/esm/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/{cart-f79c8021.js → localization-bf7224aa.js} +70 -1907
  94. package/dist/esm/{paypal-6d4667d1.js → paypal-2e0ffb07.js} +5 -4
  95. package/dist/esm/zonos-address_11.entry.js +54 -28
  96. package/dist/esm/zonos-badge.entry.js +2 -1
  97. package/dist/esm/zonos-banner.entry.js +2 -1
  98. package/dist/esm/zonos-button_3.entry.js +4 -3
  99. package/dist/esm/zonos-card.entry.js +3 -2
  100. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_14.entry.js} +54 -32
  101. package/dist/esm/zonos-checkout.entry.js +363 -18
  102. package/dist/esm/zonos-collapse.entry.js +2 -1
  103. package/dist/esm/zonos-component.entry.js +1 -1
  104. package/dist/esm/zonos-controller.entry.js +8 -6
  105. package/dist/esm/zonos-country-flag.entry.js +3 -4
  106. package/dist/esm/zonos-country-select_4.entry.js +8 -8
  107. package/dist/esm/zonos-elements.js +1 -1
  108. package/dist/esm/zonos-empty-state-payment_4.entry.js +10 -8
  109. package/dist/esm/zonos-hello-dialog.entry.js +7 -8
  110. package/dist/esm/zonos-hello.entry.js +4 -5
  111. package/dist/esm/zonos-input.entry.js +3 -2
  112. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  113. package/dist/esm/zonos-logo.entry.js +4 -3
  114. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -2
  115. package/dist/esm/zonos-stripe-input.entry.js +8 -7
  116. package/dist/esm/zonos-text.entry.js +2 -1
  117. package/dist/esm/zonos-toggle.entry.js +4 -3
  118. package/dist/esm/zonos-tooltip.entry.js +2 -2
  119. package/dist/esm/zonos-v-stack.entry.js +4 -3
  120. package/dist/esm/{zonosStore-cdabc848.js → zonosStore-d10a829f.js} +15 -5
  121. package/dist/esm-es5/VarianceTest-fef2d958.js +1 -0
  122. package/dist/esm-es5/cart-db61eb95.js +1 -0
  123. package/dist/esm-es5/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
  124. package/dist/esm-es5/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
  125. package/dist/esm-es5/index.js +1 -1
  126. package/dist/esm-es5/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
  127. package/dist/esm-es5/loader.js +1 -1
  128. package/dist/esm-es5/localization-bf7224aa.js +1 -0
  129. package/dist/esm-es5/{paypal-6d4667d1.js → paypal-2e0ffb07.js} +2 -2
  130. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  131. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  132. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  133. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  134. package/dist/esm-es5/zonos-card.entry.js +1 -1
  135. package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -0
  136. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  137. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  138. package/dist/esm-es5/zonos-component.entry.js +1 -1
  139. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  140. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  141. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  142. package/dist/esm-es5/zonos-elements.js +1 -1
  143. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  144. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  145. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  146. package/dist/esm-es5/zonos-input.entry.js +1 -1
  147. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  148. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  149. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  150. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  151. package/dist/esm-es5/zonos-text.entry.js +1 -1
  152. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  153. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  154. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  155. package/dist/esm-es5/zonosStore-d10a829f.js +1 -0
  156. package/dist/scripts/index.d.ts +844 -766
  157. package/dist/scripts/index.js +1 -1
  158. package/dist/scripts/loadZonos.js +1 -1
  159. package/dist/scripts/zonos.js +1 -1
  160. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +16 -0
  161. package/dist/types/components/common/zonos-loading-overlay/zonos-loading-overlay.d.ts +16 -0
  162. package/dist/types/components/store/checkout/cart.d.ts +5 -2
  163. package/dist/types/components/store/checkout/stripe.d.ts +2 -2
  164. package/dist/types/components/store/hello/localization.d.ts +2 -2
  165. package/dist/types/components/store/storageStore.d.ts +13 -0
  166. package/dist/types/components/store/zonosStore.d.ts +7 -2
  167. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -0
  168. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +2 -0
  169. package/dist/types/components/utils/api/selectVarianceTest.d.ts +6 -0
  170. package/dist/types/components/utils/buildCartUrl.d.ts +10 -0
  171. package/dist/types/components/utils/getLegacyQueryParams.d.ts +2 -0
  172. package/dist/types/components/utils/varianceTest/filterExpiredTests.d.ts +2 -0
  173. package/dist/types/components/utils/varianceTest/filterValidTests.d.ts +9 -0
  174. package/dist/types/components/utils/varianceTest/getSelectedTestVariant.d.ts +2 -0
  175. package/dist/types/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.d.ts +8 -0
  176. package/dist/types/components/utils/varianceTest/isInAvailableTestKey.d.ts +2 -0
  177. package/dist/types/components/utils/varianceTest/isTestEnabled.d.ts +2 -0
  178. package/dist/types/components/utils/varianceTest/isTestKeysAllVariantSelected.d.ts +9 -0
  179. package/dist/types/components/utils/varianceTest/mergeTest.d.ts +5 -0
  180. package/dist/types/components.d.ts +51 -0
  181. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +7 -0
  182. package/dist/types/types/checkout/CheckoutConfig.d.ts +13 -1
  183. package/dist/types/types/checkout/api/CheckoutSession.d.ts +7 -0
  184. package/dist/types/types/checkout/api/VarianceTest.d.ts +30 -0
  185. package/dist/types/types/generated/graphql.internal.types.d.ts +206 -22
  186. package/dist/types/types/generated/graphql.internal.types.ts +235 -19
  187. package/dist/types/types/index.d.ts +1 -0
  188. package/dist/types/types/utils/ZonosSettings.d.ts +7 -6
  189. package/dist/zonos-elements/index.esm.js +1 -1
  190. package/dist/zonos-elements/{p-609c32a3.system.entry.js → p-01987cb2.system.entry.js} +1 -1
  191. package/dist/zonos-elements/p-04a01cb1.js +1 -0
  192. package/dist/zonos-elements/p-04b43dd5.entry.js +1 -0
  193. package/dist/zonos-elements/{p-7d5d89f2.system.js → p-0693422b.system.js} +2 -2
  194. package/dist/zonos-elements/p-06f25f75.entry.js +1 -0
  195. package/dist/zonos-elements/p-0c62cfb3.entry.js +1 -0
  196. package/dist/zonos-elements/{p-7831b52c.system.entry.js → p-1dcdb65f.system.entry.js} +1 -1
  197. package/dist/zonos-elements/p-25970cb8.system.entry.js +1 -0
  198. package/dist/zonos-elements/p-26a634a5.system.entry.js +1 -0
  199. package/dist/zonos-elements/p-27987298.system.entry.js +1 -0
  200. package/dist/zonos-elements/p-2bb8ca7d.system.entry.js +1 -0
  201. package/dist/zonos-elements/p-2f70d0eb.entry.js +1 -0
  202. package/dist/zonos-elements/p-3284f459.system.entry.js +1 -0
  203. package/dist/zonos-elements/{p-13796f98.js → p-3d82a352.js} +1 -1
  204. package/dist/zonos-elements/p-411b8e10.entry.js +1 -0
  205. package/dist/zonos-elements/p-452070af.system.entry.js +1 -0
  206. package/dist/zonos-elements/p-45ebc788.entry.js +1 -0
  207. package/dist/zonos-elements/p-4c81112f.entry.js +1 -0
  208. package/dist/zonos-elements/p-4efa8187.js +1 -0
  209. package/dist/zonos-elements/p-5170bc41.entry.js +1 -0
  210. package/dist/zonos-elements/p-54cdc47f.system.entry.js +1 -0
  211. package/dist/zonos-elements/p-5a2dd041.system.js +1 -0
  212. package/dist/zonos-elements/p-5c74e5c9.system.entry.js +1 -0
  213. package/dist/zonos-elements/p-5d0f7364.system.js +1 -0
  214. package/dist/zonos-elements/p-6b6a9dd6.system.js +1 -0
  215. package/dist/zonos-elements/p-715d0f59.system.entry.js +1 -0
  216. package/dist/zonos-elements/{p-b8d87932.js → p-72f37935.js} +1 -1
  217. package/dist/zonos-elements/p-7ae5cd60.entry.js +1 -0
  218. package/dist/zonos-elements/p-7cd09f1f.system.js +1 -0
  219. package/dist/zonos-elements/p-80bbd9c0.system.entry.js +1 -0
  220. package/dist/zonos-elements/p-851c642e.system.entry.js +1 -0
  221. package/dist/zonos-elements/{p-4300d944.entry.js → p-8d870d4c.entry.js} +1 -1
  222. package/dist/zonos-elements/p-9af5e93a.entry.js +1 -0
  223. package/dist/zonos-elements/{p-5de59662.js → p-a9307caa.js} +2 -2
  224. package/dist/zonos-elements/p-aa1193bc.entry.js +1 -0
  225. package/dist/zonos-elements/p-ab176281.system.entry.js +1 -0
  226. package/dist/zonos-elements/p-bc8bda92.entry.js +1 -0
  227. package/dist/zonos-elements/p-be5afc91.system.entry.js +1 -0
  228. package/dist/zonos-elements/p-c291bac1.entry.js +1 -0
  229. package/dist/zonos-elements/p-c3d2422e.entry.js +1 -0
  230. package/dist/zonos-elements/{p-f28eb1dd.system.js → p-c50b3100.system.js} +1 -1
  231. package/dist/zonos-elements/p-c5fcbc92.system.entry.js +1 -0
  232. package/dist/zonos-elements/p-c767242b.entry.js +1 -0
  233. package/dist/zonos-elements/p-c9aa902e.system.entry.js +1 -0
  234. package/dist/zonos-elements/p-cb823c4d.system.js +1 -0
  235. package/dist/zonos-elements/p-cdd3087f.system.entry.js +1 -0
  236. package/dist/zonos-elements/p-d2165441.system.entry.js +1 -0
  237. package/dist/zonos-elements/{p-d422ad1d.system.js → p-d42dfd32.system.js} +1 -1
  238. package/dist/zonos-elements/p-d46349d3.system.entry.js +1 -0
  239. package/dist/zonos-elements/{p-b2241919.entry.js → p-d6a10007.entry.js} +1 -1
  240. package/dist/zonos-elements/p-d99d9e00.js +1 -0
  241. package/dist/zonos-elements/p-db025dfc.system.entry.js +1 -0
  242. package/dist/zonos-elements/p-dcd6acd4.system.entry.js +1 -0
  243. package/dist/zonos-elements/p-dd1cfa74.entry.js +1 -0
  244. package/dist/zonos-elements/p-df4c46a6.entry.js +1 -0
  245. package/dist/zonos-elements/p-dfd1ba1d.entry.js +1 -0
  246. package/dist/zonos-elements/{p-4593324c.js → p-e26c9e83.js} +1 -1
  247. package/dist/zonos-elements/p-e68d5219.entry.js +1 -0
  248. package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
  249. package/dist/zonos-elements/p-ef3e05e5.system.js +1 -0
  250. package/dist/zonos-elements/p-f255e822.js +1 -0
  251. package/dist/zonos-elements/p-f655ec36.entry.js +1 -0
  252. package/dist/zonos-elements/{p-e91b244c.entry.js → p-f891d470.entry.js} +1 -1
  253. package/dist/zonos-elements/p-f8d0d488.system.entry.js +1 -0
  254. package/dist/zonos-elements/{p-240ee490.system.entry.js → p-fbe36bc8.system.entry.js} +1 -1
  255. package/dist/zonos-elements/p-fcc2e712.entry.js +1 -0
  256. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  257. package/package.json +1 -1
  258. package/dist/esm-es5/cart-f79c8021.js +0 -1
  259. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  260. package/dist/esm-es5/zonosStore-cdabc848.js +0 -1
  261. package/dist/zonos-elements/p-0302a254.entry.js +0 -1
  262. package/dist/zonos-elements/p-06ed3582.system.js +0 -1
  263. package/dist/zonos-elements/p-147ca395.entry.js +0 -1
  264. package/dist/zonos-elements/p-1998d8b3.entry.js +0 -1
  265. package/dist/zonos-elements/p-1eddec23.entry.js +0 -1
  266. package/dist/zonos-elements/p-20030bf5.system.js +0 -1
  267. package/dist/zonos-elements/p-24a2e899.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-264f46a5.entry.js +0 -1
  269. package/dist/zonos-elements/p-2882b9f4.entry.js +0 -1
  270. package/dist/zonos-elements/p-2c915112.system.entry.js +0 -1
  271. package/dist/zonos-elements/p-327aebf5.entry.js +0 -1
  272. package/dist/zonos-elements/p-33488109.system.entry.js +0 -1
  273. package/dist/zonos-elements/p-337fab4e.js +0 -1
  274. package/dist/zonos-elements/p-3ddecaa4.system.entry.js +0 -1
  275. package/dist/zonos-elements/p-48f70043.system.entry.js +0 -1
  276. package/dist/zonos-elements/p-49a31b14.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-4cd867d5.js +0 -1
  278. package/dist/zonos-elements/p-55711b80.system.entry.js +0 -1
  279. package/dist/zonos-elements/p-578bf5d7.entry.js +0 -1
  280. package/dist/zonos-elements/p-5c061a35.entry.js +0 -1
  281. package/dist/zonos-elements/p-6096c1c5.entry.js +0 -1
  282. package/dist/zonos-elements/p-65a8f19d.entry.js +0 -1
  283. package/dist/zonos-elements/p-6adc6e27.entry.js +0 -1
  284. package/dist/zonos-elements/p-6cd9b6a1.system.entry.js +0 -1
  285. package/dist/zonos-elements/p-79070ee6.entry.js +0 -1
  286. package/dist/zonos-elements/p-7bb9c330.entry.js +0 -1
  287. package/dist/zonos-elements/p-82aa4f9f.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-8540f3e2.system.entry.js +0 -1
  289. package/dist/zonos-elements/p-8a9d4605.system.entry.js +0 -1
  290. package/dist/zonos-elements/p-932bed54.system.entry.js +0 -1
  291. package/dist/zonos-elements/p-94e3e50d.system.entry.js +0 -1
  292. package/dist/zonos-elements/p-9f6dd86a.entry.js +0 -1
  293. package/dist/zonos-elements/p-a64ab131.system.entry.js +0 -1
  294. package/dist/zonos-elements/p-aac95779.system.entry.js +0 -1
  295. package/dist/zonos-elements/p-ad3c5358.entry.js +0 -1
  296. package/dist/zonos-elements/p-af6af82e.system.js +0 -1
  297. package/dist/zonos-elements/p-b66b3306.system.entry.js +0 -1
  298. package/dist/zonos-elements/p-b6afcf3f.system.entry.js +0 -1
  299. package/dist/zonos-elements/p-b8d91f99.entry.js +0 -1
  300. package/dist/zonos-elements/p-c770044a.system.entry.js +0 -1
  301. package/dist/zonos-elements/p-d4842d10.system.entry.js +0 -1
  302. package/dist/zonos-elements/p-d6c3aec8.system.entry.js +0 -1
  303. package/dist/zonos-elements/p-daf73a4c.system.js +0 -1
  304. package/dist/zonos-elements/p-de388ea0.entry.js +0 -1
  305. package/dist/zonos-elements/p-e14d89de.entry.js +0 -1
  306. package/dist/zonos-elements/p-f6e587bb.entry.js +0 -1
  307. package/dist/zonos-elements/p-f818bdf5.entry.js +0 -1
  308. package/dist/zonos-elements/p-fce6bffe.system.entry.js +0 -1
@@ -3,17 +3,19 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-0993f42d.js');
6
- const cart = require('./cart-e73cde62.js');
7
- const zonosStore = require('./zonosStore-c466b127.js');
6
+ const cart = require('./cart-0d91ad0b.js');
7
+ const localization = require('./localization-2f17c95f.js');
8
+ const zonosStore = require('./zonosStore-9264749e.js');
8
9
  const handleFetch = require('./handleFetch-969d05d8.js');
9
10
  const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
10
11
  const TaxId = require('./TaxId-12acedde.js');
11
12
  const classes = require('./classes-b7918f56.js');
12
- const getBorderRadius = require('./getBorderRadius-3d0a563e.js');
13
+ const getBorderRadius = require('./getBorderRadius-8d3b1049.js');
13
14
  const RemoveIcon$2 = require('./RemoveIcon-081ac073.js');
14
- const isDarkColor = require('./isDarkColor-92a10a85.js');
15
- const debounce$1 = require('./debounce-d393fafe.js');
15
+ const isDarkColor = require('./isDarkColor-bcf49625.js');
16
+ const debounce$1 = require('./debounce-94e1b7ff.js');
16
17
  const helpers = require('./helpers-5bdbb68c.js');
18
+ require('./VarianceTest-0cb1e118.js');
17
19
 
18
20
  const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
19
21
  const ZonosAddressStyle0 = zonosAddressCss;
@@ -23,6 +25,7 @@ const ZonosAddress$1 = class {
23
25
  index.registerInstance(this, hostRef);
24
26
  this.invalidCharacters = index.createEvent(this, "invalidCharacters", 7);
25
27
  this.taxIdChanged = index.createEvent(this, "taxIdChanged", 7);
28
+ this.onStoreCheckoutSessionIdChangedSubscription = () => { };
26
29
  /**
27
30
  * Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
28
31
  */
@@ -31,6 +34,14 @@ const ZonosAddress$1 = class {
31
34
  * Check if the tracking event is sent
32
35
  */
33
36
  this.trackingSent = false;
37
+ this.onStoreCheckoutSessionIdChanged = () => {
38
+ const onCheckoutSessionIdChange = () => {
39
+ this.checkoutSessionId = localization.storageStore.checkoutSessionId;
40
+ };
41
+ // Trigger it once on init because onChange doesn't get triggered on initial load
42
+ onCheckoutSessionIdChange();
43
+ this.onStoreCheckoutSessionIdChangedSubscription = localization.storageStoreOnChange('checkoutSessionId', onCheckoutSessionIdChange);
44
+ };
34
45
  this.type = undefined;
35
46
  this.titleText = undefined;
36
47
  this.defaultAddress = [];
@@ -38,7 +49,7 @@ const ZonosAddress$1 = class {
38
49
  this.stripe = window.Zonos.stripe;
39
50
  this.isDirtyAddress = false;
40
51
  this.isAddressFilled = false;
41
- this.checkoutSessionId = cart.cartStore.checkoutSessionId;
52
+ this.checkoutSessionId = localization.storageStore.checkoutSessionId;
42
53
  }
43
54
  getStripeAddressInstance() {
44
55
  if (this.type === 'billing') {
@@ -67,7 +78,7 @@ const ZonosAddress$1 = class {
67
78
  }
68
79
  isAddressFilledChanged() {
69
80
  // Sometimes address elements is loaded with prefilled data before checkout is loaded, need to not send the event if checkout session id is not available, and send the event after checkout is loaded
70
- if (!cart.cartStore.checkoutSessionId) {
81
+ if (!localization.storageStore.checkoutSessionId) {
71
82
  return;
72
83
  }
73
84
  // Only need to track the event if the shipping address is filled
@@ -75,7 +86,7 @@ const ZonosAddress$1 = class {
75
86
  !this.trackingSent &&
76
87
  this.type === 'shipping') {
77
88
  this.trackingSent = true;
78
- const checkoutSessionId = cart.cartStore.checkoutSessionId;
89
+ const checkoutSessionId = localization.storageStore.checkoutSessionId;
79
90
  void cart.trackConversionEvent({
80
91
  checkoutSessionId,
81
92
  eventName: 'checkout_customerInfoFilled',
@@ -99,7 +110,7 @@ const ZonosAddress$1 = class {
99
110
  // remove phone from default address if it's not provided, stripe
100
111
  // will throw error if key phone exist and its value is empty or 'undefined'.
101
112
  const defaultAddress = this.defaultAddress.map(address => (Object.assign(Object.assign({}, address), { name: address.name, phone: address.phone || undefined })));
102
- const shippableCountries = cart.localizationStore.shippingZoneCountries;
113
+ const shippableCountries = localization.localizationStore.shippingZoneCountries;
103
114
  const shippingZone = shippableCountries
104
115
  ? Object.values(shippableCountries).map(country => country.code)
105
116
  : [];
@@ -107,7 +118,7 @@ const ZonosAddress$1 = class {
107
118
  const checkoutAllCountries = new URLSearchParams(window.location.search).has('zonosCheckoutAllCountries');
108
119
  const allowedCountries = this.type === 'shipping' ? shippingZone : [];
109
120
  const defaultAddressCountry = (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
110
- cart.getFallbackDefaultCountryCode(allowedCountries);
121
+ localization.getFallbackDefaultCountryCode(allowedCountries);
111
122
  handleFetch.log(`Stripe country code: ${defaultAddressCountry}`, 'info');
112
123
  const addressElement = stripeElements.create('address', {
113
124
  allowedCountries: checkoutAllCountries ? [] : allowedCountries,
@@ -224,7 +235,7 @@ const ZonosAddress$1 = class {
224
235
  return null;
225
236
  }
226
237
  const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
227
- return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { inputLabel: cart.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
238
+ return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { inputLabel: localization.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
228
239
  cart.stripeStore.taxId = event.detail;
229
240
  this.taxIdChanged.emit(event.detail);
230
241
  } }), this.taxIdErrorMessage && (index.h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
@@ -239,7 +250,7 @@ const ZonosAddress$1 = class {
239
250
  if (!isCompanyNameEnabled) {
240
251
  return null;
241
252
  }
242
- return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: cart.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
253
+ return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: localization.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
243
254
  cart.stripeStore.companyName = event.detail;
244
255
  } }));
245
256
  }
@@ -247,6 +258,8 @@ const ZonosAddress$1 = class {
247
258
  // destroy the stripe element when this component is removed from the DOM, so that we can re-create the new one with previous value
248
259
  const stripeElement = this.getStripeAddressInstance().stripeAddressElement;
249
260
  stripeElement === null || stripeElement === void 0 ? void 0 : stripeElement.destroy();
261
+ // cleanup checkout session id subscription
262
+ this.onStoreCheckoutSessionIdChangedSubscription();
250
263
  }
251
264
  componentDidLoad() {
252
265
  const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
@@ -255,15 +268,16 @@ const ZonosAddress$1 = class {
255
268
  stripeAddressEventData.value.address.line1.length > 0;
256
269
  // @Watch doesn't get trigger on initial load
257
270
  void this.watchInitStripe();
271
+ this.onStoreCheckoutSessionIdChanged();
258
272
  }
259
273
  render() {
260
274
  var _a;
261
- this.checkoutSessionId = cart.cartStore.checkoutSessionId;
275
+ this.checkoutSessionId = localization.storageStore.checkoutSessionId;
262
276
  if ((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) {
263
277
  this.isAddressFilled = true;
264
278
  }
265
279
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
266
- return (index.h(index.Host, { key: 'ebd6b34dfcb486e1746fbc306e2e413d03290d50', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: '68e7f0fa37ca7efd4d833b32d4c27cda29521871', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), index.h("div", { key: '5e6d4b3798c91def3f3a6ae5ac12f1a2ccca272b', class: "zonos--address-component" })));
280
+ return (index.h(index.Host, { key: '6cb58defa44e55a88bdb8ad3b1b2e96033337fec', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: '2708affaeb700f6c256b38285696d3eaffa1d1ea', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), index.h("div", { key: '290de47b8579a70f997ead2ab3ada123dfa4d204', class: "zonos--address-component" })));
267
281
  }
268
282
  get el() { return index.getElement(this); }
269
283
  static get watchers() { return {
@@ -287,7 +301,7 @@ const ZonosAddressDisplay = class {
287
301
  render() {
288
302
  var _a;
289
303
  const { city, country, email, line1, line2, name, phone, postal_code, state, } = this.currentAddress;
290
- const shippingZoneCountry = (_a = cart.localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[country];
304
+ const shippingZoneCountry = (_a = localization.localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[country];
291
305
  const renderEnteredInfoText = ({ bold, content, }) => {
292
306
  const textColor = shouldRenderTaxIdInput.isTextContainsNonLatinChars(content)
293
307
  ? 'red-600'
@@ -295,8 +309,8 @@ const ZonosAddressDisplay = class {
295
309
  return (index.h("zonos-text", { textColor: textColor, type: bold ? 'boldLabel' : 'body' }, content));
296
310
  };
297
311
  return (index.h(index.Host, { class: "zonos--address-form zonos--elements" }, index.h("div", { class: "zonos--title" }, index.h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
298
- ? cart.translate('Shipping')
299
- : cart.translate('Billing'))), index.h("div", { class: "zonos--address-group" }, name && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), index.h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (index.h("div", { class: "zonos--address-line" }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
312
+ ? localization.translate('Shipping')
313
+ : localization.translate('Billing'))), index.h("div", { class: "zonos--address-group" }, name && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (index.h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), index.h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), shippingZoneCountry && (index.h("div", { class: "zonos--address-line" }, index.h("zonos-country-flag", { class: "zonos--country-flag", countryCode: shippingZoneCountry.code }), ' ', renderEnteredInfoText({
300
314
  content: shippingZoneCountry.displayName,
301
315
  }))))));
302
316
  }
@@ -334,14 +348,14 @@ const ZonosAddressForm = class {
334
348
  // get the rest of the name if it exists
335
349
  const lastName = name.split(' ').slice(1).join(' ') || '';
336
350
  return (index.h(index.Host, { key: '8b578737e33203a23563be7e9be0778deec99bbf', class: "zonos--address-form zonos--elements" }, index.h("div", { key: '793675a1348547bf3f781788956befe325191011', class: "zonos--title" }, index.h("zonos-text", { key: '13de35cb0a7c98a48342e3fb86ae3ade9f5b88d9', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
337
- ? cart.translate('Shipping')
338
- : cart.translate('Billing'))), index.h("div", { key: '2c5de5b5283fb99ee5f8b61d7a217177986fc2db', class: "zonos--address-group" }, index.h("div", { key: '23bf3c893071000d5995a5f175867bab11929193', class: "zonos--contact" }, index.h("zonos-text", { key: '7cdfe2a84ebad89ba5b16498d75def99cf392384', type: "label" }, cart.translate('Contact')), index.h("zonos-input", { key: '1c39c38767fd306c5eb1164cdc989b8291209cf0', class: "zonos--form-email", inputLabel: cart.translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), index.h("div", { key: 'cbdf61217125e22b1a6cec9a340ef0aca2c75670', class: "zonos--name zonos--address-row" }, index.h("zonos-input", { key: '360c99e7b2c6caa64580d5768b5bb53368927275', class: "zonos--form-first-name", inputLabel: cart.translate('First name'), inputValue: firstName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
351
+ ? localization.translate('Shipping')
352
+ : localization.translate('Billing'))), index.h("div", { key: '2c5de5b5283fb99ee5f8b61d7a217177986fc2db', class: "zonos--address-group" }, index.h("div", { key: '23bf3c893071000d5995a5f175867bab11929193', class: "zonos--contact" }, index.h("zonos-text", { key: '7cdfe2a84ebad89ba5b16498d75def99cf392384', type: "label" }, localization.translate('Contact')), index.h("zonos-input", { key: '1c39c38767fd306c5eb1164cdc989b8291209cf0', class: "zonos--form-email", inputLabel: localization.translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), index.h("div", { key: 'cbdf61217125e22b1a6cec9a340ef0aca2c75670', class: "zonos--name zonos--address-row" }, index.h("zonos-input", { key: '360c99e7b2c6caa64580d5768b5bb53368927275', class: "zonos--form-first-name", inputLabel: localization.translate('First name'), inputValue: firstName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
339
353
  key: 'name',
340
354
  value: `${e.detail} ${lastName}`,
341
- }) }), index.h("zonos-input", { key: '8ce5fa5c15c6f7928339ea10009ce0e68954a91f', class: "zonos--form-last-name", inputLabel: cart.translate('Last name'), inputValue: lastName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
355
+ }) }), index.h("zonos-input", { key: '8ce5fa5c15c6f7928339ea10009ce0e68954a91f', class: "zonos--form-last-name", inputLabel: localization.translate('Last name'), inputValue: lastName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
342
356
  key: 'name',
343
357
  value: `${firstName} ${e.detail}`,
344
- }) }))), index.h("div", { key: '7b4fa2d3baa6cb257e7688e5ba6777123898b3fd', class: "zonos--address" }, index.h("zonos-text", { key: '9d5782331b2642755a755aeb7f98c9f4d87f9a20', type: "label" }, cart.translate('Address')), index.h("zonos-input", { key: 'a622025924ca86bdbf1d3c04b79e6dee172b4c42', class: "zonos--form-country", inputLabel: cart.translate('Country'), inputValue: country, isDisabled: true }), index.h("zonos-input", { key: 'f99b3a74db09ab5730878e80705b9aeac76bf800', class: "zonos--form-line1", inputLabel: cart.translate('Address line 1'), inputValue: line1, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), index.h("zonos-input", { key: '5d16aefa45a78045c87d166aaaec0255606e455e', class: "zonos--form-line2", inputLabel: cart.translate('Address line 2'), inputValue: line2, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), index.h("div", { key: 'dc166be9381142835d72e731cb38a718522a068a', class: "zonos--address-row" }, index.h("zonos-input", { key: '4f1a98f9d10ce0cff3ef18a3037a12382552b31d', class: "zonos--form-city", inputLabel: cart.translate('City'), inputValue: city, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), index.h("zonos-input", { key: 'd4f97900b5fe2e1619950a52d1d1f716a8bc19ff', class: "zonos--form-state", inputLabel: cart.translate('State/Province'), inputValue: state, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), index.h("zonos-input", { key: 'cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733', class: "zonos--form-postal-code", inputLabel: cart.translate('Postal code'), inputValue: postal_code, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), index.h("zonos-input", { key: '7421c82847eded6bdbcce49ef8196124d8e50c1d', class: "zonos--form-phone", inputLabel: cart.translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
358
+ }) }))), index.h("div", { key: '7b4fa2d3baa6cb257e7688e5ba6777123898b3fd', class: "zonos--address" }, index.h("zonos-text", { key: '9d5782331b2642755a755aeb7f98c9f4d87f9a20', type: "label" }, localization.translate('Address')), index.h("zonos-input", { key: 'a622025924ca86bdbf1d3c04b79e6dee172b4c42', class: "zonos--form-country", inputLabel: localization.translate('Country'), inputValue: country, isDisabled: true }), index.h("zonos-input", { key: 'f99b3a74db09ab5730878e80705b9aeac76bf800', class: "zonos--form-line1", inputLabel: localization.translate('Address line 1'), inputValue: line1, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), index.h("zonos-input", { key: '5d16aefa45a78045c87d166aaaec0255606e455e', class: "zonos--form-line2", inputLabel: localization.translate('Address line 2'), inputValue: line2, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), index.h("div", { key: 'dc166be9381142835d72e731cb38a718522a068a', class: "zonos--address-row" }, index.h("zonos-input", { key: '4f1a98f9d10ce0cff3ef18a3037a12382552b31d', class: "zonos--form-city", inputLabel: localization.translate('City'), inputValue: city, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), index.h("zonos-input", { key: 'd4f97900b5fe2e1619950a52d1d1f716a8bc19ff', class: "zonos--form-state", inputLabel: localization.translate('State/Province'), inputValue: state, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), index.h("zonos-input", { key: 'cf1eb0ca5cd15c8412a2e1246aaf2e39361dc733', class: "zonos--form-postal-code", inputLabel: localization.translate('Postal code'), inputValue: postal_code, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), index.h("zonos-input", { key: '7421c82847eded6bdbcce49ef8196124d8e50c1d', class: "zonos--form-phone", inputLabel: localization.translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
345
359
  }
346
360
  static get watchers() { return {
347
361
  "translatedAddress": ["watchCurrentAddress"]
@@ -419,9 +433,9 @@ const ZonosAddressSuggestions = class {
419
433
  return segments;
420
434
  }
421
435
  render() {
422
- return (index.h(index.Host, { key: '88eff73526172a10854d2ae18b5b54afd3fd4b28', class: "zonos--address-suggestions", role: "group", style: {
436
+ return (index.h(index.Host, { key: 'eeb520d24c5cebca1f425c9648a2bdf0269f74c9', class: "zonos--address-suggestions", role: "group", style: {
423
437
  '--zonos--border-radius': getBorderRadius.getBorderRadius(),
424
- } }, index.h("ul", { key: 'f55c95ab39906d2bcb6edc6d5379ec6c70f5277a', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (index.h("li", { key: 'b7ca181e48f18ac7c0d2c8cfc1b05fec6df5827f', "aria-selected": false, class: "powered-by option", role: "option" }, index.h("div", { key: '07577044166b2cbfbec0cf96786266d74dd1c098', class: "powered-by-container" }, index.h("zonos-text", { key: '3780f4763666ac08cfe7083749b5f781b74e4e66', type: "caption" }, "Suggestions powered by"), index.h("zonos-text", { key: '73c5d1db8a235cae3ebc2af0eba89d91ade8a6a1', type: "semiBoldLabel" }, "Google")), index.h("zonos-button", { key: '6d6058329ced6bae0f04ce4e80da07506f706847', "aria-label": "Clear suggestions", icon: index.h("zonos-icon", { content: RemoveIcon$1 }), noBackground: true, onClick: () => {
438
+ } }, index.h("ul", { key: 'f7ac29ef14417f8c86dbafcf840204f4c964b3ad', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (index.h("li", { key: '13d34e64d8bd7711268a1f5641d0c868a89b949c', "aria-selected": false, class: "powered-by option", role: "option" }, index.h("div", { key: '00f20bd5568762ee581462826410031273e808da', class: "powered-by-container" }, index.h("zonos-text", { key: 'fc61a8ec973fc2cdf1e137563617cfed0badbb12', type: "caption" }, "Suggestions powered by"), index.h("zonos-text", { key: '96343fe696ec0d3990ffebaf450306ca91624d04', type: "semiBoldLabel" }, "Google")), index.h("zonos-button", { key: 'e7c6a9e64c8976a3c3a521b0794d2e82c1919ce2', "aria-label": "Clear suggestions", icon: index.h("zonos-icon", { content: RemoveIcon$1 }), noBackground: true, onClick: () => {
425
439
  this.localSuggestions = [];
426
440
  } }))), this.localSuggestions.map(suggestion => (
427
441
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
@@ -593,7 +607,7 @@ const ZonosAddressUpdateDialog = class {
593
607
  return (index.h(index.Host, { key: '655845cef04f4af526b1a1c4e49243c4f2b4c7f6', class: classes.classes([
594
608
  'zonos--address-update-dialog zonos--elements',
595
609
  this.isMobile && 'mobile',
596
- ]) }, index.h("zonos-dialog", { key: 'eab429bb78ce6f05ba463d8748d7edd5499402fa', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeUpdateDialog.emit(), open: this.dialogOpen, width: "568px" }, index.h("div", { key: '08f0400e62addfcaffd91bf5200999d29bbd2da9', class: "zonos--body" }, index.h("div", { key: '8699df5e2f823e19066fbb552ba2a66c127c05e9', class: "zonos--dialog-header" }, index.h("div", { key: '92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3', class: "zonos--dialog-title" }, index.h("zonos-text", { key: 'aaac3375526bddb319ce7c8f49bde30da7210264', type: "title" }, cart.translate('Update your address')), index.h("zonos-button", { key: '474cc2421cd3150daa46bfe215da6ae7df9c6087', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon$2.RemoveIcon }), noBackground: true, onClick: () => this.closeUpdateDialogHandler(), title: "Close checkout dialog" })), index.h("zonos-text", { key: '6d019250cce57e8b30dd790a184df7273bdb234f' }, cart.translate('To ensure delivery all address details must be in Latin characters.'))), index.h("div", { key: '80ee681844f4f4f43fce69d977b634b1fbc3d5f5', class: "zonos--group" }, index.h("zonos-text", { key: '940e510eceec156a74f32de84cf58ffebd796435', class: "zonos--what-you-entered", type: "semiBoldLabel" }, cart.translate('What you entered')), index.h("div", { key: 'f626127f5c399c29ab1022deb66aaee8f8a49601', class: "zonos--address-display-group" }, index.h("zonos-address-display", { key: '9dfcba1037325c3a1f9e82b8e4797e7872dd7e3f', addressType: "shipping", currentAddress: shipping }), billing && (index.h("zonos-address-display", { key: 'fee8ae2c6786d735133c2a0a42f3e3d40d7f9ea9', addressType: "billing", currentAddress: billing }))), index.h("div", { key: '5a82195018ff8cdfd1126f4424062a26c25ee757', class: "zonos--address-form-section" }, index.h("zonos-text", { key: 'f694dfad166697e4c034cea51057133b69b1c144', type: "semiBoldLabel" }, cart.translate('Translated address')), index.h("zonos-address-form", { key: '4a99c841cf4800de43c612cce3d56d956d02c22f', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
610
+ ]) }, index.h("zonos-dialog", { key: 'eab429bb78ce6f05ba463d8748d7edd5499402fa', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeUpdateDialog.emit(), open: this.dialogOpen, width: "568px" }, index.h("div", { key: '08f0400e62addfcaffd91bf5200999d29bbd2da9', class: "zonos--body" }, index.h("div", { key: '8699df5e2f823e19066fbb552ba2a66c127c05e9', class: "zonos--dialog-header" }, index.h("div", { key: '92e0ff932dcdb0e5b59ea34b688d1ef8e31bfeb3', class: "zonos--dialog-title" }, index.h("zonos-text", { key: 'aaac3375526bddb319ce7c8f49bde30da7210264', type: "title" }, localization.translate('Update your address')), index.h("zonos-button", { key: '474cc2421cd3150daa46bfe215da6ae7df9c6087', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon$2.RemoveIcon }), noBackground: true, onClick: () => this.closeUpdateDialogHandler(), title: "Close checkout dialog" })), index.h("zonos-text", { key: '6d019250cce57e8b30dd790a184df7273bdb234f' }, localization.translate('To ensure delivery all address details must be in Latin characters.'))), index.h("div", { key: '80ee681844f4f4f43fce69d977b634b1fbc3d5f5', class: "zonos--group" }, index.h("zonos-text", { key: '940e510eceec156a74f32de84cf58ffebd796435', class: "zonos--what-you-entered", type: "semiBoldLabel" }, localization.translate('What you entered')), index.h("div", { key: 'f626127f5c399c29ab1022deb66aaee8f8a49601', class: "zonos--address-display-group" }, index.h("zonos-address-display", { key: '9dfcba1037325c3a1f9e82b8e4797e7872dd7e3f', addressType: "shipping", currentAddress: shipping }), billing && (index.h("zonos-address-display", { key: 'fee8ae2c6786d735133c2a0a42f3e3d40d7f9ea9', addressType: "billing", currentAddress: billing }))), index.h("div", { key: '5a82195018ff8cdfd1126f4424062a26c25ee757', class: "zonos--address-form-section" }, index.h("zonos-text", { key: 'f694dfad166697e4c034cea51057133b69b1c144', type: "semiBoldLabel" }, localization.translate('Translated address')), index.h("zonos-address-form", { key: '4a99c841cf4800de43c612cce3d56d956d02c22f', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
597
611
  const address = e.detail;
598
612
  this.translatedShippingAddressState =
599
613
  this.buildTranslateAddressState({
@@ -607,7 +621,7 @@ const ZonosAddressUpdateDialog = class {
607
621
  currentAddress: billing,
608
622
  translatedAddress: address,
609
623
  });
610
- }, translatedAddress: this.translatedBillingAddressState })))), index.h("div", { key: '918c3271579c3fc7a7efff0473b0ccf48fb575a2', class: "zonos--group-btn" }, index.h("div", { key: 'f73be0c1124d3a4d340bc6e8512f6be8356c655d', class: "zonos--button-wrapper" }, index.h("zonos-button", { key: '172a6cc0a7b75afb400802ef6b87faae6e7e2483', class: "zonos--cancel-btn", onClick: () => this.closeUpdateDialogHandler(), variant: "subtle" }, cart.translate('Cancel')), index.h("zonos-button", { key: '8fd08bc79b60eb9a0064c06ff9d840b1ecb09123', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, cart.translate('Update address'))))))));
624
+ }, translatedAddress: this.translatedBillingAddressState })))), index.h("div", { key: '918c3271579c3fc7a7efff0473b0ccf48fb575a2', class: "zonos--group-btn" }, index.h("div", { key: 'f73be0c1124d3a4d340bc6e8512f6be8356c655d', class: "zonos--button-wrapper" }, index.h("zonos-button", { key: '172a6cc0a7b75afb400802ef6b87faae6e7e2483', class: "zonos--cancel-btn", onClick: () => this.closeUpdateDialogHandler(), variant: "subtle" }, localization.translate('Cancel')), index.h("zonos-button", { key: '8fd08bc79b60eb9a0064c06ff9d840b1ecb09123', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, localization.translate('Update address'))))))));
611
625
  }
612
626
  get el() { return index.getElement(this); }
613
627
  static get watchers() { return {
@@ -794,6 +808,7 @@ const ZonosAddress = class {
794
808
  index.registerInstance(this, hostRef);
795
809
  this.invalidCharacters = index.createEvent(this, "invalidCharacters", 7);
796
810
  this.addressChange = index.createEvent(this, "addressChange", 7);
811
+ this.onStoreCheckoutSessionIdChangedSubscription = () => { };
797
812
  /**
798
813
  * Whether the suggestion is clicked
799
814
  */
@@ -869,7 +884,7 @@ const ZonosAddress = class {
869
884
  (((_b = this.countryField) === null || _b === void 0 ? void 0 : _b.cityRequired) && !!(value === null || value === void 0 ? void 0 : value.trim()));
870
885
  customErrors.city = '';
871
886
  if (!isValid) {
872
- customErrors.city = cart.translate('The field is incomplete');
887
+ customErrors.city = localization.translate('The field is incomplete');
873
888
  }
874
889
  break;
875
890
  }
@@ -878,7 +893,7 @@ const ZonosAddress = class {
878
893
  (((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.stateRequired) && !!(value === null || value === void 0 ? void 0 : value.trim()));
879
894
  customErrors.state = '';
880
895
  if (!isValid) {
881
- customErrors.state = cart.translate('The field is incomplete');
896
+ customErrors.state = localization.translate('The field is incomplete');
882
897
  }
883
898
  break;
884
899
  }
@@ -889,7 +904,7 @@ const ZonosAddress = class {
889
904
  });
890
905
  customErrors.postalCode = '';
891
906
  if (!isValid) {
892
- customErrors.postalCode = cart.translate('Your [zipLabel] is invalid', {
907
+ customErrors.postalCode = localization.translate('Your [zipLabel] is invalid', {
893
908
  zipLabel: ((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.zipLabel) || 'ZIP',
894
909
  });
895
910
  }
@@ -899,7 +914,7 @@ const ZonosAddress = class {
899
914
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
900
915
  customErrors.firstName = '';
901
916
  if (!isValid) {
902
- customErrors.firstName = cart.translate('Please provide your first name.');
917
+ customErrors.firstName = localization.translate('Please provide your first name.');
903
918
  }
904
919
  break;
905
920
  }
@@ -907,7 +922,7 @@ const ZonosAddress = class {
907
922
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
908
923
  customErrors.lastName = '';
909
924
  if (!isValid) {
910
- customErrors.lastName = cart.translate('Please provide your last name.');
925
+ customErrors.lastName = localization.translate('Please provide your last name.');
911
926
  }
912
927
  break;
913
928
  }
@@ -915,7 +930,7 @@ const ZonosAddress = class {
915
930
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
916
931
  customErrors.line1 = '';
917
932
  if (!isValid) {
918
- customErrors.line1 = cart.translate('The field is incomplete');
933
+ customErrors.line1 = localization.translate('The field is incomplete');
919
934
  }
920
935
  break;
921
936
  }
@@ -925,17 +940,17 @@ const ZonosAddress = class {
925
940
  const isValid = !!(value === null || value === void 0 ? void 0 : value.trim());
926
941
  customErrors.phone = '';
927
942
  if (!isValid) {
928
- customErrors.phone = cart.translate('Please provide a mobile phone number.');
943
+ customErrors.phone = localization.translate('Please provide a mobile phone number.');
929
944
  }
930
945
  }
931
946
  else {
932
947
  customErrors.phone = '';
933
948
  // If the phone number is empty, set the error message
934
949
  if (phoneValidateInfo.isEmpty) {
935
- customErrors.phone = cart.translate('Please provide a mobile phone number.');
950
+ customErrors.phone = localization.translate('Please provide a mobile phone number.');
936
951
  }
937
952
  else if (phoneValidateInfo.wrongFormat) {
938
- customErrors.phone = cart.translate('Your mobile phone number is incomplete.');
953
+ customErrors.phone = localization.translate('Your mobile phone number is incomplete.');
939
954
  }
940
955
  }
941
956
  break;
@@ -948,6 +963,14 @@ const ZonosAddress = class {
948
963
  cart.stripeStore.customBillingAddressErrors = customErrors;
949
964
  }
950
965
  };
966
+ this.onStoreCheckoutSessionIdChanged = () => {
967
+ const onCheckoutSessionIdChange = () => {
968
+ this.checkoutSessionId = localization.storageStore.checkoutSessionId;
969
+ };
970
+ // Trigger it once on init because onChange doesn't get triggered on initial load
971
+ onCheckoutSessionIdChange();
972
+ this.onStoreCheckoutSessionIdChangedSubscription = localization.storageStoreOnChange('checkoutSessionId', onCheckoutSessionIdChange);
973
+ };
951
974
  this.type = undefined;
952
975
  this.titleText = undefined;
953
976
  this.defaultAddress = [];
@@ -978,7 +1001,7 @@ const ZonosAddress = class {
978
1001
  this.lastNameError = '';
979
1002
  this.isFirstInitialization = true;
980
1003
  this.addressService = null;
981
- this.checkoutSessionId = cart.cartStore.checkoutSessionId;
1004
+ this.checkoutSessionId = localization.storageStore.checkoutSessionId;
982
1005
  }
983
1006
  getStripeAddressInstance() {
984
1007
  if (this.type === 'billing') {
@@ -1007,7 +1030,7 @@ const ZonosAddress = class {
1007
1030
  }
1008
1031
  isAddressFilledChanged() {
1009
1032
  // Sometimes address elements is loaded with prefilled data before checkout is loaded, need to not send the event if checkout session id is not available, and send the event after checkout is loaded
1010
- if (!cart.cartStore.checkoutSessionId) {
1033
+ if (!localization.storageStore.checkoutSessionId) {
1011
1034
  return;
1012
1035
  }
1013
1036
  // Only need to track the event if the shipping address is filled
@@ -1015,7 +1038,7 @@ const ZonosAddress = class {
1015
1038
  !this.trackingSent &&
1016
1039
  this.type === 'shipping') {
1017
1040
  this.trackingSent = true;
1018
- const checkoutSessionId = cart.cartStore.checkoutSessionId;
1041
+ const checkoutSessionId = localization.storageStore.checkoutSessionId;
1019
1042
  void cart.trackConversionEvent({
1020
1043
  checkoutSessionId,
1021
1044
  eventName: 'checkout_customerInfoFilled',
@@ -1086,7 +1109,7 @@ const ZonosAddress = class {
1086
1109
  return null;
1087
1110
  }
1088
1111
  const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
1089
- return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: cart.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
1112
+ return (index.h("div", { class: "zonos--tax-id-input" }, index.h("zonos-stripe-input", { error: this.taxIdErrorMessage, inputLabel: localization.translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: cart.stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
1090
1113
  cart.stripeStore.taxId = event.detail;
1091
1114
  } })));
1092
1115
  }
@@ -1100,7 +1123,7 @@ const ZonosAddress = class {
1100
1123
  if (!isCompanyNameEnabled) {
1101
1124
  return null;
1102
1125
  }
1103
- return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: cart.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
1126
+ return (index.h("zonos-stripe-input", { class: "zonos--company-name-input", inputLabel: localization.translate('Company name (optional)'), inputValue: cart.stripeStore.companyName, onInputChange: (event) => {
1104
1127
  cart.stripeStore.companyName = event.detail;
1105
1128
  } }));
1106
1129
  }
@@ -1117,7 +1140,7 @@ const ZonosAddress = class {
1117
1140
  // Use data from Stripe address element if it's available (This may happen when user has already at shipping selection page but go back to customer page)
1118
1141
  if (stripeAddressEventData) {
1119
1142
  const countryCode = stripeAddressEventData.value.address.country ||
1120
- cart.localizationStore.selectedCountryCode ||
1143
+ localization.localizationStore.selectedCountryCode ||
1121
1144
  'US';
1122
1145
  this.setFormValues({
1123
1146
  city: stripeAddressEventData.value.address.city,
@@ -1137,7 +1160,7 @@ const ZonosAddress = class {
1137
1160
  const firstDefaultAddress = this.defaultAddress[0];
1138
1161
  if (firstDefaultAddress) {
1139
1162
  const countryCode = firstDefaultAddress.address.country ||
1140
- cart.localizationStore.selectedCountryCode ||
1163
+ localization.localizationStore.selectedCountryCode ||
1141
1164
  'US';
1142
1165
  this.setFormValues({
1143
1166
  city: firstDefaultAddress.address.city,
@@ -1153,7 +1176,7 @@ const ZonosAddress = class {
1153
1176
  this.initCountryField(countryCode);
1154
1177
  return;
1155
1178
  }
1156
- const countryCode = cart.localizationStore.selectedCountryCode || 'US';
1179
+ const countryCode = localization.localizationStore.selectedCountryCode || 'US';
1157
1180
  // Set default values
1158
1181
  this.setFormValues({
1159
1182
  city: '',
@@ -1368,7 +1391,7 @@ const ZonosAddress = class {
1368
1391
  this.initDefaultCustomAddressForm();
1369
1392
  }
1370
1393
  shippingZonesChanged() {
1371
- this.shippingZones = cart.localizationStore.shippingZoneCountries;
1394
+ this.shippingZones = localization.localizationStore.shippingZoneCountries;
1372
1395
  this.shipToCountries = Object.values(this.shippingZones || {})
1373
1396
  .map(country => ({
1374
1397
  label: country.displayName,
@@ -1394,7 +1417,7 @@ const ZonosAddress = class {
1394
1417
  value: region.interpayCode,
1395
1418
  }))
1396
1419
  .sort((a, b) => a.label.localeCompare(b.label));
1397
- return (index.h("div", { "aria-label": `${this.type} address form`, class: "zonos--custom-address-form", role: "form" }, index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.firstName : undefined, inputLabel: cart.translate('First name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName, onInputChange: (event) => {
1420
+ return (index.h("div", { "aria-label": `${this.type} address form`, class: "zonos--custom-address-form", role: "form" }, index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.firstName : undefined, inputLabel: localization.translate('First name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName, onInputChange: (event) => {
1398
1421
  this.validate({
1399
1422
  type: this.type,
1400
1423
  value: event.detail,
@@ -1408,7 +1431,7 @@ const ZonosAddress = class {
1408
1431
  * Therefore, we must update the value after validation to ensure correct error state
1409
1432
  */
1410
1433
  this.firstName = event.detail;
1411
- }, required: true }), index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.lastName : undefined, inputLabel: cart.translate('Last name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName, onInputChange: (event) => {
1434
+ }, required: true }), index.h("zonos-stripe-input", { "aria-required": "true", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.lastName : undefined, inputLabel: localization.translate('Last name'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName, onInputChange: (event) => {
1412
1435
  this.validate({
1413
1436
  type: this.type,
1414
1437
  value: event.detail,
@@ -1427,9 +1450,9 @@ const ZonosAddress = class {
1427
1450
  this.city = '';
1428
1451
  this.state = '';
1429
1452
  this.postalCode = '';
1430
- }, options: this.shipToCountries || [], required: true, selectLabel: cart.translate('Country'), selectedValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
1431
- cart.localizationStore.selectedCountryCode ||
1432
- (firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), index.h("div", { class: "zonos--custom-address-form-line1-wrapper" }, index.h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: "shipping address-line1", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel: cart.translate('Address line 1'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line1, name: "address-line1", onInputChange: (event) => {
1453
+ }, options: this.shipToCountries || [], required: true, selectLabel: localization.translate('Country'), selectedValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
1454
+ localization.localizationStore.selectedCountryCode ||
1455
+ (firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), index.h("div", { class: "zonos--custom-address-form-line1-wrapper" }, index.h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: "shipping address-line1", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel: localization.translate('Address line 1'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line1, name: "address-line1", onInputChange: (event) => {
1433
1456
  this.validate({
1434
1457
  type: this.type,
1435
1458
  value: event.detail,
@@ -1460,9 +1483,9 @@ const ZonosAddress = class {
1460
1483
  }, suggestions: this.addressSuggestions, type: this.type })), index.h("div", { "aria-label": "Additional address details", class: classes.classes([
1461
1484
  'zonos--custom-address-form-additional-fields',
1462
1485
  countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
1463
- ]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: cart.translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
1486
+ ]), role: "group" }, index.h("zonos-stripe-input", { "aria-required": "false", autoComplete: "shipping address-line2", class: "zonos--custom-address-form-input", inputLabel: localization.translate(((_f = this.countryField) === null || _f === void 0 ? void 0 : _f.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
1464
1487
  this.line2 = event.detail;
1465
- } }), ((_g = this.countryField) === null || _g === void 0 ? void 0 : _g.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_h = this.countryField) === null || _h === void 0 ? void 0 : _h.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: cart.translate(((_j = this.countryField) === null || _j === void 0 ? void 0 : _j.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
1488
+ } }), ((_g = this.countryField) === null || _g === void 0 ? void 0 : _g.cityShow) && (index.h("zonos-stripe-input", { "aria-required": ((_h = this.countryField) === null || _h === void 0 ? void 0 : _h.cityRequired) ? 'true' : 'false', autoComplete: "shipping address-level2", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: localization.translate(((_j = this.countryField) === null || _j === void 0 ? void 0 : _j.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
1466
1489
  this.validate({
1467
1490
  type: this.type,
1468
1491
  value: event.detail,
@@ -1490,9 +1513,9 @@ const ZonosAddress = class {
1490
1513
  * Therefore, we must update the value after validation to ensure correct error state
1491
1514
  */
1492
1515
  this.state = event.detail;
1493
- }, options: stateOptions, required: (_o = this.countryField) === null || _o === void 0 ? void 0 : _o.stateRequired, selectLabel: cart.translate(((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.stateLabel) || 'State'), selectedValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.state, title: `${this.type} state` })), ((_q = this.countryField) === null || _q === void 0 ? void 0 : _q.zipShow) && (index.h("zonos-stripe-input", { "aria-describedby": ((_r = this.countryField) === null || _r === void 0 ? void 0 : _r.zipFormat)
1516
+ }, options: stateOptions, required: (_o = this.countryField) === null || _o === void 0 ? void 0 : _o.stateRequired, selectLabel: localization.translate(((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.stateLabel) || 'State'), selectedValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.state, title: `${this.type} state` })), ((_q = this.countryField) === null || _q === void 0 ? void 0 : _q.zipShow) && (index.h("zonos-stripe-input", { "aria-describedby": ((_r = this.countryField) === null || _r === void 0 ? void 0 : _r.zipFormat)
1494
1517
  ? `zip-format-${this.type}`
1495
- : undefined, "aria-required": ((_s = this.countryField) === null || _s === void 0 ? void 0 : _s.zipRequired) ? 'true' : 'false', autoComplete: "shipping postal-code", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel: cart.translate(((_t = this.countryField) === null || _t === void 0 ? void 0 : _t.zipLabel) || 'Zip'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.postal_code) || '', onInputChange: (event) => {
1518
+ : undefined, "aria-required": ((_s = this.countryField) === null || _s === void 0 ? void 0 : _s.zipRequired) ? 'true' : 'false', autoComplete: "shipping postal-code", class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel: localization.translate(((_t = this.countryField) === null || _t === void 0 ? void 0 : _t.zipLabel) || 'Zip'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.postal_code) || '', onInputChange: (event) => {
1496
1519
  this.validate({
1497
1520
  type: this.type,
1498
1521
  value: event.detail,
@@ -1506,7 +1529,7 @@ const ZonosAddress = class {
1506
1529
  * Therefore, we must update the value after validation to ensure correct error state
1507
1530
  */
1508
1531
  this.postalCode = event.detail;
1509
- }, required: (_u = this.countryField) === null || _u === void 0 ? void 0 : _u.zipRequired }))), index.h("zonos-stripe-phone-input", { autoComplete: "shipping tel", class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_v = zonosStore.zonosStore.genericSettings) === null || _v === void 0 ? void 0 : _v.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel: cart.translate('Phone number'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone) || '', onInputValueChange: event => {
1532
+ }, required: (_u = this.countryField) === null || _u === void 0 ? void 0 : _u.zipRequired }))), index.h("zonos-stripe-phone-input", { autoComplete: "shipping tel", class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_v = zonosStore.zonosStore.genericSettings) === null || _v === void 0 ? void 0 : _v.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel: localization.translate('Phone number'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone) || '', onInputValueChange: event => {
1510
1533
  const { isEmpty, phoneNumber, valid, wrongFormat } = event.detail;
1511
1534
  // Validate the phone number
1512
1535
  this.validate({
@@ -1537,6 +1560,8 @@ const ZonosAddress = class {
1537
1560
  // unsubscribe from address suggestions when this component is removed from the DOM
1538
1561
  (_a = this.onAddressSuggestionsUnsubscribe) === null || _a === void 0 ? void 0 : _a.call(this);
1539
1562
  (_b = this.onAddressSelectedUnsubscribe) === null || _b === void 0 ? void 0 : _b.call(this);
1563
+ // cleanup checkout session id subscription
1564
+ this.onStoreCheckoutSessionIdChangedSubscription();
1540
1565
  }
1541
1566
  componentWillLoad() {
1542
1567
  if (zonosStore.zonosStore.checkoutAddressService) {
@@ -1545,7 +1570,7 @@ const ZonosAddress = class {
1545
1570
  }
1546
1571
  componentDidLoad() {
1547
1572
  const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
1548
- this.shipToCountries = Object.values(cart.localizationStore.shippingZoneCountries || {})
1573
+ this.shipToCountries = Object.values(localization.localizationStore.shippingZoneCountries || {})
1549
1574
  .map(country => ({
1550
1575
  label: country.displayName,
1551
1576
  value: country.code,
@@ -1559,24 +1584,25 @@ const ZonosAddress = class {
1559
1584
  // @Watch doesn't get trigger on initial load
1560
1585
  this.initAddressSuggestions();
1561
1586
  this.isFirstInitialization = false;
1587
+ // subscribe to checkout session id changes from storage store
1588
+ this.onStoreCheckoutSessionIdChanged();
1562
1589
  }
1563
1590
  render() {
1564
1591
  var _a;
1565
- this.shippingZones = cart.localizationStore.shippingZoneCountries;
1592
+ this.shippingZones = localization.localizationStore.shippingZoneCountries;
1566
1593
  this.addressService = zonosStore.zonosStore.checkoutAddressService;
1567
- this.checkoutSessionId = cart.cartStore.checkoutSessionId;
1568
1594
  if ((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) {
1569
1595
  this.isAddressFilled = true;
1570
1596
  }
1571
1597
  // Only set country if custom address form is enabled
1572
- if (!this.country && cart.localizationStore.selectedCountryCode) {
1573
- this.country = cart.localizationStore.selectedCountryCode;
1598
+ if (!this.country && localization.localizationStore.selectedCountryCode) {
1599
+ this.country = localization.localizationStore.selectedCountryCode;
1574
1600
  }
1575
1601
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
1576
- return (index.h(index.Host, { key: 'bb1f01c899ecdc1ed52eb8be7a680fdbb2ce9a7b', class: classes.classes([
1602
+ return (index.h(index.Host, { key: '7a766af62acc47886e716ac3c52c1457eae04545', class: classes.classes([
1577
1603
  'zonos--address zonos--elements',
1578
1604
  `zonos--${this.type}-address`,
1579
- ]) }, index.h("zonos-text", { key: 'f6ad6d23ec141fe192908b639802f69ad565958e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
1605
+ ]) }, index.h("zonos-text", { key: '224a78f8d1e02e2b0d7c95eafe9a1d4354fb5f73', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
1580
1606
  }
1581
1607
  get el() { return index.getElement(this); }
1582
1608
  static get watchers() { return {
@@ -1791,7 +1817,7 @@ const ZonosLinkAuthentication = class {
1791
1817
  const renderEmailAddress = () => {
1792
1818
  var _a;
1793
1819
  if (cart.cartStore.isStagingMode) {
1794
- return (index.h("zonos-stripe-input", { inputLabel: cart.translate('Email'), inputValue: this.defaultEmail ||
1820
+ return (index.h("zonos-stripe-input", { inputLabel: localization.translate('Email'), inputValue: this.defaultEmail ||
1795
1821
  ((_a = cart.stripeStore.stripeLinkEventData) === null || _a === void 0 ? void 0 : _a.value.email) ||
1796
1822
  '', isError: this.isEmailError, onBlur: () => {
1797
1823
  var _a;
@@ -1809,7 +1835,7 @@ const ZonosLinkAuthentication = class {
1809
1835
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
1810
1836
  return (index.h(index.Host, { class: "zonos--link-authentication zonos--elements", style: {
1811
1837
  '--zonos--border-radius': getBorderRadius.getBorderRadius(),
1812
- } }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText), renderEmailAddress(), this.isEmailError && (index.h("zonos-text", { textColor: "red-600" }, cart.translate('Please enter a valid email address.')))));
1838
+ } }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, this.titleText), renderEmailAddress(), this.isEmailError && (index.h("zonos-text", { textColor: "red-600" }, localization.translate('Please enter a valid email address.')))));
1813
1839
  }
1814
1840
  get el() { return index.getElement(this); }
1815
1841
  static get watchers() { return {
@@ -7840,24 +7866,24 @@ const ZonosStripePhoneInput = class {
7840
7866
  .filter(Boolean)
7841
7867
  .sort((a, b) => a.displayName.localeCompare(b.displayName))
7842
7868
  : [];
7843
- return (index.h(index.Host, { key: 'c7ca4076eb70b166979d21074d068912af1496c5', class: classes.classes([
7869
+ return (index.h(index.Host, { key: '0d4501947787cbafe38acb60fb5ee7519b6d1c73', class: classes.classes([
7844
7870
  'zonos--phone-input zonos--elements',
7845
7871
  isDark && 'dark',
7846
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '5460d79c86d34daf94538f063274c45ae3be2239', class: classes.classes([
7872
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: 'c3e0f9655a39a5bb3d838634754be2af60a24a10', class: classes.classes([
7847
7873
  'zonos--label-wrapper',
7848
7874
  this.disabled && 'disabled',
7849
7875
  this.isFocused && 'focused',
7850
7876
  hasContent && 'has-content',
7851
7877
  this.error && 'has-error',
7852
7878
  this.inputLabel && 'has-label',
7853
- ]) }, index.h("select", { key: '290d89088b9a800b31ed19cfe3de6831322a3f5a', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
7879
+ ]) }, index.h("select", { key: '1a58471117f6748d511498e016814bd907e8775f', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
7854
7880
  var _a;
7855
7881
  return (index.h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
7856
- })), index.h("div", { key: 'b0271d3453869ed79a36d62f5f6bacb22a509b46', class: "zonos--input-group" }, index.h("div", { key: '49486c915fa2f65878a6f8ab73c48997e4ba1461', class: "zonos--select-wrapper" }, index.h("div", { key: '63412e8077e062efef5f42c3a77e583ade435b53', class: "zonos--country-select" }, index.h("div", { key: '5c073598dfeaa0c8de68f07b1a7789f4a56a24c8', class: "zonos--country-select-content" }, this.selectedCountry && (index.h("div", { key: '8a32922d75343005fde7446736746cd531ff63f8', class: "zonos--country-select-selected" }, index.h("div", { key: '859cdbc4c1879c38f0c848ff42b38bc5492d3e96', class: "zonos--country-flag-wrapper" }, index.h("zonos-country-flag", { key: '9167a7c586e2d693bfdcad7773df60a324600be7', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), index.h("div", { key: 'b39dcadb22202d866fc8e1217bbe2e17704e2300', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), index.h("div", { key: '4b0a4ce8c94e6e3125cfde55542b38efb6a8a787', class: "zonos--select-chevron-wrapper" }, index.h("zonos-icon", { key: '25322152ca9550a8b2e667f8f993c38a972aa9ce', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), index.h("div", { key: 'c6a93ba0656e09a154c3d91327f3573e0288234b', class: classes.classes([
7882
+ })), index.h("div", { key: '9c785521e095aae0cfc8af3ea90e4924c97202ac', class: "zonos--input-group" }, index.h("div", { key: 'b7fdd9db255ce33f3b6d3a982162c8286963324c', class: "zonos--select-wrapper" }, index.h("div", { key: '5d378436580df53793b1508af5e34bd43ba33ddf', class: "zonos--country-select" }, index.h("div", { key: '94628459db88e355b1c62b74cfcb48ec03022d4e', class: "zonos--country-select-content" }, this.selectedCountry && (index.h("div", { key: '96b332ed9c62413887f96f38ce26cb05b81a3132', class: "zonos--country-select-selected" }, index.h("div", { key: 'b9e5bda55328f57e15afd349789233e3c28d2bf9', class: "zonos--country-flag-wrapper" }, index.h("zonos-country-flag", { key: 'fc595df21c09553dc8ffb7fe79c3043831e65298', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), index.h("div", { key: '6c792c383acf3ccac02be6b954a7eb18bcdda817', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), index.h("div", { key: '970b9f6e18152e04375a248669fd7314088bcd2e', class: "zonos--select-chevron-wrapper" }, index.h("zonos-icon", { key: '1da5919014eee0e34b60d1df08e83d44ad20d5c2', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), index.h("div", { key: '7f0c215ddfb59c8e3c4413e44941a477a8adc6d6', class: classes.classes([
7857
7883
  'zonos--input-container',
7858
7884
  this.inputLabel && 'has-label',
7859
7885
  hasContent && 'has-content',
7860
- ]) }, index.h("input", Object.assign({ key: '49246ff464685feaa9414d1e7b36f55b82fff564' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (index.h("div", { key: '653d278b7ffc634bc7892d54c8fcab7b7626f80e', class: "zonos--floated-label" }, index.h("label", { key: 'c637ddca7164396d57e8a5eaf98b0e523ee27258', htmlFor: this.inputId }, this.inputLabel || cart.translate('Phone number'))))))), this.error && (index.h("zonos-text", { key: 'dcc70c068fef73e804eba1f134673168a0bbaf90', textColor: "red-600" }, this.error))));
7886
+ ]) }, index.h("input", Object.assign({ key: 'e3ce0b598baf78452eddaab38c80bb4f0c548a5a' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (index.h("div", { key: 'a108f2796571f9d8a4201d1906b2381b89d14bc2', class: "zonos--floated-label" }, index.h("label", { key: '50d308311270bbd8635bb7848495ee4aaa2a0cac', htmlFor: this.inputId }, this.inputLabel || localization.translate('Phone number'))))))), this.error && (index.h("zonos-text", { key: '27b0233f9241ce68348b2efd1c1b525d083363e5', textColor: "red-600" }, this.error))));
7861
7887
  }
7862
7888
  get el() { return index.getElement(this); }
7863
7889
  static get watchers() { return {
@@ -7948,14 +7974,14 @@ const ZonosStripeSelect = class {
7948
7974
  const fontSize = zonosStore.zonosStore.appearance.fontSizeInputValue || 16;
7949
7975
  const hasContent = this.internalValue || this.selectPlaceholder;
7950
7976
  const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
7951
- return (index.h(index.Host, { key: 'f5b178d5cbd48e9aff8701764a1fde4de03a6569', class: classes.classes([
7977
+ return (index.h(index.Host, { key: '18d7ba03b9136af8614874b13b9ac3ce85f7c0d0', class: classes.classes([
7952
7978
  'zonos--select zonos--elements',
7953
7979
  isDark && 'dark',
7954
7980
  this.isError && 'has-error',
7955
- ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: 'd7b3b8148777aa61f15c1489f44871589aadf00f', class: classes.classes([
7981
+ ]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '88b8d885c11bc0776bd0c25b5f0a08f91cfb7c72', class: classes.classes([
7956
7982
  'zonos--label-wrapper',
7957
7983
  this.isDisabled && 'disabled',
7958
- ]) }, index.h("select", Object.assign({ key: '629f7437fa445634db0589f217acb59b59e558d3' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
7984
+ ]) }, index.h("select", Object.assign({ key: 'd972a6a7b91bb51f2d5ed291a686d521c1bf82a3' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
7959
7985
  'zonos--floated-select',
7960
7986
  !!this.selectLabel && 'has-label',
7961
7987
  hasContent && 'has-content',
@@ -7965,9 +7991,9 @@ const ZonosStripeSelect = class {
7965
7991
  this.selectChange.emit(select.value);
7966
7992
  this.selectedValue = select.value;
7967
7993
  this.el.dispatchEvent(new Event('change'));
7968
- }, required: this.required }), index.h("option", { key: '9b50f769fc79f136b7b77916edd71acdcda199b7', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || cart.translate('Select')), this.internalOptions.map(option => (index.h("option", { key: option.value, selected: this.internalValue === option.value ||
7994
+ }, required: this.required }), index.h("option", { key: 'b67730b2c3e77ba60221320519f55e67d7d2b127', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || localization.translate('Select')), this.internalOptions.map(option => (index.h("option", { key: option.value, selected: this.internalValue === option.value ||
7969
7995
  // Sometimes google returns the label not the code for some countries
7970
- this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: '0ff44083dee7939d6f7bc2372990ccbef6066fed', class: "zonos--floated-label" }, index.h("label", { key: '8f9965fa3de61b705fa95e7ddc68013a3027464d', htmlFor: this.selectId }, this.selectLabel)), index.h("div", { key: '09aa1851295b86e30488ca69720d58d1246ad67c', class: "zonos--actions-wrapper" }, showClearButton && (index.h("button", { key: '1db5be171f74849cedc3a8804bac23fdfa43aaa5', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, index.h("zonos-icon", { key: '2ca7e2da61eef16d6feb74c4d6a6198f1762ad16', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), index.h("zonos-icon", { key: 'c0050a27a619cb9b844282be841a320648f9d008', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (index.h("zonos-text", { key: 'c0a3eb551533c4cb24f92ad6fd7a4b44cd24044c', textColor: "red-600" }, this.error))));
7996
+ this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: '088c104006e983b5ec1680067af32c0479dde13b', class: "zonos--floated-label" }, index.h("label", { key: 'faf3bf337253d205265b181d65d8f8024ffd6124', htmlFor: this.selectId }, this.selectLabel)), index.h("div", { key: '7ce8d36b84b08df139877cd2e12a26b8157ce83b', class: "zonos--actions-wrapper" }, showClearButton && (index.h("button", { key: 'b0a1af08afd9792ba4e7989361219c5cf7d5d8bc', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, index.h("zonos-icon", { key: '50ae86d5e9d9722b5546997f9fd52a997cac3add', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), index.h("zonos-icon", { key: '30034030f97f7ed6b3027cbc5220c73cde4bbbc2', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (index.h("zonos-text", { key: 'cd02da8b1a1cb81581ac7285af84193000692eaa', textColor: "red-600" }, this.error))));
7971
7997
  }
7972
7998
  get el() { return index.getElement(this); }
7973
7999
  static get watchers() { return {