@zonos/elements 1.3.245 → 1.3.247

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 (295) hide show
  1. package/dist/cjs/ShortAddressCode-bec338b0.js +7 -0
  2. package/dist/cjs/{cart-52cf3366.js → cart-97a2d20a.js} +35 -6
  3. package/dist/cjs/getContrastColor-30848800.js +37 -0
  4. package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
  5. package/dist/cjs/index.cjs.js +9 -7
  6. package/dist/cjs/{invoice-972f1ab3.js → invoice-05a10ee1.js} +2 -2
  7. package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-edd4804c.js} +2 -2
  8. package/dist/cjs/isContrastColor-09f5924a.js +12 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
  11. package/dist/cjs/{paypal-e339cc8c.js → paypal-0b4b352b.js} +4 -12
  12. package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-07b46688.js} +2 -2
  13. package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-dd3b0609.js} +2 -2
  14. package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
  15. package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
  16. package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
  17. package/dist/cjs/zonos-card_5.cjs.entry.js +4 -3
  18. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +67 -38
  19. package/dist/cjs/zonos-checkout.cjs.entry.js +36 -13
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +8 -7
  22. package/dist/cjs/zonos-collect.cjs.entry.js +5 -4
  23. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-elements.cjs.js +1 -1
  27. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  28. package/dist/cjs/zonos-hello.cjs.entry.js +5 -2
  29. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  30. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +8 -7
  31. package/dist/cjs/zonos-invoice.cjs.entry.js +5 -4
  32. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  33. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +1 -1
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -1
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +22 -3
  39. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +1 -1
  40. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +1 -1
  41. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
  42. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +18 -0
  43. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +3 -0
  44. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +1 -1
  45. package/dist/collection/components/store/checkout/stripe.js +32 -5
  46. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  47. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  48. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  59. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  60. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  61. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  62. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  63. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  64. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  65. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  66. package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
  67. package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
  68. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
  69. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  70. package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
  71. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +31 -8
  72. package/dist/collection/components/utils/getContrastColor.js +8 -0
  73. package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
  74. package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
  75. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  76. package/dist/collection/types/generated/graphql.internal.types.js +135 -0
  77. package/dist/collection/types/index.js +1 -0
  78. package/dist/esm/ShortAddressCode-7620e622.js +5 -0
  79. package/dist/esm/{cart-7f4704dc.js → cart-99ec4a3d.js} +35 -6
  80. package/dist/esm/getContrastColor-28c18704.js +35 -0
  81. package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  82. package/dist/esm/index.js +8 -7
  83. package/dist/esm/{invoice-d3d256fb.js → invoice-44e97c22.js} +2 -2
  84. package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +2 -2
  85. package/dist/esm/isContrastColor-69778cea.js +10 -0
  86. package/dist/esm/loader.js +1 -1
  87. package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
  88. package/dist/esm/{paypal-61270b79.js → paypal-56534e48.js} +4 -11
  89. package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +2 -2
  90. package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +2 -2
  91. package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
  92. package/dist/esm/zonos-address-display_9.entry.js +35 -5
  93. package/dist/esm/zonos-address_4.entry.js +37 -7
  94. package/dist/esm/zonos-card_5.entry.js +4 -3
  95. package/dist/esm/zonos-cart-items_12.entry.js +67 -38
  96. package/dist/esm/zonos-checkout.entry.js +36 -13
  97. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  98. package/dist/esm/zonos-collect-finish_6.entry.js +8 -7
  99. package/dist/esm/zonos-collect.entry.js +5 -4
  100. package/dist/esm/zonos-controller.entry.js +2 -2
  101. package/dist/esm/zonos-country-flag.entry.js +1 -1
  102. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  103. package/dist/esm/zonos-elements.js +1 -1
  104. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  105. package/dist/esm/zonos-hello.entry.js +5 -2
  106. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  107. package/dist/esm/zonos-invoice-finish_5.entry.js +8 -7
  108. package/dist/esm/zonos-invoice.entry.js +5 -4
  109. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  110. package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
  111. package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
  112. package/dist/esm-es5/cart-99ec4a3d.js +1 -0
  113. package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
  114. package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
  115. package/dist/esm-es5/index.js +1 -1
  116. package/dist/esm-es5/{invoice-d3d256fb.js → invoice-44e97c22.js} +1 -1
  117. package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-566ff0aa.js} +1 -1
  118. package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
  119. package/dist/esm-es5/loader.js +1 -1
  120. package/dist/esm-es5/localization-853b48a9.js +1 -0
  121. package/dist/esm-es5/paypal-56534e48.js +17 -0
  122. package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-9e0ab5fd.js} +1 -1
  123. package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-1bd40006.js} +1 -1
  124. package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
  125. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
  126. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  127. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  128. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  129. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  130. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  131. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  132. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  133. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  134. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  135. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  136. package/dist/esm-es5/zonos-elements.js +1 -1
  137. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  138. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  139. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  140. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  141. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  142. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  143. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  144. package/dist/scripts/index.d.ts +60 -5
  145. package/dist/scripts/index.js +1 -1
  146. package/dist/scripts/loadZonos.js +1 -1
  147. package/dist/scripts/zonos.js +1 -1
  148. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  149. package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
  150. package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
  151. package/dist/types/components/store/checkout/stripe.d.ts +4 -0
  152. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  153. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  154. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  155. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  156. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  157. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  158. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  159. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  160. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  161. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  162. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  163. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  164. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  165. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  166. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  167. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  168. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  169. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  170. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  171. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  172. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
  173. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
  174. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  175. package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
  176. package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
  177. package/dist/types/components.d.ts +32 -0
  178. package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
  179. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  180. package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
  181. package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
  182. package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
  183. package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
  184. package/dist/types/types/generated/graphql.internal.types.ts +194 -37
  185. package/dist/types/types/global.d.ts +5 -1
  186. package/dist/types/types/index.d.ts +1 -0
  187. package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
  188. package/dist/zonos-elements/index.esm.js +1 -1
  189. package/dist/zonos-elements/p-08365fdb.system.js +1 -0
  190. package/dist/zonos-elements/p-09aabce0.js +1 -0
  191. package/dist/zonos-elements/p-0c201c39.system.entry.js +1 -0
  192. package/dist/zonos-elements/p-0cb5f151.system.entry.js +1 -0
  193. package/dist/zonos-elements/{p-367c13db.system.entry.js → p-10355cf6.system.entry.js} +1 -1
  194. package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
  195. package/dist/zonos-elements/{p-288aab46.js → p-1b86711b.js} +1 -1
  196. package/dist/zonos-elements/p-1d42cd20.js +1 -0
  197. package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
  198. package/dist/zonos-elements/p-2c10b067.system.entry.js +1 -0
  199. package/dist/zonos-elements/p-2e8f842c.entry.js +1 -0
  200. package/dist/zonos-elements/p-2f55895c.system.entry.js +1 -0
  201. package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
  202. package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-382601a9.system.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
  204. package/dist/zonos-elements/p-3e2f175c.entry.js +1 -0
  205. package/dist/zonos-elements/p-403b9fca.entry.js +1 -0
  206. package/dist/zonos-elements/p-41299ffb.js +1 -0
  207. package/dist/zonos-elements/p-443e1f30.system.js +1 -0
  208. package/dist/zonos-elements/{p-a79f3685.js → p-46ece7ae.js} +1 -1
  209. package/dist/zonos-elements/p-48d55793.system.js +1 -0
  210. package/dist/zonos-elements/p-5295d36e.entry.js +1 -0
  211. package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-53a9da45.entry.js} +1 -1
  212. package/dist/zonos-elements/p-63a383f4.js +1 -0
  213. package/dist/zonos-elements/{p-a3411f20.entry.js → p-64870563.entry.js} +1 -1
  214. package/dist/zonos-elements/p-655ec440.system.js +1 -0
  215. package/dist/zonos-elements/{p-415c2a90.system.js → p-678331f0.system.js} +1 -1
  216. package/dist/zonos-elements/p-695e0803.system.entry.js +1 -0
  217. package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
  218. package/dist/zonos-elements/p-6e3cf6eb.entry.js +1 -0
  219. package/dist/zonos-elements/p-6f430d6f.system.entry.js +1 -0
  220. package/dist/zonos-elements/p-71185d24.system.js +1 -0
  221. package/dist/zonos-elements/p-786d1c24.js +1 -0
  222. package/dist/zonos-elements/p-794d29dc.entry.js +1 -0
  223. package/dist/zonos-elements/p-7b400b5f.system.entry.js +1 -0
  224. package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-0aada8ab.entry.js → p-83377e23.entry.js} +1 -1
  226. package/dist/zonos-elements/p-8defdf0d.system.js +17 -0
  227. package/dist/zonos-elements/p-8e98a7c8.js +1 -0
  228. package/dist/zonos-elements/{p-2889a485.system.entry.js → p-95348ebf.system.entry.js} +1 -1
  229. package/dist/zonos-elements/p-9a066833.system.entry.js +1 -0
  230. package/dist/zonos-elements/p-aa6c2348.system.entry.js +1 -0
  231. package/dist/zonos-elements/p-ada8841a.js +1 -0
  232. package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
  233. package/dist/zonos-elements/p-af85846e.system.js +1 -0
  234. package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
  235. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  236. package/dist/zonos-elements/p-c75b7c47.entry.js +1 -0
  237. package/dist/zonos-elements/p-caff391d.system.entry.js +1 -0
  238. package/dist/zonos-elements/p-ce98e472.js +1 -0
  239. package/dist/zonos-elements/{p-3f46d83e.entry.js → p-d0411b2d.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
  241. package/dist/zonos-elements/p-dca14319.system.js +1 -0
  242. package/dist/zonos-elements/p-dd19d9d8.js +17 -0
  243. package/dist/zonos-elements/{p-e0809901.system.js → p-df6e62f8.system.js} +1 -1
  244. package/dist/zonos-elements/p-df90bccf.entry.js +1 -0
  245. package/dist/zonos-elements/p-e07aaf09.system.js +1 -0
  246. package/dist/zonos-elements/p-e458f737.entry.js +1 -0
  247. package/dist/zonos-elements/p-eea7ac64.js +1 -0
  248. package/dist/zonos-elements/p-f6f1d779.system.entry.js +1 -0
  249. package/dist/zonos-elements/p-f8eb618b.entry.js +1 -0
  250. package/dist/zonos-elements/p-fe96e239.system.js +1 -0
  251. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  252. package/package.json +1 -1
  253. package/dist/esm-es5/cart-7f4704dc.js +0 -1
  254. package/dist/esm-es5/localization-401ec6d4.js +0 -1
  255. package/dist/esm-es5/paypal-61270b79.js +0 -17
  256. package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
  257. package/dist/zonos-elements/p-01b0a2e2.js +0 -1
  258. package/dist/zonos-elements/p-1216cfb3.entry.js +0 -1
  259. package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
  260. package/dist/zonos-elements/p-21fb6b39.js +0 -1
  261. package/dist/zonos-elements/p-2601538e.entry.js +0 -1
  262. package/dist/zonos-elements/p-276faa43.js +0 -1
  263. package/dist/zonos-elements/p-27874c22.entry.js +0 -1
  264. package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
  265. package/dist/zonos-elements/p-33fdde8a.system.js +0 -1
  266. package/dist/zonos-elements/p-38bdbdcc.system.entry.js +0 -1
  267. package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
  269. package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
  270. package/dist/zonos-elements/p-5be33a13.system.entry.js +0 -1
  271. package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
  272. package/dist/zonos-elements/p-74e258ff.system.js +0 -1
  273. package/dist/zonos-elements/p-7521549c.entry.js +0 -1
  274. package/dist/zonos-elements/p-775c1122.system.js +0 -1
  275. package/dist/zonos-elements/p-85430ec1.js +0 -1
  276. package/dist/zonos-elements/p-8d2e24a4.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-8dc7d82f.system.entry.js +0 -1
  278. package/dist/zonos-elements/p-95524f54.js +0 -1
  279. package/dist/zonos-elements/p-95703417.system.entry.js +0 -1
  280. package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
  281. package/dist/zonos-elements/p-a0a62b7e.js +0 -17
  282. package/dist/zonos-elements/p-a53d3d46.entry.js +0 -1
  283. package/dist/zonos-elements/p-a556ec07.system.js +0 -17
  284. package/dist/zonos-elements/p-a6489088.js +0 -1
  285. package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
  286. package/dist/zonos-elements/p-ba228769.entry.js +0 -1
  287. package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-c708f7e9.entry.js +0 -1
  289. package/dist/zonos-elements/p-c88cd318.system.entry.js +0 -1
  290. package/dist/zonos-elements/p-d1effb76.system.js +0 -1
  291. package/dist/zonos-elements/p-e7543082.system.js +0 -1
  292. package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
  293. package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
  294. package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
  295. package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
@@ -1,5 +1,22 @@
1
+ import { c as countryRequireShortAddressCode } from './ShortAddressCode-7620e622.js';
1
2
  import { e as euCountryCodes, c as countryRequireTaxId } from './TaxId-50d72254.js';
2
3
 
4
+ const isInShortAddressCodeCountry = (countryCode) => {
5
+ return countryRequireShortAddressCode.includes(countryCode);
6
+ };
7
+ /**
8
+ * Checks if the short address code input should be rendered based on the country code.
9
+ */
10
+ const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
11
+ // If country require short address code, show the input
12
+ const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
13
+ if (isCountryRequireShortAddressCode) {
14
+ return true;
15
+ }
16
+ // If country doesn't require short address code, no need to show the input
17
+ return false;
18
+ };
19
+
3
20
  const isInTaxIdCountry = (countryCode) => {
4
21
  return countryRequireTaxId.includes(countryCode);
5
22
  };
@@ -20,4 +37,4 @@ const shouldRenderTaxIdInput = ({ companyName, countryCode, }) => {
20
37
  return false;
21
38
  };
22
39
 
23
- export { shouldRenderTaxIdInput as s };
40
+ export { shouldRenderTaxIdInput as a, shouldRenderShortAddressCodeInput as s };
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, c as createEvent, a as getElement } from './index-0bbe9693.js';
2
- import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-401ec6d4.js';
2
+ import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-853b48a9.js';
3
3
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
4
- import { K as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-7f4704dc.js';
4
+ import { K as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-99ec4a3d.js';
5
5
  import { c as classes } from './classes-0d95c529.js';
6
6
  import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
7
7
  import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
@@ -9,11 +9,12 @@ import { R as RemoveIcon$2 } from './RemoveIcon-9dc5dd1a.js';
9
9
  import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
10
10
  import { t as throttle_1 } from './throttle-ce2432ab.js';
11
11
  import { i as isCheckoutMobile } from './handleFetch-a844cac1.js';
12
- import { s as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-d45ceeb4.js';
12
+ import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';
13
13
  import { l as log } from './VarianceTest-572cecf5.js';
14
14
  import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-50d72254.js';
15
15
  import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-2f6955b1.js';
16
16
  import './debounce-c4785346.js';
17
+ import './ShortAddressCode-7620e622.js';
17
18
 
18
19
  const zonosAddressDisplayCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:\", \";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}";
19
20
  const ZonosAddressDisplayStyle0 = zonosAddressDisplayCss;
@@ -503,6 +504,10 @@ const ZonosAddress = class {
503
504
  * Error message for tax id input
504
505
  */
505
506
  this.taxIdErrorMessage = '';
507
+ /**
508
+ * Error message for short address code input
509
+ */
510
+ this.shortAddressCodeErrorMessage = '';
506
511
  this.stripe = window.Zonos.stripe;
507
512
  /**
508
513
  * Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
@@ -833,6 +838,31 @@ const ZonosAddress = class {
833
838
  stripeStore.taxId = event.detail;
834
839
  } })));
835
840
  }
841
+ /**
842
+ * Render short address code input based on ship to country code
843
+ */
844
+ renderShortAddressCodeInput() {
845
+ var _a;
846
+ // No need to render short address code input for billing address
847
+ if (this.type === 'billing') {
848
+ return null;
849
+ }
850
+ const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
851
+ // Don't render short address code input if the country is not provided
852
+ if (!countryCode) {
853
+ return null;
854
+ }
855
+ const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
856
+ countryCode,
857
+ });
858
+ // Don't render short address code input if the country doesn't require short address code
859
+ if (!shortAddressCodeInputRendered) {
860
+ return null;
861
+ }
862
+ return (h("div", { class: "zonos--short-address-code-input" }, h("zonos-stripe-input", { inputLabel: translate('Short address code'), inputPlaceholder: "RRRD2929", inputValue: stripeStore.shortAddressCode || '', isError: !!this.shortAddressCodeErrorMessage, onInputChange: (event) => {
863
+ stripeStore.shortAddressCode = event.detail;
864
+ } }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
865
+ }
836
866
  renderCompanyNameInput() {
837
867
  // No need to render company name for billing address
838
868
  if (this.type === 'billing') {
@@ -1357,10 +1387,10 @@ const ZonosAddress = class {
1357
1387
  this.country = localizationStore.selectedCountryCode;
1358
1388
  }
1359
1389
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
1360
- return (h(Host, { key: '7214ab1c348c1236dfa65f3bb20866fb3262c35d', class: classes([
1390
+ return (h(Host, { key: '4a2a2bb06e16eb0470b827efd104c1a7a373e2b5', class: classes([
1361
1391
  'zonos--address zonos--elements',
1362
1392
  `zonos--${this.type}-address`,
1363
- ]) }, h("zonos-text", { key: '3ce287d8ffd3f5fdb4745311d17992c0b9ee9678', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: '0e33486852d6512b054bb480d0295ce97d2667eb', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
1393
+ ]) }, h("zonos-text", { key: '74fd51761c8672e23ada3c5f1bac121cdf559ca6', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: 'e21b18b079f013e1bdaf2ab526c1c7826f2376f0', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
1364
1394
  }
1365
1395
  get el() { return getElement(this); }
1366
1396
  static get watchers() { return {
@@ -1,18 +1,19 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-0bbe9693.js';
2
2
  import { t as throttle_1 } from './throttle-ce2432ab.js';
3
- import { b as stripeStore, t as trackConversionEvent, K as extractName, B as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-7f4704dc.js';
4
- import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-401ec6d4.js';
3
+ import { b as stripeStore, t as trackConversionEvent, K as extractName, B as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-99ec4a3d.js';
4
+ import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-853b48a9.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
6
6
  import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
7
- import { s as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-d45ceeb4.js';
7
+ import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';
8
8
  import { c as classes } from './classes-0d95c529.js';
9
9
  import { l as log } from './VarianceTest-572cecf5.js';
10
10
  import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-50d72254.js';
11
11
  import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
12
12
  import './debounce-c4785346.js';
13
13
  import './isDarkColor-9ddd90cc.js';
14
+ import './ShortAddressCode-7620e622.js';
14
15
 
15
- 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,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
16
+ 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,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";
16
17
  const ZonosAddressStyle0 = zonosAddressCss;
17
18
 
18
19
  const ZonosAddress = class {
@@ -33,6 +34,10 @@ const ZonosAddress = class {
33
34
  * Error message for tax id input
34
35
  */
35
36
  this.taxIdErrorMessage = '';
37
+ /**
38
+ * Error message for short address code input
39
+ */
40
+ this.shortAddressCodeErrorMessage = '';
36
41
  this.stripe = window.Zonos.stripe;
37
42
  /**
38
43
  * Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
@@ -262,7 +267,32 @@ const ZonosAddress = class {
262
267
  return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
263
268
  stripeStore.taxId = event.detail;
264
269
  this.taxIdChanged.emit(event.detail);
265
- } }), this.taxIdErrorMessage && (h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
270
+ } }), this.taxIdErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
271
+ }
272
+ /**
273
+ * Render short address code input based on ship to country code
274
+ */
275
+ renderShortAddressCodeInput() {
276
+ var _a;
277
+ // No need to render short address code input for billing address
278
+ if (this.type === 'billing') {
279
+ return null;
280
+ }
281
+ const countryCode = (_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country;
282
+ // Don't render short address code input if the country is not provided
283
+ if (!countryCode) {
284
+ return null;
285
+ }
286
+ const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
287
+ countryCode,
288
+ });
289
+ // Don't render short address code input if the country doesn't require short address code
290
+ if (!shortAddressCodeInputRendered) {
291
+ return null;
292
+ }
293
+ return (h("div", { class: "zonos--short-address-code-input" }, h("zonos-stripe-input", { inputLabel: translate('Short address code'), inputPlaceholder: "RRRD2929", inputValue: stripeStore.shortAddressCode || '', isError: !!this.shortAddressCodeErrorMessage, onInputChange: (event) => {
294
+ stripeStore.shortAddressCode = event.detail;
295
+ } }), this.shortAddressCodeErrorMessage && (h("zonos-text", { textColor: "red-600", type: "caption" }, this.shortAddressCodeErrorMessage))));
266
296
  }
267
297
  renderCompanyNameInput() {
268
298
  // No need to render company name for billing address (only allow for Collect and Invoice)
@@ -324,11 +354,11 @@ const ZonosAddress = class {
324
354
  this.isAddressFilled = true;
325
355
  }
326
356
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
327
- return (h(Host, { key: 'b02889c4677a27a8c54a411d66fb31e15af78e1a', class: classes([
357
+ return (h(Host, { key: '5dc571d7c5e706ae9cb90de70deee22847e5ba7e', class: classes([
328
358
  'zonos--address',
329
359
  'zonos--elements',
330
360
  `zonos--${this.type}-address`,
331
- ]) }, this.titleText && (h("zonos-text", { key: 'f52beb7ed6699ec1c73ee35a3436798a1fea38c7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '7c9602892de932e8a3f90a37b53a936f39082916', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), h("div", { key: '8ea6698f5b9d3bb525942c146e2cf67fefad6ad8', class: "zonos--address-component" })));
361
+ ]) }, this.titleText && (h("zonos-text", { key: 'a7c9f730bc9b64aa2c6e8cc24701e638481eac19', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '3078529c201c7947ffc833485d46184bc79ab1d1', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: 'b4a9850ac30ad9c483e05743ff41b7de9756d826', class: "zonos--address-component" })));
332
362
  }
333
363
  get el() { return getElement(this); }
334
364
  static get watchers() { return {
@@ -2,12 +2,13 @@ import { r as registerInstance, h, H as Host, a as getElement, c as createEvent
2
2
  import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
  import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
5
- import { b as stripeStore, t as trackConversionEvent } from './cart-7f4704dc.js';
6
- import { s as storageStore } from './localization-401ec6d4.js';
5
+ import { b as stripeStore, t as trackConversionEvent } from './cart-99ec4a3d.js';
6
+ import { s as storageStore } from './localization-853b48a9.js';
7
7
  import { l as logError } from './handleFetch-a844cac1.js';
8
- import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-61270b79.js';
8
+ import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-56534e48.js';
9
9
  import { l as log } from './VarianceTest-572cecf5.js';
10
10
  import './isDarkColor-9ddd90cc.js';
11
+ import './isContrastColor-69778cea.js';
11
12
 
12
13
  const zonosCardCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";
13
14
  const ZonosCardStyle0 = zonosCardCss;
@@ -1,25 +1,28 @@
1
1
  import { r as registerInstance, d as getAssetPath, h, H as Host, F as Fragment, c as createEvent, a as getElement } from './index-0bbe9693.js';
2
- import { d as cartStore, E as cartStoreHasOneEligibleItem, F as stripeStoreApplyPromoCode, G as stripeStoreRemovePromoCode, b as stripeStore, y as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, I as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, J as stripeStoreTranslateAddressToLatin, K as extractName, z as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, D as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-7f4704dc.js';
3
- import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-401ec6d4.js';
4
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-dea06d44.js';
2
+ import { d as cartStore, E as cartStoreHasOneEligibleItem, F as stripeStoreApplyPromoCode, G as stripeStoreRemovePromoCode, b as stripeStore, y as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, H as stripeStoreResetPromoCode, I as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, J as stripeStoreTranslateAddressToLatin, K as extractName, z as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, D as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-99ec4a3d.js';
3
+ import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-853b48a9.js';
4
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-1bd40006.js';
5
5
  import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
6
6
  import { c as classes } from './classes-0d95c529.js';
7
7
  import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
8
- import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-3958ed11.js';
9
- import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-61270b79.js';
8
+ import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-6fcc712f.js';
9
+ import { s as submitGtag, c as paypalStoreReset, a as paypalStore } from './paypal-56534e48.js';
10
10
  import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
11
11
  import { c as createCustomEvent } from './createCustomEvent-58159025.js';
12
12
  import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
13
13
  import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
14
14
  import { l as languages } from './ILanguage-cd6acb72.js';
15
- import { p as placeTestOrder } from './placeTestOrder-c2180600.js';
16
- import { i as isDarkColor, t as tinycolor } from './isDarkColor-9ddd90cc.js';
15
+ import { p as placeTestOrder } from './placeTestOrder-9e0ab5fd.js';
16
+ import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
17
+ import { g as getContrastColor } from './getContrastColor-28c18704.js';
17
18
  import { i as isColorVariable } from './isColorVariable-0a94004f.js';
18
19
  import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-047a6cd4.js';
19
20
  import { c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
20
- import { s as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-d45ceeb4.js';
21
+ import { s as shouldRenderShortAddressCodeInput, a as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-2572bf77.js';
21
22
  import { e as euCountryCodes } from './TaxId-50d72254.js';
23
+ import './isContrastColor-69778cea.js';
22
24
  import './debounce-c4785346.js';
25
+ import './ShortAddressCode-7620e622.js';
23
26
 
24
27
  const zonosCartItemsCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}";
25
28
  const ZonosCartItemsStyle0 = zonosCartItemsCss;
@@ -778,7 +781,7 @@ const CheckmarkLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="h
778
781
 
779
782
  const RemoveLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
780
783
 
781
- const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-5px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}";
784
+ const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}";
782
785
  const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
783
786
 
784
787
  const ZonosCheckoutPayment = class {
@@ -961,29 +964,6 @@ const ZonosCheckoutPayment = class {
961
964
  };
962
965
  ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
963
966
 
964
- const getContrastColor = ({ backgroundColor, color, }) => {
965
- // get readibility of the color
966
- const isContrastEnough = isContrastColor({
967
- backgroundColor1: backgroundColor,
968
- backgroundColor2: color,
969
- });
970
- if (isContrastEnough) {
971
- // no need to change the color if it's already contrast enough
972
- return color;
973
- }
974
- if (isDarkColor(color)) {
975
- return '#ffffff';
976
- }
977
- const newDarkerColor = tinycolor(color).darken(25).toHexString();
978
- const newLigherColor = tinycolor(color).lighten(25).toHexString();
979
- // get readibility of the color
980
- const isNewColorContrastEnough = isContrastColor({
981
- backgroundColor1: backgroundColor,
982
- backgroundColor2: newDarkerColor,
983
- });
984
- return isNewColorContrastEnough ? newDarkerColor : newLigherColor;
985
- };
986
-
987
967
  /**
988
968
  * Reset any done tabs after selected tab to undone. This is to force user to go through all tabs again
989
969
  */
@@ -1131,6 +1111,43 @@ const ZonosCurrencyToggle = class {
1131
1111
  static get assetsDirs() { return ["assets"]; }
1132
1112
  };
1133
1113
 
1114
+ const shortAddressCodeValidationResult = ({ shippingCountry, shortAddressCode, }) => {
1115
+ // Check to see if we are required to collect short address code for the shipping country or not
1116
+ const isShortAddressCodeInputRendered = shouldRenderShortAddressCodeInput({
1117
+ countryCode: shippingCountry,
1118
+ });
1119
+ // If the short address code input is not even rendered, no need to validate anything and allow to proceed. Validate when short address code input is not even rendered would prevent the user from checking out
1120
+ if (!isShortAddressCodeInputRendered) {
1121
+ return {
1122
+ error: null,
1123
+ valid: true,
1124
+ };
1125
+ }
1126
+ /**
1127
+ * If the short address code input is rendered, the input should be filled
1128
+ */
1129
+ if (!shortAddressCode) {
1130
+ return {
1131
+ error: 'Short address code is required.',
1132
+ valid: false,
1133
+ };
1134
+ }
1135
+ if (shippingCountry === 'SA') {
1136
+ const isValid = /^[A-Za-z]{4}\s*[0-9]{4}$/.test(shortAddressCode);
1137
+ if (!isValid) {
1138
+ return {
1139
+ error: 'Invalid short address code format. Must be 4 letters and 4 numbers.',
1140
+ valid: false,
1141
+ };
1142
+ }
1143
+ }
1144
+ // Other countries doesn't need to validate short address code in the right format
1145
+ return {
1146
+ error: null,
1147
+ valid: true,
1148
+ };
1149
+ };
1150
+
1134
1151
  const isTaxIdRequired = (shippingCountry) => {
1135
1152
  const requireTaxIdCountry = [
1136
1153
  'MX',
@@ -1220,7 +1237,7 @@ const taxIdValidationResult = ({ companyName, shippingCountry, taxId, }) => {
1220
1237
  };
1221
1238
  };
1222
1239
 
1223
- const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
1240
+ const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
1224
1241
  const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
1225
1242
 
1226
1243
  /**
@@ -1263,6 +1280,10 @@ const ZonosCustomerInfo = class {
1263
1280
  * Whether or not the tax id input is invalid
1264
1281
  */
1265
1282
  this.taxIdErrorMessage = '';
1283
+ /**
1284
+ * Whether or not the short address code input is invalid
1285
+ */
1286
+ this.shortAddressCodeErrorMessage = '';
1266
1287
  /**
1267
1288
  * Whether or not the shipping address contains invalid characters
1268
1289
  */
@@ -1514,7 +1535,14 @@ const ZonosCustomerInfo = class {
1514
1535
  shippingCountry: this.shippingCountry,
1515
1536
  taxId: stripeStore.taxId,
1516
1537
  });
1538
+ const { error: shortAddressCodeError, valid: validShortAddressCode } = shortAddressCodeValidationResult({
1539
+ shippingCountry: this.shippingCountry,
1540
+ shortAddressCode: stripeStore.shortAddressCode,
1541
+ });
1517
1542
  this.taxIdErrorMessage = !validTaxId ? translate(error) : '';
1543
+ this.shortAddressCodeErrorMessage = !validShortAddressCode
1544
+ ? translate(shortAddressCodeError)
1545
+ : '';
1518
1546
  const addressLengthErrorList = this.validateAddressLength({
1519
1547
  address: stripeStore.stripeAddressEventData,
1520
1548
  type: 'shipping',
@@ -1531,6 +1559,7 @@ const ZonosCustomerInfo = class {
1531
1559
  !isValidShipping ||
1532
1560
  !isValidLink ||
1533
1561
  !validTaxId ||
1562
+ !validShortAddressCode ||
1534
1563
  this.exceededCharacterLimitErrorFieldList.length > 0) {
1535
1564
  return false;
1536
1565
  }
@@ -1611,10 +1640,10 @@ const ZonosCustomerInfo = class {
1611
1640
  }
1612
1641
  // Render custom address component if the custom address form is enabled
1613
1642
  if (this.addressFormRenderType === 'zonos') {
1614
- return (h("zonos-custom-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
1643
+ return (h("zonos-custom-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
1615
1644
  }
1616
1645
  // Render Stripe address component by default
1617
- return (h("zonos-address", { defaultAddress: defaultAddress, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
1646
+ return (h("zonos-address", { defaultAddress: defaultAddress, shortAddressCodeErrorMessage: this.shortAddressCodeErrorMessage, taxIdErrorMessage: this.taxIdErrorMessage, titleText: translate(type === 'shipping' ? 'Shipping address' : 'Billing address'), type: type }, this.renderExceededCharacterLimitError(type)));
1618
1647
  };
1619
1648
  }
1620
1649
  watchShowErrorBanner() {
@@ -2063,15 +2092,15 @@ const ZonosShipping = class {
2063
2092
  var _a;
2064
2093
  // Render all service levels for US since domestic shipping doesn't have DDP/DAP
2065
2094
  if (((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.value.address.country) === 'US') {
2066
- return (h("zonos-shipping-rich-radio", { items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
2095
+ return (h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsAll, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }));
2067
2096
  }
2068
- return (h(Fragment, null, h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
2097
+ return (h(Fragment, null, h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
2069
2098
  !!this.serviceLevelsDAP.length && (h("button", { class: classes([
2070
2099
  'zonos--shipping-options-collapse-trigger',
2071
2100
  this.collapsedDAPOptions && 'collapsed',
2072
2101
  ]), onClick: () => {
2073
2102
  this.collapsedDAPOptions = !this.collapsedDAPOptions;
2074
- } }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
2103
+ } }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
2075
2104
  };
2076
2105
  return (h(Host, { class: "zonos--shipping zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.length ? (h("zonos-banner", { bannerTitle: cartStore.customQuotingError
2077
2106
  ? cartStore.customQuotingError
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, F as Fragment, H as Host } from './index-0bbe9693.js';
2
- import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as cartStoreOnChange } from './cart-7f4704dc.js';
3
- import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-61270b79.js';
4
- import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-401ec6d4.js';
2
+ import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreHandleInventoryRefund, y as stripeStoreReset, z as cartStoreOnChange } from './cart-99ec4a3d.js';
3
+ import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalStore, b as paypalInitScript } from './paypal-56534e48.js';
4
+ import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-853b48a9.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-b434e436.js';
6
6
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
7
7
  import { h as handleFetch, b as getAdditionalLogMetadata, g as getIsTestMode, l as logError, j as jsonParse, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
@@ -14,6 +14,7 @@ import { g as getBorderRadius } from './getBorderRadius-877f6389.js';
14
14
  import { i as isDarkColor } from './isDarkColor-9ddd90cc.js';
15
15
  import { s as styles } from './styles-6fc2fad9.js';
16
16
  import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
17
+ import './isContrastColor-69778cea.js';
17
18
  import './debounce-c4785346.js';
18
19
 
19
20
  /**
@@ -131,7 +132,7 @@ providedCountryCode) => {
131
132
  return true;
132
133
  };
133
134
 
134
- const SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
135
+ const FALLBACK_SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
135
136
  /**
136
137
  * Watch for changes in domestic checkout step. Redirects user to home page to open international checkout when user selects a country in the international shipping zone.
137
138
  * @note Only works on default bigcommerce checkout page
@@ -143,12 +144,12 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
143
144
  /**
144
145
  * Keep checking
145
146
  */
146
- const handleInternationalCheckoutSelected = async () => {
147
- const shipToCountryElement = document.querySelector(SHIP_TO_COUNTRY_SELECTOR);
148
- if (!shipToCountryElement) {
149
- return false;
150
- }
151
- const shippingCountry = shipToCountryElement.value;
147
+ const handleInternationalCheckoutSelected = async (overrideShippingCountry) => {
148
+ var _a;
149
+ const shipToCountryElement = document.querySelector(((_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceDomesticCheckoutCountrySelector) ||
150
+ FALLBACK_SHIP_TO_COUNTRY_SELECTOR);
151
+ const shippingCountry = ((shipToCountryElement === null || shipToCountryElement === void 0 ? void 0 : shipToCountryElement.value) ||
152
+ overrideShippingCountry);
152
153
  if (!shippingCountry) {
153
154
  // do nothing if shipping country is not found
154
155
  return false;
@@ -195,6 +196,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
195
196
  let isProcessing = false;
196
197
  let intervalCreated = false;
197
198
  const observer = new MutationObserver(() => {
199
+ var _a;
198
200
  const domesticRedirectedButton = document.querySelector(domesticRedirectedBtnSelector);
199
201
  const shippingAddressSession = stripeStoreGetDomesticShippingSession();
200
202
  // append a hidden button to the body if the shipping address session is found
@@ -211,7 +213,8 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
211
213
  }
212
214
  const isBigcommerceDomesticCheckoutPage = window.location.pathname.includes('/checkout') &&
213
215
  window.Zonos.isBigCommerce;
214
- const shipToCountryElement = document.querySelector(SHIP_TO_COUNTRY_SELECTOR);
216
+ const shipToCountryElement = document.querySelector(((_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.bigcommerceDomesticCheckoutCountrySelector) ||
217
+ FALLBACK_SHIP_TO_COUNTRY_SELECTOR);
215
218
  // Should just disconnect the observer if it's not bigcommerce domestic checkout page
216
219
  if (!isBigcommerceDomesticCheckoutPage) {
217
220
  observer.disconnect();
@@ -250,6 +253,26 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
250
253
  isProcessing = false;
251
254
  }
252
255
  }, 1000);
256
+ // keep checking for stripe address element to be initialized
257
+ const stripeBcListenerInterval = setInterval(() => {
258
+ var _a;
259
+ if (!window.bcStripeElements) {
260
+ clearInterval(stripeBcListenerInterval);
261
+ return;
262
+ }
263
+ const addressElement = (_a = window.bcStripeElements) === null || _a === void 0 ? void 0 : _a.getElement('address');
264
+ if (!addressElement) {
265
+ return;
266
+ }
267
+ clearInterval(stripeBcListenerInterval);
268
+ addressElement.on('change', event => {
269
+ const shippingCountry = event.value.address.country;
270
+ if (shippingCountry) {
271
+ void handleInternationalCheckoutSelected(shippingCountry);
272
+ }
273
+ });
274
+ // we want to attacch event to addressElement as soon as it's loaded
275
+ }, 500);
253
276
  });
254
277
  observer.observe(document.body, {
255
278
  childList: true,
@@ -1889,7 +1912,7 @@ const ZonosCheckout = class {
1889
1912
  '--zonos--primary-color': !this.isMobile
1890
1913
  ? colorPrimary
1891
1914
  : undefined,
1892
- }) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
1915
+ }) }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.getDefaultAddress(), isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, isMobile: this.isMobile, onContinueClicked: async () => {
1893
1916
  await this.handleStripePaymentContinue();
1894
1917
  }, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
1895
1918
  // do nothing if it's not mobile
@@ -1917,7 +1940,7 @@ const ZonosCheckout = class {
1917
1940
  this.isMobile && 'mobile',
1918
1941
  this.isIframed && 'iframed',
1919
1942
  this.hiddenMode && 'hidden-mode',
1920
- ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-dialog", { isLoading: true, loadingText: translate('You will be redirected to international checkout shortly.'), loadingTitle: translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
1943
+ ]) }, this.preview ? (renderContent()) : (h("zonos-dialog", { borderStyle: style, class: "zonos--checkout-dialog", "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), h("zonos-dialog", { isLoading: true, loadingText: translate('You will be redirected to international checkout shortly.'), loadingTitle: translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: translate("Don't close"), dialogConfirmBtnText: translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: translate('Would you like to close checkout and return to the site?'), dialogTitle: translate('Are you sure?'), onCancelClicked: () => {
1921
1944
  this.confirmDialogOpen = false;
1922
1945
  },
1923
1946
  // Mark user selected confirm to close the dialog
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, d as getAssetPath, h, H as Host } from './index-0bbe9693.js';
2
- import { d as cartStore } from './cart-7f4704dc.js';
2
+ import { d as cartStore } from './cart-99ec4a3d.js';
3
3
  import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
4
4
  import { f as zonosStoreFontFamily } from './zonosStore-b434e436.js';
5
5
  import { c as classes } from './classes-0d95c529.js';
6
6
  import { s as styles } from './styles-6fc2fad9.js';
7
- import './localization-401ec6d4.js';
7
+ import './localization-853b48a9.js';
8
8
  import './handleFetch-a844cac1.js';
9
9
  import './VarianceTest-572cecf5.js';
10
10
  import './isDarkColor-9ddd90cc.js';