@zonos/elements 1.3.54 → 1.3.55

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 (96) hide show
  1. package/dist/cjs/{CheckoutConfig-ca67953a.js → CheckoutConfig-c75fe0fe.js} +1 -1
  2. package/dist/cjs/{cart-03b08131.js → cart-6095475b.js} +1 -1
  3. package/dist/cjs/{createCustomEvent-532569f1.js → createCustomEvent-0cef191b.js} +2 -2
  4. package/dist/cjs/{handleFetch-4b296adc.js → handleFetch-57c46afa.js} +3 -0
  5. package/dist/cjs/index.cjs.js +9 -9
  6. package/dist/cjs/{paypal-bdc19559.js → paypal-ac2f82ef.js} +2 -2
  7. package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -6
  10. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -1
  18. package/dist/collection/components/utils/logging/sendErrorLog.js +3 -0
  19. package/dist/esm/{CheckoutConfig-bf2a28bd.js → CheckoutConfig-49ba0fef.js} +1 -1
  20. package/dist/esm/{cart-008dea87.js → cart-0467d5ac.js} +1 -1
  21. package/dist/esm/{createCustomEvent-a10320c1.js → createCustomEvent-ccb2f324.js} +2 -2
  22. package/dist/esm/{handleFetch-99b944a2.js → handleFetch-de935ec3.js} +3 -0
  23. package/dist/esm/index.js +10 -10
  24. package/dist/esm/{paypal-b90fc7ff.js → paypal-e68cf8df.js} +2 -2
  25. package/dist/esm/zonos-address_8.entry.js +2 -2
  26. package/dist/esm/zonos-badge_13.entry.js +4 -4
  27. package/dist/esm/zonos-checkout.entry.js +9 -6
  28. package/dist/esm/zonos-controller.entry.js +2 -2
  29. package/dist/esm/zonos-country-flag.entry.js +2 -2
  30. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  31. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  32. package/dist/esm/zonos-hello.entry.js +2 -2
  33. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  34. package/dist/esm/zonos-notification_3.entry.js +3 -3
  35. package/dist/esm-es5/{CheckoutConfig-bf2a28bd.js → CheckoutConfig-49ba0fef.js} +1 -1
  36. package/dist/esm-es5/{cart-008dea87.js → cart-0467d5ac.js} +1 -1
  37. package/dist/esm-es5/{createCustomEvent-a10320c1.js → createCustomEvent-ccb2f324.js} +1 -1
  38. package/dist/esm-es5/handleFetch-de935ec3.js +1 -0
  39. package/dist/esm-es5/index.js +1 -1
  40. package/dist/esm-es5/{paypal-b90fc7ff.js → paypal-e68cf8df.js} +1 -1
  41. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  42. package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
  43. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  44. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  45. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  46. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  47. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  48. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  49. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  50. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  51. package/dist/scripts/index.js +1 -1
  52. package/dist/scripts/loadZonos.js +1 -1
  53. package/dist/scripts/zonos.js +1 -1
  54. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  55. package/dist/zonos-elements/index.esm.js +1 -1
  56. package/dist/zonos-elements/{p-b914e98e.js → p-068c9ba4.js} +1 -1
  57. package/dist/zonos-elements/p-0f198151.entry.js +1 -0
  58. package/dist/zonos-elements/{p-e672e4de.entry.js → p-1b071708.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-3149985c.entry.js → p-29ad5aa6.entry.js} +1 -1
  60. package/dist/zonos-elements/{p-baff865d.entry.js → p-386bef53.entry.js} +1 -1
  61. package/dist/zonos-elements/p-41871fbd.js +17 -0
  62. package/dist/zonos-elements/p-478b5c7d.entry.js +1 -0
  63. package/dist/zonos-elements/{p-710b8292.js → p-4c30186a.js} +1 -1
  64. package/dist/zonos-elements/{p-ca4efb81.system.entry.js → p-59c51734.system.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-e6b9cf45.system.js → p-60129618.system.js} +1 -1
  66. package/dist/zonos-elements/p-6be07fde.js +1 -0
  67. package/dist/zonos-elements/{p-f5bac726.system.entry.js → p-726cef64.system.entry.js} +1 -1
  68. package/dist/zonos-elements/{p-72cfc372.system.entry.js → p-7b18892a.system.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-546aabc0.system.entry.js → p-7e431f33.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-1c29081a.js → p-8d9112e9.js} +1 -1
  71. package/dist/zonos-elements/p-93f12fa9.system.js +1 -0
  72. package/dist/zonos-elements/{p-4b7c05a8.system.entry.js → p-974ce80b.system.entry.js} +1 -1
  73. package/dist/zonos-elements/{p-3566044a.entry.js → p-9a1a2aa2.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-997cc826.entry.js → p-a164f76d.entry.js} +1 -1
  75. package/dist/zonos-elements/p-ac162a0f.system.js +1 -0
  76. package/dist/zonos-elements/{p-f9bfbf42.system.js → p-aff41c41.system.js} +1 -1
  77. package/dist/zonos-elements/{p-ada937d6.system.entry.js → p-b2e18e34.system.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-2673dd6d.system.entry.js → p-b80ef150.system.entry.js} +1 -1
  79. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  80. package/dist/zonos-elements/{p-7f93c97a.system.js → p-c7a8a6bb.system.js} +1 -1
  81. package/dist/zonos-elements/{p-f6e385f8.system.entry.js → p-ce149fc7.system.entry.js} +1 -1
  82. package/dist/zonos-elements/{p-66cc2bbd.system.js → p-de2bd8da.system.js} +1 -1
  83. package/dist/zonos-elements/{p-88c2057e.entry.js → p-e65dd068.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-3cfbbf17.system.entry.js → p-f0ebd55a.system.entry.js} +1 -1
  85. package/dist/zonos-elements/{p-18802362.entry.js → p-f32d7972.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-2bc6342f.system.entry.js → p-fb3c4b52.system.entry.js} +1 -1
  87. package/dist/zonos-elements/{p-fb28f27f.entry.js → p-ffa7d4c2.entry.js} +1 -1
  88. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  89. package/package.json +1 -1
  90. package/dist/esm-es5/handleFetch-99b944a2.js +0 -1
  91. package/dist/zonos-elements/p-7400bcd3.js +0 -1
  92. package/dist/zonos-elements/p-7a3118e7.entry.js +0 -1
  93. package/dist/zonos-elements/p-7eac524d.system.js +0 -1
  94. package/dist/zonos-elements/p-92faa378.system.js +0 -1
  95. package/dist/zonos-elements/p-dfbc9605.js +0 -17
  96. package/dist/zonos-elements/p-e7e22128.entry.js +0 -1
@@ -1 +1 @@
1
- (function(){"use strict";const e=(e,t,...o)=>{var n,r;if(!(!!(null===(n=window.Zonos)||void 0===n?void 0:n.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...o));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...o);break;case"info":i.info(e,...o);break;case"error":i.error(e,...o);break;default:i.groupCollapsed(e,...o),i.trace(),i.groupEnd()}},t=(t,...o)=>{e(t,"error",...o)},o=["jsdelivr","cdnjs","unpkg","vercel"],n="jsdelivr",r=e=>{const t=o.indexOf(e);return o[t+1]||null},s=()=>{const t=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||t)return null;const o=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href),n="https://v1.3.54.js.zonos.com";if(!o&&(n.includes("test.")||n.includes("test-")))return n;if(!o&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const r=`https://${o}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${r}' for loading script`,"warn"),fetch(r).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${r}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:t}=window.location,o=`${t}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),r},i="https://js.stripe.com/v3",l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let c=null;const d=e=>(null!==c||(c=new Promise(((o,n)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(a),window.Stripe)o(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${i}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&l.test(o.src))return o}return null})();r&&e?console.warn(a):r||(r=(e=>{const o=document.createElement("script");o.src=`${i}`;const n=document.head||document.body;return n?(n.appendChild(o),o):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):n(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else o(null)}))),c),u=Promise.resolve().then((()=>d(null)));let p=!1;u.catch((e=>{p||console.warn(e)}));function m(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}"function"==typeof SuppressedError&&SuppressedError;const h=["cloudflare","vercel"],y=h[0],w={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},g=w[y],f=(e=y)=>{const t=h.indexOf(e),o=h[t+1];return o||null},v=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},b=async({response:e,shouldLog:t=!0,shouldThrow:o=!1})=>{try{return await e.json()}catch(e){if(o)throw e;return t&&console.error(e),null}},S=async({basePathType:e,options:t,path:o})=>{let n;const r=w[e]||y,s=new URL(r+o);s.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(t){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));try{n=await fetch(s.toString(),t)}catch(e){if(e instanceof Error)return{baseUrl:r,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null};return{baseUrl:r,errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const i=n.headers.get("Zonos-Mode"),l=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&i&&l&&(window.Zonos.modeAlerted=!0),n.ok){return{baseUrl:r,errors:[],json:await b({response:n}),response:n,zonosMode:i}}const a=n.status.toString();try{const e=await b({response:n,shouldThrow:!0});return{baseUrl:r,errors:[{message:JSON.stringify(e),type:a}],json:null,response:n,zonosMode:i}}catch(e){return{baseUrl:r,errors:[{message:`${a}: ${"Unknown error"}`,type:a}],json:null,response:null,zonosMode:i}}},z=async({basePathType:t,options:o,path:n})=>{var r,s;const i=n.startsWith("/api/bigcommerce")?"vercel":t,l=await S({basePathType:i,options:o,path:n}),{errors:a,response:c}=l,d=m(l,["errors","response"]),u=f(i),p=!!a.find((({type:e})=>"unknown"===e))||404===(null==c?void 0:c.status),h=u&&p;return p&&(async({endpoint:e,errors:t,metadata:o,shouldPostReleaseErrorReporting:n})=>{if(n){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const r="userAgentData"in window.navigator?window.navigator.userAgentData:null,s={endpoint:e,errors:t,metadata:Object.assign({href:window.location.href,userAgent:r&&r.brands.length>0?r:window.navigator.userAgent},o)};try{fetch(`${g}/api/zonos-elements/log-error`,{body:JSON.stringify(s),method:"POST"})}catch(e){const t=f();if(!t)return;fetch(`${w[t]}/api/zonos-elements/log-error`,{body:JSON.stringify(s),method:"POST"})}})({endpoint:w[i]+n,errors:a.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:i,nextFallbackApiType:u,requestHeaders:null==o?void 0:o.headers,requestPayload:v(null===(r=null==o?void 0:o.body)||void 0===r?void 0:r.toString())||(null===(s=null==o?void 0:o.body)||void 0===s?void 0:s.toString()),status:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText},shouldPostReleaseErrorReporting:!0}),h?(e(`=== "${n}" failed to fetch, trying next fallback ${u}`),z({basePathType:u,options:o,path:n})):Object.assign({errors:a,response:c},d)},j=async e=>{const{errors:t,json:o}=await(async(e,t)=>{const o=m(t||{},[]),n=o.body?JSON.stringify(o.body):void 0,r=o.method||"GET",s=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},o.headers),i=Object.assign(Object.assign({},o),{body:"GET"===r?void 0:n,headers:s,method:r}),l=new URLSearchParams(window.location.search).get("useFallbackApi");return z({basePathType:l||y,options:i,path:e})})("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"});return!o||t.length?null:o};var O;const C=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),n=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:n,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?t:null})(),k="https://v1.3.54.js.zonos.com",E=C||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.54",A="https://rsms.me",Z="https://fonts.googleapis.com",U=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class T{}O=T,T.doneInit=!1,T.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),T.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),T._paypalMockResponse=null,T.isBigCommerce=!1,T.releaseDate="1726615155012",T.isLegacyCheckout=!1,T.isNpm=!0,T.zonosQaUrl=null,T.version="v1.3.54",T.modeAlerted=!1,T.cartData=null,T.paypal=null,T.getCurrentTimestamp=()=>(new Date).getTime(),T.zonosController=null,T.init=async({appearance:o,checkoutSettings:n,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l,storeId:a,zonosApiKey:c})=>{if(O.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!O.doneInit){if(e(`====== ZONOS DEBUG MODE: on (${O.version}) ======`),O.zonosApiKey=c,O.storeId=a,O.isNpm){if(e("====== ZONOS LOADING FROM NPM ======"),!c&&!O.cartId)return void t("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!O.cartData&&O.cartId){e("Initialize cart data");const o=await(async o=>{const n=await j(o);return e("[ZONOS - loadZonos] getting temp cart data","info",n),n?{cartData:n.cartData,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}:(t("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(O.cartId);if(!o)return void t("Failed to get cart data");O.cartData=o.cartData,O.zonosApiKey=o.zonosApiKey}}if(O.cartId&&O.cartData){e("Cart data is available, inject hidden button and trigger checkout");const t=document.createElement("button");t.style.display="none",t.id="zonos--checkout-hidden-button",document.body.appendChild(t)}e("init zonos"),O.injectZonosCdn(),O.injectZonosCss(),O.injectFonts(),O.injectController({config:{appearance:o,checkoutSettings:n,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l}}),O.doneInit=!0}},T.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},T.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},T.showNotification=e=>{var t;null===(t=O.zonosController)||void 0===t||t.showNotification(e)},T.updateOrganizationName=e=>{var t;null===(t=O.zonosController)||void 0===t||t.updateOrganizationName(e)},T.disablePlaceOrderButtons=({autoEnable:e=!0,config:t,disable:o,placeOrderButtonSelector:n})=>{var r;if(!(null===(r=t.checkoutSettings)||void 0===r?void 0:r.disablePlaceOrderButtonActivation)&&n){const t=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&o&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},T.injectController=({config:o})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=o.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;O.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{O.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const r=document.createElement("zonos-controller");r.config=o,r.zonosApiKey=O.zonosApiKey||"",r.addEventListener("stripeInitEvent",(async o=>{const{detail:n}=o;e("loading Stripe");const s=await(async(...e)=>{p=!0;const t=Date.now();return u.then((o=>((e,t,o)=>{if(null===e)return null;const n=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(n,o),n})(o,e,t)))})(n.publishableKey);s?(window.Zonos.stripe=s,r.initCheckoutElement(s)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(r),O.zonosController=r,e("Zonos controller injected!")},T.injectScript=({cdnType:o,isModule:n,theRestUrl:s})=>{const i=`${O.getZonosUrl(o)}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,a=document.createElement("script");n?a.type="module":a.noModule=!0,a.src=i,a.crossOrigin="anonymous",a.onerror=()=>{t(`Failed to load ${a.src}`);const e=r(o);e&&O.injectScript({cdnType:e,isModule:n,theRestUrl:s})},l.appendChild(a)},T.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return E;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.54";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.54";case"vercel":return k}};if(O.isNpm){return s()||t()}return t()},T.injectZonosCdn=()=>{O.injectScript({cdnType:n,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),O.injectScript({cdnType:n,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},T.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const n=O.getZonosUrl(e),s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${k}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${n}/${o}`,l.onerror=()=>{t(`Failed to load ${l.href}`);const n=r(e);n&&O.injectStylesheet({cdnType:n,theRestUrl:o})},s.appendChild(l)},T.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(O.injectStylesheet({cdnType:n,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},T.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${A}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&!U.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=A,t.appendChild(o);const n=document.createElement("link");n.rel="stylesheet",n.href=`${A}/inter/inter.css`,t.appendChild(n),e("Zonos font injected!")},T.setupGoogleFont=e=>{var t;null===(t=O.zonosController)||void 0===t||t.setupGoogleFont(e)},T.injectSupportGoogleFont=t=>{var o;e(`[FONT] injecting ${t}`);const n=null===(o=t.match(/family=(.*?):/))||void 0===o?void 0:o[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${Z}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=Z,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${n} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${n} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=T)})();
1
+ (function(){"use strict";const e=(e,t,...o)=>{var n,r;if(!(!!(null===(n=window.Zonos)||void 0===n?void 0:n.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===t&&console.error(e,...o));let s=document.querySelector("iframe#zonos---debug-logging-iframe");s||(s=document.createElement("iframe"),s.id="zonos---debug-logging-iframe",s.style.display="none",s.style.opacity="0",s.style.position="absolute",s.style.top="-9999px",s.style.left="-9999px",s.style.width="1px",s.style.height="1px",s.style.border="none",s.style.overflow="hidden",s.style.visibility="hidden",document.body.appendChild(s));const i=(null===(r=s.contentWindow)||void 0===r?void 0:r.window.console)||window.console;switch(t){case"warn":i.warn(e,...o);break;case"info":i.info(e,...o);break;case"error":i.error(e,...o);break;default:i.groupCollapsed(e,...o),i.trace(),i.groupEnd()}},t=(t,...o)=>{e(t,"error",...o)},o=["jsdelivr","cdnjs","unpkg","vercel"],n="jsdelivr",r=e=>{const t=o.indexOf(e);return o[t+1]||null},s=()=>{const t=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||t)return null;const o=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href),n="https://v1.3.55.js.zonos.com";if(!o&&(n.includes("test.")||n.includes("test-")))return n;if(!o&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const r=`https://${o}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${r}' for loading script`,"warn"),fetch(r).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${r}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:t}=window.location,o=`${t}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),r},i="https://js.stripe.com/v3",l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let c=null;const d=e=>(null!==c||(c=new Promise(((o,n)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(a),window.Stripe)o(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${i}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&l.test(o.src))return o}return null})();r&&e?console.warn(a):r||(r=(e=>{const o=document.createElement("script");o.src=`${i}`;const n=document.head||document.body;return n?(n.appendChild(o),o):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):n(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else o(null)}))),c),u=Promise.resolve().then((()=>d(null)));let p=!1;u.catch((e=>{p||console.warn(e)}));function m(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}"function"==typeof SuppressedError&&SuppressedError;const h=["cloudflare","vercel"],y=h[0],w={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},g=w[y],f=(e=y)=>{const t=h.indexOf(e),o=h[t+1];return o||null},v=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},b=async({response:e,shouldLog:t=!0,shouldThrow:o=!1})=>{try{return await e.json()}catch(e){if(o)throw e;return t&&console.error(e),null}},S=async({basePathType:e,options:t,path:o})=>{let n;const r=w[e]||y,s=new URL(r+o);s.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(t){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));try{n=await fetch(s.toString(),t)}catch(e){if(e instanceof Error)return{baseUrl:r,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null};return{baseUrl:r,errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const i=n.headers.get("Zonos-Mode"),l=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&i&&l&&(window.Zonos.modeAlerted=!0),n.ok){return{baseUrl:r,errors:[],json:await b({response:n}),response:n,zonosMode:i}}const a=n.status.toString();try{const e=await b({response:n,shouldThrow:!0});return{baseUrl:r,errors:[{message:JSON.stringify(e),type:a}],json:null,response:n,zonosMode:i}}catch(e){return{baseUrl:r,errors:[{message:`${a}: ${"Unknown error"}`,type:a}],json:null,response:null,zonosMode:i}}},z=async({basePathType:t,options:o,path:n})=>{var r,s;const i=n.startsWith("/api/bigcommerce")?"vercel":t,l=await S({basePathType:i,options:o,path:n}),{errors:a,response:c}=l,d=m(l,["errors","response"]),u=f(i),p=!!a.find((({type:e})=>"unknown"===e))||404===(null==c?void 0:c.status),h=u&&p;return p&&(async({endpoint:e,errors:t,metadata:o,shouldPostReleaseErrorReporting:n})=>{if(n){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const r="userAgentData"in window.navigator?window.navigator.userAgentData:null,s={endpoint:e,errors:t,metadata:Object.assign({href:window.location.href,userAgent:r&&r.brands.length>0?r:window.navigator.userAgent},o)};try{fetch(`${g}/api/zonos-elements/log-error`,{body:JSON.stringify(s),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const t=f();if(!t)return;fetch(`${w[t]}/api/zonos-elements/log-error`,{body:JSON.stringify(s),method:"POST"})}})({endpoint:w[i]+n,errors:a.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:i,nextFallbackApiType:u,requestHeaders:null==o?void 0:o.headers,requestPayload:v(null===(r=null==o?void 0:o.body)||void 0===r?void 0:r.toString())||(null===(s=null==o?void 0:o.body)||void 0===s?void 0:s.toString()),status:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText},shouldPostReleaseErrorReporting:!0}),h?(e(`=== "${n}" failed to fetch, trying next fallback ${u}`),z({basePathType:u,options:o,path:n})):Object.assign({errors:a,response:c},d)},j=async e=>{const{errors:t,json:o}=await(async(e,t)=>{const o=m(t||{},[]),n=o.body?JSON.stringify(o.body):void 0,r=o.method||"GET",s=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},o.headers),i=Object.assign(Object.assign({},o),{body:"GET"===r?void 0:n,headers:s,method:r}),l=new URLSearchParams(window.location.search).get("useFallbackApi");return z({basePathType:l||y,options:i,path:e})})("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"});return!o||t.length?null:o};var O;const C=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:t,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const t=new URL(e).origin,o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>t.includes(e))),n=["qa.js.zonos.com"].some((e=>t.includes(e)));return{currentLoadScriptUrl:t,isForceLoadVersionDomain:n,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?t:null})(),k="https://v1.3.55.js.zonos.com",E=C||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.55",A="https://rsms.me",Z="https://fonts.googleapis.com",U=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class T{}O=T,T.doneInit=!1,T.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),T.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),T._paypalMockResponse=null,T.isBigCommerce=!1,T.releaseDate="1726679538493",T.isLegacyCheckout=!1,T.isNpm=!0,T.zonosQaUrl=null,T.version="v1.3.55",T.modeAlerted=!1,T.cartData=null,T.paypal=null,T.getCurrentTimestamp=()=>(new Date).getTime(),T.zonosController=null,T.init=async({appearance:o,checkoutSettings:n,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l,storeId:a,zonosApiKey:c})=>{if(O.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!O.doneInit){if(e(`====== ZONOS DEBUG MODE: on (${O.version}) ======`),O.zonosApiKey=c,O.storeId=a,O.isNpm){if(e("====== ZONOS LOADING FROM NPM ======"),!c&&!O.cartId)return void t("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!O.cartData&&O.cartId){e("Initialize cart data");const o=await(async o=>{const n=await j(o);return e("[ZONOS - loadZonos] getting temp cart data","info",n),n?{cartData:n.cartData,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}:(t("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(O.cartId);if(!o)return void t("Failed to get cart data");O.cartData=o.cartData,O.zonosApiKey=o.zonosApiKey}}if(O.cartId&&O.cartData){e("Cart data is available, inject hidden button and trigger checkout");const t=document.createElement("button");t.style.display="none",t.id="zonos--checkout-hidden-button",document.body.appendChild(t)}e("init zonos"),O.injectZonosCdn(),O.injectZonosCss(),O.injectFonts(),O.injectController({config:{appearance:o,checkoutSettings:n,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l}}),O.doneInit=!0}},T.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},T.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},T.showNotification=e=>{var t;null===(t=O.zonosController)||void 0===t||t.showNotification(e)},T.updateOrganizationName=e=>{var t;null===(t=O.zonosController)||void 0===t||t.updateOrganizationName(e)},T.disablePlaceOrderButtons=({autoEnable:e=!0,config:t,disable:o,placeOrderButtonSelector:n})=>{var r;if(!(null===(r=t.checkoutSettings)||void 0===r?void 0:r.disablePlaceOrderButtonActivation)&&n){const t=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&o&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},T.injectController=({config:o})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=o.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;O.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{O.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const r=document.createElement("zonos-controller");r.config=o,r.zonosApiKey=O.zonosApiKey||"",r.addEventListener("stripeInitEvent",(async o=>{const{detail:n}=o;e("loading Stripe");const s=await(async(...e)=>{p=!0;const t=Date.now();return u.then((o=>((e,t,o)=>{if(null===e)return null;const n=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(n,o),n})(o,e,t)))})(n.publishableKey);s?(window.Zonos.stripe=s,r.initCheckoutElement(s)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(r),O.zonosController=r,e("Zonos controller injected!")},T.injectScript=({cdnType:o,isModule:n,theRestUrl:s})=>{const i=`${O.getZonosUrl(o)}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,a=document.createElement("script");n?a.type="module":a.noModule=!0,a.src=i,a.crossOrigin="anonymous",a.onerror=()=>{t(`Failed to load ${a.src}`);const e=r(o);e&&O.injectScript({cdnType:e,isModule:n,theRestUrl:s})},l.appendChild(a)},T.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return E;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.55";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.55";case"vercel":return k}};if(O.isNpm){return s()||t()}return t()},T.injectZonosCdn=()=>{O.injectScript({cdnType:n,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),O.injectScript({cdnType:n,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},T.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const n=O.getZonosUrl(e),s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${k}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${n}/${o}`,l.onerror=()=>{t(`Failed to load ${l.href}`);const n=r(e);n&&O.injectStylesheet({cdnType:n,theRestUrl:o})},s.appendChild(l)},T.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(O.injectStylesheet({cdnType:n,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},T.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${A}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&!U.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=A,t.appendChild(o);const n=document.createElement("link");n.rel="stylesheet",n.href=`${A}/inter/inter.css`,t.appendChild(n),e("Zonos font injected!")},T.setupGoogleFont=e=>{var t;null===(t=O.zonosController)||void 0===t||t.setupGoogleFont(e)},T.injectSupportGoogleFont=t=>{var o;e(`[FONT] injecting ${t}`);const n=null===(o=t.match(/family=(.*?):/))||void 0===o?void 0:o[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${Z}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=Z,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${n} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${n} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=T)})();
@@ -1 +1 @@
1
- <svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>
1
+ <svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>g>
@@ -1 +1 @@
1
- import{l as e,a as n}from"./p-7400bcd3.js";import{s as t,c as o}from"./p-b914e98e.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b914e98e.js";const s=["jsdelivr","cdnjs","unpkg","vercel"],r="jsdelivr",i=e=>{const n=s.indexOf(e);return s[n+1]||null},l="https://js.stripe.com/v3",u=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let m=null;const p=Promise.resolve().then((()=>{return e=null,null!==m||(m=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(a),window.Stripe)t(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${l}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&u.test(t.src))return t}return null})();s&&e?console.warn(a):s||(s=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${l}${t}`;const s=document.head||document.body;return s?(s.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),m;var e}));let w=!1;var f;p.catch((e=>{w||console.warn(e)}));const h=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),v="https://v1.3.54.js.zonos.com",y=h||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.54",z="https://rsms.me",j="https://fonts.googleapis.com",S=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class g{}f=g,g.doneInit=!1,g.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),g.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),g._paypalMockResponse=null,g.isBigCommerce=!1,g.releaseDate="1726615112859",g.isLegacyCheckout=!1,g.isNpm=!0,g.zonosQaUrl=null,g.version="v1.3.54",g.modeAlerted=!1,g.cartData=null,g.paypal=null,g.getCurrentTimestamp=()=>(new Date).getTime(),g.zonosController=null,g.init=async({appearance:s,checkoutSettings:r,currencyConverter:i,helloSettings:c,onCountryChange:l,overrideCurrencyFormat:d,storeId:u,zonosApiKey:a})=>{if(f.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!f.doneInit){if(e(`====== ZONOS DEBUG MODE: on (${f.version}) ======`),f.zonosApiKey=a,f.storeId=u,f.isNpm){if(e("====== ZONOS LOADING FROM NPM ======"),!a&&!f.cartId)return void n("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!f.cartData&&f.cartId){e("Initialize cart data");const o=await t(f.cartId);if(!o)return void n("Failed to get cart data");f.cartData=o.cartData,f.zonosApiKey=o.zonosApiKey}}if(f.cartId&&f.cartData){e("Cart data is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${o}`,document.body.appendChild(n)}e("init zonos"),f.injectZonosCdn(),f.injectZonosCss(),f.injectFonts(),f.injectController({config:{appearance:s,checkoutSettings:r,currencyConverter:i,helloSettings:c,onCountryChange:l,overrideCurrencyFormat:d}}),f.doneInit=!0}},g.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},g.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},g.showNotification=e=>{var n;null===(n=f.zonosController)||void 0===n||n.showNotification(e)},g.updateOrganizationName=e=>{var n;null===(n=f.zonosController)||void 0===n||n.updateOrganizationName(e)},g.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},g.injectController=({config:t})=>{var o;if(document.querySelector("zonos-controller"))return;if(null===(o=t.checkoutSettings)||void 0===o?void 0:o.placeOrderButtonSelector){const e=t.checkoutSettings.placeOrderButtonSelector;f.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{f.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=t,s.zonosApiKey=f.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async t=>{const{detail:o}=t;e("loading Stripe");const r=await(async(...e)=>{w=!0;const n=Date.now();return p.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),f.zonosController=s,e("Zonos controller injected!")},g.injectScript=({cdnType:t,isModule:o,theRestUrl:s})=>{const r=`${f.getZonosUrl(t)}/${s}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const c=document.head||document.body,l=document.createElement("script");o?l.type="module":l.noModule=!0,l.src=r,l.crossOrigin="anonymous",l.onerror=()=>{n(`Failed to load ${l.src}`);const e=i(t);e&&f.injectScript({cdnType:e,isModule:o,theRestUrl:s})},c.appendChild(l)},g.getZonosUrl=n=>{const t=()=>{switch(n){case"jsdelivr":return y;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.54";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.54";case"vercel":return v}};return f.isNpm&&(()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const t=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.54.js.zonos.com";if(!t&&(o.includes("test.")||o.includes("test-")))return o;if(!t&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const s=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s})()||t()},g.injectZonosCdn=()=>{f.injectScript({cdnType:r,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),f.injectScript({cdnType:r,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},g.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const o=f.getZonosUrl(e),s=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${v}/`,s.appendChild(r);const c=document.createElement("link");c.rel="stylesheet",c.href=`${o}/${t}`,c.onerror=()=>{n(`Failed to load ${c.href}`);const o=i(e);o&&f.injectStylesheet({cdnType:o,theRestUrl:t})},s.appendChild(c)},g.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(f.injectStylesheet({cdnType:r,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},g.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${z}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!S.test(t.href))return t}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=z,n.appendChild(t);const o=document.createElement("link");o.rel="stylesheet",o.href=`${z}/inter/inter.css`,n.appendChild(o),e("Zonos font injected!")},g.setupGoogleFont=e=>{var n;null===(n=f.zonosController)||void 0===n||n.setupGoogleFont(e)},g.injectSupportGoogleFont=n=>{var t;e(`[FONT] injecting ${n}`);const o=null===(t=n.match(/family=(.*?):/))||void 0===t?void 0:t[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${j}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=j,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${o} font injected!`)};export{g as Zonos}
1
+ import{l as e,a as n}from"./p-6be07fde.js";import{s as t,c as o}from"./p-068c9ba4.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-068c9ba4.js";const s=["jsdelivr","cdnjs","unpkg","vercel"],r="jsdelivr",i=e=>{const n=s.indexOf(e);return s[n+1]||null},l="https://js.stripe.com/v3",u=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let m=null;const p=Promise.resolve().then((()=>{return e=null,null!==m||(m=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(a),window.Stripe)t(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${l}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&u.test(t.src))return t}return null})();s&&e?console.warn(a):s||(s=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${l}${t}`;const s=document.head||document.body;return s?(s.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),m;var e}));let w=!1;var f;p.catch((e=>{w||console.warn(e)}));const h=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),v="https://v1.3.55.js.zonos.com",y=h||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.55",z="https://rsms.me",j="https://fonts.googleapis.com",S=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class g{}f=g,g.doneInit=!1,g.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),g.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),g._paypalMockResponse=null,g.isBigCommerce=!1,g.releaseDate="1726679495773",g.isLegacyCheckout=!1,g.isNpm=!0,g.zonosQaUrl=null,g.version="v1.3.55",g.modeAlerted=!1,g.cartData=null,g.paypal=null,g.getCurrentTimestamp=()=>(new Date).getTime(),g.zonosController=null,g.init=async({appearance:s,checkoutSettings:r,currencyConverter:i,helloSettings:c,onCountryChange:l,overrideCurrencyFormat:d,storeId:u,zonosApiKey:a})=>{if(f.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!f.doneInit){if(e(`====== ZONOS DEBUG MODE: on (${f.version}) ======`),f.zonosApiKey=a,f.storeId=u,f.isNpm){if(e("====== ZONOS LOADING FROM NPM ======"),!a&&!f.cartId)return void n("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!f.cartData&&f.cartId){e("Initialize cart data");const o=await t(f.cartId);if(!o)return void n("Failed to get cart data");f.cartData=o.cartData,f.zonosApiKey=o.zonosApiKey}}if(f.cartId&&f.cartData){e("Cart data is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${o}`,document.body.appendChild(n)}e("init zonos"),f.injectZonosCdn(),f.injectZonosCss(),f.injectFonts(),f.injectController({config:{appearance:s,checkoutSettings:r,currencyConverter:i,helloSettings:c,onCountryChange:l,overrideCurrencyFormat:d}}),f.doneInit=!0}},g.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},g.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},g.showNotification=e=>{var n;null===(n=f.zonosController)||void 0===n||n.showNotification(e)},g.updateOrganizationName=e=>{var n;null===(n=f.zonosController)||void 0===n||n.updateOrganizationName(e)},g.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},g.injectController=({config:t})=>{var o;if(document.querySelector("zonos-controller"))return;if(null===(o=t.checkoutSettings)||void 0===o?void 0:o.placeOrderButtonSelector){const e=t.checkoutSettings.placeOrderButtonSelector;f.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{f.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=t,s.zonosApiKey=f.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async t=>{const{detail:o}=t;e("loading Stripe");const r=await(async(...e)=>{w=!0;const n=Date.now();return p.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),f.zonosController=s,e("Zonos controller injected!")},g.injectScript=({cdnType:t,isModule:o,theRestUrl:s})=>{const r=`${f.getZonosUrl(t)}/${s}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const c=document.head||document.body,l=document.createElement("script");o?l.type="module":l.noModule=!0,l.src=r,l.crossOrigin="anonymous",l.onerror=()=>{n(`Failed to load ${l.src}`);const e=i(t);e&&f.injectScript({cdnType:e,isModule:o,theRestUrl:s})},c.appendChild(l)},g.getZonosUrl=n=>{const t=()=>{switch(n){case"jsdelivr":return y;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.55";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.55";case"vercel":return v}};return f.isNpm&&(()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const t=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.55.js.zonos.com";if(!t&&(o.includes("test.")||o.includes("test-")))return o;if(!t&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const s=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s})()||t()},g.injectZonosCdn=()=>{f.injectScript({cdnType:r,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),f.injectScript({cdnType:r,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},g.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const o=f.getZonosUrl(e),s=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${v}/`,s.appendChild(r);const c=document.createElement("link");c.rel="stylesheet",c.href=`${o}/${t}`,c.onerror=()=>{n(`Failed to load ${c.href}`);const o=i(e);o&&f.injectStylesheet({cdnType:o,theRestUrl:t})},s.appendChild(c)},g.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(f.injectStylesheet({cdnType:r,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},g.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${z}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!S.test(t.href))return t}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=z,n.appendChild(t);const o=document.createElement("link");o.rel="stylesheet",o.href=`${z}/inter/inter.css`,n.appendChild(o),e("Zonos font injected!")},g.setupGoogleFont=e=>{var n;null===(n=f.zonosController)||void 0===n||n.setupGoogleFont(e)},g.injectSupportGoogleFont=n=>{var t;e(`[FONT] injecting ${n}`);const o=null===(t=n.match(/family=(.*?):/))||void 0===t?void 0:t[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${j}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=j,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${o} font injected!`)};export{g as Zonos}
@@ -1 +1 @@
1
- import{h as t,l as o,a as e}from"./p-7400bcd3.js";const a=async a=>{const s=await(async o=>{const{errors:e,json:a}=await t("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"});return!a||e.length?null:a})(a);return o("[ZONOS - loadZonos] getting temp cart data","info",s),s?{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}:(e("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)},s="zonos--checkout-hidden-button",n="zonos--domestic-redirected-checkout-button";export{s as c,n as d,a as s}
1
+ import{h as t,l as o,a as e}from"./p-6be07fde.js";const a=async a=>{const s=await(async o=>{const{errors:e,json:a}=await t("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"});return!a||e.length?null:a})(a);return o("[ZONOS - loadZonos] getting temp cart data","info",s),s?{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}:(e("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)},s="zonos--checkout-hidden-button",n="zonos--domestic-redirected-checkout-button";export{s as c,n as d,a as s}
@@ -0,0 +1 @@
1
+ import{r as o,h as s,H as e,F as t}from"./p-5b7da777.js";import{l as n,s as c,a as i,b as r,c as a,i as h,d,e as l,f as u,g as m,h as z,j as p,k,m as g,n as f,t as b,o as w,p as v,q as y,r as C,u as x,v as S}from"./p-8d9112e9.js";import{s as I,p as A}from"./p-41871fbd.js";import{z as j,g as O,m as B}from"./p-9dd6b00d.js";import{c as P,t as T,g as L}from"./p-4c30186a.js";import{i as $}from"./p-81a54668.js";import{l as D,a as H,s as N}from"./p-6be07fde.js";import{c as _}from"./p-b4b7f705.js";import{g as M}from"./p-f05f3e27.js";import{i as R}from"./p-23a84835.js";import{s as E,d as F,c as U}from"./p-068c9ba4.js";import{R as Z}from"./p-08e7107d.js";const V=o=>{const s=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:s}},W=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(document.dispatchEvent(P("legacyCheckoutError","Unable to initiate checkout process in a country where shipping is not available")),o&&D("Checkout: not shippable country"),1)),q='<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',G=class{constructor(s){o(this,s),this.onChangeLocaleListener=()=>{},this.applyStripeTheme=async()=>{var o,s,e,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||j.appearance.theme;await h({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0})},this.getCurrentLocalePageEnum=()=>{switch(d.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.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.inventoryCheckErrorMessage=null}async initCartInfoHandler(o){l({adjustments:d.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var s,e;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,I("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==d.step||u(),d.step="customer-info",m(),z(),null===(e=(s=j.checkoutSettings).onClose)||void 0===e||e.call(s)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if(window.Zonos.cartData){D("tempCartUUID is provided, start building cart");const{adjustments:o,cartItems:s}=V(window.Zonos.cartData);await l({adjustments:o,cartItems:s})}else if("function"==typeof j.checkoutSettings.createCartId){D('"createCartId" is provided, start building cart');const o=await j.checkoutSettings.createCartId();window.Zonos.cartId=o;const s=await E(o),e=null==s?void 0:s.cartData;if(!e)return void H("Fail to build cart, please try again.");const{adjustments:t,cartItems:n}=V(e);await l({adjustments:t,cartItems:n})}else if(j.checkoutSettings.buildCartDetail&&n.selectedCountryCode){D("build cart detail");const o=await j.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency});await l({adjustments:[],cartItems:o})}if(!p.clientSecret){const o=await k();if(D(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}reloadCheckoutSession(){window.location.reload()}attachCheckout(){const o=j.checkoutSettings.placeOrderButtonSelector;if(D(`attach checkout ${o}`),!o&&!window.Zonos.cartData)return;const s=[o,`#${F}`,`#${U}`].filter(Boolean);document.querySelectorAll(s.join(",")).forEach((s=>{s.getAttribute("data-zonos-checkout-attached")||(D(`attached event to button ${o}`,"info",{button:s}),s.addEventListener("click",(async o=>{if(W()){o.preventDefault(),o.stopPropagation(),D("zonos checkout button clicked"),p.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");g({isPreview:this.preview,sessionTimeout:54e5}),I("zonos-checkout-start"),T("checkout_open")}catch(o){p.isFetchingSession=!1,f({messages:[b("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:b("Error creating Checkout")})}}}),{capture:!0,passive:!1}),j.checkoutSettings.disablePlaceOrderButtonActivation||s.removeAttribute("disabled"),s.setAttribute("data-zonos-checkout-attached","true"),s.matches(F)&&(s.dispatchEvent(P("click")),r(),s.remove()),s.matches(`#${U}`)&&(s.dispatchEvent(P("click")),s.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParam(){const o=new URLSearchParams(window.location.search),s={country:o.get("country")||n.selectedCountryCode,customerAddress1:o.get("customerAddress1"),customerAddress2:o.get("customerAddress2"),customerCity:o.get("customerCity"),customerEmail:o.get("customerEmail"),customerName:o.get("customerName"),customerPhone:o.get("customerPhone"),customerState:o.get("customerState"),customerZip:o.get("customerZip")};s.customerAddress1&&s.customerCity&&s.customerName&&s.customerPhone&&s.customerState&&s.customerZip&&s.country?this.defaultAddress={address:{city:s.customerCity,country:s.country,line1:s.customerAddress1,line2:s.customerAddress2||"",postal_code:s.customerZip,state:s.customerState},email:s.customerEmail||"",name:s.customerName,phone:s.customerPhone}:D("Missing some query params so it can not be prefilled","info",s)}async init(){p.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const t=document.querySelector(o),n=c();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==s||s(n),void e.disconnect()}const h=document.querySelector('select[name="shippingAddress.countryCode"]'),d=document.querySelector("#checkout-shipping-continue");h&&d&&(e.disconnect(),d.addEventListener("click",(async o=>{var s,e;const t=h.value;if(!t)return;if(i(t),!W(!1))return void r();const n=document.querySelector("form");if(!n)return;const c=new FormData(n),d=document.querySelector("input#addressLine1Input"),l={address1:null!==(s=c.get("shippingAddress.address1"))&&void 0!==s?s:d&&d.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=c.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:c.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 N({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:{domain:window.location.hostname,storeId:j.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="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:F,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.useLegacyQueryParam();const o=setInterval((()=>{p.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(D("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):D("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){d.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await w();const o=setInterval((()=>{!d.landedCostData&&p.isFetchingLandedCost||(d.landedCostData&&(A({currency:d.currency}),v()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{v(),this.submitLoading=!1}),500)}handleInventoryCheckDialogCancel(){d.inventoryCheckErrorMessage=null}handleInventoryCheckDialogConfirm(){d.inventoryCheckErrorMessage=null,this.closeDialogHandler({confirmed:!0})}async handleStripePaymentContinue(){p.hasPaymentError=!1,this.submitLoading=!0,d.inventoryCheckErrorMessage=null;try{d.inventoryCheckErrorMessage=await y()}catch(o){d.inventoryCheckErrorMessage=b("Unable to check inventory. Please try again.")}if(d.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await C(),v(),z()}catch(o){H(o),p.hasPaymentError=!0}this.submitLoading=!1}}async handleFinishClick(){if(x(),this.preview)return d.step="customer-info",void await this.init();if(u(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl;return void(window.location.href=o)}const o=window.location.href.split("?")[0],s=L();this.open=!1,s||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=$(this.mobile),this.applyStripeTheme(),D(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=$(this.mobile),this.applyStripeTheme(),D(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=O(this.appearanceSettingsOverride.theme))}handleAddressChange(){x()}componentWillLoad(){this.init(),this.isMobile=$(this.mobile),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=S("selectedLocale",(()=>{this.applyStripeTheme()})),D(`mobile: ${this.isMobile}`)}disconnectedCallback(){x(),u(),this.onChangeLocaleListener()}render(){var o;const c="finish"!==d.step&&"error"!==d.step&&!p.stripeElements||p.isFetchingSession,{colorPrimary:i,colorSecondary:r,logoUrl:a,style:h}=B(j.appearance,this.appearanceSettingsOverride),l="ENABLED"===j.appearance.zonosAttribution,u=j.appearance.theme,m=i&&R(i)?"DARK":"LIGHT",z=this.isMobile?u:m,k=this.isMobile?void 0:r,{customMessages:g}=n,f=null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,w=this.getCurrentLocalePageEnum(),v=g.filter((o=>o.pageName===w)),y=()=>{const o=this.preview?`${a}?timestamp=${Date.now()}`:a;return s("div",{class:"zonos--logo"},o&&s("img",{alt:`${j.organizationName} logo`,src:o,width:100}))},C=L(),x=()=>s("zonos-v-stack",null,s("div",{class:"zonos--logo-wrapper"},y(),C&&s("zonos-badge",{badgeColor:"orange",size:"small"},b("Test mode"))),s("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),v.map((o=>s("zonos-custom-message",{icon:q,message:o.message})))),S=()=>d.checkoutSessionTimeoutShow?s("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:b("Your checkout session has expired. Please reload the page to continue."),restStateTitle:b("Session timed out"),restStateType:"Warning"},s("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},b("Reload"))):s("div",{class:"zonos--content",style:{"--border-radius":M({overrideBorderStyle:h})}},"finish"!==d.step&&"error"!==d.step&&s(t,null,s("div",{class:"zonos--left","data-theme":z,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&x(),"customer-info"===d.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k}),"shipping"===d.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k}),"payment"===d.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:k})),s("div",{class:"zonos--right","data-theme":u},this.isMobile&&x(),!this.isLegacyCheckout&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:Z}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null),this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:q,message:f})))),s("zonos-cart-restricted-items",null),!this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:q,message:f}))))),("finish"===d.step||"error"===d.step)&&s("div",{class:"zonos--done","data-theme":u},s("div",{class:"zonos--header"},y(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:Z}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:u})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===d.step&&d.error?Object.assign(Object.assign({},d.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",{"data-theme":u,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return s(e,{class:_(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?S():s("zonos-dialog",{borderStyle:h,"data-theme":u,height:"980px",isLoading:c,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},S()),s("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:b("Don't close"),dialogConfirmBtnText:b("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:b("Would you like to close checkout and return to the site?"),dialogTitle:b("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),s("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:b("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:b("Couldn't place order"),dialogType:"alert",onCancelClicked:()=>{this.handleInventoryCheckDialogCancel()},onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}}};G.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--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(--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(--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--close-button.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2}.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--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(--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}";export{G as zonos_checkout}
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-5b7da777.js";import{l as a}from"./p-1c29081a.js";import{d as e}from"./p-9dd6b00d.js";import{c as n}from"./p-b4b7f705.js";import"./p-7400bcd3.js";import"./p-23a84835.js";import"./p-f05f3e27.js";const h=class{constructor(s){t(this,s),this.countryCode=a.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=e();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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}";export{h as zonos_country_flag}
1
+ import{r as t,h as s,H as o,d as i}from"./p-5b7da777.js";import{l as e}from"./p-8d9112e9.js";import{d as a}from"./p-9dd6b00d.js";import{c as n}from"./p-b4b7f705.js";import"./p-6be07fde.js";import"./p-23a84835.js";import"./p-f05f3e27.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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}";export{h as zonos_country_flag}