@zonos/elements 1.3.280 → 1.3.281
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.
- package/dist/cjs/{TaxId-12acedde.js → TaxId-cd9d490e.js} +1 -1
- package/dist/cjs/{cart-0fa312a5.js → cart-3313cb0c.js} +2 -2
- package/dist/cjs/{collect-f9c4ca7c.js → collect-2659c5af.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-95431bca.js → hasInclusivePrice-d132daaa.js} +1 -1
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/{invoice-ce757565.js → invoice-26f52c07.js} +2 -2
- package/dist/cjs/{localization-7fded969.js → localization-6189080f.js} +80 -80
- package/dist/cjs/{paypal-57ab3ab6.js → paypal-f6a256b5.js} +2 -2
- package/dist/cjs/{placeTestOrder-35e0d3bd.js → placeTestOrder-695f2b32.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-41d48407.js → renderCheckoutCurrency-fe56094f.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-b8abf6de.js → shouldRenderTaxIdInput-7d19556c.js} +1 -1
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +4 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_5.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +14 -11
- package/dist/cjs/zonos-checkout.cjs.entry.js +4 -4
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -7
- package/dist/cjs/zonos-invoice.cjs.entry.js +5 -5
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
- package/dist/collection/components/store/translationStore/strings.arabic.js +4 -4
- package/dist/collection/components/store/translationStore/strings.base.js +4 -4
- package/dist/collection/components/store/translationStore/strings.chinese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.danish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.dutch.js +4 -4
- package/dist/collection/components/store/translationStore/strings.french.js +4 -4
- package/dist/collection/components/store/translationStore/strings.german.js +4 -4
- package/dist/collection/components/store/translationStore/strings.hebrew.js +4 -4
- package/dist/collection/components/store/translationStore/strings.indonesian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.italian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.japanese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.korean.js +4 -4
- package/dist/collection/components/store/translationStore/strings.norwegian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.polish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.portuguese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.russian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.spanish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.swedish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.turkish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +4 -4
- package/dist/collection/components/utils/taxIdValidationResult.js +6 -3
- package/dist/collection/types/checkout/TaxId.js +1 -1
- package/dist/esm/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
- package/dist/esm/{cart-4699e6ab.js → cart-c66ec17e.js} +2 -2
- package/dist/esm/{collect-24cc2e12.js → collect-915fd59d.js} +2 -2
- package/dist/esm/{hasInclusivePrice-f81ddcd6.js → hasInclusivePrice-6fd935f3.js} +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/{invoice-575dc93d.js → invoice-2a17c93c.js} +2 -2
- package/dist/esm/{localization-da2f407f.js → localization-6d36209f.js} +80 -80
- package/dist/esm/{paypal-d4436abd.js → paypal-cae1d404.js} +2 -2
- package/dist/esm/{placeTestOrder-d87b2c6a.js → placeTestOrder-955269d2.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-08526996.js → renderCheckoutCurrency-951386a5.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
- package/dist/esm/zonos-address-display_8.entry.js +4 -4
- package/dist/esm/zonos-address_4.entry.js +4 -4
- package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
- package/dist/esm/zonos-card_5.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +14 -11
- package/dist/esm/zonos-checkout.entry.js +4 -4
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
- package/dist/esm/zonos-collect.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
- package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
- package/dist/esm/zonos-invoice.entry.js +5 -5
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
- package/dist/esm-es5/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
- package/dist/esm-es5/{cart-4699e6ab.js → cart-c66ec17e.js} +1 -1
- package/dist/esm-es5/{collect-24cc2e12.js → collect-915fd59d.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-f81ddcd6.js → hasInclusivePrice-6fd935f3.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-575dc93d.js → invoice-2a17c93c.js} +1 -1
- package/dist/esm-es5/localization-6d36209f.js +1 -0
- package/dist/esm-es5/{paypal-d4436abd.js → paypal-cae1d404.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-d87b2c6a.js → placeTestOrder-955269d2.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-08526996.js → renderCheckoutCurrency-951386a5.js} +1 -1
- package/dist/esm-es5/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +2 -2
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.base.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.danish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.french.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.german.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.italian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.korean.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.polish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.russian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +2 -2
- package/dist/types/components/utils/taxIdValidationResult.d.ts +1 -1
- package/dist/types/types/checkout/TaxId.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-3f90cb36.entry.js → p-03fda4a8.entry.js} +1 -1
- package/dist/zonos-elements/{p-81c4f04a.system.entry.js → p-060c521b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-85796e67.entry.js → p-09da3c76.entry.js} +1 -1
- package/dist/zonos-elements/{p-f55a2352.system.js → p-0ac1aa87.system.js} +1 -1
- package/dist/zonos-elements/{p-275fa2da.js → p-156891c5.js} +1 -1
- package/dist/zonos-elements/p-1577a739.js +1 -0
- package/dist/zonos-elements/{p-cf0c8c77.system.entry.js → p-179caaea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-19f4e77a.entry.js → p-1ee5f392.entry.js} +1 -1
- package/dist/zonos-elements/p-26ca8ce7.js +1 -0
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-6451537c.entry.js → p-30067eed.entry.js} +1 -1
- package/dist/zonos-elements/{p-96e7b465.js → p-3246d120.js} +1 -1
- package/dist/zonos-elements/{p-1bb85ff1.entry.js → p-38879af9.entry.js} +1 -1
- package/dist/zonos-elements/{p-2dbdf883.system.js → p-39695a8b.system.js} +1 -1
- package/dist/zonos-elements/{p-6197aa73.system.entry.js → p-3e6bbf0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6049eef.system.entry.js → p-3f6fe80a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-564c7bb5.system.entry.js → p-40b96482.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc2d5dd9.entry.js → p-4441c451.entry.js} +1 -1
- package/dist/zonos-elements/{p-362215b6.system.entry.js → p-4c3f5fda.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-66223935.system.entry.js → p-54a8d4cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aff7112b.entry.js → p-5677d31f.entry.js} +1 -1
- package/dist/zonos-elements/p-56fc3210.js +1 -0
- package/dist/zonos-elements/{p-944148db.system.entry.js → p-5a61c301.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5e1aad7d.entry.js +1 -0
- package/dist/zonos-elements/{p-12452213.entry.js → p-683ec0bf.entry.js} +1 -1
- package/dist/zonos-elements/{p-28b1c189.entry.js → p-6df034d6.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bea1787.entry.js → p-6df6cb8a.entry.js} +1 -1
- package/dist/zonos-elements/{p-016b5bde.system.js → p-717cbe90.system.js} +1 -1
- package/dist/zonos-elements/{p-ec53c436.system.entry.js → p-71cb16da.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dbd5be5d.entry.js → p-727387ed.entry.js} +1 -1
- package/dist/zonos-elements/{p-807e7ebc.entry.js → p-746bdebe.entry.js} +1 -1
- package/dist/zonos-elements/{p-48d55793.system.js → p-7ac8846c.system.js} +1 -1
- package/dist/zonos-elements/{p-a30f03d6.system.js → p-8005e102.system.js} +1 -1
- package/dist/zonos-elements/{p-67b2e46c.js → p-8051403a.js} +1 -1
- package/dist/zonos-elements/{p-46f88c11.system.entry.js → p-8308f7d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0adab1d5.system.entry.js → p-86d6961c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9448d960.js +1 -0
- package/dist/zonos-elements/{p-2b8345d8.system.js → p-989cb22b.system.js} +1 -1
- package/dist/zonos-elements/{p-3068247c.system.entry.js → p-a23d3b3f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b05da593.system.entry.js → p-a34269b1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a553e132.js +1 -0
- package/dist/zonos-elements/{p-f3759c70.js → p-a5f8dc19.js} +1 -1
- package/dist/zonos-elements/{p-c2014d57.system.entry.js → p-a6535773.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4a479ad.entry.js → p-a6773627.entry.js} +1 -1
- package/dist/zonos-elements/{p-7237ec6f.system.entry.js → p-ae30e6c0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-72c1bd64.entry.js → p-b406bb39.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b361d2b.js → p-bcf5cffb.js} +1 -1
- package/dist/zonos-elements/p-bf942ef0.system.js +1 -0
- package/dist/zonos-elements/p-c345d1f5.system.js +1 -0
- package/dist/zonos-elements/{p-dff1d3be.entry.js → p-d4337686.entry.js} +1 -1
- package/dist/zonos-elements/{p-40a0c1d3.system.js → p-ddf68916.system.js} +1 -1
- package/dist/zonos-elements/{p-65fe75e1.entry.js → p-df8b8827.entry.js} +1 -1
- package/dist/zonos-elements/{p-43a14674.system.entry.js → p-e0ec0aa3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e210edd9.system.js +1 -0
- package/dist/zonos-elements/{p-db9cb522.entry.js → p-e7a45f6c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b54f10c.entry.js → p-edf613ea.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6cd6e62.system.entry.js → p-ee3c7b11.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a7f0e824.system.entry.js → p-f156e2e5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-788a16bb.system.js → p-f314217a.system.js} +1 -1
- package/dist/zonos-elements/{p-a5afcea1.system.entry.js → p-f3e1a6a7.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/localization-da2f407f.js +0 -1
- package/dist/zonos-elements/p-39e2642f.js +0 -1
- package/dist/zonos-elements/p-3f8f4c78.js +0 -1
- package/dist/zonos-elements/p-63a383f4.js +0 -1
- package/dist/zonos-elements/p-75da4ba0.entry.js +0 -1
- package/dist/zonos-elements/p-79b6070a.js +0 -1
- package/dist/zonos-elements/p-94329e56.js +0 -1
- package/dist/zonos-elements/p-b330e451.system.js +0 -1
- package/dist/zonos-elements/p-b8c019b9.system.js +0 -1
- package/dist/zonos-elements/p-fd2d4d04.system.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o}from"./p-1d42cd20.js";import{e as r,c as s}from"./p-6b361d2b.js";const t=({countryCode:r})=>{const s=(r=>o.includes(r))(r);return!!s},c=({companyName:o,countryCode:t})=>{if(r.includes(t))return o.trim().length>0;const c=(o=>s.includes(o))(t);return!!c};export{c as a,t as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,d as t,h as o,a as i}from"./p-ce75b047.js";import{b as n}from"./p-67b2e46c.js";import{j as s,k as c,m as r,s as l,c as a}from"./p-3f8f4c78.js";import{z as d,e as u,f as h}from"./p-9a417eeb.js";import{g as p,i as m,a as f}from"./p-e7b0c156.js";import{h as w,l as v}from"./p-41dd1cb8.js";import{l as g}from"./p-0a377722.js";import{a as y}from"./p-3d28353a.js";import"./p-34d6eb83.js";import"./p-f1aea919.js";import"./p-6b361d2b.js";const S="zonos-domestic-element-hide-style",b="undefined"!=typeof document&&(()=>{try{return document.querySelector(":is(.zonos-is-probe)"),!0}catch(e){return!1}})(),z=e=>{const t=document.querySelector(e);if(!document.querySelector("zonos-hello")&&t){const e=document.createElement("zonos-hello");return t.appendChild(e),!0}return!1},j=e=>{switch(e){case"BOTTOM_RIGHT":default:return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right"}},I=({position:e="bottom-right"})=>{const t=".zonos--hello-mobile-wrapper";if(document.querySelector(t))return t;const o=document.createElement("div");return o.className="zonos--hello-mobile-wrapper",o.style.position="fixed","top-right"===e&&(o.style.top="72px",o.style.right="24px"),"top-left"===e&&(o.style.top="72px",o.style.left="24px"),"bottom-right"===e&&(o.style.bottom="72px",o.style.right="24px"),"bottom-left"===e&&(o.style.bottom="72px",o.style.left="24px"),o.style.zIndex="2147483647",document.body.appendChild(o),t},O=async e=>{if(window.Zonos.isLegacyCheckout)return void g("Hello is disabled when isLegacyCheckout","info");const{anchorElementSelector:t}=e;let o=t;if(!e.anchorElementSelector&&e.desktopLocation){const e=I({position:"bottom-right"});o=e}if(o&&c(o)){if(g("Hello init complete"),!z(o)){const t=new MutationObserver((()=>{z(o)&&t.disconnect()}));t.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{z(o)}),1e3),setTimeout((()=>{if(e.notFoundElementFallback){g(`Hello anchor selector ${e.anchorElementSelector} not found after 3 seconds, falling back to 'notFoundElementFallback': ${e.notFoundElementFallback}`,"info");const t=I({position:j(e.notFoundElementFallback)});z(t)}}),3e3)}}else v(`Selector anchorElementSelector "${e.anchorElementSelector}" is not a valid selector.`)};class C{constructor(e,t){this.targetId=e,this.allowedEvents=t,this.listeners=new Map,this.handleMessage=e=>{var t,o,i;const n=e.data,s=(null===(t=this.iframe)||void 0===t?void 0:t.contentWindow)||(null===(i=null===(o=this.iframe)||void 0===o?void 0:o.contentDocument)||void 0===i?void 0:i.defaultView);if(e.source!==s)return;if(!this.isValidMessage(n))return;const c=this.listeners.get(n.type);null==c||c.forEach((e=>{try{e(n.payload)}catch(e){v("Error in event listener:",e)}}))},this.initializeEventListeners(),this.iframe=document.getElementById(this.targetId)}initializeEventListeners(){window.addEventListener("message",this.handleMessage)}isValidMessage(e){if(!e||"object"!=typeof e)return!1;const t=e;return t.id===this.targetId&&"string"==typeof t.type&&this.allowedEvents.includes(t.type)&&void 0!==t.payload}on(e,t){this.listeners.has(e)||this.listeners.set(e,new Set),g(`[CheckoutAddressService] listening to ${e}`,"info");const o=t,i=this.listeners.get(e);return i&&i.add(o),()=>{const t=this.listeners.get(e);t&&t.delete(o)}}destroy(){window.removeEventListener("message",this.handleMessage),this.listeners.clear()}}class k extends C{constructor(){g("=== [Google Places Service] Initializing","info"),super(m.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])}sendMessage(e,t){var o;if(!(null===(o=this.iframe)||void 0===o?void 0:o.contentWindow))return;const i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:t,type:e};g(`GooglePlacesService] parent --\x3e ${e}`,"info",t),this.iframe.contentWindow.postMessage(i,"*")}initialize(){this.sendMessage("initializeGooglePlacesService",{})}fetchSuggestions({country:e,query:t,type:o}){e&&this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[e],input:t},type:o})}selectPlace({placeId:e,type:t}){this.sendMessage("placeSelected",{placeId:e,type:t})}}class E{constructor(){this.googlePlaceInitialized=!1,g("=== [CheckoutAddressService] Initializing","info"),this.googlePlaces=new k,this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{g("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info"),this.googlePlaceInitialized=!0})),this.initialize()}initialize(){this.googlePlaces.initialize()}onInitializeGooglePlacesService(e){return this.googlePlaces.on("onInitializeGooglePlacesService",(()=>{g("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService"),e()}))}isGooglePlaceInitialized(){return this.googlePlaceInitialized}onAddressSuggestions(e){return this.suggestionsCallback=e,this.googlePlaces.on("onFetchAutocompleteSuggestions",((...t)=>{g(`[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ${t[0].type}`,"info",...t),e(...t)}))}onAddressSelected(e){return this.placeSelectedCallback=e,this.googlePlaces.on("onPlaceSelected",((...t)=>{g(`[CheckoutAddressService] parent <-- onPlaceSelected ${t[0].type}`,"info",...t),e(...t)}))}getAddressSuggestions({country:e,query:t,type:o}){this.googlePlaceInitialized&&this.googlePlaces.fetchSuggestions({country:e,query:t,type:o})}selectAddress({placeId:e,type:t}){this.googlePlaces.selectPlace({placeId:e,type:t})}destroy(){this.googlePlaces.destroy(),this.suggestionsCallback&&(this.suggestionsCallback=void 0),this.placeSelectedCallback&&(this.placeSelectedCallback=void 0)}}const A=class{constructor(o){e(this,o),this.paypalInitEvent=t(this,"paypalInitEvent",7),this.stripeInitEvent=t(this,"stripeInitEvent",7)}async initCheckoutElement(e){var t;e?(n.stripe=e,((t=d.checkoutSettings).placeOrderButtonSelector||t.alwaysTriggerInternationalCheckoutSelector||window.Zonos.cartData)&&(!t.placeOrderButtonSelector||c(t.placeOrderButtonSelector)?!t.alwaysTriggerInternationalCheckoutSelector||c(t.alwaysTriggerInternationalCheckoutSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const e=document.createElement("zonos-checkout");document.body.appendChild(e)}})():v(`Selector alwaysTriggerInternationalCheckoutSelector "${t.alwaysTriggerInternationalCheckoutSelector}" is not a valid selector`):v(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),g("init checkout element")):g("Stripe is not loaded yet - cannot init checkout element","warn")}async initCollectElement(e){e?(n.stripe=e,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-collect")){const e=document.createElement("zonos-collect");document.body.appendChild(e)}})(),g("init Collect element")):g("Stripe is not loaded yet - cannot init Collect element","warn")}async initInvoiceElement(e){e?(n.stripe=e,window.Zonos.cartData&&(()=>{if(!document.querySelector("zonos-invoice")){const e=document.createElement("zonos-invoice");document.body.appendChild(e)}})(),g("init Invoice element")):g("Stripe is not loaded yet - cannot init Invoice element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const e=document.createElement("zonos-notification");document.body.appendChild(e)}async setupGoogleFont(e){var t,o;const i=e||h();if("Inter"===i){if(!e)return;g("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:e})}const n=new URLSearchParams;n.set("family",i);const{errors:s,json:c}=await w(`/api/zonos-elements/get-font-detail?${n.toString()}`);if(s.length>0)return g(`Failed to load font ${i}`,"warn"),void(d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:"Inter"}));const r=null==c?void 0:c.fontUrl;r&&(null===(o=(t=window.Zonos).injectSupportGoogleFont)||void 0===o||o.call(t,r)),e&&(g(`[FONT] ${e} font override applied`),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:e}))}handleLocationChange(){O(d.helloSettings)}initHistoryListener(){const e=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),e.apply(this,arguments)};const t=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)}}injectCustomHTML(e){if(!e)return;if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect||window.Zonos.isInvoice)return void g("=== Skip injecting custom HTML for hosted checkout","info");g("=== Injecting custom HTML for hosted checkout");const t=document.createElement("template");t.innerHTML=e,t.content.querySelectorAll("script").forEach((e=>{const t=document.createElement("script");e.src?(t.src=e.src,t.async=e.async):t.textContent=e.innerHTML,document.body.appendChild(t)})),y()}async initGooglePlacesService(e){const t=null==e?void 0:e.genericSettings;if(!t)return;const o=t.signedTokenGooglePlaces;o&&f({id:m.GOOGLE_PLACES,onload:()=>{d.checkoutAddressService=new E},src:`https://route.elements.zonos.com/iframe/google-maps?signedToken=${o}`})}buildBaseConfig(e){var t,o;const i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:void 0,captureDelay:void 0,subscriptionStatus:void 0});if(window.Zonos.isCollect||window.Zonos.isInvoice)return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})});if(!this.config.checkoutSettings)return Object.assign(Object.assign({},this.config),{checkoutSettings:void 0});const n=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&"CLOSE_MODAL"===(null===(t=this.config.checkoutSettings)||void 0===t?void 0:t.successBehavior);return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:n?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:n?(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||(null==e?void 0:e.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})}async componentWillLoad(){this.initHistoryListener(),d.zonosApiKey=this.zonosApiKey,(async()=>{var e,t,o,i,n,c;const{errors:l,json:a,zonosMode:h}=await(async()=>{if(window.Zonos.cartSettings)return g("Reusing cached zonos settings"),{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode};const e=p(),t=new URLSearchParams;e.overrideShouldEnabledCustomAddress&&t.set("overrideShouldEnabledCustomAddress",e.overrideShouldEnabledCustomAddress);const o=s();o&&t.set("zCountry",o);const{errors:i,json:n,zonosMode:c}=await w(`/api/zonos-elements/zonos-settings?${t.toString()}`);return i.length?(v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:i,json:null,zonosMode:c}):{errors:[],json:n,zonosMode:c}})();if("403"===(null===(t=null===(e=l[0])||void 0===e?void 0:e.type)||void 0===t?void 0:t.toString()))return void g("Failed to load zonos settings. This domain may not have access","warn");const m=(null===(o=null==a?void 0:a.checkoutSettings)||void 0===o?void 0:o.customHTML)||"";this.injectCustomHTML(m),this.initZonosNotification();const f=this.buildBaseConfig(a),y=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:(()=>{var e,t,o;return window.Zonos.isLegacyCheckout?(null===(e=null==a?void 0:a.appearanceSettings)||void 0===e?void 0:e.logoUrl)||(null===(t=this.config.appearance)||void 0===t?void 0:t.logoUrl):null===(o=this.config.appearance)||void 0===o?void 0:o.logoUrl})()})}),f);u({overrideSettings:y,zonosSettings:a}),d.zonosMode=h,(e=>{if("undefined"==typeof document||!e)return;const t=(({merchantSelector:e,supportsIs:t})=>t?`body.z-intl :is(${e})`:(e=>{const t=[];let o=0,i=0,n="";for(let s=0;s<e.length;s++){const c=e[s];if("("===c?o++:")"===c?o--:"["===c?i++:"]"===c&&i--,","===c&&0===o&&0===i){const e=n.trim();e&&t.push(e),n=""}else n+=c}const s=n.trim();return s&&t.push(s),t})(e).map((e=>`body.z-intl ${e}`)).join(", "))({merchantSelector:e,supportsIs:b});try{document.querySelector(t)}catch(o){return void g(`Skip domesticElementSelector injection: "${e}" produced an invalid CSS selector ("${t}")`,"warn")}if(document.getElementById(S))return;const o=document.createElement("style");o.id=S,o.textContent=`${t} { display: none !important; }`,(document.head||document.body).appendChild(o),g("Zonos domestic element hide style injected")})(d.checkoutSettings.domesticElementSelector),this.setupGoogleFont(),"DISABLED"===d.helloSettings.visibilityStatus&&g("=== Hello is disabled by store owner ===","warn"),d.helloSettings&&"ENABLED"===d.helloSettings.visibilityStatus&&(g("Initializing hello"),O(d.helloSettings)),await r();const z=(null===(i=null==a?void 0:a.checkoutSettings)||void 0===i?void 0:i.externalServiceTokens.find((e=>"STRIPE_PUBLISHABLE_TOKEN"===e.type)))||null;if(!z||!this.stripeInitEvent)return void g("Checkout failed to load -- missing publishable key","warn");if(window.Zonos.isCollect||window.Zonos.isInvoice)return this.stripeInitEvent.emit({publishableKey:z.token}),void this.initGooglePlacesService(a);if("INACTIVE"===d.checkoutSettings.subscriptionStatus)return g('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void g("zonos controller loaded");if("DISABLED"===d.checkoutSettings.visibilityStatus)return g("=== Checkout is disabled by store owner ===","warn"),void g("zonos controller loaded");const j="function"==typeof(null===(n=d.checkoutSettings)||void 0===n?void 0:n.buildCartDetail)||"function"==typeof(null===(c=d.checkoutSettings)||void 0===c?void 0:c.createCartId),I=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret"),C=!(!window.Zonos.cartId||!window.Zonos.cartData)||!!I;j||C?(this.stripeInitEvent.emit({publishableKey:z.token}),this.initGooglePlacesService(a)):g("Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present","warn")})()}async showNotification(e){const t=document.querySelector("zonos-notification");t?t.showNotification(e):g("Failed to show notification - zonos-notification not found","warn")}async reset(){l.checkoutSessionId=null,n.clientSecret=""}async overrideConfig(e){u({overrideSettings:e,zonosSettings:null})}async overrideCountry(e){g(`Override country code to ${e}`),a({isInitializing:!1,newSelectedCountryCode:e})}async getAppearanceSetting(){return d.appearance}async updateOrganizationName(e){d.organizationName=e}render(){return o(i,{key:"925af89a63419b44e6372de48c66e0898d039ae0",class:"zonos--elements"})}};A.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";export{A as zonos_controller}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o}from"./p-3f8f4c78.js";const r="gkjqw123",v="Kq93wqw3",i=()=>{var i;return null===(i=o.inclusivePricingConfigurations)||void 0===i?void 0:i.some((o=>{var i,l;return"ENABLED"===(null===(i=o.configurations[r])||void 0===i?void 0:i.status)||"ENABLED"===(null===(l=o.configurations[v])||void 0===l?void 0:l.status)}))};export{r as D,v as T,i as h}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as o}from"./p-67b2e46c.js";import{w as r,h as n}from"./p-3f8f4c78.js";const u=({amount:u,isForeign:i})=>{var t,c;const a=(null===(t=o.exchangeRate)||void 0===t?void 0:t.rate)||1,s=i?u:r(u),v=o.currency;if((null===(c=o.items[0])||void 0===c?void 0:c.currencyCode)===v)return n({amount:s,currency:v});const d=o.displayBaseCurrency,e=(()=>{var r,n;return o.displayBaseCurrency&&(null===(r=o.exchangeRate)||void 0===r?void 0:r.sourceCurrencyCode)?null===(n=o.exchangeRate)||void 0===n?void 0:n.sourceCurrencyCode:o.currency})();return n(i?{amount:d?s/a:s,currency:e}:{amount:d?s:s*a,currency:e})};export{u as r}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-f55a2352.system.js","./p-fd2d4d04.system.js"],(function(r){"use strict";var n,v,u;return{setters:[function(r){n=r.d},function(r){v=r.w;u=r.h}],execute:function(){var t=function(){var r,v;var u=n.displayBaseCurrency;var t=u&&((r=n.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(v=n.exchangeRate)===null||v===void 0?void 0:v.sourceCurrencyCode:n.currency;return t};var a=r("r",(function(r){var a=r.amount,e=r.isForeign;var i,o;var c=((i=n.exchangeRate)===null||i===void 0?void 0:i.rate)||1;var d=e?a:v(a);var s=n.currency;var f=(o=n.items[0])===null||o===void 0?void 0:o.currencyCode;if(f===s){return u({amount:d,currency:s})}var l=n.displayBaseCurrency;var m=t();if(e){var y=l?d/c:d;return u({amount:y,currency:m})}var j=l?d:d*c;return u({amount:j,currency:m})}))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,r,e){function i(n){return n instanceof r?n:new r((function(t){t(n)}))}return new(r||(r=Promise))((function(r,o){function u(n){try{c(e.next(n))}catch(n){o(n)}}function s(n){try{c(e["throw"](n))}catch(n){o(n)}}function c(n){n.done?r(n.value):i(n.value).then(u,s)}c((e=e.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,i,o,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(t){return c([n,t])}}function c(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(e=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(n,r)}catch(n){s=[6,n];i=0}finally{e=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-f55a2352.system.js","./p-fd2d4d04.system.js","./p-01174496.system.js"],(function(n){"use strict";var t,r,e,i;return{setters:[function(n){t=n.d},function(n){r=n.s},function(n){e=n.l;i=n.h}],execute:function(){var o=this;var u=n("p",(function(){return __awaiter(o,void 0,void 0,(function(){var n,o,u,s,c,a,f,d,l;return __generator(this,(function(h){switch(h.label){case 0:u=(n=t.partiesData.find((function(n){return n.type==="DESTINATION"})))===null||n===void 0?void 0:n.id;s=(o=t.partiesData.find((function(n){return n.type==="PAYOR"})))===null||o===void 0?void 0:o.id;c=r.checkoutSessionId;if(!c||!s||!u){e("Missing required data",{billToPartyId:s,checkoutSessionId:c,shipToPartyId:u});return[2,{errors:["Missing required data"],json:null}]}a={billToPartyId:s,checkoutSessionId:c,shipToPartyId:u};return[4,i("/api/zonos-elements/place-test-order",{body:a,method:"POST"})];case 1:f=h.sent(),d=f.errors,l=f.json;if(d.length||!l){e("Error occurs when placing test order",d);return[2,{errors:d.map((function(n){return n.message})),json:null}]}return[2,{errors:[],json:l}]}}))}))}))}}}));
|