@zonos/elements 1.4.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/dist/cjs/{TaxId-Q6aDqqWv.js → TaxId-ChhNwG04.js} +36 -0
  2. package/dist/cjs/{cart-B6Aty-21.js → cart-CiXlehwQ.js} +88 -52
  3. package/dist/cjs/{collect-DnrvaXUI.js → collect-Drr8fY-q.js} +3 -3
  4. package/dist/cjs/{debounce-Cd2emZPn.js → debounce-BhgA8_3W.js} +2 -2
  5. package/dist/cjs/{debounce-vY0QYT6o.js → debounce-DRPMxNew.js} +1 -1
  6. package/dist/cjs/{getBorderRadius-CyYZw4qq.js → getBorderRadius-CJ_95w3o.js} +1 -1
  7. package/dist/cjs/{getMissingRequiredShippingFields-D03ICqss.js → getMissingRequiredShippingFields-DI6qF1z3.js} +1 -1
  8. package/dist/cjs/{hasInclusivePrice-CPCoVeU3.js → hasInclusivePrice-84KS94yH.js} +1 -1
  9. package/dist/cjs/index.cjs.js +19 -8
  10. package/dist/cjs/{invoice-Cj8W7NW0.js → invoice-5hVfSXpb.js} +3 -3
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{localization-BzNeXeDe.js → localization-B2mjW0Xa.js} +701 -41
  13. package/dist/cjs/{paypal-CuKshRmZ.js → paypal-pd8Nz_R_.js} +4 -4
  14. package/dist/cjs/{placeTestOrder-7czjwkjm.js → placeTestOrder-DrI8rD9o.js} +2 -2
  15. package/dist/cjs/{renderCheckoutCurrency-BH8t2b2x.js → renderCheckoutCurrency-u5q8YdUb.js} +2 -2
  16. package/dist/cjs/shouldRenderShortAddressCodeInput-gpu_bMfp.js +21 -0
  17. package/dist/cjs/{shouldShowLanguageSelect-yAbtCmd8.js → shouldShowLanguageSelect-gBg4KeTQ.js} +1 -1
  18. package/dist/cjs/{submitGtag-D79e8u6s.js → submitGtag-Rc-S3PnH.js} +1 -1
  19. package/dist/cjs/{throttle-zSVRQLC0.js → taxIdFields-BrIaPTcd.js} +57 -2
  20. package/dist/cjs/taxIdRules-BBj8kQxJ.js +58 -0
  21. package/dist/cjs/{updateCheckoutSessionAttributes-jMtfOL2m.js → updateCheckoutSessionAttributes-d0IKpwW8.js} +1 -1
  22. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +25 -30
  23. package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-address_4.cjs.entry.js +27 -30
  25. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +7 -6
  26. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  27. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
  29. package/dist/cjs/zonos-card_5.cjs.entry.js +8 -7
  30. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +148 -80
  31. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-checkout.cjs.entry.js +31 -20
  33. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  34. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -5
  35. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +12 -11
  36. package/dist/cjs/zonos-collect.cjs.entry.js +9 -8
  37. package/dist/cjs/zonos-controller.cjs.entry.js +7 -6
  38. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  40. package/dist/cjs/zonos-elements.cjs.js +1 -1
  41. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
  42. package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
  43. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  44. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -7
  45. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +12 -11
  46. package/dist/cjs/zonos-invoice.cjs.entry.js +9 -8
  47. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  48. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  49. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +7 -6
  50. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  51. package/dist/cjs/zonos-stripe-input.cjs.entry.js +2 -2
  52. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  53. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  54. package/dist/cjs/{zonosStore-Bx9jK82G.js → zonosStore-CDV83QyK.js} +2 -0
  55. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +10 -0
  56. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +6 -2
  57. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -10
  58. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
  59. package/dist/collection/components/store/checkout/stripe.js +10 -12
  60. package/dist/collection/components/store/translationStore/strings.arabic.js +35 -2
  61. package/dist/collection/components/store/translationStore/strings.base.js +35 -2
  62. package/dist/collection/components/store/translationStore/strings.chinese.js +35 -2
  63. package/dist/collection/components/store/translationStore/strings.danish.js +35 -2
  64. package/dist/collection/components/store/translationStore/strings.dutch.js +35 -2
  65. package/dist/collection/components/store/translationStore/strings.french.js +35 -2
  66. package/dist/collection/components/store/translationStore/strings.german.js +35 -2
  67. package/dist/collection/components/store/translationStore/strings.hebrew.js +35 -2
  68. package/dist/collection/components/store/translationStore/strings.indonesian.js +35 -2
  69. package/dist/collection/components/store/translationStore/strings.italian.js +35 -2
  70. package/dist/collection/components/store/translationStore/strings.japanese.js +35 -2
  71. package/dist/collection/components/store/translationStore/strings.korean.js +35 -2
  72. package/dist/collection/components/store/translationStore/strings.norwegian.js +35 -2
  73. package/dist/collection/components/store/translationStore/strings.polish.js +35 -2
  74. package/dist/collection/components/store/translationStore/strings.portuguese.js +35 -2
  75. package/dist/collection/components/store/translationStore/strings.russian.js +35 -2
  76. package/dist/collection/components/store/translationStore/strings.spanish.js +35 -2
  77. package/dist/collection/components/store/translationStore/strings.swedish.js +35 -2
  78. package/dist/collection/components/store/translationStore/strings.turkish.js +35 -2
  79. package/dist/collection/components/store/translationStore/strings.vietnamese.js +35 -2
  80. package/dist/collection/components/store/zonosStore.js +2 -1
  81. package/dist/collection/components/stripe/zonos-address/zonos-address.css +5 -0
  82. package/dist/collection/components/stripe/zonos-address/zonos-address.js +37 -22
  83. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.css +5 -0
  84. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +34 -21
  85. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +24 -35
  86. package/dist/collection/components/utils/checkout/getCheckoutTaxIdPayload.js +16 -0
  87. package/dist/collection/components/utils/checkout/getTaxIdFieldState.js +26 -0
  88. package/dist/collection/components/utils/checkout/isHostedVsNativeTestAllowed.js +13 -0
  89. package/dist/collection/components/utils/checkout/itemCustomization.js +53 -0
  90. package/dist/collection/components/utils/checkout/parseItemCustomizations.js +6 -0
  91. package/dist/collection/components/utils/checkout/resolveTaxIdSelection.js +23 -0
  92. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +7 -11
  93. package/dist/collection/components/utils/checkout/taxIdFields.js +29 -0
  94. package/dist/collection/components/utils/taxId/taxIdRules.js +44 -0
  95. package/dist/collection/components/utils/taxIdValidationResult.js +57 -58
  96. package/dist/collection/index.js +1 -0
  97. package/dist/collection/types/checkout/TaxId.js +31 -0
  98. package/dist/collection/types/checkout/itemCustomization.js +1 -0
  99. package/dist/collection/types/index.js +1 -0
  100. package/dist/esm/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +32 -1
  101. package/dist/esm/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +88 -53
  102. package/dist/esm/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +3 -3
  103. package/dist/esm/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +1 -1
  104. package/dist/esm/{debounce-CrmpwbEE.js → debounce-DWqMT4lo.js} +2 -2
  105. package/dist/esm/{getBorderRadius-DYfkeXdx.js → getBorderRadius-BiGd45jw.js} +1 -1
  106. package/dist/esm/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +1 -1
  107. package/dist/esm/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
  108. package/dist/esm/index.js +9 -8
  109. package/dist/esm/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +3 -3
  110. package/dist/esm/loader.js +1 -1
  111. package/dist/esm/{localization-BIh-4pc_.js → localization-DHM91diu.js} +701 -41
  112. package/dist/esm/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +4 -4
  113. package/dist/esm/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +2 -2
  114. package/dist/esm/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
  115. package/dist/esm/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +19 -0
  116. package/dist/esm/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
  117. package/dist/esm/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
  118. package/dist/esm/taxIdFields-ByEYfsO5.js +139 -0
  119. package/dist/esm/taxIdRules-xYlx7ZXW.js +47 -0
  120. package/dist/esm/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
  121. package/dist/esm/zonos-address-completion-dialog_7.entry.js +23 -28
  122. package/dist/esm/zonos-address-display_2.entry.js +3 -3
  123. package/dist/esm/zonos-address_4.entry.js +25 -28
  124. package/dist/esm/zonos-airwallex-payment.entry.js +7 -6
  125. package/dist/esm/zonos-badge.entry.js +1 -1
  126. package/dist/esm/zonos-banner.entry.js +1 -1
  127. package/dist/esm/zonos-button_3.entry.js +2 -2
  128. package/dist/esm/zonos-card_5.entry.js +8 -7
  129. package/dist/esm/zonos-cart-items_12.entry.js +147 -79
  130. package/dist/esm/zonos-checkbox_2.entry.js +2 -2
  131. package/dist/esm/zonos-checkout.entry.js +31 -20
  132. package/dist/esm/zonos-collapse.entry.js +1 -1
  133. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -5
  134. package/dist/esm/zonos-collect-finish_6.entry.js +12 -11
  135. package/dist/esm/zonos-collect.entry.js +9 -8
  136. package/dist/esm/zonos-controller.entry.js +7 -6
  137. package/dist/esm/zonos-country-flag.entry.js +2 -2
  138. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  139. package/dist/esm/zonos-elements.js +1 -1
  140. package/dist/esm/zonos-hello-dialog.entry.js +4 -4
  141. package/dist/esm/zonos-hello.entry.js +4 -4
  142. package/dist/esm/zonos-input.entry.js +2 -2
  143. package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -7
  144. package/dist/esm/zonos-invoice-finish_5.entry.js +12 -11
  145. package/dist/esm/zonos-invoice.entry.js +9 -8
  146. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  147. package/dist/esm/zonos-logo.entry.js +1 -1
  148. package/dist/esm/zonos-policy-consent_2.entry.js +7 -6
  149. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  150. package/dist/esm/zonos-stripe-input.entry.js +2 -2
  151. package/dist/esm/zonos-text.entry.js +1 -1
  152. package/dist/esm/zonos-v-stack.entry.js +1 -1
  153. package/dist/esm/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +2 -1
  154. package/dist/esm-es5/{TaxId-Cye-evFK.js → TaxId-DMIgN_sT.js} +2 -1
  155. package/dist/esm-es5/{cart-BoQp8Ema.js → cart-DmJkjiDE.js} +64 -53
  156. package/dist/esm-es5/{collect-Eo4gtyql.js → collect-BV5GTPmh.js} +1 -1
  157. package/dist/esm-es5/{debounce-BR3PaG8X.js → debounce-DHj2iHA1.js} +7 -7
  158. package/dist/esm-es5/debounce-DWqMT4lo.js +1 -0
  159. package/dist/esm-es5/getBorderRadius-BiGd45jw.js +8 -0
  160. package/dist/esm-es5/{getMissingRequiredShippingFields-Ks6_tpjn.js → getMissingRequiredShippingFields-DljgpDZe.js} +3 -3
  161. package/dist/esm-es5/{hasInclusivePrice-CbEfIhI5.js → hasInclusivePrice-DhGXpH2D.js} +1 -1
  162. package/dist/esm-es5/index.js +11 -11
  163. package/dist/esm-es5/{invoice-S1KahJ_Z.js → invoice-CO-iqlni.js} +1 -1
  164. package/dist/esm-es5/loader.js +1 -1
  165. package/dist/esm-es5/localization-DHM91diu.js +348 -0
  166. package/dist/esm-es5/{paypal-DNfvnuUU.js → paypal-BfW5aLJw.js} +1 -1
  167. package/dist/esm-es5/{placeTestOrder-CQaMKFOg.js → placeTestOrder-CyWUFhxD.js} +1 -1
  168. package/dist/esm-es5/{renderCheckoutCurrency-C2Tw73uR.js → renderCheckoutCurrency-B31ZNkUv.js} +2 -2
  169. package/dist/esm-es5/shouldRenderShortAddressCodeInput-Bc8k2vN0.js +8 -0
  170. package/dist/esm-es5/{shouldShowLanguageSelect-CCD7gpSY.js → shouldShowLanguageSelect-DwSfSHar.js} +1 -1
  171. package/dist/esm-es5/{submitGtag-df9AQ2zL.js → submitGtag-BEFrutel.js} +1 -1
  172. package/dist/esm-es5/taxIdFields-ByEYfsO5.js +46 -0
  173. package/dist/esm-es5/taxIdRules-xYlx7ZXW.js +6 -0
  174. package/dist/esm-es5/{updateCheckoutSessionAttributes-4Jq6V4pO.js → updateCheckoutSessionAttributes-B0bQH0uw.js} +1 -1
  175. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +253 -254
  176. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  177. package/dist/esm-es5/zonos-address_4.entry.js +8 -9
  178. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  179. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  180. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  181. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  182. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  183. package/dist/esm-es5/zonos-cart-items_12.entry.js +40 -26
  184. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  185. package/dist/esm-es5/zonos-checkout.entry.js +7 -7
  186. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  187. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  188. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  189. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  190. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  191. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  192. package/dist/esm-es5/zonos-country-select_4.entry.js +2 -2
  193. package/dist/esm-es5/zonos-elements.js +1 -1
  194. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  195. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  196. package/dist/esm-es5/zonos-input.entry.js +1 -1
  197. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +2 -2
  198. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  199. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  200. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  201. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  202. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  203. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  204. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  205. package/dist/esm-es5/zonos-text.entry.js +1 -1
  206. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  207. package/dist/esm-es5/{zonosStore-msUlqmSD.js → zonosStore-BXP9FvIt.js} +1 -1
  208. package/dist/scripts/index.d.ts +97 -1
  209. package/dist/scripts/index.js +1 -1
  210. package/dist/scripts/loadZonos.js +1 -1
  211. package/dist/scripts/zonos.js +1 -1
  212. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
  213. package/dist/types/components/store/checkout/stripe.d.ts +9 -0
  214. package/dist/types/components/store/translationStore/strings.arabic.d.ts +34 -1
  215. package/dist/types/components/store/translationStore/strings.base.d.ts +34 -1
  216. package/dist/types/components/store/translationStore/strings.chinese.d.ts +34 -1
  217. package/dist/types/components/store/translationStore/strings.danish.d.ts +34 -1
  218. package/dist/types/components/store/translationStore/strings.dutch.d.ts +34 -1
  219. package/dist/types/components/store/translationStore/strings.french.d.ts +34 -1
  220. package/dist/types/components/store/translationStore/strings.german.d.ts +34 -1
  221. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +34 -1
  222. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +34 -1
  223. package/dist/types/components/store/translationStore/strings.italian.d.ts +34 -1
  224. package/dist/types/components/store/translationStore/strings.japanese.d.ts +34 -1
  225. package/dist/types/components/store/translationStore/strings.korean.d.ts +34 -1
  226. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +34 -1
  227. package/dist/types/components/store/translationStore/strings.polish.d.ts +34 -1
  228. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +34 -1
  229. package/dist/types/components/store/translationStore/strings.russian.d.ts +34 -1
  230. package/dist/types/components/store/translationStore/strings.spanish.d.ts +34 -1
  231. package/dist/types/components/store/translationStore/strings.swedish.d.ts +34 -1
  232. package/dist/types/components/store/translationStore/strings.turkish.d.ts +34 -1
  233. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +34 -1
  234. package/dist/types/components/store/zonosStore.d.ts +2 -1
  235. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +4 -1
  236. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +4 -1
  237. package/dist/types/components/utils/checkout/getCheckoutTaxIdPayload.d.ts +6 -0
  238. package/dist/types/components/utils/checkout/getTaxIdFieldState.d.ts +18 -0
  239. package/dist/types/components/utils/checkout/isHostedVsNativeTestAllowed.d.ts +11 -0
  240. package/dist/types/components/utils/checkout/itemCustomization.d.ts +23 -0
  241. package/dist/types/components/utils/checkout/parseItemCustomizations.d.ts +7 -0
  242. package/dist/types/components/utils/checkout/resolveTaxIdSelection.d.ts +12 -0
  243. package/dist/types/components/utils/checkout/shouldRenderTaxIdInput.d.ts +2 -1
  244. package/dist/types/components/utils/checkout/taxIdFields.d.ts +11 -0
  245. package/dist/types/components/utils/taxId/taxIdRules.d.ts +37 -0
  246. package/dist/types/components/utils/taxIdValidationResult.d.ts +8 -2
  247. package/dist/types/components.d.ts +22 -0
  248. package/dist/types/index.d.ts +1 -0
  249. package/dist/types/types/checkout/TaxId.d.ts +45 -0
  250. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +11 -0
  251. package/dist/types/types/checkout/api/CreateParty.d.ts +2 -0
  252. package/dist/types/types/checkout/itemCustomization.d.ts +4 -0
  253. package/dist/types/types/index.d.ts +1 -0
  254. package/dist/types/types/utils/ZonosSettings.d.ts +5 -0
  255. package/dist/zonos-elements/index.esm.js +1 -1
  256. package/dist/zonos-elements/{p-7bd99479.system.entry.js → p-064d8829.system.entry.js} +26 -26
  257. package/dist/zonos-elements/p-107f287b.entry.js +1 -0
  258. package/dist/zonos-elements/{p-51400242.system.entry.js → p-1199baef.system.entry.js} +3 -3
  259. package/dist/zonos-elements/p-12b24ebb.entry.js +1 -0
  260. package/dist/zonos-elements/{p-9c33f7ed.system.entry.js → p-189cc594.system.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-d3d0656a.entry.js → p-1a5acbcd.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-11defdca.system.entry.js → p-1cc42a98.system.entry.js} +18 -18
  263. package/dist/zonos-elements/p-1e6db427.entry.js +1 -0
  264. package/dist/zonos-elements/{p-5016d71b.system.entry.js → p-1fda4aec.system.entry.js} +132 -117
  265. package/dist/zonos-elements/{p-756d303f.system.entry.js → p-20eb00de.system.entry.js} +1 -1
  266. package/dist/zonos-elements/{p-5967a1c1.system.entry.js → p-216a908d.system.entry.js} +5 -5
  267. package/dist/zonos-elements/p-25eb99d4.entry.js +1 -0
  268. package/dist/zonos-elements/{p-23352709.system.entry.js → p-2b63865a.system.entry.js} +4 -4
  269. package/dist/zonos-elements/{p-6db7c0b1.system.entry.js → p-2ca826b9.system.entry.js} +2 -2
  270. package/dist/zonos-elements/{p-6c41b00c.entry.js → p-2d513aa3.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-c961caaf.entry.js → p-3e705c9b.entry.js} +1 -1
  272. package/dist/zonos-elements/{p-acd50b0b.entry.js → p-4612facd.entry.js} +1 -1
  273. package/dist/zonos-elements/{p-5b80aff2.system.entry.js → p-46a839d2.system.entry.js} +24 -24
  274. package/dist/zonos-elements/p-46b9f0cf.entry.js +1 -0
  275. package/dist/zonos-elements/{p-244e0302.system.entry.js → p-4715045c.system.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-d168023b.entry.js → p-4917b74d.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-0b81f8b9.system.entry.js → p-53eac12f.system.entry.js} +14 -14
  278. package/dist/zonos-elements/{p-17c7ea4a.system.entry.js → p-55813e9f.system.entry.js} +3 -3
  279. package/dist/zonos-elements/{p-06030d3b.system.entry.js → p-5585db86.system.entry.js} +45 -45
  280. package/dist/zonos-elements/p-59fc32af.entry.js +1 -0
  281. package/dist/zonos-elements/{p-193d9722.entry.js → p-61312d5b.entry.js} +1 -1
  282. package/dist/zonos-elements/p-636b71d4.entry.js +1 -0
  283. package/dist/zonos-elements/{p-155ed3d3.system.entry.js → p-6410fa11.system.entry.js} +24 -24
  284. package/dist/zonos-elements/{p-0fca452b.entry.js → p-65817880.entry.js} +1 -1
  285. package/dist/zonos-elements/p-678b9214.entry.js +1 -0
  286. package/dist/zonos-elements/p-6e691736.entry.js +1 -0
  287. package/dist/zonos-elements/p-6vSUiBfr.system.js +348 -0
  288. package/dist/zonos-elements/p-74659d88.entry.js +1 -0
  289. package/dist/zonos-elements/p-7dc7f328.entry.js +1 -0
  290. package/dist/zonos-elements/{p-55916c90.entry.js → p-7f1bea9b.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-1c150f26.entry.js → p-821e413a.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-c403f004.system.entry.js → p-82e45d0c.system.entry.js} +1 -1
  293. package/dist/zonos-elements/p-84e76348.entry.js +1 -0
  294. package/dist/zonos-elements/{p-1409de3b.system.entry.js → p-88e20e99.system.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-195f6e38.system.entry.js → p-89a3c4db.system.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-4679f0ec.entry.js → p-8f9d8795.entry.js} +1 -1
  297. package/dist/zonos-elements/p-8fa6cfff.entry.js +1 -0
  298. package/dist/zonos-elements/{p-92fe9a1f.system.entry.js → p-902cca23.system.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-0a4a7742.system.entry.js → p-93860183.system.entry.js} +1 -1
  300. package/dist/zonos-elements/{p-69c3e367.system.entry.js → p-941a95a1.system.entry.js} +10 -10
  301. package/dist/zonos-elements/{p-b5882fbb.system.entry.js → p-9449b4f4.system.entry.js} +1 -1
  302. package/dist/zonos-elements/{p-6abec43f.system.entry.js → p-960070d0.system.entry.js} +3 -3
  303. package/dist/zonos-elements/{p-1bac5ac1.system.entry.js → p-990fcf81.system.entry.js} +1 -1
  304. package/dist/zonos-elements/p-BD-9rD53.js +1 -0
  305. package/dist/zonos-elements/p-BMPYH-LT.js +1 -0
  306. package/dist/zonos-elements/{p-DI2vXnXc.system.js → p-BrQ8n8NS.system.js} +3 -3
  307. package/dist/zonos-elements/p-Bu9WCfUC.system.js +2 -2
  308. package/dist/zonos-elements/{p-CUaf1cEg.js → p-C70h5mKA.js} +1 -1
  309. package/dist/zonos-elements/{p-B4Ufchqh.system.js → p-C9XLkmmb.system.js} +3 -3
  310. package/dist/zonos-elements/{p-CZD8WvyY.system.js → p-CBUz18kA.system.js} +1 -1
  311. package/dist/zonos-elements/{p-kaOxUR9u.system.js → p-CGNVm52g.system.js} +6 -6
  312. package/dist/zonos-elements/p-CHKKvuiz.js +1 -0
  313. package/dist/zonos-elements/{p-0mGRBGcf.js → p-CMo3ZweU.js} +1 -1
  314. package/dist/zonos-elements/p-CTiqplrr.js +1 -0
  315. package/dist/zonos-elements/p-CYxMfUL7.system.js +1 -0
  316. package/dist/zonos-elements/{p-D4MevhAL.system.js → p-CbhN65lj.system.js} +3 -3
  317. package/dist/zonos-elements/p-Ch1w0Lr7.js +1 -0
  318. package/dist/zonos-elements/{p-W82paT5F.js → p-CqB9AfBf.js} +1 -1
  319. package/dist/zonos-elements/p-CzKlS3E-.system.js +6 -0
  320. package/dist/zonos-elements/p-D1SmY_fZ.js +1 -0
  321. package/dist/zonos-elements/{p-sz4L-ZnB.js → p-D1e9zNDA.js} +1 -1
  322. package/dist/zonos-elements/{p-c9QtIdJX.js → p-D6xXnsM_.js} +1 -1
  323. package/dist/zonos-elements/{p-8PPEbm_0.system.js → p-DIab60nK.system.js} +12 -12
  324. package/dist/zonos-elements/{p-Cye-evFK.js → p-DMIgN_sT.js} +1 -1
  325. package/dist/zonos-elements/{p-DCS8qcL6.system.js → p-DQrMfUzi.system.js} +41 -41
  326. package/dist/zonos-elements/{p-BuU_p5DP.system.js → p-DTgUqgwV.system.js} +2 -2
  327. package/dist/zonos-elements/p-DW7I0zOF.js +1 -0
  328. package/dist/zonos-elements/p-DZdkJHK9.system.js +7 -0
  329. package/dist/zonos-elements/{p-XqkqjeNV.system.js → p-DgUrB-1a.system.js} +1 -1
  330. package/dist/zonos-elements/p-DiMEP3mh.js +1 -0
  331. package/dist/zonos-elements/p-DprOoI2W.system.js +528 -0
  332. package/dist/zonos-elements/{p-7abqRc9V.js → p-DpwmHU8R.js} +2 -2
  333. package/dist/zonos-elements/p-DqVePqqx.system.js +8 -0
  334. package/dist/zonos-elements/{p-Cby4EkFu.system.js → p-DsBuZ6ob.system.js} +2 -1
  335. package/dist/zonos-elements/{p-XDxdMlQl.system.js → p-Dtu_Japy.system.js} +39 -39
  336. package/dist/zonos-elements/p-Dwg61Ft_.js +1 -0
  337. package/dist/zonos-elements/p-U33isUJG.js +1 -0
  338. package/dist/zonos-elements/{p-Be3Hpms1.system.js → p-XoQH3S7Z.system.js} +1 -1
  339. package/dist/zonos-elements/{p-474e8a92.system.entry.js → p-a1022808.system.entry.js} +1 -1
  340. package/dist/zonos-elements/{p-83aa1c8c.entry.js → p-ad04bba2.entry.js} +1 -1
  341. package/dist/zonos-elements/{p-a938c174.entry.js → p-b51010b9.entry.js} +1 -1
  342. package/dist/zonos-elements/{p-dfc87b10.system.entry.js → p-c33b8f6a.system.entry.js} +1 -1
  343. package/dist/zonos-elements/{p-a40fd99b.system.entry.js → p-cccaad60.system.entry.js} +39 -40
  344. package/dist/zonos-elements/p-d3345b2c.entry.js +1 -0
  345. package/dist/zonos-elements/{p-249c1ee1.system.entry.js → p-d8f375da.system.entry.js} +3 -3
  346. package/dist/zonos-elements/{p-2603dce0.entry.js → p-e216cc8c.entry.js} +1 -1
  347. package/dist/zonos-elements/{p-b79036fc.entry.js → p-e7fdb2c9.entry.js} +1 -1
  348. package/dist/zonos-elements/p-ebe157b5.entry.js +1 -0
  349. package/dist/zonos-elements/p-ef5344ea.entry.js +1 -0
  350. package/dist/zonos-elements/{p-be1237fc.system.entry.js → p-f3d9a380.system.entry.js} +97 -97
  351. package/dist/zonos-elements/{p-31043c2e.system.entry.js → p-f5f95990.system.entry.js} +296 -297
  352. package/dist/zonos-elements/p-fda89981.system.entry.js +13 -0
  353. package/dist/zonos-elements/{p-d4d2b39e.entry.js → p-fddf3556.entry.js} +1 -1
  354. package/dist/zonos-elements/p-iAIzUA4k.js +1 -0
  355. package/dist/zonos-elements/{p-BpDCLBwW.js → p-n5PZKz1k.js} +1 -1
  356. package/dist/zonos-elements/{p-DoEHepOc.system.js → p-ojtNq-r5.system.js} +1 -1
  357. package/dist/zonos-elements/{p-C_z9WL8a.js → p-r-YGHhLa.js} +1 -1
  358. package/dist/zonos-elements/{p-CBx5nYet.system.js → p-vTIygnHq.system.js} +1 -1
  359. package/dist/zonos-elements/{p-DQZncB2d.system.js → p-zsTASoh2.system.js} +3 -3
  360. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  361. package/item-customization.d.ts +25 -0
  362. package/item-customization.js +52 -0
  363. package/package.json +7 -4
  364. package/dist/cjs/shouldRenderTaxIdInput-TxekHCp7.js +0 -43
  365. package/dist/esm/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -40
  366. package/dist/esm/throttle-Cvlvb-dm.js +0 -85
  367. package/dist/esm-es5/debounce-CrmpwbEE.js +0 -1
  368. package/dist/esm-es5/getBorderRadius-DYfkeXdx.js +0 -8
  369. package/dist/esm-es5/localization-BIh-4pc_.js +0 -348
  370. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +0 -17
  371. package/dist/esm-es5/throttle-Cvlvb-dm.js +0 -46
  372. package/dist/zonos-elements/p-0457f579.entry.js +0 -1
  373. package/dist/zonos-elements/p-06fe2939.entry.js +0 -1
  374. package/dist/zonos-elements/p-24f3c547.entry.js +0 -1
  375. package/dist/zonos-elements/p-34656e6c.entry.js +0 -1
  376. package/dist/zonos-elements/p-39ee1558.entry.js +0 -1
  377. package/dist/zonos-elements/p-3a2da031.entry.js +0 -1
  378. package/dist/zonos-elements/p-4806b264.system.entry.js +0 -13
  379. package/dist/zonos-elements/p-725e29bb.entry.js +0 -1
  380. package/dist/zonos-elements/p-BGktDPwA.system.js +0 -1
  381. package/dist/zonos-elements/p-Bi-s0fp_.system.js +0 -17
  382. package/dist/zonos-elements/p-CEK_Wk6v.system.js +0 -7
  383. package/dist/zonos-elements/p-CFbfEmjN.js +0 -1
  384. package/dist/zonos-elements/p-CcJF6xhQ.js +0 -1
  385. package/dist/zonos-elements/p-Cxuiqv1I.js +0 -1
  386. package/dist/zonos-elements/p-D-bZg-Pc.js +0 -1
  387. package/dist/zonos-elements/p-DOD2I44l.system.js +0 -348
  388. package/dist/zonos-elements/p-DS-qw_qc.system.js +0 -517
  389. package/dist/zonos-elements/p-DZ2mevDK.js +0 -1
  390. package/dist/zonos-elements/p-DnjGkbEy.js +0 -1
  391. package/dist/zonos-elements/p-FRWZayxL.js +0 -1
  392. package/dist/zonos-elements/p-Mrz_lnC1.js +0 -1
  393. package/dist/zonos-elements/p-ad9ff14c.entry.js +0 -1
  394. package/dist/zonos-elements/p-bb3546c0.entry.js +0 -1
  395. package/dist/zonos-elements/p-c1cbfdba.entry.js +0 -1
  396. package/dist/zonos-elements/p-c47ce656.entry.js +0 -1
  397. package/dist/zonos-elements/p-c9d5d8f1.entry.js +0 -1
  398. package/dist/zonos-elements/p-clDfq9AL.js +0 -1
  399. package/dist/zonos-elements/p-d74bc3e8.entry.js +0 -1
  400. package/dist/zonos-elements/p-d8b312e5.entry.js +0 -1
  401. package/dist/zonos-elements/p-db87b0dd.entry.js +0 -1
  402. package/dist/zonos-elements/p-defc2d18.entry.js +0 -1
  403. package/dist/zonos-elements/p-rVp8hgWw.js +0 -1
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
- var cart = require('./cart-B6Aty-21.js');
5
- var localization = require('./localization-BzNeXeDe.js');
3
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
4
+ var cart = require('./cart-CiXlehwQ.js');
5
+ var localization = require('./localization-B2mjW0Xa.js');
6
6
  var handleFetch = require('./handleFetch-DQLhurnE.js');
7
7
  var isContrastColor = require('./isContrastColor-B9ldIdpa.js');
8
8
  var VarianceTest = require('./VarianceTest-C98whVgO.js');
9
- var submitGtag = require('./submitGtag-D79e8u6s.js');
9
+ var submitGtag = require('./submitGtag-Rc-S3PnH.js');
10
10
 
11
11
  /*!
12
12
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var cart = require('./cart-B6Aty-21.js');
4
- var localization = require('./localization-BzNeXeDe.js');
3
+ var cart = require('./cart-CiXlehwQ.js');
4
+ var localization = require('./localization-B2mjW0Xa.js');
5
5
  var handleFetch = require('./handleFetch-DQLhurnE.js');
6
6
 
7
7
  const placeTestOrder = async () => {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var cart = require('./cart-B6Aty-21.js');
4
- var localization = require('./localization-BzNeXeDe.js');
3
+ var cart = require('./cart-CiXlehwQ.js');
4
+ var localization = require('./localization-B2mjW0Xa.js');
5
5
 
6
6
  const getDisplayCurrency = () => {
7
7
  var _a, _b;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var ShortAddressCode = require('./ShortAddressCode-C5l520-F.js');
4
+
5
+ const isInShortAddressCodeCountry = (countryCode) => {
6
+ return ShortAddressCode.countryRequireShortAddressCode.includes(countryCode);
7
+ };
8
+ /**
9
+ * Checks if the short address code input should be rendered based on the country code.
10
+ */
11
+ const shouldRenderShortAddressCodeInput = ({ countryCode, }) => {
12
+ // If country require short address code, show the input
13
+ const isCountryRequireShortAddressCode = isInShortAddressCodeCountry(countryCode);
14
+ if (isCountryRequireShortAddressCode) {
15
+ return true;
16
+ }
17
+ // If country doesn't require short address code, no need to show the input
18
+ return false;
19
+ };
20
+
21
+ exports.shouldRenderShortAddressCodeInput = shouldRenderShortAddressCodeInput;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var localization = require('./localization-BzNeXeDe.js');
3
+ var localization = require('./localization-B2mjW0Xa.js');
4
4
 
5
5
  /**
6
6
  * Whether to offer the language selector. Hidden when the merchant has narrowed
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
3
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
4
4
  var handleFetch = require('./handleFetch-DQLhurnE.js');
5
5
  var VarianceTest = require('./VarianceTest-C98whVgO.js');
6
6
 
@@ -1,7 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
- var debounce = require('./debounce-vY0QYT6o.js');
3
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
4
+ var debounce = require('./debounce-DRPMxNew.js');
5
+ var index = require('./index-DAAr465v.js');
6
+ var cart = require('./cart-CiXlehwQ.js');
7
+ var localization = require('./localization-B2mjW0Xa.js');
8
+ var taxIdRules = require('./taxIdRules-BBj8kQxJ.js');
5
9
 
6
10
  var throttle_1;
7
11
  var hasRequiredThrottle;
@@ -84,4 +88,55 @@ function requireThrottle () {
84
88
  var throttleExports = requireThrottle();
85
89
  var throttle = /*@__PURE__*/zonosStore.getDefaultExportFromCjs(throttleExports);
86
90
 
91
+ const getTaxIdFieldState = ({ companyName, countryCode, errorField, errorMessage, shouldRequirePeruTaxId, taxIdType, }) => {
92
+ var _a, _b;
93
+ const { rendered, selectedType, send, typeOptions } = cart.resolveTaxIdSelection({
94
+ companyName,
95
+ countryCode,
96
+ shouldRequirePeruTaxId,
97
+ taxIdType,
98
+ });
99
+ if (!rendered) {
100
+ return null;
101
+ }
102
+ const singleTypeLabel = typeOptions
103
+ ? null
104
+ : taxIdRules.taxIdLabelForCheckout(countryCode);
105
+ return {
106
+ inputLabel: (_a = selectedType === null || selectedType === void 0 ? void 0 : selectedType.label) !== null && _a !== void 0 ? _a : singleTypeLabel === null || singleTypeLabel === void 0 ? void 0 : singleTypeLabel.friendlyName,
107
+ inputPlaceholder: (_b = selectedType === null || selectedType === void 0 ? void 0 : selectedType.placeholder) !== null && _b !== void 0 ? _b : singleTypeLabel === null || singleTypeLabel === void 0 ? void 0 : singleTypeLabel.placeholder,
108
+ selectedValue: (selectedType === null || selectedType === void 0 ? void 0 : selectedType.value) || '',
109
+ showValueInput: send,
110
+ typeError: errorField === 'type' ? errorMessage : '',
111
+ typeOptions,
112
+ valueError: errorField === 'value' ? errorMessage : '',
113
+ };
114
+ };
115
+
116
+ const renderTaxIdFields = ({ companyName, countryCode, errorField, errorMessage, onTaxIdChange, shouldRequirePeruTaxId, taxId, taxIdType, }) => {
117
+ const state = getTaxIdFieldState({
118
+ companyName,
119
+ countryCode,
120
+ errorField,
121
+ errorMessage,
122
+ shouldRequirePeruTaxId,
123
+ taxIdType,
124
+ });
125
+ if (!state) {
126
+ return null;
127
+ }
128
+ return (index.h("div", { class: "zonos--tax-id-input" }, state.typeOptions && (index.h("zonos-stripe-select", { error: state.typeError, isError: !!state.typeError, onSelectChange: (event) => {
129
+ if (taxIdRules.isCheckoutTaxIdTypeValue(event.detail)) {
130
+ cart.stripeStore.taxIdType = event.detail;
131
+ }
132
+ }, options: state.typeOptions.map(option => ({
133
+ label: localization.translate(option.label),
134
+ value: option.value,
135
+ })), selectLabel: localization.translate('Tax id type'), selectedValue: state.selectedValue, value: state.selectedValue })), state.showValueInput && (index.h("zonos-stripe-input", { error: state.valueError, inputLabel: state.inputLabel ? localization.translate(state.inputLabel) : '', inputPlaceholder: state.inputPlaceholder || '', inputValue: taxId, isError: !!state.valueError, onInputChange: (event) => {
136
+ cart.stripeStore.taxId = event.detail;
137
+ onTaxIdChange === null || onTaxIdChange === void 0 ? void 0 : onTaxIdChange(event.detail);
138
+ } }))));
139
+ };
140
+
141
+ exports.renderTaxIdFields = renderTaxIdFields;
87
142
  exports.throttle = throttle;
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ var TaxId = require('./TaxId-ChhNwG04.js');
4
+
5
+ const stripTaxIdSeparators = (taxId) => taxId.replace(/[\s-]/g, '');
6
+ const rfcRegex = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/;
7
+ const curpRegex = /^[A-Z]{4}[0-9]{6}[HMX][A-Z]{5}[A-Z0-9][0-9]$/;
8
+ const isMexicoTaxIdType = (taxIdType) => TaxId.taxIdTypeOptions.MX.some(option => option.value === taxIdType);
9
+ const isPeruTaxIdType = (taxIdType) => TaxId.taxIdTypeOptions.PE.some(option => option.value === taxIdType);
10
+ const isCheckoutTaxIdTypeValue = (taxIdType) => TaxId.checkoutTaxIdTypeValues.some(value => value === taxIdType);
11
+ /** 8 digits are a DNI, 9 a carné, 11 an RUC. Anything else is not a Peru tax id. */
12
+ const peruTaxIdTypeFromValue = (taxId) => {
13
+ const digits = stripTaxIdSeparators(taxId);
14
+ if (!/^\d+$/.test(digits)) {
15
+ return null;
16
+ }
17
+ if (digits.length === TaxId.peruTaxIdDigitLength.DNI) {
18
+ return 'DNI';
19
+ }
20
+ if (digits.length === TaxId.peruTaxIdDigitLength.CE) {
21
+ return 'CE';
22
+ }
23
+ if (digits.length === TaxId.peruTaxIdDigitLength.RUC) {
24
+ return 'RUC';
25
+ }
26
+ return null;
27
+ };
28
+ const isPeruTaxIdActive = ({ countryCode, shouldRequirePeruTaxId, }) => shouldRequirePeruTaxId && countryCode === 'PE';
29
+ /**
30
+ * Peru stays off `countryRequireTaxId`. The API flag decides which stores see it.
31
+ * Mexico and Peru pick the kind from a dropdown instead of a regex.
32
+ */
33
+ const taxIdTypeOptionsForCheckout = ({ countryCode, shouldRequirePeruTaxId, }) => {
34
+ if (isPeruTaxIdActive({ countryCode, shouldRequirePeruTaxId })) {
35
+ return TaxId.taxIdTypeOptions.PE;
36
+ }
37
+ if (countryCode === 'MX') {
38
+ return TaxId.taxIdTypeOptions.MX;
39
+ }
40
+ return null;
41
+ };
42
+ const taxIdLabelForCheckout = (countryCode) => {
43
+ if (TaxId.isCountryRequireTaxId(countryCode)) {
44
+ return TaxId.shipToTaxIdLabels[countryCode];
45
+ }
46
+ return null;
47
+ };
48
+
49
+ exports.curpRegex = curpRegex;
50
+ exports.isCheckoutTaxIdTypeValue = isCheckoutTaxIdTypeValue;
51
+ exports.isMexicoTaxIdType = isMexicoTaxIdType;
52
+ exports.isPeruTaxIdActive = isPeruTaxIdActive;
53
+ exports.isPeruTaxIdType = isPeruTaxIdType;
54
+ exports.peruTaxIdTypeFromValue = peruTaxIdTypeFromValue;
55
+ exports.rfcRegex = rfcRegex;
56
+ exports.stripTaxIdSeparators = stripTaxIdSeparators;
57
+ exports.taxIdLabelForCheckout = taxIdLabelForCheckout;
58
+ exports.taxIdTypeOptionsForCheckout = taxIdTypeOptionsForCheckout;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var debounce = require('./debounce-Cd2emZPn.js');
3
+ var debounce = require('./debounce-BhgA8_3W.js');
4
4
  var handleFetch = require('./handleFetch-DQLhurnE.js');
5
5
 
6
6
  const attributesToUpdate = {};
@@ -1,22 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var localization = require('./localization-BzNeXeDe.js');
5
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
6
- var getMissingRequiredShippingFields = require('./getMissingRequiredShippingFields-D03ICqss.js');
4
+ var localization = require('./localization-B2mjW0Xa.js');
5
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
6
+ var getMissingRequiredShippingFields = require('./getMissingRequiredShippingFields-DI6qF1z3.js');
7
7
  var classes = require('./classes-D_DL168u.js');
8
- var cart = require('./cart-B6Aty-21.js');
8
+ var cart = require('./cart-CiXlehwQ.js');
9
9
  var RemoveIcon$1 = require('./RemoveIcon-CuM1YmjP.js');
10
10
  var containsNonLatinChars = require('./containsNonLatinChars-D_OggJN6.js');
11
- var getBorderRadius = require('./getBorderRadius-CyYZw4qq.js');
12
- var throttle = require('./throttle-zSVRQLC0.js');
11
+ var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
12
+ var taxIdFields = require('./taxIdFields-BrIaPTcd.js');
13
13
  var handleFetch = require('./handleFetch-DQLhurnE.js');
14
- var shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-TxekHCp7.js');
14
+ var shouldRenderShortAddressCodeInput = require('./shouldRenderShortAddressCodeInput-gpu_bMfp.js');
15
15
  var VarianceTest = require('./VarianceTest-C98whVgO.js');
16
- var TaxId = require('./TaxId-Q6aDqqWv.js');
17
16
  var helpers = require('./helpers-ClOZ11A9.js');
18
17
  var isDarkColor = require('./isDarkColor-f-fD9c2l.js');
19
- require('./debounce-vY0QYT6o.js');
18
+ require('./taxIdRules-BBj8kQxJ.js');
19
+ require('./TaxId-ChhNwG04.js');
20
+ require('./debounce-DRPMxNew.js');
20
21
  require('./ShortAddressCode-C5l520-F.js');
21
22
 
22
23
  const zonosAddressCompletionDialogCss = () => `: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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}`;
@@ -534,7 +535,7 @@ const mergeAddress = ({ addresses, delimiter = ' ', }) => {
534
535
  return Array.from(addressSet).join(delimiter);
535
536
  };
536
537
 
537
- const zonosCustomAddressCss = () => `.sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}`;
538
+ const zonosCustomAddressCss = () => `.sc-zonos-custom-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-custom-address-h *.sc-zonos-custom-address{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-custom-address-h img.sc-zonos-custom-address{max-width:100%}.sc-zonos-custom-address-h dl.sc-zonos-custom-address,.sc-zonos-custom-address-h dd.sc-zonos-custom-address,.sc-zonos-custom-address-h h1.sc-zonos-custom-address,.sc-zonos-custom-address-h h2.sc-zonos-custom-address,.sc-zonos-custom-address-h h3.sc-zonos-custom-address,.sc-zonos-custom-address-h h4.sc-zonos-custom-address,.sc-zonos-custom-address-h h5.sc-zonos-custom-address,.sc-zonos-custom-address-h h6.sc-zonos-custom-address,.sc-zonos-custom-address-h hr.sc-zonos-custom-address,.sc-zonos-custom-address-h figure.sc-zonos-custom-address,.sc-zonos-custom-address-h p.sc-zonos-custom-address,.sc-zonos-custom-address-h pre.sc-zonos-custom-address{margin:0}.sc-zonos-custom-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-custom-address-h .zonos--title.sc-zonos-custom-address{margin-bottom:16px}.sc-zonos-custom-address-h .zonos--company-name-input.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{margin-bottom:8px}.sc-zonos-custom-address-h .zonos--tax-id-input.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h zonos-banner.sc-zonos-custom-address{margin-top:8px}.sc-zonos-custom-address-h .zonos--custom-address-form.sc-zonos-custom-address,.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}.sc-zonos-custom-address-h .zonos--custom-address-form-state-zip-wrapper.sc-zonos-custom-address>*.sc-zonos-custom-address{-ms-flex:1 1 200px;flex:1 1 200px}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.sc-zonos-custom-address{opacity:0;height:0;overflow:hidden;-webkit-transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, height 0.3s ease-in-out}.sc-zonos-custom-address-h .zonos--custom-address-form-additional-fields.zonos--show.sc-zonos-custom-address{opacity:1;height:auto}`;
538
539
 
539
540
  var __rest = (undefined && undefined.__rest) || function (s, e) {
540
541
  var t = {};
@@ -558,6 +559,10 @@ const ZonosAddress = class {
558
559
  * Default address for stripe
559
560
  */
560
561
  this.defaultAddress = [];
562
+ /**
563
+ * Which tax id control the error belongs on. Empty when there is no error.
564
+ */
565
+ this.taxIdErrorField = '';
561
566
  /**
562
567
  * Error message for tax id input
563
568
  */
@@ -639,7 +644,7 @@ const ZonosAddress = class {
639
644
  */
640
645
  this.countryOptionsCache = null;
641
646
  // Create a single throttled instance that persists
642
- this.throttledGetAddressSuggestions = throttle.throttle(() => {
647
+ this.throttledGetAddressSuggestions = taxIdFields.throttle(() => {
643
648
  if (zonosStore.zonosStore.checkoutAddressService) {
644
649
  zonosStore.zonosStore.checkoutAddressService.getAddressSuggestions({
645
650
  country: this.country,
@@ -884,9 +889,6 @@ const ZonosAddress = class {
884
889
  const hasErrors = line1 || postalCode || state || city || firstName || lastName || phone;
885
890
  return !hasErrors;
886
891
  }
887
- isInTaxIdCountry(countryCode) {
888
- return TaxId.countryRequireTaxId.includes(countryCode);
889
- }
890
892
  /**
891
893
  * Render tax id input based on ship to country code
892
894
  */
@@ -901,22 +903,15 @@ const ZonosAddress = class {
901
903
  if (!countryCode) {
902
904
  return null;
903
905
  }
904
- // This just to type guard the countryCode, if it's able to get to this point it should already be in country that has tax id input
905
- if (!this.isInTaxIdCountry(countryCode)) {
906
- return null;
907
- }
908
- const taxIdInputRendered = shouldRenderTaxIdInput.shouldRenderTaxIdInput({
906
+ return taxIdFields.renderTaxIdFields({
909
907
  companyName: cart.stripeStore.companyName,
910
908
  countryCode,
909
+ errorField: this.taxIdErrorField,
910
+ errorMessage: this.taxIdErrorMessage,
911
+ shouldRequirePeruTaxId: zonosStore.getShouldRequirePeruTaxId(),
912
+ taxId: cart.stripeStore.taxId || '',
913
+ taxIdType: cart.stripeStore.taxIdType,
911
914
  });
912
- // Don't render tax id input if the country doesn't require tax id
913
- if (!taxIdInputRendered) {
914
- return null;
915
- }
916
- const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
917
- 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) => {
918
- cart.stripeStore.taxId = event.detail;
919
- } })));
920
915
  }
921
916
  /**
922
917
  * Render short address code input based on ship to country code
@@ -932,7 +927,7 @@ const ZonosAddress = class {
932
927
  if (!countryCode) {
933
928
  return null;
934
929
  }
935
- const shortAddressCodeInputRendered = shouldRenderTaxIdInput.shouldRenderShortAddressCodeInput({
930
+ const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput.shouldRenderShortAddressCodeInput({
936
931
  countryCode,
937
932
  });
938
933
  // Don't render short address code input if the country doesn't require short address code
@@ -1453,10 +1448,10 @@ const ZonosAddress = class {
1453
1448
  this.country = localization.localizationStore.selectedCountryCode;
1454
1449
  }
1455
1450
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
1456
- return (index.h(index.Host, { key: '9d178094ee341623633d1e3822bd79f254a27e51', class: classes.classes([
1451
+ return (index.h(index.Host, { key: 'd3bb2635d41dd74ba52ff37034f348fc0a763366', class: classes.classes([
1457
1452
  'zonos--address zonos--elements',
1458
1453
  `zonos--${this.type}-address`,
1459
- ]) }, index.h("zonos-text", { key: 'c36b4ce9b63cce95664894fd8929ffe15807a22a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("slot", { key: '661eab7074f99b6dca52d5f7f546cfbd29322fbf', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
1454
+ ]) }, index.h("zonos-text", { key: '7d3f67988eac13616f3470f46f05060e194c2df7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("slot", { key: '1bd63bd015542ec3302f087bcbf3d9549f342c25', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
1460
1455
  }
1461
1456
  get el() { return index.getElement(this); }
1462
1457
  static get watchers() { return {
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var localization = require('./localization-BzNeXeDe.js');
4
+ var localization = require('./localization-B2mjW0Xa.js');
5
5
  var containsNonLatinChars = require('./containsNonLatinChars-D_OggJN6.js');
6
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
6
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
7
7
  var classes = require('./classes-D_DL168u.js');
8
- var getBorderRadius = require('./getBorderRadius-CyYZw4qq.js');
8
+ var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
9
9
  require('./handleFetch-DQLhurnE.js');
10
10
  require('./VarianceTest-C98whVgO.js');
11
11
 
@@ -1,17 +1,18 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var throttle = require('./throttle-zSVRQLC0.js');
5
- var cart = require('./cart-B6Aty-21.js');
6
- var localization = require('./localization-BzNeXeDe.js');
7
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
+ var taxIdFields = require('./taxIdFields-BrIaPTcd.js');
5
+ var cart = require('./cart-CiXlehwQ.js');
6
+ var localization = require('./localization-B2mjW0Xa.js');
7
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
8
8
  var handleFetch = require('./handleFetch-DQLhurnE.js');
9
- var shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-TxekHCp7.js');
9
+ var shouldRenderShortAddressCodeInput = require('./shouldRenderShortAddressCodeInput-gpu_bMfp.js');
10
10
  var classes = require('./classes-D_DL168u.js');
11
11
  var VarianceTest = require('./VarianceTest-C98whVgO.js');
12
- var TaxId = require('./TaxId-Q6aDqqWv.js');
13
- var getBorderRadius = require('./getBorderRadius-CyYZw4qq.js');
14
- require('./debounce-vY0QYT6o.js');
12
+ var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
13
+ require('./debounce-DRPMxNew.js');
14
+ require('./taxIdRules-BBj8kQxJ.js');
15
+ require('./TaxId-ChhNwG04.js');
15
16
  require('./isDarkColor-f-fD9c2l.js');
16
17
  require('./ShortAddressCode-C5l520-F.js');
17
18
 
@@ -72,7 +73,7 @@ const buildAddressContacts = ({ currentEvent, defaultAddress, }) => {
72
73
  return [currentContact, ...defaultAddress];
73
74
  };
74
75
 
75
- 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}`;
76
+ 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--tax-id-input.sc-zonos-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}`;
76
77
 
77
78
  const ZonosAddress = class {
78
79
  constructor(hostRef) {
@@ -88,6 +89,10 @@ const ZonosAddress = class {
88
89
  * Default address for stripe
89
90
  */
90
91
  this.defaultAddress = [];
92
+ /**
93
+ * Which tax id control the error belongs on. Empty when there is no error.
94
+ */
95
+ this.taxIdErrorField = '';
91
96
  /**
92
97
  * Error message for tax id input
93
98
  */
@@ -118,7 +123,7 @@ const ZonosAddress = class {
118
123
  * Check if the tracking event is sent
119
124
  */
120
125
  this.trackingSent = false;
121
- this.prefetchLandedCost = throttle.throttle(cart.stripeStorePrefetchLandedCost, 1000);
126
+ this.prefetchLandedCost = taxIdFields.throttle(cart.stripeStorePrefetchLandedCost, 1000);
122
127
  }
123
128
  getStripeAddressInstance() {
124
129
  if (this.type === 'billing') {
@@ -296,9 +301,6 @@ const ZonosAddress = class {
296
301
  }
297
302
  void this.watchInitStripe();
298
303
  }
299
- isInTaxIdCountry(countryCode) {
300
- return TaxId.countryRequireTaxId.includes(countryCode);
301
- }
302
304
  /**
303
305
  * Render tax id input based on ship to country code
304
306
  */
@@ -313,23 +315,18 @@ const ZonosAddress = class {
313
315
  if (!countryCode) {
314
316
  return null;
315
317
  }
316
- // This just to type guard the countryCode, if it's able to get to this point it should already be in country that has tax id input
317
- if (!this.isInTaxIdCountry(countryCode)) {
318
- return null;
319
- }
320
- const taxIdInputRendered = shouldRenderTaxIdInput.shouldRenderTaxIdInput({
318
+ return taxIdFields.renderTaxIdFields({
321
319
  companyName: cart.stripeStore.companyName,
322
320
  countryCode,
321
+ errorField: this.taxIdErrorField,
322
+ errorMessage: this.taxIdErrorMessage,
323
+ onTaxIdChange: value => {
324
+ this.taxIdChanged.emit(value);
325
+ },
326
+ shouldRequirePeruTaxId: zonosStore.getShouldRequirePeruTaxId(),
327
+ taxId: cart.stripeStore.taxId || '',
328
+ taxIdType: cart.stripeStore.taxIdType,
323
329
  });
324
- // Don't render tax id input if the country doesn't require tax id
325
- if (!taxIdInputRendered) {
326
- return null;
327
- }
328
- const taxIdInputInfo = TaxId.shipToTaxIdLabels[countryCode];
329
- 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) => {
330
- cart.stripeStore.taxId = event.detail;
331
- this.taxIdChanged.emit(event.detail);
332
- } }), this.taxIdErrorMessage && (index.h("zonos-text", { textColor: "red-600", type: "caption" }, this.taxIdErrorMessage))));
333
330
  }
334
331
  /**
335
332
  * Render short address code input based on ship to country code
@@ -345,7 +342,7 @@ const ZonosAddress = class {
345
342
  if (!countryCode) {
346
343
  return null;
347
344
  }
348
- const shortAddressCodeInputRendered = shouldRenderTaxIdInput.shouldRenderShortAddressCodeInput({
345
+ const shortAddressCodeInputRendered = shouldRenderShortAddressCodeInput.shouldRenderShortAddressCodeInput({
349
346
  countryCode,
350
347
  });
351
348
  // Don't render short address code input if the country doesn't require short address code
@@ -416,11 +413,11 @@ const ZonosAddress = class {
416
413
  this.isAddressFilled = true;
417
414
  }
418
415
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
419
- return (index.h(index.Host, { key: '302dafde973c4bf2d847640d8f0e064d88f350f8', class: classes.classes([
416
+ return (index.h(index.Host, { key: 'bbf12ad9213fbbbaf6c14ecb0cb7acb0679f3d6e', class: classes.classes([
420
417
  'zonos--address',
421
418
  'zonos--elements',
422
419
  `zonos--${this.type}-address`,
423
- ]) }, this.titleText && (index.h("zonos-text", { key: '706204604ad32eed710e38adbe8133b3384044eb', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("slot", { key: '0edc4c5d6c3ff965be6edbf680acaed892c71a16', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), index.h("div", { key: '6aa6e4e86a76f1081c5af1f2b5f3282dfd91f3c5', class: "zonos--address-component" })));
420
+ ]) }, this.titleText && (index.h("zonos-text", { key: 'a81550755a359e1a9c46acc99eef7749959187ee', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("slot", { key: 'bdba9c19992622bcf0354366080b1932c0e28bb2', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), index.h("div", { key: 'b376efea8ef5d57f525be9b6eed3f98c67b2834e', class: "zonos--address-component" })));
424
421
  }
425
422
  get el() { return index.getElement(this); }
426
423
  static get watchers() { return {
@@ -1,15 +1,16 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var collect = require('./collect-DnrvaXUI.js');
5
- var cart = require('./cart-B6Aty-21.js');
6
- var localization = require('./localization-BzNeXeDe.js');
7
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
+ var collect = require('./collect-Drr8fY-q.js');
5
+ var cart = require('./cart-CiXlehwQ.js');
6
+ var localization = require('./localization-B2mjW0Xa.js');
7
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
8
8
  var VarianceTest = require('./VarianceTest-C98whVgO.js');
9
9
  var handleFetch = require('./handleFetch-DQLhurnE.js');
10
+ require('./taxIdRules-BBj8kQxJ.js');
11
+ require('./TaxId-ChhNwG04.js');
10
12
  require('./isDarkColor-f-fD9c2l.js');
11
- require('./getBorderRadius-CyYZw4qq.js');
12
- require('./TaxId-Q6aDqqWv.js');
13
+ require('./getBorderRadius-CJ_95w3o.js');
13
14
 
14
15
  const zonosAirwallexPaymentCss = () => `.sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}`;
15
16
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
5
5
  var classes = require('./classes-D_DL168u.js');
6
6
  require('./VarianceTest-C98whVgO.js');
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
5
5
  var classes = require('./classes-D_DL168u.js');
6
6
  require('./VarianceTest-C98whVgO.js');
7
7
 
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
5
5
  var helpers = require('./helpers-ClOZ11A9.js');
6
6
  var classes = require('./classes-D_DL168u.js');
7
- var getBorderRadius = require('./getBorderRadius-CyYZw4qq.js');
7
+ var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
8
8
  var isColorVariable = require('./isColorVariable-CKoJdu9G.js');
9
9
  var isDarkColor = require('./isDarkColor-f-fD9c2l.js');
10
10
  var styles = require('./styles-nowYls3K.js');
@@ -1,18 +1,19 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DAAr465v.js');
4
- var zonosStore = require('./zonosStore-Bx9jK82G.js');
4
+ var zonosStore = require('./zonosStore-CDV83QyK.js');
5
5
  var classes = require('./classes-D_DL168u.js');
6
- var getBorderRadius = require('./getBorderRadius-CyYZw4qq.js');
7
- var cart = require('./cart-B6Aty-21.js');
8
- var localization = require('./localization-BzNeXeDe.js');
6
+ var getBorderRadius = require('./getBorderRadius-CJ_95w3o.js');
7
+ var cart = require('./cart-CiXlehwQ.js');
8
+ var localization = require('./localization-B2mjW0Xa.js');
9
9
  var handleFetch = require('./handleFetch-DQLhurnE.js');
10
- var paypal = require('./paypal-CuKshRmZ.js');
10
+ var paypal = require('./paypal-pd8Nz_R_.js');
11
11
  var VarianceTest = require('./VarianceTest-C98whVgO.js');
12
+ require('./taxIdRules-BBj8kQxJ.js');
13
+ require('./TaxId-ChhNwG04.js');
12
14
  require('./isDarkColor-f-fD9c2l.js');
13
- require('./TaxId-Q6aDqqWv.js');
14
15
  require('./isContrastColor-B9ldIdpa.js');
15
- require('./submitGtag-D79e8u6s.js');
16
+ require('./submitGtag-Rc-S3PnH.js');
16
17
 
17
18
  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)}`;
18
19