@zonos/elements 1.3.248 → 1.3.249

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 (320) hide show
  1. package/dist/cjs/{cart-28310848.js → cart-eca56521.js} +4 -4
  2. package/dist/cjs/{cleanHtmlMarkdown-577d0a77.js → cleanHtmlMarkdown-31da84b7.js} +9 -7
  3. package/dist/cjs/{debounce-815d1517.js → debounce-0c75ba33.js} +1 -1
  4. package/dist/cjs/{getBorderRadius-2ef1170d.js → getBorderRadius-27a74844.js} +1 -1
  5. package/dist/cjs/{getContrastColor-30848800.js → getContrastColor-cc087c53.js} +2 -2
  6. package/dist/cjs/{hasInclusivePrice-134b0250.js → hasInclusivePrice-e7d67b45.js} +1 -1
  7. package/dist/cjs/index-b1f95d96.js +4065 -0
  8. package/dist/cjs/index.cjs.js +7 -7
  9. package/dist/cjs/{invoice-2e8e5879.js → invoice-918f2c2b.js} +3 -3
  10. package/dist/cjs/{isCollectMobileTablet-bd0f4556.js → isCollectMobileTablet-89911215.js} +3 -3
  11. package/dist/cjs/{isContrastColor-09f5924a.js → isContrastColor-d1936a5c.js} +1 -1
  12. package/dist/cjs/{isDarkColor-878e600e.js → isDarkColor-a68abf7a.js} +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/{localization-00e73920.js → localization-878ef681.js} +1 -1
  15. package/dist/cjs/{paypal-3019ae94.js → paypal-6acca678.js} +52 -21
  16. package/dist/cjs/{placeTestOrder-b0369cfd.js → placeTestOrder-f1c1e939.js} +2 -2
  17. package/dist/cjs/{renderCheckoutCurrency-9e919b9f.js → renderCheckoutCurrency-d9590e81.js} +2 -2
  18. package/dist/cjs/{renderFallback-78b54537.js → renderFallback-bc20ee20.js} +1 -1
  19. package/dist/cjs/{submitGtag-a50ab32e.js → submitGtag-cb4fb332.js} +1 -1
  20. package/dist/cjs/{throttle-7dd64984.js → throttle-ff483793.js} +2 -2
  21. package/dist/cjs/{updateCheckoutSessionAttributes-3a1db9de.js → updateCheckoutSessionAttributes-8be63b63.js} +1 -1
  22. package/dist/cjs/zonos-address-display_9.cjs.entry.js +1314 -1608
  23. package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
  24. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-button_3.cjs.entry.js +5 -5
  27. package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
  28. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +16 -16
  29. package/dist/cjs/zonos-checkout.cjs.entry.js +11 -11
  30. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  31. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
  32. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +13 -13
  33. package/dist/cjs/zonos-collect.cjs.entry.js +11 -11
  34. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  35. package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
  36. package/dist/cjs/zonos-country-flag.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
  38. package/dist/cjs/zonos-elements.cjs.js +29 -2
  39. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
  40. package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
  41. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  42. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +9 -9
  43. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +13 -13
  44. package/dist/cjs/zonos-invoice.cjs.entry.js +10 -10
  45. package/dist/cjs/zonos-language-select_2.cjs.entry.js +3 -3
  46. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  47. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  48. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +6 -6
  49. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  50. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  51. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  52. package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
  53. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  54. package/dist/cjs/{zonosStore-37a4b4f4.js → zonosStore-f5a61112.js} +110 -25
  55. package/dist/collection/components/common/zonos-button/zonos-button.css +3 -1
  56. package/dist/collection/components/common/zonos-input/zonos-input.css +3 -1
  57. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +3 -1
  58. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.css +3 -1
  59. package/dist/esm/{cart-ba8f3890.js → cart-efb30253.js} +4 -4
  60. package/dist/esm/{cleanHtmlMarkdown-b5b18743.js → cleanHtmlMarkdown-5f7856f2.js} +9 -7
  61. package/dist/esm/{debounce-c4785346.js → debounce-efc0e473.js} +1 -1
  62. package/dist/esm/{getBorderRadius-877f6389.js → getBorderRadius-c21a42e5.js} +1 -1
  63. package/dist/esm/{getContrastColor-28c18704.js → getContrastColor-98f0d1d5.js} +2 -2
  64. package/dist/esm/{hasInclusivePrice-6fcc712f.js → hasInclusivePrice-565ddbe5.js} +1 -1
  65. package/dist/esm/index-cfd394c8.js +4028 -0
  66. package/dist/esm/index.js +7 -7
  67. package/dist/esm/{invoice-055bb6e5.js → invoice-0e462fcc.js} +3 -3
  68. package/dist/esm/{isCollectMobileTablet-797cea8b.js → isCollectMobileTablet-0bcba25a.js} +3 -3
  69. package/dist/esm/{isContrastColor-69778cea.js → isContrastColor-c17e83c9.js} +1 -1
  70. package/dist/esm/{isDarkColor-9ddd90cc.js → isDarkColor-3537021b.js} +1 -1
  71. package/dist/esm/loader.js +2 -2
  72. package/dist/esm/{localization-853b48a9.js → localization-c1aff677.js} +1 -1
  73. package/dist/esm/{paypal-8d8518c0.js → paypal-06b67be0.js} +52 -21
  74. package/dist/esm/{placeTestOrder-0a74923e.js → placeTestOrder-6c9a6c8a.js} +2 -2
  75. package/dist/esm/{renderCheckoutCurrency-bd059ecf.js → renderCheckoutCurrency-910fea67.js} +2 -2
  76. package/dist/esm/{renderFallback-3f010b48.js → renderFallback-b250f4e9.js} +1 -1
  77. package/dist/esm/{submitGtag-89d6e9cb.js → submitGtag-13de9f1f.js} +1 -1
  78. package/dist/esm/{throttle-ce2432ab.js → throttle-0504ba2c.js} +2 -2
  79. package/dist/esm/{updateCheckoutSessionAttributes-047a6cd4.js → updateCheckoutSessionAttributes-b9f7e982.js} +1 -1
  80. package/dist/esm/zonos-address-display_9.entry.js +1314 -1608
  81. package/dist/esm/zonos-address_4.entry.js +8 -8
  82. package/dist/esm/zonos-badge.entry.js +2 -2
  83. package/dist/esm/zonos-banner.entry.js +2 -2
  84. package/dist/esm/zonos-button_3.entry.js +5 -5
  85. package/dist/esm/zonos-card_5.entry.js +9 -9
  86. package/dist/esm/zonos-cart-items_12.entry.js +16 -16
  87. package/dist/esm/zonos-checkout.entry.js +11 -11
  88. package/dist/esm/zonos-collapse.entry.js +2 -2
  89. package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
  90. package/dist/esm/zonos-collect-finish_6.entry.js +13 -13
  91. package/dist/esm/zonos-collect.entry.js +11 -11
  92. package/dist/esm/zonos-component.entry.js +1 -1
  93. package/dist/esm/zonos-controller.entry.js +7 -7
  94. package/dist/esm/zonos-country-flag.entry.js +3 -3
  95. package/dist/esm/zonos-country-select_4.entry.js +4 -4
  96. package/dist/esm/zonos-elements.js +30 -3
  97. package/dist/esm/zonos-hello-dialog.entry.js +4 -4
  98. package/dist/esm/zonos-hello.entry.js +4 -4
  99. package/dist/esm/zonos-input.entry.js +4 -4
  100. package/dist/esm/zonos-invoice-cart-items_2.entry.js +9 -9
  101. package/dist/esm/zonos-invoice-finish_5.entry.js +13 -13
  102. package/dist/esm/zonos-invoice.entry.js +10 -10
  103. package/dist/esm/zonos-language-select_2.entry.js +3 -3
  104. package/dist/esm/zonos-link.entry.js +1 -1
  105. package/dist/esm/zonos-logo.entry.js +2 -2
  106. package/dist/esm/zonos-shipping-rich-radio.entry.js +6 -6
  107. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  108. package/dist/esm/zonos-text.entry.js +2 -2
  109. package/dist/esm/zonos-toggle.entry.js +2 -2
  110. package/dist/esm/zonos-tooltip.entry.js +1 -1
  111. package/dist/esm/zonos-v-stack.entry.js +2 -2
  112. package/dist/esm/{zonosStore-b434e436.js → zonosStore-5242a58d.js} +110 -25
  113. package/dist/esm-es5/{cart-ba8f3890.js → cart-efb30253.js} +1 -1
  114. package/dist/esm-es5/cleanHtmlMarkdown-5f7856f2.js +1 -0
  115. package/dist/esm-es5/{debounce-c4785346.js → debounce-efc0e473.js} +1 -1
  116. package/dist/esm-es5/{getBorderRadius-877f6389.js → getBorderRadius-c21a42e5.js} +1 -1
  117. package/dist/esm-es5/{getContrastColor-28c18704.js → getContrastColor-98f0d1d5.js} +1 -1
  118. package/dist/esm-es5/{hasInclusivePrice-6fcc712f.js → hasInclusivePrice-565ddbe5.js} +1 -1
  119. package/dist/esm-es5/index-cfd394c8.js +13 -0
  120. package/dist/esm-es5/index.js +1 -1
  121. package/dist/esm-es5/{invoice-055bb6e5.js → invoice-0e462fcc.js} +1 -1
  122. package/dist/esm-es5/{isCollectMobileTablet-797cea8b.js → isCollectMobileTablet-0bcba25a.js} +1 -1
  123. package/dist/esm-es5/{isContrastColor-69778cea.js → isContrastColor-c17e83c9.js} +1 -1
  124. package/dist/esm-es5/{isDarkColor-9ddd90cc.js → isDarkColor-3537021b.js} +1 -1
  125. package/dist/esm-es5/loader.js +1 -1
  126. package/dist/esm-es5/{localization-853b48a9.js → localization-c1aff677.js} +1 -1
  127. package/dist/esm-es5/paypal-06b67be0.js +17 -0
  128. package/dist/esm-es5/{placeTestOrder-0a74923e.js → placeTestOrder-6c9a6c8a.js} +1 -1
  129. package/dist/esm-es5/{renderCheckoutCurrency-bd059ecf.js → renderCheckoutCurrency-910fea67.js} +1 -1
  130. package/dist/esm-es5/{renderFallback-3f010b48.js → renderFallback-b250f4e9.js} +1 -1
  131. package/dist/esm-es5/{submitGtag-89d6e9cb.js → submitGtag-13de9f1f.js} +1 -1
  132. package/dist/esm-es5/{throttle-ce2432ab.js → throttle-0504ba2c.js} +1 -1
  133. package/dist/esm-es5/{updateCheckoutSessionAttributes-047a6cd4.js → updateCheckoutSessionAttributes-b9f7e982.js} +1 -1
  134. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
  135. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  136. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  137. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  138. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  139. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  140. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  141. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  142. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  143. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  144. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  145. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  146. package/dist/esm-es5/zonos-component.entry.js +1 -1
  147. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  148. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  149. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  150. package/dist/esm-es5/zonos-elements.js +1 -1
  151. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  152. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  153. package/dist/esm-es5/zonos-input.entry.js +1 -1
  154. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  155. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  156. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  157. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  158. package/dist/esm-es5/zonos-link.entry.js +1 -1
  159. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  160. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  161. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  162. package/dist/esm-es5/zonos-text.entry.js +1 -1
  163. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  164. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  165. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  166. package/dist/esm-es5/zonosStore-5242a58d.js +1 -0
  167. package/dist/scripts/index.d.ts +2 -2
  168. package/dist/scripts/index.js +1 -1
  169. package/dist/scripts/loadZonos.js +1 -1
  170. package/dist/scripts/zonos.js +1 -1
  171. package/dist/types/environment.d.ts +2 -2
  172. package/dist/types/types/global.d.ts +2 -0
  173. package/dist/zonos-elements/index.esm.js +1 -1
  174. package/dist/zonos-elements/p-058f6124.js +1 -0
  175. package/dist/zonos-elements/{p-d5b7d3c3.entry.js → p-06e2bc14.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-c2f34b10.system.entry.js → p-079bc009.system.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-291f7ccb.system.entry.js → p-09110bb7.system.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-c027a832.system.js → p-096182f0.system.js} +1 -1
  179. package/dist/zonos-elements/{p-8205ae87.system.entry.js → p-0a2abbab.system.entry.js} +1 -1
  180. package/dist/zonos-elements/p-0aeba2c7.system.js +1 -0
  181. package/dist/zonos-elements/{p-7aa50ef2.entry.js → p-0d18d94b.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-7b400b5f.system.entry.js → p-101226f3.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-c01f86b4.entry.js → p-12459b59.entry.js} +1 -1
  184. package/dist/zonos-elements/p-127e0395.js +17 -0
  185. package/dist/zonos-elements/p-18d411c3.system.entry.js +1 -0
  186. package/dist/zonos-elements/{p-71d855b8.system.entry.js → p-197d9b23.system.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-63a3d3b9.system.js → p-1b5f89d5.system.js} +1 -1
  188. package/dist/zonos-elements/p-1b8771bb.js +1 -0
  189. package/dist/zonos-elements/{p-71a8d971.system.entry.js → p-1f1bf95c.system.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-5062dcf3.system.entry.js → p-234f0339.system.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-2c2a1339.system.entry.js → p-25dd58f8.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-39fa55c7.entry.js → p-26718a78.entry.js} +1 -1
  193. package/dist/zonos-elements/p-29b60bf3.system.js +1 -0
  194. package/dist/zonos-elements/{p-1c4d12f0.entry.js → p-2aa44601.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-3908f78d.system.entry.js → p-302b7105.system.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-bc4bfa06.js → p-321d2963.js} +1 -1
  197. package/dist/zonos-elements/p-34d10122.js +1 -0
  198. package/dist/zonos-elements/p-358dfb9e.entry.js +1 -0
  199. package/dist/zonos-elements/{p-b54a95ea.system.entry.js → p-36bea5d5.system.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-14c920b2.system.entry.js → p-38881641.system.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-c7311ce5.system.entry.js → p-3ad2a9a3.system.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-2f55895c.system.entry.js → p-3ece0f96.system.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-c6e3d747.system.js → p-3fbd9cc0.system.js} +1 -1
  204. package/dist/zonos-elements/p-445072f8.js +1 -0
  205. package/dist/zonos-elements/{p-de8899bc.js → p-456c0e52.js} +1 -1
  206. package/dist/zonos-elements/p-45bd8072.system.js +1 -0
  207. package/dist/zonos-elements/{p-85e59f3a.system.entry.js → p-4a395eea.system.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-9c49daa4.entry.js → p-4aefd668.entry.js} +1 -1
  209. package/dist/zonos-elements/{p-0792688d.system.entry.js → p-4c087a8e.system.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-403b9fca.entry.js → p-4d081ce8.entry.js} +1 -1
  211. package/dist/zonos-elements/p-4d4b7faa.entry.js +1 -0
  212. package/dist/zonos-elements/{p-a359e0a2.system.entry.js → p-4e4fa1fb.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-c36696f9.js → p-4f7d64f6.js} +1 -1
  214. package/dist/zonos-elements/{p-09aabce0.js → p-507f00d2.js} +1 -1
  215. package/dist/zonos-elements/p-53db5f85.system.js +1 -0
  216. package/dist/zonos-elements/{p-e17bbcee.entry.js → p-54c95926.entry.js} +1 -1
  217. package/dist/zonos-elements/p-5dd86dd9.system.js +1 -0
  218. package/dist/zonos-elements/{p-83377e23.entry.js → p-5eaa0de1.entry.js} +1 -1
  219. package/dist/zonos-elements/p-5f628e57.entry.js +1 -0
  220. package/dist/zonos-elements/{p-ae26aec5.system.js → p-5fd0cd66.system.js} +1 -1
  221. package/dist/zonos-elements/{p-0b7beb16.system.entry.js → p-661cd4ce.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-aa028d91.entry.js → p-66d72216.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-57fa64d7.js → p-67897a0d.js} +1 -1
  224. package/dist/zonos-elements/{p-a12cb7ce.entry.js → p-6d37f669.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-917f714c.system.entry.js → p-6f19845a.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-232b0fb5.system.entry.js → p-70c8a47d.system.entry.js} +1 -1
  227. package/dist/zonos-elements/p-7261e245.system.js +13 -0
  228. package/dist/zonos-elements/{p-3e67ca05.entry.js → p-7427dd1e.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-23d497e3.system.js → p-7501c637.system.js} +1 -1
  230. package/dist/zonos-elements/{p-c1fb3a2d.entry.js → p-777e0a81.entry.js} +1 -1
  231. package/dist/zonos-elements/p-7d7ffb42.js +1 -0
  232. package/dist/zonos-elements/p-7e77b055.system.entry.js +1 -0
  233. package/dist/zonos-elements/{p-0f787f5d.entry.js → p-80524eac.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-cfb9b847.system.entry.js → p-87d89870.system.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-69b9b711.entry.js → p-8a424412.entry.js} +1 -1
  236. package/dist/zonos-elements/p-8b206982.system.js +1 -0
  237. package/dist/zonos-elements/{p-443e1f30.system.js → p-8c6624b6.system.js} +1 -1
  238. package/dist/zonos-elements/{p-48475755.entry.js → p-8d1efd7b.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-57cee1b5.system.entry.js → p-8d5f928c.system.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-5762e217.js → p-908f13ae.js} +1 -1
  241. package/dist/zonos-elements/{p-8f0f6449.entry.js → p-939ba2a5.entry.js} +1 -1
  242. package/dist/zonos-elements/p-9581bffb.js +1 -0
  243. package/dist/zonos-elements/p-959918fe.system.js +1 -0
  244. package/dist/zonos-elements/{p-3e85b9f5.system.entry.js → p-9c64ca98.system.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-f8d56ba9.system.js → p-9d44fef6.system.js} +1 -1
  246. package/dist/zonos-elements/p-9eea270b.entry.js +1 -0
  247. package/dist/zonos-elements/{p-fb9fb873.system.entry.js → p-a1c476d6.system.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-1acf0a71.system.entry.js → p-a75b3efc.system.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-5edef7c3.system.js → p-ab25379f.system.js} +1 -1
  250. package/dist/zonos-elements/p-ac30b7a8.system.js +1 -0
  251. package/dist/zonos-elements/{p-37bb5f2d.entry.js → p-b004146f.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-0ff93ca6.entry.js → p-b360ee5b.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-3972663a.system.entry.js → p-b589f621.system.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-58248f03.entry.js → p-b9a4430c.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-69212d0f.entry.js → p-bc6b33fa.entry.js} +1 -1
  256. package/dist/zonos-elements/p-bd004403.system.js +1 -0
  257. package/dist/zonos-elements/{p-84cf1a90.system.entry.js → p-bdaf94a4.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-231baaf8.entry.js → p-c1ab70d2.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-866afec1.js → p-c4e358f2.js} +1 -1
  260. package/dist/zonos-elements/{p-942358eb.system.js → p-c87d3d50.system.js} +1 -1
  261. package/dist/zonos-elements/{p-aedd3911.entry.js → p-c9d4eb42.entry.js} +1 -1
  262. package/dist/zonos-elements/{p-ae16dda9.system.js → p-c9e3bc98.system.js} +1 -1
  263. package/dist/zonos-elements/p-cda52300.js +1 -0
  264. package/dist/zonos-elements/p-ce75b047.js +2 -0
  265. package/dist/zonos-elements/{p-909e2bc3.system.js → p-d18a2b2c.system.js} +1 -1
  266. package/dist/zonos-elements/p-d233ef0d.entry.js +1 -0
  267. package/dist/zonos-elements/{p-14735e9a.system.entry.js → p-dbb3db89.system.entry.js} +1 -1
  268. package/dist/zonos-elements/{p-4592ae49.entry.js → p-ddcbea81.entry.js} +1 -1
  269. package/dist/zonos-elements/p-def2d465.js +1 -0
  270. package/dist/zonos-elements/p-e219d011.js +1 -0
  271. package/dist/zonos-elements/{p-6adfb3af.system.entry.js → p-ed61dedd.system.entry.js} +1 -1
  272. package/dist/zonos-elements/p-ee217693.entry.js +1 -0
  273. package/dist/zonos-elements/p-f0938b51.system.entry.js +1 -0
  274. package/dist/zonos-elements/{p-71f10bf0.entry.js → p-f31fbbf0.entry.js} +1 -1
  275. package/dist/zonos-elements/p-f830f800.js +1 -0
  276. package/dist/zonos-elements/p-f8f7d491.js +1 -0
  277. package/dist/zonos-elements/p-fc0aa91e.system.js +18 -0
  278. package/dist/zonos-elements/zonos-elements.css +1 -1
  279. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  280. package/dist/zonos-elements/zonos-elements.js +1 -1
  281. package/package.json +70 -52
  282. package/dist/cjs/index-69fa8852.js +0 -1961
  283. package/dist/esm/index-0bbe9693.js +0 -1928
  284. package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +0 -1
  285. package/dist/esm-es5/index-0bbe9693.js +0 -2
  286. package/dist/esm-es5/paypal-8d8518c0.js +0 -17
  287. package/dist/esm-es5/zonosStore-b434e436.js +0 -1
  288. package/dist/zonos-elements/p-002e45f9.system.js +0 -17
  289. package/dist/zonos-elements/p-01dada4e.js +0 -1
  290. package/dist/zonos-elements/p-0ef2a242.js +0 -1
  291. package/dist/zonos-elements/p-1dbeeab2.entry.js +0 -1
  292. package/dist/zonos-elements/p-1f894984.js +0 -1
  293. package/dist/zonos-elements/p-27f6930b.js +0 -1
  294. package/dist/zonos-elements/p-3bec13dd.system.js +0 -1
  295. package/dist/zonos-elements/p-41299ffb.js +0 -1
  296. package/dist/zonos-elements/p-43a22d85.entry.js +0 -1
  297. package/dist/zonos-elements/p-4ffbb0d6.system.js +0 -1
  298. package/dist/zonos-elements/p-64661dd1.js +0 -1
  299. package/dist/zonos-elements/p-719403e0.system.js +0 -1
  300. package/dist/zonos-elements/p-72ff005c.entry.js +0 -1
  301. package/dist/zonos-elements/p-786d1c24.js +0 -1
  302. package/dist/zonos-elements/p-7dba5f23.system.js +0 -1
  303. package/dist/zonos-elements/p-94c5fbfc.system.entry.js +0 -1
  304. package/dist/zonos-elements/p-989d3af9.system.js +0 -2
  305. package/dist/zonos-elements/p-9fa90292.system.entry.js +0 -1
  306. package/dist/zonos-elements/p-ab41bab5.js +0 -2
  307. package/dist/zonos-elements/p-abf38ed6.js +0 -1
  308. package/dist/zonos-elements/p-af85846e.system.js +0 -1
  309. package/dist/zonos-elements/p-b2a0ab4a.js +0 -1
  310. package/dist/zonos-elements/p-b2ae8eb7.system.js +0 -1
  311. package/dist/zonos-elements/p-bf5e47e2.entry.js +0 -1
  312. package/dist/zonos-elements/p-c2442878.system.js +0 -1
  313. package/dist/zonos-elements/p-d45285aa.system.js +0 -1
  314. package/dist/zonos-elements/p-dcf999d8.entry.js +0 -1
  315. package/dist/zonos-elements/p-e9e6bea7.system.entry.js +0 -1
  316. package/dist/zonos-elements/p-eea7ac64.js +0 -1
  317. package/dist/zonos-elements/p-f6c2c743.entry.js +0 -1
  318. package/dist/zonos-elements/p-fc776473.js +0 -1
  319. package/dist/zonos-elements/p-fe06c9ea.js +0 -17
  320. package/dist/zonos-elements/p-fe96e239.system.js +0 -1
@@ -0,0 +1 @@
1
+ System.register(["./p-d18a2b2c.system.js","./p-8c6624b6.system.js"],(function(r){"use strict";var n,t,o;return{setters:[function(r){n=r.i;t=r.t},function(r){o=r.i}],execute:function(){var u=r("g",(function(r){var u=r.backgroundColor,e=r.color;if(u===e){if(n(e)){var f=t(e).lighten(40).toHexString();return f}var a=t(e).darken(40).toHexString();return a}var c=o({backgroundColor1:u,backgroundColor2:e});if(c){return e}if(n(e)){return"#ffffff"}var s=t(e).darken(25).toHexString();var i=t(e).lighten(25).toHexString();var v=o({backgroundColor1:u,backgroundColor2:s});return v?s:i}))}}}));
@@ -1 +1 @@
1
- import{r as t,c as e,h as o,H as i}from"./p-ab41bab5.js";import{b as n}from"./p-866afec1.js";import{e as s,i as c,h as r,s as l,a}from"./p-09aabce0.js";import{z as d,e as h,f as u}from"./p-b2a0ab4a.js";import{g as p,i as m,a as f}from"./p-e7b0c156.js";import{h as w,l as v}from"./p-41dd1cb8.js";import{l as g}from"./p-0a377722.js";import{e as y}from"./p-c36696f9.js";import"./p-57fa64d7.js";import"./p-1f894984.js";const S=t=>{const e=document.querySelector(t);if(!document.querySelector("zonos-hello")&&e){const t=document.createElement("zonos-hello");return e.appendChild(t),!0}return!1},b=t=>{switch(t){case"BOTTOM_RIGHT":default:return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right"}},z=({position:t="bottom-right"})=>{const e=".zonos--hello-mobile-wrapper";if(document.querySelector(e))return e;const o=document.createElement("div");return o.className="zonos--hello-mobile-wrapper",o.style.position="fixed","top-right"===t&&(o.style.top="72px",o.style.right="24px"),"top-left"===t&&(o.style.top="72px",o.style.left="24px"),"bottom-right"===t&&(o.style.bottom="72px",o.style.right="24px"),"bottom-left"===t&&(o.style.bottom="72px",o.style.left="24px"),o.style.zIndex="2147483647",document.body.appendChild(o),e},j=async t=>{if(window.Zonos.isLegacyCheckout)return void g("Hello is disabled when isLegacyCheckout","info");const{anchorElementSelector:e}=t;let o=e;if(!t.anchorElementSelector&&t.desktopLocation){const t=z({position:"bottom-right"});o=t}if(o&&c(o)){if(g("Hello init complete"),!S(o)){const e=new MutationObserver((()=>{S(o)&&e.disconnect()}));e.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{S(o)}),1e3),setTimeout((()=>{if(t.notFoundElementFallback){g(`Hello anchor selector ${t.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${t.notFoundElementFallback}`,"info");const e=z({position:b(t.notFoundElementFallback)});S(e)}}),3e3)}}else v(`Selector anchorElementSelector "${t.anchorElementSelector}" is not a valid selector.`)};class I{constructor(t,e){this.targetId=t,this.allowedEvents=e,this.listeners=new Map,this.handleMessage=t=>{var e,o,i;const n=t.data,s=(null===(e=this.iframe)||void 0===e?void 0:e.contentWindow)||(null===(i=null===(o=this.iframe)||void 0===o?void 0:o.contentDocument)||void 0===i?void 0:i.defaultView);if(t.source!==s)return;if(!this.isValidMessage(n))return;const c=this.listeners.get(n.type);null==c||c.forEach((t=>{try{t(n.payload)}catch(t){v("Error in event listener:",t)}}))},this.initializeEventListeners(),this.iframe=document.getElementById(this.targetId)}initializeEventListeners(){window.addEventListener("message",this.handleMessage)}isValidMessage(t){if(!t||"object"!=typeof t)return!1;const e=t;return e.id===this.targetId&&"string"==typeof e.type&&this.allowedEvents.includes(e.type)&&void 0!==e.payload}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),g(`[CheckoutAddressService] listening to ${t}`,"info");const o=e,i=this.listeners.get(t);return i&&i.add(o),()=>{const e=this.listeners.get(t);e&&e.delete(o)}}destroy(){window.removeEventListener("message",this.handleMessage),this.listeners.clear()}}class O extends I{constructor(){g("=== [Google Places Service] Initializing","info"),super(m.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])}sendMessage(t,e){var o;if(!(null===(o=this.iframe)||void 0===o?void 0:o.contentWindow))return;const i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:e,type:t};g(`GooglePlacesService] parent --\x3e ${t}`,"info",e),this.iframe.contentWindow.postMessage(i,"*")}initialize(){this.sendMessage("initializeGooglePlacesService",{})}fetchSuggestions({country:t,query:e,type:o}){t&&this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[t],input:e},type:o})}selectPlace({placeId:t,type:e}){this.sendMessage("placeSelected",{placeId:t,type:e})}}class C{constructor(){this.googlePlaceInitialized=!1,g("=== [CheckoutAddressService] Initializing","info"),this.googlePlaces=new O,this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{g("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info"),this.googlePlaceInitialized=!0})),this.initialize()}initialize(){this.googlePlaces.initialize()}onInitializeGooglePlacesService(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{g("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService"),t()}))}isGooglePlaceInitialized(){return this.googlePlaceInitialized}onAddressSuggestions(t){return this.suggestionsCallback=t,this.googlePlaces.on("onFetchAutocompleteSuggestions",((...e)=>{g(`[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ${e[0].type}`,"info",...e),t(...e)}))}onAddressSelected(t){return this.placeSelectedCallback=t,this.googlePlaces.on("onPlaceSelected",((...e)=>{g(`[CheckoutAddressService] parent <-- onPlaceSelected ${e[0].type}`,"info",...e),t(...e)}))}getAddressSuggestions({country:t,query:e,type:o}){this.googlePlaceInitialized&&this.googlePlaces.fetchSuggestions({country:t,query:e,type:o})}selectAddress({placeId:t,type:e}){this.googlePlaces.selectPlace({placeId:t,type:e})}destroy(){this.googlePlaces.destroy(),this.suggestionsCallback&&(this.suggestionsCallback=void 0),this.placeSelectedCallback&&(this.placeSelectedCallback=void 0)}}const k=class{constructor(o){t(this,o),this.paypalInitEvent=e(this,"paypalInitEvent",7),this.stripeInitEvent=e(this,"stripeInitEvent",7)}async initCheckoutElement(t){var e;t?(n.stripe=t,((e=d.checkoutSettings).placeOrderButtonSelector||e.alwaysTriggerInternationalCheckoutSelector||window.Zonos.cartData)&&(!e.placeOrderButtonSelector||c(e.placeOrderButtonSelector)?!e.alwaysTriggerInternationalCheckoutSelector||c(e.alwaysTriggerInternationalCheckoutSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const t=document.createElement("zonos-checkout");document.body.appendChild(t)}})():v(`Selector alwaysTriggerInternationalCheckoutSelector "${e.alwaysTriggerInternationalCheckoutSelector}" is not a valid selector`):v(`Selector checkoutButtonAnchor "${e.placeOrderButtonSelector}" is not a valid selector`)),g("init checkout element")):g("Stripe is not loaded yet - cannot init checkout element","warn")}async initCollectElement(t){t?(n.stripe=t,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-collect")){const t=document.createElement("zonos-collect");document.body.appendChild(t)}})(),g("init Collect element")):g("Stripe is not loaded yet - cannot init Collect element","warn")}async initInvoiceElement(t){t?(n.stripe=t,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-invoice")){const t=document.createElement("zonos-invoice");document.body.appendChild(t)}})(),g("init Invoice element")):g("Stripe is not loaded yet - cannot init Invoice element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const t=document.createElement("zonos-notification");document.body.appendChild(t)}async setupGoogleFont(t){var e,o;const i=t||u();if("Inter"===i){if(!t)return;g("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t})}const n=new URLSearchParams;n.set("family",i);const{errors:s,json:c}=await w(`/api/zonos-elements/get-font-detail?${n.toString()}`);if(s.length>0)return g(`Failed to load font ${i}`,"warn"),void(d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:"Inter"}));const r=null==c?void 0:c.fontUrl;r&&(null===(o=(e=window.Zonos).injectSupportGoogleFont)||void 0===o||o.call(e,r)),t&&(g(`[FONT] ${t} font override applied`),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t}))}handleLocationChange(){j(d.helloSettings)}initHistoryListener(){const t=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)};const e=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),e.apply(this,arguments)}}injectCustomHTML(t){if(!t)return;if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect||window.Zonos.isInvoice)return void g("=== Skip injecting custom HTML for hosted checkout","info");g("=== Injecting custom HTML for hosted checkout");const e=document.createElement("template");e.innerHTML=t,e.content.querySelectorAll("script").forEach((t=>{const e=document.createElement("script");t.src?(e.src=t.src,e.async=t.async):e.textContent=t.innerHTML,document.body.appendChild(e)})),y()}async initGooglePlacesService(t){const e=null==t?void 0:t.genericSettings;if(!e)return;const o=e.signedTokenGooglePlaces;o&&f({id:m.GOOGLE_PLACES,onload:()=>{d.checkoutAddressService=new C},src:`https://route.elements.zonos.com/iframe/google-maps?signedToken=${o}`})}buildBaseConfig(t){var e,o;const i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:void 0,captureDelay:void 0,subscriptionStatus:void 0});if(window.Zonos.isCollect||window.Zonos.isInvoice)return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})});if(!this.config.checkoutSettings)return Object.assign(Object.assign({},this.config),{checkoutSettings:void 0});const n=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&"CLOSE_MODAL"===(null===(e=this.config.checkoutSettings)||void 0===e?void 0:e.successBehavior);return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:n?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:n?(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||(null==t?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})}async componentWillLoad(){this.initHistoryListener(),d.zonosApiKey=this.zonosApiKey,(async()=>{var t,e,o,i;const{errors:n,json:c,zonosMode:l}=await(async()=>{if(window.Zonos.cartSettings)return g("Reusing cached zonos settings"),{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode};const t=p(),e=new URLSearchParams;t.overrideShouldEnabledCustomAddress&&e.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress);const o=s();o&&e.set("zCountry",o);const{errors:i,json:n,zonosMode:c}=await w(`/api/zonos-elements/zonos-settings?${e.toString()}`);return i.length?(v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:i,json:null,zonosMode:c}):{errors:[],json:n,zonosMode:c}})();if("403"===(null===(e=null===(t=n[0])||void 0===t?void 0:t.type)||void 0===e?void 0:e.toString()))return void g("Failed to load zonos settings. This domain may not have access","warn");const a=(null===(o=null==c?void 0:c.checkoutSettings)||void 0===o?void 0:o.customHTML)||"";this.injectCustomHTML(a),this.initZonosNotification();const u=this.buildBaseConfig(c),m=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:(()=>{var t,e,o;return window.Zonos.isLegacyCheckout?(null===(t=null==c?void 0:c.appearanceSettings)||void 0===t?void 0:t.logoUrl)||(null===(e=this.config.appearance)||void 0===e?void 0:e.logoUrl):null===(o=this.config.appearance)||void 0===o?void 0:o.logoUrl})()})}),u);h({overrideSettings:m,zonosSettings:c}),d.zonosMode=l,this.setupGoogleFont(),"DISABLED"===d.helloSettings.visibilityStatus&&g("=== Hello is disabled by store owner ===","warn"),d.helloSettings&&"ENABLED"===d.helloSettings.visibilityStatus&&(g("Initializing hello"),j(d.helloSettings)),await r();const f=(null===(i=null==c?void 0:c.checkoutSettings)||void 0===i?void 0:i.externalServiceTokens.find((t=>"STRIPE_PUBLISHABLE_TOKEN"===t.type)))||null;if(f&&this.stripeInitEvent){if(window.Zonos.isCollect||window.Zonos.isInvoice)return this.stripeInitEvent.emit({publishableKey:f.token}),void this.initGooglePlacesService(c);if("INACTIVE"===d.checkoutSettings.subscriptionStatus)return g('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void g("zonos controller loaded");if("DISABLED"===d.checkoutSettings.visibilityStatus)return g("=== Checkout is disabled by store owner ===","warn"),void g("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:f.token}),this.initGooglePlacesService(c)}else g("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(t){const e=document.querySelector("zonos-notification");e?e.showNotification(t):g("Failed to show notification - zonos-notification not found","warn")}async reset(){l.checkoutSessionId=null,n.clientSecret=""}async overrideConfig(t){h({overrideSettings:t,zonosSettings:null})}async overrideCountry(t){g(`Override country code to ${t}`),a({isInitializing:!1,newSelectedCountryCode:t})}async getAppearanceSetting(){return d.appearance}async updateOrganizationName(t){d.organizationName=t}render(){return o(i,{key:"92e1eae13d0b13f91098ea110203b6c7a7f67c3e",class:"zonos--elements"})}};k.style=":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{visibility:hidden;opacity:0;height:0}";export{k as zonos_controller}
1
+ import{r as t,d as e,h as o,a as i}from"./p-ce75b047.js";import{b as n}from"./p-c4e358f2.js";import{e as s,i as r,h as c,s as l,a}from"./p-507f00d2.js";import{z as d,e as h,f as u}from"./p-058f6124.js";import{g as p,i as f,a as m}from"./p-e7b0c156.js";import{h as w,l as v}from"./p-41dd1cb8.js";import{l as g}from"./p-0a377722.js";import{e as y}from"./p-4f7d64f6.js";import"./p-67897a0d.js";import"./p-f830f800.js";const S=t=>{const e=document.querySelector(t);if(!document.querySelector("zonos-hello")&&e){const t=document.createElement("zonos-hello");return e.appendChild(t),!0}return!1},b=t=>{switch(t){case"BOTTOM_RIGHT":default:return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right"}},z=({position:t="bottom-right"})=>{const e=".zonos--hello-mobile-wrapper";if(document.querySelector(e))return e;const o=document.createElement("div");return o.className="zonos--hello-mobile-wrapper",o.style.position="fixed","top-right"===t&&(o.style.top="72px",o.style.right="24px"),"top-left"===t&&(o.style.top="72px",o.style.left="24px"),"bottom-right"===t&&(o.style.bottom="72px",o.style.right="24px"),"bottom-left"===t&&(o.style.bottom="72px",o.style.left="24px"),o.style.zIndex="2147483647",document.body.appendChild(o),e},j=async t=>{if(window.Zonos.isLegacyCheckout)return void g("Hello is disabled when isLegacyCheckout","info");const{anchorElementSelector:e}=t;let o=e;if(!t.anchorElementSelector&&t.desktopLocation){const t=z({position:"bottom-right"});o=t}if(o&&r(o)){if(g("Hello init complete"),!S(o)){const e=new MutationObserver((()=>{S(o)&&e.disconnect()}));e.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{S(o)}),1e3),setTimeout((()=>{if(t.notFoundElementFallback){g(`Hello anchor selector ${t.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${t.notFoundElementFallback}`,"info");const e=z({position:b(t.notFoundElementFallback)});S(e)}}),3e3)}}else v(`Selector anchorElementSelector "${t.anchorElementSelector}" is not a valid selector.`)};class I{constructor(t,e){this.targetId=t,this.allowedEvents=e,this.listeners=new Map,this.handleMessage=t=>{var e,o,i;const n=t.data,s=(null===(e=this.iframe)||void 0===e?void 0:e.contentWindow)||(null===(i=null===(o=this.iframe)||void 0===o?void 0:o.contentDocument)||void 0===i?void 0:i.defaultView);if(t.source!==s)return;if(!this.isValidMessage(n))return;const r=this.listeners.get(n.type);null==r||r.forEach((t=>{try{t(n.payload)}catch(t){v("Error in event listener:",t)}}))},this.initializeEventListeners(),this.iframe=document.getElementById(this.targetId)}initializeEventListeners(){window.addEventListener("message",this.handleMessage)}isValidMessage(t){if(!t||"object"!=typeof t)return!1;const e=t;return e.id===this.targetId&&"string"==typeof e.type&&this.allowedEvents.includes(e.type)&&void 0!==e.payload}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),g(`[CheckoutAddressService] listening to ${t}`,"info");const o=e,i=this.listeners.get(t);return i&&i.add(o),()=>{const e=this.listeners.get(t);e&&e.delete(o)}}destroy(){window.removeEventListener("message",this.handleMessage),this.listeners.clear()}}class O extends I{constructor(){g("=== [Google Places Service] Initializing","info"),super(f.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])}sendMessage(t,e){var o;if(!(null===(o=this.iframe)||void 0===o?void 0:o.contentWindow))return;const i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:e,type:t};g(`GooglePlacesService] parent --\x3e ${t}`,"info",e),this.iframe.contentWindow.postMessage(i,"*")}initialize(){this.sendMessage("initializeGooglePlacesService",{})}fetchSuggestions({country:t,query:e,type:o}){t&&this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[t],input:e},type:o})}selectPlace({placeId:t,type:e}){this.sendMessage("placeSelected",{placeId:t,type:e})}}class C{constructor(){this.googlePlaceInitialized=!1,g("=== [CheckoutAddressService] Initializing","info"),this.googlePlaces=new O,this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{g("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info"),this.googlePlaceInitialized=!0})),this.initialize()}initialize(){this.googlePlaces.initialize()}onInitializeGooglePlacesService(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{g("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService"),t()}))}isGooglePlaceInitialized(){return this.googlePlaceInitialized}onAddressSuggestions(t){return this.suggestionsCallback=t,this.googlePlaces.on("onFetchAutocompleteSuggestions",((...e)=>{g(`[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ${e[0].type}`,"info",...e),t(...e)}))}onAddressSelected(t){return this.placeSelectedCallback=t,this.googlePlaces.on("onPlaceSelected",((...e)=>{g(`[CheckoutAddressService] parent <-- onPlaceSelected ${e[0].type}`,"info",...e),t(...e)}))}getAddressSuggestions({country:t,query:e,type:o}){this.googlePlaceInitialized&&this.googlePlaces.fetchSuggestions({country:t,query:e,type:o})}selectAddress({placeId:t,type:e}){this.googlePlaces.selectPlace({placeId:t,type:e})}destroy(){this.googlePlaces.destroy(),this.suggestionsCallback&&(this.suggestionsCallback=void 0),this.placeSelectedCallback&&(this.placeSelectedCallback=void 0)}}const k=class{constructor(o){t(this,o),this.paypalInitEvent=e(this,"paypalInitEvent",7),this.stripeInitEvent=e(this,"stripeInitEvent",7)}async initCheckoutElement(t){var e;t?(n.stripe=t,((e=d.checkoutSettings).placeOrderButtonSelector||e.alwaysTriggerInternationalCheckoutSelector||window.Zonos.cartData)&&(!e.placeOrderButtonSelector||r(e.placeOrderButtonSelector)?!e.alwaysTriggerInternationalCheckoutSelector||r(e.alwaysTriggerInternationalCheckoutSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const t=document.createElement("zonos-checkout");document.body.appendChild(t)}})():v(`Selector alwaysTriggerInternationalCheckoutSelector "${e.alwaysTriggerInternationalCheckoutSelector}" is not a valid selector`):v(`Selector checkoutButtonAnchor "${e.placeOrderButtonSelector}" is not a valid selector`)),g("init checkout element")):g("Stripe is not loaded yet - cannot init checkout element","warn")}async initCollectElement(t){t?(n.stripe=t,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-collect")){const t=document.createElement("zonos-collect");document.body.appendChild(t)}})(),g("init Collect element")):g("Stripe is not loaded yet - cannot init Collect element","warn")}async initInvoiceElement(t){t?(n.stripe=t,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-invoice")){const t=document.createElement("zonos-invoice");document.body.appendChild(t)}})(),g("init Invoice element")):g("Stripe is not loaded yet - cannot init Invoice element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const t=document.createElement("zonos-notification");document.body.appendChild(t)}async setupGoogleFont(t){var e,o;const i=t||u();if("Inter"===i){if(!t)return;g("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t})}const n=new URLSearchParams;n.set("family",i);const{errors:s,json:r}=await w(`/api/zonos-elements/get-font-detail?${n.toString()}`);if(s.length>0)return g(`Failed to load font ${i}`,"warn"),void(d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:"Inter"}));const c=null==r?void 0:r.fontUrl;c&&(null===(o=(e=window.Zonos).injectSupportGoogleFont)||void 0===o||o.call(e,c)),t&&(g(`[FONT] ${t} font override applied`),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t}))}handleLocationChange(){j(d.helloSettings)}initHistoryListener(){const t=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)};const e=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),e.apply(this,arguments)}}injectCustomHTML(t){if(!t)return;if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect||window.Zonos.isInvoice)return void g("=== Skip injecting custom HTML for hosted checkout","info");g("=== Injecting custom HTML for hosted checkout");const e=document.createElement("template");e.innerHTML=t,e.content.querySelectorAll("script").forEach((t=>{const e=document.createElement("script");t.src?(e.src=t.src,e.async=t.async):e.textContent=t.innerHTML,document.body.appendChild(e)})),y()}async initGooglePlacesService(t){const e=null==t?void 0:t.genericSettings;if(!e)return;const o=e.signedTokenGooglePlaces;o&&m({id:f.GOOGLE_PLACES,onload:()=>{d.checkoutAddressService=new C},src:`https://route.elements.zonos.com/iframe/google-maps?signedToken=${o}`})}buildBaseConfig(t){var e,o;const i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:void 0,captureDelay:void 0,subscriptionStatus:void 0});if(window.Zonos.isCollect||window.Zonos.isInvoice)return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})});if(!this.config.checkoutSettings)return Object.assign(Object.assign({},this.config),{checkoutSettings:void 0});const n=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&"CLOSE_MODAL"===(null===(e=this.config.checkoutSettings)||void 0===e?void 0:e.successBehavior);return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:n?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:n?(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||(null==t?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})}async componentWillLoad(){this.initHistoryListener(),d.zonosApiKey=this.zonosApiKey,(async()=>{var t,e,o,i;const{errors:n,json:r,zonosMode:l}=await(async()=>{if(window.Zonos.cartSettings)return g("Reusing cached zonos settings"),{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode};const t=p(),e=new URLSearchParams;t.overrideShouldEnabledCustomAddress&&e.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress);const o=s();o&&e.set("zCountry",o);const{errors:i,json:n,zonosMode:r}=await w(`/api/zonos-elements/zonos-settings?${e.toString()}`);return i.length?(v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:i,json:null,zonosMode:r}):{errors:[],json:n,zonosMode:r}})();if("403"===(null===(e=null===(t=n[0])||void 0===t?void 0:t.type)||void 0===e?void 0:e.toString()))return void g("Failed to load zonos settings. This domain may not have access","warn");const a=(null===(o=null==r?void 0:r.checkoutSettings)||void 0===o?void 0:o.customHTML)||"";this.injectCustomHTML(a),this.initZonosNotification();const u=this.buildBaseConfig(r),f=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:(()=>{var t,e,o;return window.Zonos.isLegacyCheckout?(null===(t=null==r?void 0:r.appearanceSettings)||void 0===t?void 0:t.logoUrl)||(null===(e=this.config.appearance)||void 0===e?void 0:e.logoUrl):null===(o=this.config.appearance)||void 0===o?void 0:o.logoUrl})()})}),u);h({overrideSettings:f,zonosSettings:r}),d.zonosMode=l,this.setupGoogleFont(),"DISABLED"===d.helloSettings.visibilityStatus&&g("=== Hello is disabled by store owner ===","warn"),d.helloSettings&&"ENABLED"===d.helloSettings.visibilityStatus&&(g("Initializing hello"),j(d.helloSettings)),await c();const m=(null===(i=null==r?void 0:r.checkoutSettings)||void 0===i?void 0:i.externalServiceTokens.find((t=>"STRIPE_PUBLISHABLE_TOKEN"===t.type)))||null;if(m&&this.stripeInitEvent){if(window.Zonos.isCollect||window.Zonos.isInvoice)return this.stripeInitEvent.emit({publishableKey:m.token}),void this.initGooglePlacesService(r);if("INACTIVE"===d.checkoutSettings.subscriptionStatus)return g('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void g("zonos controller loaded");if("DISABLED"===d.checkoutSettings.visibilityStatus)return g("=== Checkout is disabled by store owner ===","warn"),void g("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:m.token}),this.initGooglePlacesService(r)}else g("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(t){const e=document.querySelector("zonos-notification");e?e.showNotification(t):g("Failed to show notification - zonos-notification not found","warn")}async reset(){l.checkoutSessionId=null,n.clientSecret=""}async overrideConfig(t){h({overrideSettings:t,zonosSettings:null})}async overrideCountry(t){g(`Override country code to ${t}`),a({isInitializing:!1,newSelectedCountryCode:t})}async getAppearanceSetting(){return d.appearance}async updateOrganizationName(t){d.organizationName=t}render(){return o(i,{key:"92e1eae13d0b13f91098ea110203b6c7a7f67c3e",class:"zonos--elements"})}};k.style=":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{visibility:hidden;opacity:0;height:0}";export{k as zonos_controller}
@@ -0,0 +1 @@
1
+ System.register([],(function(n){"use strict";return{execute:function(){function r(n){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t){if(t.hasOwnProperty(e))n[e]=t[e]}}return n}function t(n,r){return Array(r+1).join(n)}function e(n){return n.replace(/^\n*/,"")}function i(n){var r=n.length;while(r>0&&n[r-1]==="\n")r--;return n.substring(0,r)}function u(n){return i(e(n))}var f=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function a(n){return g(n,f)}var o=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function c(n){return g(n,o)}function l(n){return m(n,o)}var s=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function v(n){return g(n,s)}function h(n){return m(n,s)}function g(n,r){return r.indexOf(n.nodeName)>=0}function m(n,r){return n.getElementsByTagName&&r.some((function(r){return n.getElementsByTagName(r).length}))}var E={};E.paragraph={filter:"p",replacement:function(n){return"\n\n"+n+"\n\n"}};E.lineBreak={filter:"br",replacement:function(n,r,t){return t.br+"\n"}};E.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(n,r,e){var i=Number(r.nodeName.charAt(1));if(e.headingStyle==="setext"&&i<3){var u=t(i===1?"=":"-",n.length);return"\n\n"+n+"\n"+u+"\n\n"}else{return"\n\n"+t("#",i)+" "+n+"\n\n"}}};E.blockquote={filter:"blockquote",replacement:function(n){n=u(n).replace(/^/gm,"> ");return"\n\n"+n+"\n\n"}};E.list={filter:["ul","ol"],replacement:function(n,r){var t=r.parentNode;if(t.nodeName==="LI"&&t.lastElementChild===r){return"\n"+n}else{return"\n\n"+n+"\n\n"}}};E.listItem={filter:"li",replacement:function(n,r,t){var e=t.bulletListMarker+" ";var i=r.parentNode;if(i.nodeName==="OL"){var f=i.getAttribute("start");var a=Array.prototype.indexOf.call(i.children,r);e=(f?Number(f)+a:a+1)+". "}var o=/\n$/.test(n);n=u(n)+(o?"\n":"");n=n.replace(/\n/gm,"\n"+" ".repeat(e.length));return e+n+(r.nextSibling?"\n":"")}};E.indentedCodeBlock={filter:function(n,r){return r.codeBlockStyle==="indented"&&n.nodeName==="PRE"&&n.firstChild&&n.firstChild.nodeName==="CODE"},replacement:function(n,r,t){return"\n\n "+r.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}};E.fencedCodeBlock={filter:function(n,r){return r.codeBlockStyle==="fenced"&&n.nodeName==="PRE"&&n.firstChild&&n.firstChild.nodeName==="CODE"},replacement:function(n,r,e){var i=r.firstChild.getAttribute("class")||"";var u=(i.match(/language-(\S+)/)||[null,""])[1];var f=r.firstChild.textContent;var a=e.fence.charAt(0);var o=3;var c=new RegExp("^"+a+"{3,}","gm");var l;while(l=c.exec(f)){if(l[0].length>=o){o=l[0].length+1}}var s=t(a,o);return"\n\n"+s+u+"\n"+f.replace(/\n$/,"")+"\n"+s+"\n\n"}};E.horizontalRule={filter:"hr",replacement:function(n,r,t){return"\n\n"+t.hr+"\n\n"}};E.inlineLink={filter:function(n,r){return r.linkStyle==="inlined"&&n.nodeName==="A"&&n.getAttribute("href")},replacement:function(n,r){var t=r.getAttribute("href");if(t)t=t.replace(/([()])/g,"\\$1");var e=d(r.getAttribute("title"));if(e)e=' "'+e.replace(/"/g,'\\"')+'"';return"["+n+"]("+t+e+")"}};E.referenceLink={filter:function(n,r){return r.linkStyle==="referenced"&&n.nodeName==="A"&&n.getAttribute("href")},replacement:function(n,r,t){var e=r.getAttribute("href");var i=d(r.getAttribute("title"));if(i)i=' "'+i+'"';var u;var f;switch(t.linkReferenceStyle){case"collapsed":u="["+n+"][]";f="["+n+"]: "+e+i;break;case"shortcut":u="["+n+"]";f="["+n+"]: "+e+i;break;default:var a=this.references.length+1;u="["+n+"]["+a+"]";f="["+a+"]: "+e+i}this.references.push(f);return u},references:[],append:function(n){var r="";if(this.references.length){r="\n\n"+this.references.join("\n")+"\n\n";this.references=[]}return r}};E.emphasis={filter:["em","i"],replacement:function(n,r,t){if(!n.trim())return"";return t.emDelimiter+n+t.emDelimiter}};E.strong={filter:["strong","b"],replacement:function(n,r,t){if(!n.trim())return"";return t.strongDelimiter+n+t.strongDelimiter}};E.code={filter:function(n){var r=n.previousSibling||n.nextSibling;var t=n.parentNode.nodeName==="PRE"&&!r;return n.nodeName==="CODE"&&!t},replacement:function(n){if(!n)return"";n=n.replace(/\r?\n|\r/g," ");var r=/^`|^ .*?[^ ].* $|`$/.test(n)?" ":"";var t="`";var e=n.match(/`+/gm)||[];while(e.indexOf(t)!==-1)t=t+"`";return t+r+n+r+t}};E.image={filter:"img",replacement:function(n,r){var t=d(r.getAttribute("alt"));var e=r.getAttribute("src")||"";var i=d(r.getAttribute("title"));var u=i?' "'+i+'"':"";return e?"!["+t+"]"+"("+e+u+")":""}};function d(n){return n?n.replace(/(\n+\s*)+/g,"\n"):""}function p(n){this.options=n;this._keep=[];this._remove=[];this.blankRule={replacement:n.blankReplacement};this.keepReplacement=n.keepReplacement;this.defaultRule={replacement:n.defaultReplacement};this.array=[];for(var r in n.rules)this.array.push(n.rules[r])}p.prototype={add:function(n,r){this.array.unshift(r)},keep:function(n){this._keep.unshift({filter:n,replacement:this.keepReplacement})},remove:function(n){this._remove.unshift({filter:n,replacement:function(){return""}})},forNode:function(n){if(n.isBlank)return this.blankRule;var r;if(r=A(this.array,n,this.options))return r;if(r=A(this._keep,n,this.options))return r;if(r=A(this._remove,n,this.options))return r;return this.defaultRule},forEach:function(n){for(var r=0;r<this.array.length;r++)n(this.array[r],r)}};function A(n,r,t){for(var e=0;e<n.length;e++){var i=n[e];if(R(i,r,t))return i}return void 0}function R(n,r,t){var e=n.filter;if(typeof e==="string"){if(e===r.nodeName.toLowerCase())return true}else if(Array.isArray(e)){if(e.indexOf(r.nodeName.toLowerCase())>-1)return true}else if(typeof e==="function"){if(e.call(n,r,t))return true}else{throw new TypeError("`filter` needs to be a string, array, or function")}}function T(n){var r=n.element;var t=n.isBlock;var e=n.isVoid;var i=n.isPre||function(n){return n.nodeName==="PRE"};if(!r.firstChild||i(r))return;var u=null;var f=false;var a=null;var o=O(a,r,i);while(o!==r){if(o.nodeType===3||o.nodeType===4){var c=o.data.replace(/[ \r\n\t]+/g," ");if((!u||/ $/.test(u.data))&&!f&&c[0]===" "){c=c.substr(1)}if(!c){o=D(o);continue}o.data=c;u=o}else if(o.nodeType===1){if(t(o)||o.nodeName==="BR"){if(u){u.data=u.data.replace(/ $/,"")}u=null;f=false}else if(e(o)||i(o)){u=null;f=true}else if(u){f=false}}else{o=D(o);continue}var l=O(a,o,i);a=o;o=l}if(u){u.data=u.data.replace(/ $/,"");if(!u.data){D(u)}}}function D(n){var r=n.nextSibling||n.parentNode;n.parentNode.removeChild(n);return r}function O(n,r,t){if(n&&n.parentNode===r||t(r)){return r.nextSibling||r.parentNode}return r.firstChild||r.nextSibling||r.parentNode}var w=typeof window!=="undefined"?window:{};function y(){var n=w.DOMParser;var r=false;try{if((new n).parseFromString("","text/html")){r=true}}catch(n){}return r}function I(){var n=function(){};{if(S()){n.prototype.parseFromString=function(n){var r=new window.ActiveXObject("htmlfile");r.designMode="on";r.open();r.write(n);r.close();return r}}else{n.prototype.parseFromString=function(n){var r=document.implementation.createHTMLDocument("");r.open();r.write(n);r.close();return r}}}return n}function S(){var n=false;try{document.implementation.createHTMLDocument("").open()}catch(r){if(w.ActiveXObject)n=true}return n}var C=y()?w.DOMParser:I();function N(n,r){var t;if(typeof n==="string"){var e=L().parseFromString('<x-turndown id="turndown-root">'+n+"</x-turndown>","text/html");t=e.getElementById("turndown-root")}else{t=n.cloneNode(true)}T({element:t,isBlock:a,isVoid:c,isPre:r.preformattedCode?M:null});return t}var H;function L(){H=H||new C;return H}function M(n){return n.nodeName==="PRE"||n.nodeName==="CODE"}function P(n,r){n.isBlock=a(n);n.isCode=n.nodeName==="CODE"||n.parentNode.isCode;n.isBlank=$(n);n.flankingWhitespace=B(n,r);return n}function $(n){return!c(n)&&!v(n)&&/^\s*$/i.test(n.textContent)&&!l(n)&&!h(n)}function B(n,r){if(n.isBlock||r.preformattedCode&&n.isCode){return{leading:"",trailing:""}}var t=b(n.textContent);if(t.leadingAscii&&k("left",n,r)){t.leading=t.leadingNonAscii}if(t.trailingAscii&&k("right",n,r)){t.trailing=t.trailingNonAscii}return{leading:t.leading,trailing:t.trailing}}function b(n){var r=n.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:r[1],leadingAscii:r[2],leadingNonAscii:r[3],trailing:r[4],trailingNonAscii:r[5],trailingAscii:r[6]}}function k(n,r,t){var e;var i;var u;if(n==="left"){e=r.previousSibling;i=/ $/}else{e=r.nextSibling;i=/^ /}if(e){if(e.nodeType===3){u=i.test(e.nodeValue)}else if(t.preformattedCode&&e.nodeName==="CODE"){u=false}else if(e.nodeType===1&&!a(e)){u=i.test(e.textContent)}}return u}var F=Array.prototype.reduce;var U=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function x(n){if(!(this instanceof x))return new x(n);var t={rules:E,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:false,blankReplacement:function(n,r){return r.isBlock?"\n\n":""},keepReplacement:function(n,r){return r.isBlock?"\n\n"+r.outerHTML+"\n\n":r.outerHTML},defaultReplacement:function(n,r){return r.isBlock?"\n\n"+n+"\n\n":n}};this.options=r({},t,n);this.rules=new p(this.options)}x.prototype={turndown:function(n){if(!_(n)){throw new TypeError(n+" is not a string, or an element/document/fragment node.")}if(n==="")return"";var r=G.call(this,new N(n,this.options));return V.call(this,r)},use:function(n){if(Array.isArray(n)){for(var r=0;r<n.length;r++)this.use(n[r])}else if(typeof n==="function"){n(this)}else{throw new TypeError("plugin must be a Function or an Array of Functions")}return this},addRule:function(n,r){this.rules.add(n,r);return this},keep:function(n){this.rules.keep(n);return this},remove:function(n){this.rules.remove(n);return this},escape:function(n){return U.reduce((function(n,r){return n.replace(r[0],r[1])}),n)}};function G(n){var r=this;return F.call(n.childNodes,(function(n,t){t=new P(t,r.options);var e="";if(t.nodeType===3){e=t.isCode?t.nodeValue:r.escape(t.nodeValue)}else if(t.nodeType===1){e=K.call(r,t)}return Y(n,e)}),"")}function V(n){var r=this;this.rules.forEach((function(t){if(typeof t.append==="function"){n=Y(n,t.append(r.options))}}));return n.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function K(n){var r=this.rules.forNode(n);var t=G.call(this,n);var e=n.flankingWhitespace;if(e.leading||e.trailing)t=t.trim();return e.leading+r.replacement(t,n,this.options)+e.trailing}function Y(n,r){var t=i(n);var u=e(r);var f=Math.max(n.length-t.length,r.length-u.length);var a="\n\n".substring(0,f);return t+a+u}function _(n){return n!=null&&(typeof n==="string"||n.nodeType&&(n.nodeType===1||n.nodeType===9||n.nodeType===11))}var q=new x;var Q=n("c",(function(n){var r=q.turndown(n);var t=r.replace(/^\#+\s+/gm,"").trim();if(!t){return[]}var e=t.split(/[\n\r]+/gm);return e}))}}}));
@@ -1 +1 @@
1
- import{r as o,c as e,h as t,F as s,H as i}from"./p-ab41bab5.js";import{l as a,t as n,d as l}from"./p-09aabce0.js";import{z as r}from"./p-b2a0ab4a.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{h as c,T as m,D as g}from"./p-eea7ac64.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-6b361d2b.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',z='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=a.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{const o=a.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e?n("Spend up to [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend up to [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${n("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${n("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`]:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${n("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${n("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:n("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${n("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:n("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${n("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:n("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:n("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:n("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:n("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=()=>{const o=this.getDutyMessage(),e=this.getTaxMessage(),i=this.getInclusivePriceMessage();if(c()&&i)switch(i.inclusiveType){case"DUTIES_FEES":return t(s,null,i.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:z}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},i.message)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:w}),t("zonos-text",{"aria-label":"Tax de minimis message"},e)));case"TAXES":return t(s,null,i.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:z}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},i.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:z}),t("zonos-text",null,i.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:w}),t("zonos-text",{"aria-label":"Tax de minimis message"},e)))},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(a.countryLandedCost);default:return f.includes(a.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(a.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=a,s=this.getAdditionalDutyTaxMessage(),l=this.animateFromLeftOverride||this.dialogRef&&u(this.dialogRef),c=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:m}=a,g=n("Welcome to [storeName]",{storeName:r.organizationName}),f=(null===(o=m.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),b=h(f),p=this.getCurrentPageEnum(),z=m.filter((o=>o.pageName===p));return t(i,{key:"9012938ffc3ab002bac78479cbcf4063526cf562",class:"zonos--elements"},t("div",{key:"ec6c5429694e4d18abf240c5de950b0da33ca846",class:d(["zonos--hello-dialog",l&&"zonos--hello-dialog-animate-from-left",c&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"cb64ca4f4474e06f728eec751f3c7c7fae578d26"},t("div",{key:"c062c2482ef59df6ef60e7ccfb1716cc0cf2a19d",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"c36de505068bd2c4b520a20ca7110a7bd46e749d",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"85d246bab229099324507799eb8f771795ea92e0",spacing:24},t("zonos-country-flag",{key:"602b68614bdee4120900ed184941adc4ffa40619",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"3994f7ec81cfe691f6b5f8ce83391922966a7700",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"48c7e9bf22dd30eb089b7b25a99d908dbed5966f",type:"boldSubheader"},g),t("zonos-text",{key:"d590b3ed499b456134720ef73a965a5a552da80f",innerHTML:b,textColor:"gray-800"})),t("zonos-v-stack",{key:"8bce397c8522031d46b8e6efc38986af5645c3ee",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"0772e7dc4499423f3a379a2cfc0b28dd23ec137e",spacing:"12px"},t("zonos-v-stack",{key:"ea421af6bc847eaece471f557d2d0ee1815d14bf",spacing:12},this.renderHelloMessage(),null==s?void 0:s.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"6eed9e71407e1351053abd4a2e1b4aae75b12044",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"cb9d77a61c481100fe21714bec8d062ffaa8f974"},t("zonos-country-select",{key:"d76ad3cdc005561e19d64502d4c2f02173929c22",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"f9bbf877aba822b04676039d07ebb752d07fd362"},t("zonos-language-select",{key:"3d96dd6902003adf96a2ce73f0405e112a04b380",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.style=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
1
+ import{r as o,d as e,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as n,t as a,d as l}from"./p-507f00d2.js";import{z as r}from"./p-058f6124.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{h as c,T as m,D as g}from"./p-f8f7d491.js";import{g as f}from"./p-5883217a.js";import{e as u}from"./p-6b361d2b.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',z='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',w='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=n.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...u].includes(o),this.getDutyMessage=()=>{const o=n.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return a("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e?a("Spend up to [threshold] duty free.",{threshold:e}):a("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return a("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend up to [threshold] tax free.",{threshold:e}):a("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${a("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:a("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${a("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:a("Learn more.")})}`]:[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${a("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${a("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:a("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${a("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:a("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${a("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:a("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=n.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:a("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:a("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:a("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=()=>{const o=this.getDutyMessage(),e=this.getTaxMessage(),i=this.getInclusivePriceMessage();if(c()&&i)switch(i.inclusiveType){case"DUTIES_FEES":return t(s,null,i.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:z}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},i.message)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:w}),t("zonos-text",{"aria-label":"Tax de minimis message"},e)));case"TAXES":return t(s,null,i.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:z}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},i.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:z}),t("zonos-text",null,i.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:w}),t("zonos-text",{"aria-label":"Tax de minimis message"},e)))},this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(n.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(n.countryLandedCost);default:return u.includes(n.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(n.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=n,s=this.getAdditionalDutyTaxMessage(),l=this.animateFromLeftOverride||this.dialogRef&&f(this.dialogRef),c=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:m}=n,g=a("Welcome to [storeName]",{storeName:r.organizationName}),u=(null===(o=m.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),b=h(u),p=this.getCurrentPageEnum(),z=m.filter((o=>o.pageName===p));return t(i,{key:"9012938ffc3ab002bac78479cbcf4063526cf562",class:"zonos--elements"},t("div",{key:"ec6c5429694e4d18abf240c5de950b0da33ca846",class:d(["zonos--hello-dialog",l&&"zonos--hello-dialog-animate-from-left",c&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"cb64ca4f4474e06f728eec751f3c7c7fae578d26"},t("div",{key:"c062c2482ef59df6ef60e7ccfb1716cc0cf2a19d",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"c36de505068bd2c4b520a20ca7110a7bd46e749d",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"85d246bab229099324507799eb8f771795ea92e0",spacing:24},t("zonos-country-flag",{key:"602b68614bdee4120900ed184941adc4ffa40619",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"3994f7ec81cfe691f6b5f8ce83391922966a7700",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"48c7e9bf22dd30eb089b7b25a99d908dbed5966f",type:"boldSubheader"},g),t("zonos-text",{key:"d590b3ed499b456134720ef73a965a5a552da80f",innerHTML:b,textColor:"gray-800"})),t("zonos-v-stack",{key:"8bce397c8522031d46b8e6efc38986af5645c3ee",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"0772e7dc4499423f3a379a2cfc0b28dd23ec137e",spacing:"12px"},t("zonos-v-stack",{key:"ea421af6bc847eaece471f557d2d0ee1815d14bf",spacing:12},this.renderHelloMessage(),null==s?void 0:s.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"6eed9e71407e1351053abd4a2e1b4aae75b12044",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"cb9d77a61c481100fe21714bec8d062ffaa8f974"},t("zonos-country-select",{key:"d76ad3cdc005561e19d64502d4c2f02173929c22",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"f9bbf877aba822b04676039d07ebb752d07fd362"},t("zonos-language-select",{key:"3d96dd6902003adf96a2ce73f0405e112a04b380",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.style=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
@@ -0,0 +1 @@
1
+ import{r as o,h as t,a as e,g as s}from"./p-ce75b047.js";import{z as n,f as r}from"./p-058f6124.js";import{i as a,a as i}from"./p-eef5b0cc.js";import{c as d}from"./p-b4b7f705.js";import{g as l}from"./p-f830f800.js";import{i as h}from"./p-ae393255.js";import{i as c}from"./p-67897a0d.js";import{s as b}from"./p-96d77739.js";import"./p-0a377722.js";const u=class{constructor(t){o(this,t),this.inheritedAttributes={},this.isDisabled=!1,this.icon=null,this.iconRight=!1,this.size="sm",this.variant="standard",this.noBackground=!1,this.withBoxShadow=!1,this.noPaddingLeft=!1,this.noPaddingRight=!1,this.loading=!1,this.justifyContent="center",this.bold=!1,this.hasIcon=!!this.icon,this.hasContent=!1,this.handleSlotChange=()=>{this.hasContent=!0},this.getColorVarProperty=o=>o.replace("var(","").replace(")",""),this.getButtonStyle=()=>{const o=this.variant||"standard",t=this.buttonColor&&h(this.buttonColor)?`var(--zonos-elements-${this.buttonColor})`:this.buttonColor,e=window.getComputedStyle(this.ele).getPropertyValue(this.getColorVarProperty(t||""))||t||"",s=!c(window.getComputedStyle(this.ele).getPropertyValue("--zonos-elements-gray-0")),r=!c(e),a=s&&!r||!s&&r;if("subtle"===o)return{color:t,useDarkHoverSubtle:a};{const o=(this.backgroundColor&&h(this.backgroundColor)?`var(--zonos-elements-${this.backgroundColor})`:this.backgroundColor)||n.appearance.colorSecondary,e=o&&h(this.getColorVarProperty(o))?window.getComputedStyle(this.ele).getPropertyValue(this.getColorVarProperty(o)):o;return{backgroundColor:o,color:"subtle"!==this.variant&&e&&c(e)?"white":t,spinnerColor:e&&c(e)?"white":"black",useDarkHoverSubtle:a}}}}iconChangeHandler(){this.hasIcon=!!this.icon}clickHandler(o){(this.loading||this.isDisabled)&&(o.preventDefault(),o.stopPropagation())}componentWillLoad(){this.iconChangeHandler(),this.inheritedAttributes=Object.assign(Object.assign({},a(this.ele)),i(this.ele,["tabindex","title","data-form-type","dir"]))}render(){const{backgroundColor:o,color:s,spinnerColor:a,useDarkHoverSubtle:i}=this.getButtonStyle(),u=this.loading||this.isDisabled,g=this.variant||"standard",m="standard"===g?(o=>{const t=o||n.appearance.colorSecondary,e=t&&h(t)?`var(--zonos-elements-${t})`:t;return e&&c(e)?"DARK":"LIGHT"})(o):void 0,v=l({overrideBorderStyle:this.borderStyle});return t(e,{key:"301c0140cae22157209423d34385103d9ea1cf29",class:d(["zonos--elements"]),"data-theme":this.theme||m,disabled:u,style:b({"--zonos--background-color":o,"--zonos--border-radius":v,"--zonos--color":s,"--zonos--font-family":r(),"--zonos--font-weight":this.bold?"bold":"normal"})},t("button",Object.assign({key:"2e3e75b8d0fd7c22c668972ad4a2f8bda363e159"},this.inheritedAttributes,{class:d([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",this.withBoxShadow&&"with-box-shadow",i&&"dark-hover-subtle",g,this.size,o&&"standard"===g&&"override-background"]),disabled:u,style:{justifyContent:this.justifyContent}}),this.loading&&t("div",{key:"f1965c769d9d1a2a7f636b09be1384cf7cd6227a",class:"zonos--spinner-wrapper"},t("zonos-spinner",{key:"5bbeb95041065e247ebc2f725f751e2fb5cd93c5",size:16,spinnerColor:a})),!this.loading&&!this.iconRight&&this.icon,t("slot",{key:"b32f5bd10dc79b258545efd92ed594a2906b3292",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))}static get delegatesFocus(){return!0}get ele(){return s(this)}static get watchers(){return{icon:["iconChangeHandler"]}}};u.style=":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{display:-ms-inline-flexbox;display:inline-flex;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--zonos-elements-radius-10);gap:8px}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--zonos-elements-surface-color);border:none;outline:1px solid var(--zonos-elements-surface-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-weight:var(--zonos--font-weight, 500);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--zonos--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:8px 24px;color:var(--zonos--color, var(--zonos-elements-gray-1000));margin:1px}:host button:not([disabled]):hover{background-image:var(--zonos-elements-button-standard-hover)}:host button:not([disabled]):active{background:var(--zonos-elements-gray-700)}:host button:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button.with-box-shadow{-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard)}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--zonos--background-color, var(--zonos-elements-gray-200))}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button{}:host button.sm{height:var(--zonos-elements-size-sm);line-height:var(--zonos-elements-size-sm);padding:4px 8px}:host button.sm:not(.has-content).has-icon{padding:0 4px}:host button.md{height:var(--zonos-elements-size-md);line-height:var(--zonos-elements-size-md);padding:8px 16px}:host button.md:not(.has-content).has-icon{padding:0 8px}:host button.lg{height:var(--zonos-elements-size-lg);line-height:var(--zonos-elements-size-lg);padding:12px 24px}:host button.lg:not(.has-content).has-icon{padding:0 16px}:host button:not(.only-icon).has-icon{gap:8px}@media (max-width: 400px){:host button:not(.only-icon).has-icon{font-size:var(--zonos-elements-font-size-s)}}:host button.override-background{background-color:var(--zonos--background-color, var(--zonos-elements-gray-0));color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:1px solid var(--zonos--background-color, var(--zonos-elements-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--zonos-elements-blue-600);outline:1px solid var(--zonos-elements-blue-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--zonos-elements-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--zonos-elements-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--zonos-elements-blue-600)}:host button:not(.override-background).success{background:var(--zonos-elements-green-600);outline:1px solid var(--zonos-elements-green-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--zonos-elements-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--zonos-elements-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--zonos-elements-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-green-400)}:host button:not(.override-background).danger{background:var(--zonos-elements-red-600);outline:1px solid var(--zonos-elements-red-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--zonos-elements-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--zonos-elements-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--zonos-elements-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-red-400)}:host button:not(.override-background).warning{background:var(--zonos-elements-orange-600);outline:1px solid var(--zonos-elements-orange-600);color:var(--zonos-elements-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--zonos-elements-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--zonos-elements-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--zonos-elements-focus-button);box-shadow:var(--zonos-elements-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--zonos-elements-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--zonos--color, var(--zonos-elements-gray-1000));outline:none}:host button:not(.override-background).subtle:not([disabled]):hover{background:rgba(0, 0, 0, 0.1)}:host button:not(.override-background).subtle:not([disabled]):active{background:rgba(0, 0, 0, 0.2)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--zonos-elements-button-focus-ring);box-shadow:var(--zonos-elements-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--zonos-elements-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--zonos-elements-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--zonos-elements-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--zonos-elements-gray-200)}:host .zonos--footer-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;border-radius:var(--zonos-elements-radius-4);width:24px}";const g=class{constructor(t){o(this,t),this.autoHeight=!1,this.iconColor="gray-1000",this.size=24}render(){if(!this.content||!this.el.shadowRoot)return null;const o=h(this.iconColor)?`var(--zonos-elements-${this.iconColor})`:this.iconColor;return this.el.shadowRoot.innerHTML=this.content,t(e,{class:"zonos--elements",style:{"--zonos--color":o,"--zonos--font-family":r(),"--zonos--height":this.autoHeight?"auto":`${this.size}px`,"--zonos--width":`${this.size}px`}})}get el(){return s(this)}};g.style=":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{display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--width);height:var(--zonos--height);fill:var(--zonos--color);color:var(--zonos--color)}";const m=class{constructor(t){o(this,t),this.size=32}render(){return this.el.shadowRoot?t(e,{class:d(["zonos--elements",this.spinnerColor]),style:{"--zonos--size":`${this.size}px`}},t("svg",{viewBox:"0 0 50 50"},t("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),t("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}))):null}get el(){return s(this)}};m.style=":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{position:relative;overflow:hidden;width:var(--zonos--size);height:var(--zonos--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--zonos--size);height:var(--zonos--size);stroke:var(--zonos-elements-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--zonos-elements-gray-200)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}:host(.black) circle{stroke:var(--zonos-elements-spinner-stroke-black)}:host(.black) circle.track{stroke:var(--zonos-elements-spinner-track-black)}:host(.white) circle{stroke:var(--zonos-elements-spinner-stroke-white)}:host(.white) circle.track{stroke:var(--zonos-elements-spinner-track-white)}:host(.info) circle{stroke:var(--zonos-elements-blue-600)}:host(.info) circle.track{stroke:var(--zonos-elements-blue-100)}:host(.success) circle{stroke:var(--zonos-elements-green-600)}:host(.success) circle.track{stroke:var(--zonos-elements-green-100)}:host(.danger) circle{stroke:var(--zonos-elements-red-600)}:host(.danger) circle.track{stroke:var(--zonos-elements-red-100)}:host(.warning) circle{stroke:var(--zonos-elements-orange-600)}:host(.warning) circle.track{stroke:var(--zonos-elements-orange-100)}";export{u as zonos_button,g as zonos_icon,m as zonos_spinner}