@zonos/elements 1.3.138 → 1.3.140

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 (235) hide show
  1. package/dist/cjs/{cart-efd80d55.js → cart-e1b59d03.js} +280 -41
  2. package/dist/cjs/index.cjs.js +12 -13
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{paypal-50e03778.js → paypal-86cc51e4.js} +13 -1
  5. package/dist/cjs/zonos-address_7.cjs.entry.js +10 -10
  6. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  7. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  8. package/dist/cjs/zonos-card.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +94 -26
  10. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
  11. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -9
  16. package/dist/cjs/zonos-elements.cjs.js +1 -1
  17. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  18. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  20. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  21. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  23. package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
  24. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  27. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +19 -4
  28. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +24 -2
  29. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -2
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +23 -11
  31. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  32. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  33. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  34. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  35. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +11 -4
  36. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  37. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  38. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
  39. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  40. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  41. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  42. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  43. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  44. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  45. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  46. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  47. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  48. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  49. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  50. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  51. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  52. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
  53. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  54. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  55. package/dist/collection/components/main/zonos-controller.js +1 -1
  56. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  57. package/dist/collection/components/store/checkout/paypal.js +14 -1
  58. package/dist/collection/components/store/checkout/stripe.js +9 -0
  59. package/dist/collection/components/store/hello/localization.js +3 -1
  60. package/dist/collection/components/store/translationStore/strings.arabic.js +11 -2
  61. package/dist/collection/components/store/translationStore/strings.base.js +11 -2
  62. package/dist/collection/components/store/translationStore/strings.chinese.js +11 -2
  63. package/dist/collection/components/store/translationStore/strings.danish.js +11 -2
  64. package/dist/collection/components/store/translationStore/strings.dutch.js +11 -2
  65. package/dist/collection/components/store/translationStore/strings.french.js +11 -2
  66. package/dist/collection/components/store/translationStore/strings.german.js +11 -2
  67. package/dist/collection/components/store/translationStore/strings.hebrew.js +11 -2
  68. package/dist/collection/components/store/translationStore/strings.indonesian.js +11 -2
  69. package/dist/collection/components/store/translationStore/strings.italian.js +11 -2
  70. package/dist/collection/components/store/translationStore/strings.japanese.js +11 -2
  71. package/dist/collection/components/store/translationStore/strings.korean.js +11 -2
  72. package/dist/collection/components/store/translationStore/strings.norwegian.js +11 -2
  73. package/dist/collection/components/store/translationStore/strings.polish.js +11 -2
  74. package/dist/collection/components/store/translationStore/strings.portuguese.js +11 -2
  75. package/dist/collection/components/store/translationStore/strings.russian.js +11 -2
  76. package/dist/collection/components/store/translationStore/strings.spanish.js +11 -2
  77. package/dist/collection/components/store/translationStore/strings.swedish.js +11 -2
  78. package/dist/collection/components/store/translationStore/strings.turkish.js +11 -2
  79. package/dist/collection/components/store/translationStore/strings.vietnamese.js +11 -2
  80. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  81. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +2 -2
  82. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  83. package/dist/collection/components/utils/api/getCheckoutSession.js +14 -0
  84. package/dist/collection/components/utils/resetToSelectedTab.js +17 -0
  85. package/dist/collection/components/utils/validateCheckoutSession.js +39 -0
  86. package/dist/collection/scripts/_zonosBase.js +5 -6
  87. package/dist/esm/{cart-f0bf7202.js → cart-709f053f.js} +281 -43
  88. package/dist/esm/index.js +12 -13
  89. package/dist/esm/loader.js +1 -1
  90. package/dist/esm/{paypal-65d40ba3.js → paypal-77a60c44.js} +13 -1
  91. package/dist/esm/zonos-address_7.entry.js +10 -10
  92. package/dist/esm/zonos-badge.entry.js +3 -3
  93. package/dist/esm/zonos-button_3.entry.js +3 -3
  94. package/dist/esm/zonos-card.entry.js +4 -4
  95. package/dist/esm/zonos-cart-items_13.entry.js +94 -26
  96. package/dist/esm/zonos-checkout.entry.js +5 -3
  97. package/dist/esm/zonos-collapse.entry.js +2 -2
  98. package/dist/esm/zonos-component.entry.js +1 -1
  99. package/dist/esm/zonos-controller.entry.js +2 -2
  100. package/dist/esm/zonos-country-flag.entry.js +1 -1
  101. package/dist/esm/zonos-country-select_4.entry.js +9 -9
  102. package/dist/esm/zonos-elements.js +1 -1
  103. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  104. package/dist/esm/zonos-hello.entry.js +2 -2
  105. package/dist/esm/zonos-input.entry.js +4 -4
  106. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  107. package/dist/esm/zonos-link.entry.js +1 -1
  108. package/dist/esm/zonos-logo.entry.js +2 -2
  109. package/dist/esm/zonos-notification_3.entry.js +4 -4
  110. package/dist/esm/zonos-toggle.entry.js +2 -2
  111. package/dist/esm/zonos-tooltip.entry.js +2 -2
  112. package/dist/esm/zonos-v-stack.entry.js +2 -2
  113. package/dist/esm-es5/cart-709f053f.js +1 -0
  114. package/dist/esm-es5/index.js +1 -1
  115. package/dist/esm-es5/loader.js +1 -1
  116. package/dist/esm-es5/paypal-77a60c44.js +17 -0
  117. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  118. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  119. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  120. package/dist/esm-es5/zonos-card.entry.js +1 -1
  121. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  122. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  123. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  124. package/dist/esm-es5/zonos-component.entry.js +1 -1
  125. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  126. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  127. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  128. package/dist/esm-es5/zonos-elements.js +1 -1
  129. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  130. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  131. package/dist/esm-es5/zonos-input.entry.js +1 -1
  132. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  133. package/dist/esm-es5/zonos-link.entry.js +1 -1
  134. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  135. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  136. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  137. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  138. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  139. package/dist/scripts/index.js +1 -1
  140. package/dist/scripts/loadZonos.js +1 -1
  141. package/dist/scripts/zonos.js +1 -1
  142. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +6 -0
  143. package/dist/types/components/store/checkout/stripe.d.ts +4 -0
  144. package/dist/types/components/store/translationStore/strings.arabic.d.ts +10 -1
  145. package/dist/types/components/store/translationStore/strings.base.d.ts +10 -1
  146. package/dist/types/components/store/translationStore/strings.chinese.d.ts +10 -1
  147. package/dist/types/components/store/translationStore/strings.danish.d.ts +10 -1
  148. package/dist/types/components/store/translationStore/strings.dutch.d.ts +10 -1
  149. package/dist/types/components/store/translationStore/strings.french.d.ts +10 -1
  150. package/dist/types/components/store/translationStore/strings.german.d.ts +10 -1
  151. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +10 -1
  152. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +10 -1
  153. package/dist/types/components/store/translationStore/strings.italian.d.ts +10 -1
  154. package/dist/types/components/store/translationStore/strings.japanese.d.ts +10 -1
  155. package/dist/types/components/store/translationStore/strings.korean.d.ts +10 -1
  156. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +10 -1
  157. package/dist/types/components/store/translationStore/strings.polish.d.ts +10 -1
  158. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +10 -1
  159. package/dist/types/components/store/translationStore/strings.russian.d.ts +10 -1
  160. package/dist/types/components/store/translationStore/strings.spanish.d.ts +10 -1
  161. package/dist/types/components/store/translationStore/strings.swedish.d.ts +10 -1
  162. package/dist/types/components/store/translationStore/strings.turkish.d.ts +10 -1
  163. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +10 -1
  164. package/dist/types/components/store/translationStore.d.ts +1 -1
  165. package/dist/types/components/utils/api/getCheckoutSession.d.ts +9 -0
  166. package/dist/types/components/utils/resetToSelectedTab.d.ts +12 -0
  167. package/dist/types/components/utils/validateCheckoutSession.d.ts +9 -0
  168. package/dist/types/types/checkout/api/CheckoutSession.d.ts +5 -1
  169. package/dist/types/types/generated/graphql.internal.types.d.ts +112 -0
  170. package/dist/types/types/generated/graphql.internal.types.ts +102 -1
  171. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  172. package/dist/zonos-elements/index.esm.js +1 -1
  173. package/dist/zonos-elements/{p-bbd5119f.entry.js → p-00d4bff1.entry.js} +1 -1
  174. package/dist/zonos-elements/p-010f5797.system.entry.js +1 -0
  175. package/dist/zonos-elements/{p-7b34be6e.system.entry.js → p-01ad5be8.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-856bf7a4.entry.js → p-04a6a167.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-b500f0d1.system.entry.js → p-0aee2e4c.system.entry.js} +1 -1
  178. package/dist/zonos-elements/p-0c027d2e.entry.js +1 -0
  179. package/dist/zonos-elements/{p-59d0f69b.system.entry.js → p-1c4ff7b2.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-1af0a800.system.entry.js → p-22d69480.system.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-d2a77699.system.entry.js → p-25c7e4fa.system.entry.js} +1 -1
  182. package/dist/zonos-elements/p-26b24d0b.system.js +1 -0
  183. package/dist/zonos-elements/{p-ba26fc96.system.entry.js → p-289ded20.system.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-c9c4e557.entry.js → p-35b8dcde.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-acae88db.entry.js → p-3a26cae5.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-1360c4b5.system.entry.js → p-3dd503fd.system.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-24488838.system.entry.js → p-4319600a.system.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-1393d259.system.entry.js → p-461624ce.system.entry.js} +1 -1
  189. package/dist/zonos-elements/p-49e4ca08.system.entry.js +1 -0
  190. package/dist/zonos-elements/{p-e44ab8b8.entry.js → p-5c32689e.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-47efac28.system.entry.js → p-64a04391.system.entry.js} +1 -1
  192. package/dist/zonos-elements/p-6b0aa1bb.system.js +17 -0
  193. package/dist/zonos-elements/{p-22d099fb.system.entry.js → p-7a60deef.system.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-84df573a.entry.js → p-7acf6802.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-f9f48476.entry.js → p-7ef573f0.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-37a127fc.entry.js → p-8368a79e.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-5775cd68.system.entry.js → p-87ed2e17.system.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-1ac0f941.system.entry.js → p-896ab1ed.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-c48e735d.system.entry.js → p-896d62a4.system.entry.js} +1 -1
  200. package/dist/zonos-elements/p-8f9affb3.system.entry.js +1 -0
  201. package/dist/zonos-elements/{p-234b3f74.entry.js → p-9589bd08.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-22e2f162.entry.js → p-9b59704a.entry.js} +1 -1
  203. package/dist/zonos-elements/p-a58731ec.system.js +1 -0
  204. package/dist/zonos-elements/{p-bad5200e.entry.js → p-ad1d6ea2.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-b9e4e410.entry.js → p-ad4bc6a2.entry.js} +1 -1
  206. package/dist/zonos-elements/p-afffdfc2.js +1 -0
  207. package/dist/zonos-elements/{p-4ab4ba81.entry.js → p-b832ec52.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-f0ce4d90.entry.js → p-b9efc660.entry.js} +1 -1
  209. package/dist/zonos-elements/p-be2feba6.entry.js +1 -0
  210. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  211. package/dist/zonos-elements/{p-a0cc4dd2.entry.js → p-cd1fd09e.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-52a5bd4c.system.entry.js → p-cf72603f.system.entry.js} +1 -1
  213. package/dist/zonos-elements/p-d35376d3.js +17 -0
  214. package/dist/zonos-elements/{p-95f26bc3.entry.js → p-d633ced9.entry.js} +1 -1
  215. package/dist/zonos-elements/p-e6c31531.entry.js +1 -0
  216. package/dist/zonos-elements/{p-de020c11.system.entry.js → p-ee1e1d94.system.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-be468605.system.entry.js → p-f07c01c5.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-8880d648.entry.js → p-f2867195.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-b088f65a.entry.js → p-f8ca3e71.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-c0719959.system.entry.js → p-ffe4a999.system.entry.js} +1 -1
  221. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  222. package/package.json +2 -1
  223. package/dist/esm-es5/cart-f0bf7202.js +0 -1
  224. package/dist/esm-es5/paypal-65d40ba3.js +0 -17
  225. package/dist/zonos-elements/p-09636917.js +0 -1
  226. package/dist/zonos-elements/p-128b1b70.system.entry.js +0 -1
  227. package/dist/zonos-elements/p-31a776aa.system.entry.js +0 -1
  228. package/dist/zonos-elements/p-4628832d.system.js +0 -1
  229. package/dist/zonos-elements/p-58983c97.entry.js +0 -1
  230. package/dist/zonos-elements/p-6e24b0cf.system.js +0 -17
  231. package/dist/zonos-elements/p-845ad2b8.js +0 -17
  232. package/dist/zonos-elements/p-8e25910c.entry.js +0 -1
  233. package/dist/zonos-elements/p-b6005449.system.entry.js +0 -1
  234. package/dist/zonos-elements/p-c5bff157.entry.js +0 -1
  235. package/dist/zonos-elements/p-e309e4a3.system.js +0 -1
@@ -1 +1 @@
1
- import{r as o,c as e,h as t,F as s,H as i}from"./p-5b7da777.js";import{q as n,l as a,I as l}from"./p-09636917.js";import{z as r}from"./p-edc16f69.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as c}from"./p-5883217a.js";import"./p-860e46ab.js";import"./p-10d6fe23.js";import"./p-d10ffd69.js";const m=`${n("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${(({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`)({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`,f=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),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.hasInclusivePrices=()=>{var o;return"ENABLED"===(null===(o=a.inclusivePricing)||void 0===o?void 0:o.status)},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>this.hasInclusivePrices()?[m]:[n("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:100*o.vatTaxRate+"%"}),m],this.getNewZealandDutyTaxMessge=o=>this.hasInclusivePrices()?null:[n("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:l({amount:o.vatTaxDeminimus})})],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricing;return"ENABLED"!==(null==o?void 0:o.status)?null:"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status?n("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status?n("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status?n("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.fee.status?n("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions."):null},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);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=a,l=this.hasInclusivePrices(),m=this.getInclusivePriceMessage(),f=this.getDutyMessage(),g=this.getTaxMessage(),u=this.getAdditionalDutyTaxMessage(),p=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef),b=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:w}=a,x=n("Welcome to [storeName]",{storeName:r.organizationName}),C=(null===(o=w.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!"),z=h(C),v=this.getCurrentPageEnum(),y=w.filter((o=>o.pageName===v));return t(i,{key:"7ff123654399aee05fd295c108e01d924a8964e5",class:"zonos--elements"},t("div",{key:"316720cc18d1b9fbbf86cbfcde1f25106b1197e8",class:d(["zonos--hello-dialog",p&&"zonos--hello-dialog-animate-from-left",b&&"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:"29a0018c2c8eb7fdde938e432ea783517d364ea8"},t("div",{key:"a882452996503ddb4feb3e431eaf9cc14dc2ff34",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"2c656e792daa59c0ce5770d71a779de270a8adc8",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:"1dd3473645c5581fee41da086a478b6eb6f3104e",spacing:24},t("zonos-country-flag",{key:"57bdcb6b5e2044b65868a53e91220b7eea5c389e",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"8f01898edbd5c30771a2c8d12e0919f6b41cc96c",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"75728fcc40efe82ff58e767b3c3c9f60f96f37b2",type:"boldSubheader"},x),t("zonos-text",{key:"b82ebf2adacbb72637064b04957846ee79f10bd5",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"7a0ae96961883e1a55248d4163da3bed2e76d077",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:"d6a1f8270f3b6c69febc04224e6a0fa7ada5e07a",spacing:"12px"},t("zonos-v-stack",{key:"209eac48b847c3ac4c7e8eb9df35c95416d89536",spacing:12},l?t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<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>'}),t("zonos-text",null,m)):t(s,null,t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<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'}),t("zonos-text",null,f)),t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis",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="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'}),t("zonos-text",null,g))),null==u?void 0:u.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",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",{innerHTML:o})))))),y.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:"e9444ec1c3c3616712faeba92734b4275d373da1",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"a612e3daa6de5e5f73422ed8ebed8b3a682c3c46"},t("zonos-country-select",{key:"b45c18d7feaf95e74da6e0540ea28325a24d287b",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"e50779d3c0e3c83587ae445e9ded8e108f893e31"},t("zonos-language-select",{key:"b502cef6095a0e9a57b3c81fa354ca3614060878",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};f.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:1001}: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:calc(100% - 32px);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}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{f as zonos_hello_dialog}
1
+ import{r as o,c as e,h as t,F as s,H as i}from"./p-5b7da777.js";import{q as n,l as a,J as l}from"./p-afffdfc2.js";import{z as r}from"./p-edc16f69.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as c}from"./p-5883217a.js";import"./p-860e46ab.js";import"./p-10d6fe23.js";import"./p-d10ffd69.js";const f=`${n("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${(({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`)({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`,m=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),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.hasInclusivePrices=()=>{var o;return"ENABLED"===(null===(o=a.inclusivePricing)||void 0===o?void 0:o.status)},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a,e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>this.hasInclusivePrices()?[f]:[n("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.",{percentage:100*o.vatTaxRate+"%"}),f],this.getNewZealandDutyTaxMessge=o=>this.hasInclusivePrices()?null:[n("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:l({amount:o.vatTaxDeminimus})})],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricing;return"ENABLED"!==(null==o?void 0:o.status)?null:"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.tax.status?n("Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status&&"INCLUDED"===o.fee.status?n("Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status&&"INCLUDED"===o.fee.status?n("Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions."):"INCLUDED"===o.duty.status?n("Product prices already include duties. No additional duties will be added at checkout, with rare exceptions."):"INCLUDED"===o.tax.status?n("Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions."):"INCLUDED"===o.fee.status?n("Product prices already include fees. No additional fees will be added at checkout, with rare exceptions."):null},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);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=a,l=this.hasInclusivePrices(),f=this.getInclusivePriceMessage(),m=this.getDutyMessage(),g=this.getTaxMessage(),u=this.getAdditionalDutyTaxMessage(),b=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef),p=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:w}=a,x=n("Welcome to [storeName]",{storeName:r.organizationName}),C=(null===(o=w.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!"),z=h(C),v=this.getCurrentPageEnum(),y=w.filter((o=>o.pageName===v));return t(i,{key:"25f0055cadd0b38a8374cdb0c981124d569ae9df",class:"zonos--elements"},t("div",{key:"7c04c71c7926d0bc64499f9c124464087d19570d",class:d(["zonos--hello-dialog",b&&"zonos--hello-dialog-animate-from-left",p&&"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:"b4ad9c5eb5893ecd553b1bed056810bd8d69c3ca"},t("div",{key:"bd442c14e751180b3dded8d415662eb456b5b5fd",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"2d0f6d48e91c1897ca6ab442e8bff7efefd76920",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:"eb19103741ccbced87f11d800a8c9439f692fcfd",spacing:24},t("zonos-country-flag",{key:"50f7375b30576d69bb751de6b6ba6565f34e83aa",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"4e5eb35029bbafa1343d4b7b911dadfa77074be0",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"fc62525f1442ddb2ad98b8b4f5a4e874586ffa55",type:"boldSubheader"},x),t("zonos-text",{key:"b85a16aacba64bdc477102d87e76071312395128",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"9cff07928aeadaccdb5d9c906125f603281d3bb1",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:"e3a98411ec2be35dfbe3e9a2a5945851697da7ad",spacing:"12px"},t("zonos-v-stack",{key:"09cd2bbbb94e819a272f3ef415bb9ace37111f04",spacing:12},l?t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<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>'}),t("zonos-text",null,f)):t(s,null,t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:'<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'}),t("zonos-text",null,m)),t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis",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="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'}),t("zonos-text",null,g))),null==u?void 0:u.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",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",{innerHTML:o})))))),y.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:"443975bc6a4355f49cde5513aa494f700e1eee98",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"a55ed373839ed80b449b9f6271ea19cf15124843"},t("zonos-country-select",{key:"e8fa0c5c6f36ebe67b84f692ad10a9a84305eba5",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7bd9d8836c876049d190aaa1bbf3ddea04139090"},t("zonos-language-select",{key:"15002ebf92828cd52881f30ddb639f704d074462",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};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 .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:1001}: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:calc(100% - 32px);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}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{m as zonos_hello_dialog}
@@ -1 +1 @@
1
- import{r as e,h as o,H as s}from"./p-5b7da777.js";import{T as t,q as a,l as n}from"./p-09636917.js";import{d as l}from"./p-edc16f69.js";import{l as i}from"./p-97aceb11.js";import"./p-860e46ab.js";import"./p-10d6fe23.js";import"./p-d10ffd69.js";const d=class{constructor(o){e(this,o),this.languageSelected=e=>{t(e),this.handleOnClose()},this.handleOnClose=()=>{}}render(){const{selectedLocale:e}=n;return o(s,{key:"38bd8435fdeb1a017b9ed7253d599b99f370a0b6",class:"zonos--elements",style:{"--zonos--font-family":l()}},o("div",{key:"c7cffeecf5da28e323f60a5b4e3b292cfbe900bc",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"331f76a0a0a57cbd9dbd282ba854956c183a75dd",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"15743243ddbfb50dd533cf91254d6e41db7597a5",class:"zonos--language-select-content"},i.map((s=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(s.code)},o("zonos-text",{textColor:"gray-800"},s.translatedLabel),s.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};d.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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const c=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(s,{key:"82ed89ddf7915df04bad887c887edb2cdd116ff8",class:"zonos--elements",style:{"--zonos--font-family":l()}},o("zonos-v-stack",{key:"6c91fb64db203a773f2fb375059173f2e0a4b7db",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"b26a23574556b119e27bf5fb0cb5308709b0eb73",class:"zonos--select-dialog-header"},o("zonos-text",{key:"3347503084cae69ccfca1fe5a503174e2acecc3c",type:"boldLabel"},this.label),o("zonos-button",{key:"66e91d6c0a46407cc88c4d269d880eaa27b650db",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select 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>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"2db7470d4893918939dd54d2f2e994f49517def9"})))}};c.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--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{d as zonos_language_select,c as zonos_select_dialog_header}
1
+ import{r as e,h as o,H as s}from"./p-5b7da777.js";import{U as t,q as a,l as n}from"./p-afffdfc2.js";import{d as l}from"./p-edc16f69.js";import{l as i}from"./p-97aceb11.js";import"./p-860e46ab.js";import"./p-10d6fe23.js";import"./p-d10ffd69.js";const d=class{constructor(o){e(this,o),this.languageSelected=e=>{t(e),this.handleOnClose()},this.handleOnClose=()=>{}}render(){const{selectedLocale:e}=n;return o(s,{key:"cc711dba7371852eab6e20994389ae3b95bb3be7",class:"zonos--elements",style:{"--zonos--font-family":l()}},o("div",{key:"47135e2b7363a3179139a7b8e23cb22435ce3299",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"3bf830e585fa6478f560c57dfa978721af47ad19",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"f693b231755087ec849f5a759b2dc43e2695b24f",class:"zonos--language-select-content"},i.map((s=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(s.code)},o("zonos-text",{textColor:"gray-800"},s.translatedLabel),s.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};d.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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const c=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(s,{key:"15035421483b079dde47eeb3ddcb4dcc6edffae4",class:"zonos--elements",style:{"--zonos--font-family":l()}},o("zonos-v-stack",{key:"bf1bbdb1bb8a62841616893d8e9005002772adc4",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"a2593795816ceb851489c386231a1b90e6dd6261",class:"zonos--select-dialog-header"},o("zonos-text",{key:"e91d4a54ac0deb073c30272c5e9626168fea52b7",type:"boldLabel"},this.label),o("zonos-button",{key:"e8fdf75686b33e9958f64925ddf95fb5c89d74bb",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select 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>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"ede6d09a4f6900419bf16df0ca8a2b79882bf266"})))}};c.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--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{d as zonos_language_select,c as zonos_select_dialog_header}
@@ -0,0 +1 @@
1
+ import{r as o,h as e,H as s,F as t}from"./p-5b7da777.js";import{l as n,s as i,a as c,b as r,c as a,i as d,d as h,e as l,f as u,g as m,h as z,j as p,k,m as g,n as w,t as f,o as b,p as v,q as y,r as C,u as x,v as S,w as O,x as A,y as I,z as T,A as j,B as D}from"./p-afffdfc2.js";import{p as B,s as P,a as L,b as E}from"./p-d35376d3.js";import{z as _,g as $,m as R}from"./p-edc16f69.js";import{h as U,l as N,a as H,s as M,g as F,b as W,j as Z}from"./p-860e46ab.js";import{g as q,c as G}from"./p-7b999a40.js";import{i as K}from"./p-81a54668.js";import{c as V}from"./p-b4b7f705.js";import{g as Y}from"./p-d10ffd69.js";import{i as Q}from"./p-10d6fe23.js";import{s as J}from"./p-96d77739.js";import{c as X,s as oo,d as eo}from"./p-b7307c61.js";import{R as so}from"./p-08e7107d.js";const to=o=>{const e=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:e}},no=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(o&&N("Checkout: not shippable country"),1)),io=()=>{const o="userAgentData"in window.navigator?window.navigator.userAgentData:null,e=(()=>{const o="connection"in window.navigator?window.navigator.connection:null,e="mozConnection"in window.navigator?window.navigator.mozConnection:null,s="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return o||e||s})();return{connectionDownlink:null==e?void 0:e.downlink,connectionEffectiveType:null==e?void 0:e.effectiveType,connectionRtt:null==e?void 0:e.rtt,connectionSaveData:null==e?void 0:e.saveData,userAgent:o&&o.brands.length>0?o:window.navigator.userAgent}},co='<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',ro=class{constructor(e){o(this,e),this.onChangeLocaleListener=()=>{},this.isRedirectAfterOrder=!1,this.applyStripeTheme=async()=>{var o,e,s,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||_.appearance.theme;await d({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:B()})},this.handleCartExpiredCheck=()=>{var o;if(q())return N("Not checking for cart expiration in test mode"),!1;if(!_.checkoutSettings.cartExpiration||!(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.createdAt))return!1;const e=new Date(window.Zonos.cartData.createdAt).getTime(),s=(new Date).getTime(),t=Math.floor((s-e)/6e4);return N(`Cart has been created for ${t} minutes`),!!(_.checkoutSettings.cartExpiration&&t>_.checkoutSettings.cartExpiration)&&(this.isCartExpired=!0,!0)},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${X}`),s=!!window.Zonos.cartData,t=new URL(window.location.href).searchParams,n=t.get("payment_intent_client_secret"),i=t.get("zonosCheckoutSessionId");if(!e)return N("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(N("Payment intent exist, checking stripe payment intent status"),!n)return N("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:s};const{error:c,status:r}=await h({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(N(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,l.checkoutSessionId=i,u.clientSecret=n,this.setToFinishStep(r),{shouldAllowOrder:!1}):s?(N("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(N("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(l.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.defaultAddressParams=null,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null}async initCartInfoHandler(o){m({adjustments:l.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,s;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,P("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||z(),l.step="customer-info",p(),k(),null===(s=(e=_.checkoutSettings).onClose)||void 0===s||s.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if(window.Zonos.cartData){if(N("tempCartUUID is provided, start building cart"),this.handleCartExpiredCheck())return;const{adjustments:o,cartItems:e}=to(window.Zonos.cartData);await m({adjustments:o,cartItems:e})}else if("function"==typeof _.checkoutSettings.createCartId){N('"createCartId" is provided, start building cart');const o=await _.checkoutSettings.createCartId();window.Zonos.cartId=o;const e=await oo(o),s=null==e?void 0:e.cartData;if(!s)return void H("Failed to build cart, please try again.");if(window.Zonos.cartData=s,this.handleCartExpiredCheck())return;const{adjustments:t,cartItems:n}=to(s);await m({adjustments:t,cartItems:n})}else if(_.checkoutSettings.buildCartDetail&&n.selectedCountryCode){N("build cart detail");const o=await _.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency}),e=o.filter((o=>o.amount>=0)),s=o.filter((o=>o.amount<0)).map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await m({adjustments:s,cartItems:e})}if(!u.clientSecret){const o=await g();if(N(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===_.checkoutSettings.successBehavior||!!l.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=Z(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;N(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const s=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>s)return N(`=== Existing placed order info is older than ${s}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,N("=== Showing order duplication confirmation","warn")}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,l.checkoutSessionId&&U("/api/zonos-elements/update-checkout-session-metadata",{body:{id:l.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=_.checkoutSettings.placeOrderButtonSelector;if(N(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const e=[o,`#${eo}`,`#${X}`].filter(Boolean);document.querySelectorAll(e.join(",")).forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(N(`attached event to button ${o}`,"info",{button:e}),e.addEventListener("click",(async o=>{var e;if(!window.Zonos.isLegacyCheckout&&(!no()||((o=!0)=>!n.localizationLoaded||!!n.isDisabledCountry&&(o&&N("Checkout: disabled country"),!0))()))return;o.preventDefault(),o.stopPropagation(),N("zonos checkout button clicked");const{shouldAllowOrder:s}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(s){u.isFetchingSession=!0,this.open=!0;try{const o=await this.buildCartAndInit();if(this.isCartExpired)throw new Error("This shopping cart is expired");if(!o)throw new Error("Error building cart");w({isPreview:this.preview,sessionTimeout:54e5});const{enabled:e}=await(async()=>{const{errors:o,json:e}=await U("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();l.shouldHideDiscountInput=!e,P("zonos-checkout-start"),f("checkout_open"),this.handleOrderDuplication(),window.Zonos.isLegacyCheckout&&(async()=>{const{elapsedTime:o}=F(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:W},io()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};U("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})()}catch(o){if(u.isFetchingSession=!1,H(o),this.isCartExpired)return;M({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:W,cartId:window.Zonos.cartId,checkoutSessionBody:b(),href:window.location.href,storeBaseUrl:null===(e=window.Zonos.cartData)||void 0===e?void 0:e.storeBaseUrl}}),v({messages:[y("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:y("Error creating Checkout")})}}}),{capture:!0,passive:!1}),_.checkoutSettings.disablePlaceOrderButtonActivation||e.removeAttribute("disabled"),e.setAttribute("data-zonos-checkout-attached","true"),e.matches(eo)&&(e.dispatchEvent(G("click")),r(),e.remove()),e.matches(`#${X}`)&&(e.dispatchEvent(G("click")),e.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);N("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const s=o.get(e);return s&&"undefined"!==s?s:null},s=C(o)||n.selectedCountryCode,t=e("customerCity"),i=e("customerEmail")||"",c=e("customerAddress1"),r=e("customerAddress2")||"",a=e("customerName"),d=e("customerPhone"),h=e("customerZip")||"",l=e("customerState")||"";c&&a&&d&&s?this.defaultAddressParams={address:{city:t||"",country:s,line1:c,line2:r,postal_code:h,state:l},email:i,name:a,phone:d}:N("Missing required query params so it can not be prefilled","info",[!c&&"line1",!a&&"name",!d&&"phone",!s&&"country"].filter(Boolean).join(", "))}async init(){u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const s=new MutationObserver((async()=>{const t=document.querySelector(o),n=i();if(!t&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(n),void s.disconnect()}const d=document.querySelector('select[name="shippingAddress.countryCode"]'),h=document.querySelector("#checkout-shipping-continue");d&&h&&(s.disconnect(),h.addEventListener("click",(async o=>{var e,s;const t=d.value;if(!t)return;if(c(t),!no(!1))return void r();const n=document.querySelector("form");if(!n)return;const i=new FormData(n),h=document.querySelector("input#addressLine1Input"),l={address1:null!==(e=i.get("shippingAddress.address1"))&&void 0!==e?e:h&&h.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(s=i.get("shippingAddress.stateOrProvince"))&&void 0!==s?s:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((o=>null==o)))return H("One or more shipping address field is missing",Object.entries(l)),void M({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{storeId:_.storeId}});a({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));s.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:eo,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(N("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):N("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){x(o)}async handleCustomerInfoContinue(){this.submitLoading=!0,await S();const o=setInterval((()=>{!l.landedCostData&&u.isFetchingLandedCost||(l.landedCostData&&(L({currency:l.currency}),O()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{O(),this.submitLoading=!1}),500)}handleInventoryCheckDialogConfirm(){l.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){E.paypalErrorMessage=null,u.hasPaymentError=!1,this.submitLoading=!0,l.inventoryCheckErrorMessage=null;try{l.inventoryCheckErrorMessage=await A()}catch(o){l.inventoryCheckErrorMessage=y("Unable to check inventory. Please try again.")}if(l.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await I(),O(),k()}catch(o){H(o),P("zonos-checkout-payment-fail"),u.hasPaymentError=!0,u.shouldInventoryRefund&&(T(),u.shouldInventoryRefund=!1)}this.submitLoading=!1}}async handleFinishClick(){if(j(),this.preview)return l.step="customer-info",void await this.init();if(z(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=K(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=K(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=$(this.appearanceSettingsOverride.theme))}handleAddressChange(){j()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,s=document.documentElement;if(this.open)e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",s.style.overflow&&s.setAttribute(o,s.style.overflow),s.style.overflow="hidden";else{const t=e.getAttribute(o),n=s.getAttribute(o);t?(e.removeAttribute(o),e.style.overflow=t):e.style.removeProperty("overflow"),n?(s.removeAttribute(o),s.style.overflow=n):s.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=K(this.mobile),this.isIframed=window.self!==window.top,N(`iframed: ${this.isIframed}`),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=D("selectedLocale",(()=>{this.applyStripeTheme()})),N(`mobile: ${this.isMobile}`)}disconnectedCallback(){j(),z(),this.onChangeLocaleListener()}render(){var o,i,c,r;const a="finish"!==l.step&&"error"!==l.step&&!u.stripeElements||u.isFetchingSession,{colorPrimary:d,colorSecondary:h,logoUrl:m,style:z}=R(_.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===_.appearance.zonosAttribution,k=_.appearance.theme,g=d&&Q(d)?"DARK":"LIGHT",w=this.isMobile?k:g,f=this.isMobile?void 0:h,{customMessages:b}=n,v=null===(o=b.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,C=this.getCurrentLocalePageEnum(),x=b.filter((o=>o.pageName===C)),S=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${_.organizationName} logo`,src:o}))},O=q(),A=()=>{const o=new URLSearchParams(window.location.search),s=o.get("zonosQaUrl"),t=o.get("zonosDebug"),n=o.get("zonosE2ETest");return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},S(),O&&e("zonos-badge",{badgeColor:"orange",size:"small"},y("Test mode")),"1"===t&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),s&&e("zonos-badge",{badgeColor:"purple",size:"small"},s),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),x.map((o=>e("zonos-custom-message",{icon:co,message:o.message}))))},I=()=>l.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:y("Your checkout session has expired. Please reload the page to continue."),restStateTitle:y("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},y("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":Y({overrideBorderStyle:z})}},"finish"!==l.step&&"error"!==l.step&&e(t,null,e("div",{class:"zonos--left","data-theme":w,style:J({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&A(),"customer-info"===l.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress||this.defaultAddressParams,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:f}),"shipping"===l.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:f}),"payment"===l.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:f})),e("div",{class:"zonos--right","data-theme":k},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:so}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:f}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:co,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:co,message:v}))))),("finish"===l.step||"error"===l.step)&&e("div",{class:"zonos--done","data-theme":k},e("div",{class:"zonos--header"},S(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:so}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:k})),e("zonos-checkout-finish",{borderRadius:z,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":k,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:V(["zonos--checkout zonos--elements",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed"])},this.preview?I():e("zonos-dialog",{borderStyle:z,"data-theme":k,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},I()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:y("Don't close"),dialogConfirmBtnText:y("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:y("Would you like to close checkout and return to the site?"),dialogTitle:y("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:y("Return to merchant site"),dialogConfirmBtnText:y("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(i=this.placedOrderInfo)||void 0===i?void 0:i.zonosOrderNumber)?y("It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):y("It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:y("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:y("Return to cart"),dialogIntent:"danger",dialogOpen:!!l.inventoryCheckErrorMessage,dialogSubtitle:l.inventoryCheckErrorMessage,dialogTitle:y("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:y("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:y("You are being sent back to the shop to re-add items to your cart."),dialogTitle:y("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],open:["handleOpenChange"]}}};ro.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{ro as zonos_checkout}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):n(e.value).then(r,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,i,n;return{setters:[function(t){o=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return o(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-128b1b70.system",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"open":["handleOpenChange"]}]]],["p-7b34be6e.system",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-59d0f69b.system",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-1360c4b5.system",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-1393d259.system",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-de020c11.system",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-be468605.system",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-c48e735d.system",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-1ac0f941.system",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-e205ef1c.system",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-c0719959.system",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-b500f0d1.system",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-5775cd68.system",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-22d099fb.system",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-47efac28.system",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-0fc96872.system",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-52a5bd4c.system",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-31a776aa.system",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-dc09df19.system",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-24488838.system",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-ba26fc96.system",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-1af0a800.system",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-d2a77699.system",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}]]],["p-b6005449.system",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):n(e.value).then(r,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(i=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{i=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,i,n;return{setters:[function(t){o=t.p;i=t.b;e("setNonce",t.s)},function(e){n=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return o(i)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:e.sent();return[2,i(JSON.parse('[["p-8f9affb3.system",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"open":["handleOpenChange"]}]]],["p-01ad5be8.system",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-1c4ff7b2.system",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-3dd503fd.system",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-461624ce.system",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-ee1e1d94.system",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-f07c01c5.system",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-896d62a4.system",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-896ab1ed.system",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-e205ef1c.system",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-ffe4a999.system",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-0aee2e4c.system",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-87ed2e17.system",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-7a60deef.system",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-64a04391.system",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-0fc96872.system",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-cf72603f.system",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-010f5797.system",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-dc09df19.system",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-4319600a.system",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-289ded20.system",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-22d69480.system",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-25c7e4fa.system",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}]]],["p-49e4ca08.system",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32],"hasStripePaymentError":[32]},null,{"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),t)]}}))}))}))}}}));
@@ -1 +1 @@
1
- import{r as o,h as t,H as s}from"./p-5b7da777.js";const e=class{constructor(t){o(this,t),this.href="",this.rel=void 0,this.target=void 0,this.linkTitle=void 0}render(){return t(s,{key:"9c08d2689b011f162ef47271bd50e9e1fc2d177f",class:"zonos--elements"},t("a",{key:"ad0a8003308783081a7070bb9f06cd2387bb3a78",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},t("slot",{key:"d54f21f0f36196b9b5a0bf7f63a989e9dd1c411e"})))}};e.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:inline-block}:host a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";export{e as zonos_link}
1
+ import{r as o,h as t,H as s}from"./p-5b7da777.js";const e=class{constructor(t){o(this,t),this.href="",this.rel=void 0,this.target=void 0,this.linkTitle=void 0}render(){return t(s,{key:"41f0a757a334338631250764599ac99e28c41ed2",class:"zonos--elements"},t("a",{key:"b6e84f40141e8de85d005c05426f885f242ffc53",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},t("slot",{key:"dd5ed33f163d7958fb7806992e003d2279ee1f5b"})))}};e.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:inline-block}:host a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";export{e as zonos_link}
@@ -1 +1 @@
1
- System.register(["./p-fd061229.system.js","./p-4628832d.system.js","./p-10efff62.system.js","./p-23e7c655.system.js","./p-febc72e7.system.js","./p-46a5ec52.system.js","./p-6b6cd6c3.system.js"],(function(t){"use strict";var s,o,n,e,i,a,h;return{setters:[function(t){s=t.r;o=t.h;n=t.H;e=t.d},function(t){i=t.l},function(t){a=t.d},function(t){h=t.c},function(){},function(){},function(){}],execute:function(){var r=":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 .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";var f=r;var l="https://zonos-store-assets.s3.amazonaws.com/images/elements-flags";var c=t("zonos_country_flag",function(){function t(t){s(this,t);this.countryCode=i.selectedCountryCode;this.size=undefined}t.prototype.render=function(){if(!this.el.shadowRoot||!this.countryCode){return null}var t="".concat(l,"/").concat(this.countryCode,".svg");var s=a();return o(n,{class:"zonos--elements",style:this.size?{"--zonos--font-family":s,height:"".concat(this.size,"px"),width:"".concat(this.size,"px")}:{"--zonos--font-family":s}},o("div",{class:h(["flag-container"])},o("div",{class:"flag-icon",style:{backgroundImage:"url(".concat(t,")")}})))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());c.style=f}}}));
1
+ System.register(["./p-fd061229.system.js","./p-a58731ec.system.js","./p-10efff62.system.js","./p-23e7c655.system.js","./p-febc72e7.system.js","./p-46a5ec52.system.js","./p-6b6cd6c3.system.js"],(function(t){"use strict";var s,o,n,e,i,a,h;return{setters:[function(t){s=t.r;o=t.h;n=t.H;e=t.d},function(t){i=t.l},function(t){a=t.d},function(t){h=t.c},function(){},function(){},function(){}],execute:function(){var r=":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 .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";var f=r;var l="https://zonos-store-assets.s3.amazonaws.com/images/elements-flags";var c=t("zonos_country_flag",function(){function t(t){s(this,t);this.countryCode=i.selectedCountryCode;this.size=undefined}t.prototype.render=function(){if(!this.el.shadowRoot||!this.countryCode){return null}var t="".concat(l,"/").concat(this.countryCode,".svg");var s=a();return o(n,{class:"zonos--elements",style:this.size?{"--zonos--font-family":s,height:"".concat(this.size,"px"),width:"".concat(this.size,"px")}:{"--zonos--font-family":s}},o("div",{class:h(["flag-container"])},o("div",{class:"flag-icon",style:{backgroundImage:"url(".concat(t,")")}})))};Object.defineProperty(t.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});return t}());c.style=f}}}));
@@ -0,0 +1,17 @@
1
+ import{z as o,c as e}from"./p-edc16f69.js";import{C as r,f as n,e as t,x as a,q as i,w as s,k as l}from"./p-afffdfc2.js";import{h as c,l as u,a as d,j as p}from"./p-860e46ab.js";import{t as v}from"./p-10d6fe23.js";
2
+ /*!
3
+ * paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
4
+ * Copyright 2020-present, PayPal, Inc. All rights reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */function f(o,e){void 0===e&&(e={});var r=document.createElement("script");return r.src=o,Object.keys(e).forEach((function(o){r.setAttribute(o,e[o]),"data-csp-nonce"===o&&r.setAttribute("nonce",e["data-csp-nonce"])})),r}function y(o){return window[o]}function w(o,e){if("object"!=typeof o||null===o)throw new Error("Expected an options object.");var r=o.environment;if(r&&"production"!==r&&"sandbox"!==r)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==e&&"function"!=typeof e)throw new Error("Expected PromisePonyfill to be a function.")}const b=({backgroundColor1:o,backgroundColor2:e})=>v.readability(o,e)>2.5,h=e=>{const r=o.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));r&&"DISABLED"!==(null==r?void 0:r.status)&&"function"==typeof window.gtag&&(u("Zonos submits gtag event","log",e),window.gtag("event",e,{}))},{reset:P,state:m}=e((()=>({orderIdCreated:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}))),k=({checkoutSessionId:e,onPaypalFail:u,onPaypalSessionDone:v,overrideBorderRaidus:f,overridePrimaryColor:y})=>({createOrder:async()=>{const o=await r();if(!o.valid)return m.paypalErrorMessage=o.errorMessage,n.hasPaymentError=!1,n.customErrorMessage=null,null==u||u(),"";try{m.paypalErrorMessage=null,t.inventoryCheckErrorMessage=null;try{t.inventoryCheckErrorMessage=await a()}catch(o){t.inventoryCheckErrorMessage=i("Unable to check inventory. Please try again.")}return t.inventoryCheckErrorMessage?"":await(async({checkoutSessionId:o})=>{var e,r;const{errors:n,json:t}=await(async({checkoutSessionId:o})=>{const{errors:e,json:r}=await c("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o},method:"POST"});return{errors:e,json:r}})({checkoutSessionId:o}),a=null===(e=null==t?void 0:t.paypalOrderCreate)||void 0===e?void 0:e.paypalOrderId;if(n.length||!a)throw new Error((null===(r=n.find(Boolean))||void 0===r?void 0:r.message)||"An unexpected error occurred when creating paypal order.");return a})({checkoutSessionId:e})}catch(o){return d("Failed to create paypal order",o),m.paypalErrorMessage=i("Failed to create PayPal order. Please try again, or consider using an alternative method."),n.hasPaymentError=!1,n.customErrorMessage=null,null==u||u(),""}},onApprove:async()=>{try{m.paypalErrorMessage=null,h("zonos-checkout-payment-info");const o=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{var r,n;const{errors:t,json:a}=await(async({checkoutSessionId:o,paypalMockResponse:e})=>{const{errors:r,json:n}=await c("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:e},method:"POST"});return{errors:r,json:n}})({checkoutSessionId:o,paypalMockResponse:e}),s=null===(r=null==a?void 0:a.paypalOrderCapture.order)||void 0===r?void 0:r.id;if(t.length||!s)throw new Error((null===(n=t.find(Boolean))||void 0===n?void 0:n.message)||i("An unexpected error occurred when processing PayPal order."));return s})({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse});m.orderIdCreated=o,null==v||v({orderId:o}),s(),l()}catch(o){if(d("==== Failed to capture paypal order",o),o instanceof Error)return(({error:o})=>{var e;const r=p(o.message),n=null===(e=null==r?void 0:r.errors.find(Boolean))||void 0===e?void 0:e.message,t=(null==n?void 0:n.match(/\[(.*?)\] (.*)/i))||[];t||(m.paypalErrorMessage=i("An unexpected error occurred when processing PayPal order."));const a=t[2]||i("An unexpected error occurred when processing PayPal order.");m.paypalErrorMessage=a})({error:o});null==u||u()}},style:{borderRadius:"SHARP"===f?0:10,color:b({backgroundColor1:"#ffc33a",backgroundColor2:y||o.appearance.colorPrimary||""})?"gold":"blue",shape:"rect"}}),j=async({currency:e})=>{var r;if(!(null===(r=o.checkoutSettings.externalPaymentMethods)||void 0===r?void 0:r.find((o=>"PAYPAL"===o.type&&"ENABLED"===o.status))))return void u("=== Paypal is disabled for this store","warn");const n=o.checkoutSettings.externalServiceTokens.find((o=>"PAYPAL_CLIENT_ID"===o.type));if(!n)return void u("Failed to load paypal -- missing paypal publishable key","warn");const t="production"===o.zonosMode&&"LIVE"===o.checkoutSettings.mode?"production":"sandbox";window.Zonos.paypal=await function(o,e){if(void 0===e&&(e=Promise),w(o,e),"undefined"==typeof document)return e.resolve(null);var r=function(o){var e="sandbox"===o.environment?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js";delete o.environment,o.sdkBaseUrl&&(e=o.sdkBaseUrl,delete o.sdkBaseUrl);var r,n,t=o,a=Object.keys(t).filter((function(o){return null!=t[o]&&""!==t[o]})).reduce((function(o,e){var r=t[e].toString();return"data"===(e=e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(function(o,e){return(e?"-":"")+o.toLowerCase()}))).substring(0,4)||"crossorigin"===e?o.attributes[e]=r:o.queryParams[e]=r,o}),{queryParams:{},attributes:{}}),i=a.queryParams,s=a.attributes;return i["merchant-id"]&&-1!==i["merchant-id"].indexOf(",")&&(s["data-merchant-id"]=i["merchant-id"],i["merchant-id"]="*"),{url:"".concat(e,"?").concat((r=i,n="",Object.keys(r).forEach((function(o){0!==n.length&&(n+="&"),n+=o+"="+r[o]})),n)),attributes:s}}(o),n=r.url,t=r.attributes,a=t["data-namespace"]||"paypal",i=y(a);return t["data-js-sdk-library"]||(t["data-js-sdk-library"]="paypal-js"),function(o,e){var r=document.querySelector('script[src="'.concat(o,'"]'));if(null===r)return null;var n=f(o,e),t=r.cloneNode();if(delete t.dataset.uidAuto,Object.keys(t.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(t.dataset).forEach((function(o){t.dataset[o]!==n.dataset[o]&&(a=!1)})),a?r:null}(n,t)&&i?e.resolve(i):function(o,e){void 0===e&&(e=Promise),w(o,e);var r=o.url,n=o.attributes;if("string"!=typeof r||0===r.length)throw new Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw new Error("Expected attributes to be an object.");return new e((function(o,e){if("undefined"==typeof document)return o();!function(o){var e=o.onSuccess,r=o.onError,n=f(o.url,o.attributes);n.onerror=r,n.onload=e,document.head.insertBefore(n,document.head.firstElementChild)}({url:r,attributes:n,onSuccess:function(){return o()},onError:function(){var o=new Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return e(o)}})}))}({url:n,attributes:t},e).then((function(){var o=y(a);if(o)return o;throw new Error("The window.".concat(a," global variable is not available."))}))}({clientId:n.token,currency:e,environment:t}),u("==== Paypal script loaded")},g=o=>{var e;const r=window.Zonos.paypal;if(!r)return u("Paypal is not available"),null;const n=t.checkoutSessionId;if(!n)return u("Paypal is not available due to checkoutSessionId is not available"),null;u("==== Loading Paypal buttons"),m.paypalButtons.length&&(m.paypalButtons.forEach((async o=>{await o.close()})),m.paypalButtons=[]);const a=[null===(e=r.FUNDING)||void 0===e?void 0:e.PAYPAL].filter(Boolean);return m.paypalButtons=a.map((e=>{var t;let a=null;try{a=(null===(t=r.Buttons)||void 0===t?void 0:t.call(r,Object.assign(Object.assign({},k(Object.assign({checkoutSessionId:n,fundingSource:e},o))),{fundingSource:e})))||null}catch(o){u(`===== Failed to load paypal's "${e}" button`,"warn",o)}return(null==a?void 0:a.isEligible())?(u(`==== Paypal button ${e} loaded`),a):null})).filter(Boolean),m.paypalButtons},E=()=>{var e,r;return"ENABLED"===(null===(r=null===(e=o.checkoutSettings.externalPaymentMethods)||void 0===e?void 0:e.find((o=>"PAYPAL"===o.type)))||void 0===r?void 0:r.status)||!!m.paypalButtons.length};export{j as a,m as b,P as c,g as d,b as i,E as p,h as s}
@@ -1 +1 @@
1
- import{r as o,h as s,H as t}from"./p-5b7da777.js";import{d as a}from"./p-edc16f69.js";import{c as r}from"./p-b4b7f705.js";const f=class{constructor(s){o(this,s),this.spacing=24}render(){return s(t,{key:"99d265d6cc1c8f746217f3f42d21b8d7d5ba70b6",style:{"--zonos--font-family":a()}},s("div",{key:"f935f28aebb85434e71afcc52b7dc4463df8eb4a",class:r(["vstack"]),style:{"grid-row-gap":`${this.spacing}px`}},s("slot",{key:"53f2a34378fcd8b291446bf8293e89307bc15d1f"})))}};f.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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";export{f as zonos_v_stack}
1
+ import{r as o,h as s,H as t}from"./p-5b7da777.js";import{d as a}from"./p-edc16f69.js";import{c as r}from"./p-b4b7f705.js";const h=class{constructor(s){o(this,s),this.spacing=24}render(){return s(t,{key:"4d2a0ea6c3c427e04bb9bca7ac0d035bd2c7143e",style:{"--zonos--font-family":a()}},s("div",{key:"6ea72ff37210b0d719fd15506bd78810658d59ac",class:r(["vstack"]),style:{"grid-row-gap":`${this.spacing}px`}},s("slot",{key:"fa0abf999f3737852cb181b7678a89ce6b52a471"})))}};h.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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";export{h as zonos_v_stack}