@zonos/elements 1.3.83 → 1.3.85

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 (144) hide show
  1. package/dist/cjs/{cart-4de3faca.js → cart-fc426d98.js} +94 -144
  2. package/dist/cjs/{createCustomEvent-65331eae.js → createCustomEvent-354c8e63.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{paypal-370b3a10.js → paypal-1fe5ed0c.js} +1 -1
  5. package/dist/cjs/zonos-address_7.cjs.entry.js +3 -3
  6. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +30 -13
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -7
  8. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
  15. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +3 -1
  16. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +12 -3
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -3
  18. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +2 -1
  19. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +3 -2
  20. package/dist/collection/components/store/checkout/cart.js +0 -1
  21. package/dist/collection/components/store/checkout/stripe.js +4 -2
  22. package/dist/collection/components/store/hello/localization.js +6 -2
  23. package/dist/collection/components/store/translationStore/strings.arabic.js +4 -7
  24. package/dist/collection/components/store/translationStore/strings.base.js +4 -7
  25. package/dist/collection/components/store/translationStore/strings.chinese.js +4 -7
  26. package/dist/collection/components/store/translationStore/strings.danish.js +4 -7
  27. package/dist/collection/components/store/translationStore/strings.dutch.js +4 -7
  28. package/dist/collection/components/store/translationStore/strings.french.js +4 -7
  29. package/dist/collection/components/store/translationStore/strings.german.js +4 -7
  30. package/dist/collection/components/store/translationStore/strings.hebrew.js +4 -7
  31. package/dist/collection/components/store/translationStore/strings.indonesian.js +4 -7
  32. package/dist/collection/components/store/translationStore/strings.italian.js +4 -7
  33. package/dist/collection/components/store/translationStore/strings.japanese.js +4 -7
  34. package/dist/collection/components/store/translationStore/strings.korean.js +4 -7
  35. package/dist/collection/components/store/translationStore/strings.norwegian.js +4 -7
  36. package/dist/collection/components/store/translationStore/strings.polish.js +4 -7
  37. package/dist/collection/components/store/translationStore/strings.portuguese.js +4 -7
  38. package/dist/collection/components/store/translationStore/strings.russian.js +4 -7
  39. package/dist/collection/components/store/translationStore/strings.spanish.js +4 -7
  40. package/dist/collection/components/store/translationStore/strings.swedish.js +4 -7
  41. package/dist/collection/components/store/translationStore/strings.turkish.js +4 -7
  42. package/dist/collection/components/store/translationStore/strings.vietnamese.js +4 -7
  43. package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -3
  44. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
  45. package/dist/collection/components/utils/checkout/isDisabledCountry.js +0 -2
  46. package/dist/collection/components/utils/checkout/isShippableCountry.js +0 -2
  47. package/dist/collection/components/utils/getContrastColor.js +8 -3
  48. package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
  49. package/dist/esm/{cart-bdc45f59.js → cart-6c44367a.js} +94 -145
  50. package/dist/esm/{createCustomEvent-4db13122.js → createCustomEvent-ec15a4a7.js} +1 -1
  51. package/dist/esm/index.js +7 -7
  52. package/dist/esm/{paypal-1b29d424.js → paypal-a562a640.js} +1 -1
  53. package/dist/esm/zonos-address_7.entry.js +3 -3
  54. package/dist/esm/zonos-cart-items_12.entry.js +30 -13
  55. package/dist/esm/zonos-checkout.entry.js +9 -7
  56. package/dist/esm/zonos-controller.entry.js +1 -1
  57. package/dist/esm/zonos-country-flag.entry.js +1 -1
  58. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  59. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  60. package/dist/esm/zonos-hello.entry.js +1 -1
  61. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  62. package/dist/esm/zonos-notification_3.entry.js +4 -4
  63. package/dist/esm-es5/cart-6c44367a.js +1 -0
  64. package/dist/esm-es5/{createCustomEvent-4db13122.js → createCustomEvent-ec15a4a7.js} +1 -1
  65. package/dist/esm-es5/index.js +1 -1
  66. package/dist/esm-es5/{paypal-1b29d424.js → paypal-a562a640.js} +1 -1
  67. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  68. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  69. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  70. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  71. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  72. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  73. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  74. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  75. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  76. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  77. package/dist/scripts/index.js +1 -1
  78. package/dist/scripts/loadZonos.js +1 -1
  79. package/dist/scripts/zonos.js +1 -1
  80. package/dist/types/components/store/hello/localization.d.ts +4 -0
  81. package/dist/types/components/store/translationStore/strings.arabic.d.ts +2 -5
  82. package/dist/types/components/store/translationStore/strings.base.d.ts +2 -5
  83. package/dist/types/components/store/translationStore/strings.chinese.d.ts +2 -5
  84. package/dist/types/components/store/translationStore/strings.danish.d.ts +2 -5
  85. package/dist/types/components/store/translationStore/strings.dutch.d.ts +2 -5
  86. package/dist/types/components/store/translationStore/strings.french.d.ts +2 -5
  87. package/dist/types/components/store/translationStore/strings.german.d.ts +2 -5
  88. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +2 -5
  89. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +2 -5
  90. package/dist/types/components/store/translationStore/strings.italian.d.ts +2 -5
  91. package/dist/types/components/store/translationStore/strings.japanese.d.ts +2 -5
  92. package/dist/types/components/store/translationStore/strings.korean.d.ts +2 -5
  93. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +2 -5
  94. package/dist/types/components/store/translationStore/strings.polish.d.ts +2 -5
  95. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +2 -5
  96. package/dist/types/components/store/translationStore/strings.russian.d.ts +2 -5
  97. package/dist/types/components/store/translationStore/strings.spanish.d.ts +2 -5
  98. package/dist/types/components/store/translationStore/strings.swedish.d.ts +2 -5
  99. package/dist/types/components/store/translationStore/strings.turkish.d.ts +2 -5
  100. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +2 -5
  101. package/dist/types/components/store/translationStore.d.ts +1 -1
  102. package/dist/zonos-elements/assets/ChevronUpIcon.svg +1 -23
  103. package/dist/zonos-elements/index.esm.js +1 -1
  104. package/dist/zonos-elements/{p-a34f0674.entry.js → p-01604d44.entry.js} +1 -1
  105. package/dist/zonos-elements/{p-a6cff57f.system.js → p-08fee913.system.js} +1 -1
  106. package/dist/zonos-elements/{p-4ec7afc5.system.js → p-092961f1.system.js} +1 -1
  107. package/dist/zonos-elements/{p-2140ccb4.system.entry.js → p-133595ff.system.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-2183128a.system.entry.js → p-1eb59b7c.system.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-3457c5e8.system.entry.js → p-35b6b151.system.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-017bf338.entry.js → p-3b3cb2a4.entry.js} +1 -1
  111. package/dist/zonos-elements/p-51e2df70.entry.js +1 -0
  112. package/dist/zonos-elements/{p-b0303b0e.entry.js → p-5ba198b3.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-e3df5ff6.system.entry.js → p-5ebde561.system.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-9cfa3736.system.entry.js → p-63a33354.system.entry.js} +1 -1
  115. package/dist/zonos-elements/p-64b67900.entry.js +1 -0
  116. package/dist/zonos-elements/p-6b7fa35e.system.js +1 -0
  117. package/dist/zonos-elements/p-710ac059.js +1 -0
  118. package/dist/zonos-elements/{p-01d11845.system.entry.js → p-76013796.system.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-f1d043ad.system.entry.js → p-7b4a5b9b.system.entry.js} +1 -1
  120. package/dist/zonos-elements/p-95241447.entry.js +1 -0
  121. package/dist/zonos-elements/p-a26a8ca5.system.entry.js +1 -0
  122. package/dist/zonos-elements/{p-9b911f6f.entry.js → p-a858a304.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-6aa35f18.entry.js → p-b5316c2c.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-a1fa0a1c.system.js → p-b9645c27.system.js} +1 -1
  125. package/dist/zonos-elements/p-c37b99dd.system.entry.js +1 -0
  126. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  127. package/dist/zonos-elements/{p-7cc5e325.js → p-cbb742ab.js} +1 -1
  128. package/dist/zonos-elements/p-d7b341e3.system.entry.js +1 -0
  129. package/dist/zonos-elements/p-de6c2a4a.entry.js +1 -0
  130. package/dist/zonos-elements/{p-771e2623.entry.js → p-e78c2429.entry.js} +1 -1
  131. package/dist/zonos-elements/p-ee8b5e53.js +1 -0
  132. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  133. package/package.json +1 -1
  134. package/dist/esm-es5/cart-bdc45f59.js +0 -1
  135. package/dist/zonos-elements/p-00bb8221.system.entry.js +0 -1
  136. package/dist/zonos-elements/p-0cc8c6a3.system.js +0 -1
  137. package/dist/zonos-elements/p-278d61ed.js +0 -1
  138. package/dist/zonos-elements/p-2b60faf8.entry.js +0 -1
  139. package/dist/zonos-elements/p-3347e142.entry.js +0 -1
  140. package/dist/zonos-elements/p-5fb337a0.entry.js +0 -1
  141. package/dist/zonos-elements/p-7f3aeb53.system.entry.js +0 -1
  142. package/dist/zonos-elements/p-844ec9f9.system.entry.js +0 -1
  143. package/dist/zonos-elements/p-c6350880.entry.js +0 -1
  144. package/dist/zonos-elements/p-ce41cbde.js +0 -1
@@ -1 +1 @@
1
- (function(){"use strict";const e=performance.now(),t=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){if(e&&"function"==typeof e.toString){return e.toString()}return"Unable to stringify info"}},o=(o,n,...r)=>{var s,i;const l=performance.now()-e,a=[`(${l>1e3?`${(l/1e3).toFixed(2)}s`:`${l.toFixed(2)}ms`})`,...r];a.map(t).join(" ");if(!(!!(null===(s=window.Zonos)||void 0===s?void 0:s.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===n&&console.error(o,...a));let c=document.querySelector("iframe#zonos---debug-logging-iframe");c||(c=document.createElement("iframe"),c.id="zonos---debug-logging-iframe",c.style.display="none",c.style.opacity="0",c.style.position="absolute",c.style.top="-9999px",c.style.left="-9999px",c.style.width="1px",c.style.height="1px",c.style.border="none",c.style.overflow="hidden",c.style.visibility="hidden",document.body.appendChild(c));const d=(null===(i=c.contentWindow)||void 0===i?void 0:i.window.console)||window.console;switch(n){case"warn":d.warn(o,...a);break;case"info":d.info(o,...a);break;case"error":d.error(o,...a);break;default:d.groupCollapsed(o,...a),d.trace(),d.groupEnd()}},n=(e,...t)=>{o(e,"error",...t)},r=["jsdelivr","cdnjs","unpkg","vercel"],s="jsdelivr",i=e=>{const t=r.indexOf(e);return r[t+1]||null},l=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const t=(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.83.js.zonos.com";if(!t&&(n.includes("test.")||n.includes("test-")))return n;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 r=`https://${t}.preview.js.zonos.com`;return o(`[ZONOS-WARNING] using '${r}' for loading elements 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},a="https://js.stripe.com/v3",c=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let u=null;const p=e=>(null!==u||(u=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(d),window.Stripe)t(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${a}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&c.test(o.src))return o}return null})();r&&e?console.warn(d):r||(r=(e=>{const t=document.createElement("script");t.src=`${a}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),u),m=Promise.resolve().then((()=>p(null)));let h=!1;m.catch((e=>{h||console.warn(e)}));function y(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 w=["cloudflare","vercel"],f=w[0],g={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},v=g[f],b=(e=f)=>{const t=w.indexOf(e),o=w[t+1];return o||null},S=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},z=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}},j=async({basePathType:e,options:t,path:o})=>{let n;const r=window.Zonos.zonosQaUrlApi||g[e]||f,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:"Failed 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 z({response:n}),response:n,zonosMode:i}}const a=n.status.toString();try{const e=await z({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}}},O=async({basePathType:e,options:t,path:n})=>{var r,s;const i=n.startsWith("/api/bigcommerce")?"vercel":e,l=await j({basePathType:i,options:t,path:n}),{errors:a,response:c}=l,d=y(l,["errors","response"]),u=b(i),p=!!a.find((({type:e})=>"unknown"===e))||404===(null==c?void 0:c.status),m=u&&p;return p&&(async({endpoint:e,errors:t,metadata:n,shouldPostReleaseErrorReporting:r})=>{if(o("sendErrorLog","warn",e,n,t),r){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,i={endpoint:e,errors:t,metadata:Object.assign({href:window.location.href,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},n)};try{fetch(`${v}/api/zonos-elements/log-error`,{body:JSON.stringify(i),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const t=b();if(!t)return;fetch(`${g[t]}/api/zonos-elements/log-error`,{body:JSON.stringify(i),method:"POST"})}})({endpoint:g[i]+n,errors:a.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:i,nextFallbackApiType:u,requestHeaders:null==t?void 0:t.headers,requestPayload:S(null===(r=null==t?void 0:t.body)||void 0===r?void 0:r.toString())||(null===(s=null==t?void 0:t.body)||void 0===s?void 0:s.toString()),status:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText},shouldPostReleaseErrorReporting:!0}),m?(o(`=== "${n}" failed to fetch, trying next fallback ${u}`),O({basePathType:u,options:t,path:n})):Object.assign({errors:a,response:c},d)},C=async e=>{const{errors:t,json:n}=await(async(e,t)=>{const n=y(t||{},[]),r=n.body?JSON.stringify(n.body):void 0,s=n.method||"GET",i=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"},n.headers),l=Object.assign(Object.assign({},n),{body:"GET"===s?void 0:r,headers:i,method:s}),a=new URLSearchParams(window.location.search).get("useFallbackApi");return o(e,"info"),O({basePathType:a||f,options:l,path:e})})("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"});return!n||t.length?null:n};var k;const E=(()=>{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","dev.assets-checkout.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})(),A="https://v1.3.83.js.zonos.com",U=E||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.83",Z="https://rsms.me",T="https://fonts.googleapis.com",$=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class N{}k=N,N.doneInit=!1,N.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),N.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),N._paypalMockResponse=null,N.isBigCommerce=!1,N.releaseDate="1728684733949",N.isLegacyCheckout=!1,N.isNpm=!0,N.zonosQaUrl=null,N.zonosQaUrlApi=null,N.version="v1.3.83",N.modeAlerted=!1,N.cartData=null,N.paypal=null,N.getCurrentTimestamp=()=>(new Date).getTime(),N.zonosController=null,N.init=async({appearance:e,checkoutSettings:t,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l,storeId:a,zonosApiKey:c})=>{if(k.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!k.doneInit){if(o(`====== ZONOS DEBUG MODE: on (${k.version}) ======`),k.zonosApiKey=c,k.storeId=a,k.isNpm){if(o("====== ZONOS LOADING FROM NPM ======"),!c&&!k.cartId)return void n("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!k.cartData&&k.cartId){o("Initialize cart data");const e=await(async e=>{const t=await C(e);return o("[ZONOS - loadZonos] getting temp cart data","info",t),t?{cartData:t.cartData,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}:(n("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(k.cartId);if(!e)return void n("Failed to get cart data");k.cartData=e.cartData,k.zonosApiKey=e.zonosApiKey}}if(k.cartId&&k.cartData){o("Cart data is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id="zonos--checkout-hidden-button",document.body.appendChild(e)}o("init zonos"),k.injectZonosCdn(),k.injectZonosCss(),k.injectFonts(),k.injectController({config:{appearance:e,checkoutSettings:t,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l}}),k.doneInit=!0}},N.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},N.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},N.showNotification=e=>{var t;null===(t=k.zonosController)||void 0===t||t.showNotification(e)},N.updateOrganizationName=e=>{var t;null===(t=k.zonosController)||void 0===t||t.updateOrganizationName(e)},N.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)}},N.injectController=({config:e})=>{var t;if(document.querySelector("zonos-controller"))return;if(null===(t=e.checkoutSettings)||void 0===t?void 0:t.placeOrderButtonSelector){const t=e.checkoutSettings.placeOrderButtonSelector;k.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:t});new MutationObserver((()=>{k.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:t})})).observe(document.body,{childList:!0,subtree:!0})}const r=document.createElement("zonos-controller");r.config=e,r.zonosApiKey=k.zonosApiKey||"",r.addEventListener("stripeInitEvent",(async e=>{const{detail:t}=e;o("loading Stripe");const s=await(async(...e)=>{h=!0;const t=Date.now();return m.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)))})(t.publishableKey);s?(window.Zonos.stripe=s,r.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(r),k.zonosController=r,o("Zonos controller injected!")},N.injectScript=({cdnType:e,isModule:t,theRestUrl:r})=>{const s=`${k.getZonosUrl(e)}/${r}`;if(document.querySelector(`script[src="${s}"]`))return void o(`Zonos script "${s}" already exists in the document`,"warn");const l=document.head||document.body,a=document.createElement("script");t?a.type="module":a.noModule=!0,a.src=s,a.crossOrigin="anonymous",a.onerror=()=>{n(`Failed to load ${a.src}`);const o=i(e);o&&k.injectScript({cdnType:o,isModule:t,theRestUrl:r})},l.appendChild(a)},N.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return U;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.83";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.83";case"vercel":return A}};if(k.isNpm){return l()||t()}return t()},N.injectZonosCdn=()=>{k.injectScript({cdnType:s,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),k.injectScript({cdnType:s,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),o("Zonos cdn script injected!")},N.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const o=k.getZonosUrl(e),r=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${A}/`,r.appendChild(s);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${t}`,l.onerror=()=>{n(`Failed to load ${l.href}`);const o=i(e);o&&k.injectStylesheet({cdnType:o,theRestUrl:t})},r.appendChild(l)},N.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?o("Zonos style links already injected","warn"):(k.injectStylesheet({cdnType:s,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),o("Zonos style css injected!"))},N.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${Z}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&!$.test(o.href))return o}return null})())return void o("Inter font already injected","warn");const e=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=Z,e.appendChild(t);const n=document.createElement("link");n.rel="stylesheet",n.href=`${Z}/inter/inter.css`,e.appendChild(n),o("Zonos font injected!")},N.setupGoogleFont=e=>{var t;null===(t=k.zonosController)||void 0===t||t.setupGoogleFont(e)},N.injectSupportGoogleFont=e=>{var t;o(`[FONT] injecting ${e}`);const n=null===(t=e.match(/family=(.*?):/))||void 0===t?void 0:t[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${T}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=T,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void o(`[FONT] ${n} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,r.appendChild(s),o(`[FONT] ${n} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=N)})();
1
+ (function(){"use strict";const e=performance.now(),t=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){if(e&&"function"==typeof e.toString){return e.toString()}return"Unable to stringify info"}},o=(o,n,...r)=>{var s,i;const l=performance.now()-e,a=[`(${l>1e3?`${(l/1e3).toFixed(2)}s`:`${l.toFixed(2)}ms`})`,...r];a.map(t).join(" ");if(!(!!(null===(s=window.Zonos)||void 0===s?void 0:s.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===n&&console.error(o,...a));let c=document.querySelector("iframe#zonos---debug-logging-iframe");c||(c=document.createElement("iframe"),c.id="zonos---debug-logging-iframe",c.style.display="none",c.style.opacity="0",c.style.position="absolute",c.style.top="-9999px",c.style.left="-9999px",c.style.width="1px",c.style.height="1px",c.style.border="none",c.style.overflow="hidden",c.style.visibility="hidden",document.body.appendChild(c));const d=(null===(i=c.contentWindow)||void 0===i?void 0:i.window.console)||window.console;switch(n){case"warn":d.warn(o,...a);break;case"info":d.info(o,...a);break;case"error":d.error(o,...a);break;default:d.groupCollapsed(o,...a),d.trace(),d.groupEnd()}},n=(e,...t)=>{o(e,"error",...t)},r=["jsdelivr","cdnjs","unpkg","vercel"],s="jsdelivr",i=e=>{const t=r.indexOf(e);return r[t+1]||null},l=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const t=(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.85.js.zonos.com";if(!t&&(n.includes("test.")||n.includes("test-")))return n;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 r=`https://${t}.preview.js.zonos.com`;return o(`[ZONOS-WARNING] using '${r}' for loading elements 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},a="https://js.stripe.com/v3",c=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let u=null;const p=e=>(null!==u||(u=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(d),window.Stripe)t(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${a}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&c.test(o.src))return o}return null})();r&&e?console.warn(d):r||(r=(e=>{const t=document.createElement("script");t.src=`${a}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==r||r.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),u),m=Promise.resolve().then((()=>p(null)));let h=!1;m.catch((e=>{h||console.warn(e)}));function y(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 w=["cloudflare","vercel"],f=w[0],g={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},v=g[f],b=(e=f)=>{const t=w.indexOf(e),o=w[t+1];return o||null},S=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},z=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}},j=async({basePathType:e,options:t,path:o})=>{let n;const r=window.Zonos.zonosQaUrlApi||g[e]||f,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:"Failed 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 z({response:n}),response:n,zonosMode:i}}const a=n.status.toString();try{const e=await z({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}}},O=async({basePathType:e,options:t,path:n})=>{var r,s;const i=n.startsWith("/api/bigcommerce")?"vercel":e,l=await j({basePathType:i,options:t,path:n}),{errors:a,response:c}=l,d=y(l,["errors","response"]),u=b(i),p=!!a.find((({type:e})=>"unknown"===e))||404===(null==c?void 0:c.status),m=u&&p;return p&&(async({endpoint:e,errors:t,metadata:n,shouldPostReleaseErrorReporting:r})=>{if(o("sendErrorLog","warn",e,n,t),r){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,i={endpoint:e,errors:t,metadata:Object.assign({href:window.location.href,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},n)};try{fetch(`${v}/api/zonos-elements/log-error`,{body:JSON.stringify(i),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const t=b();if(!t)return;fetch(`${g[t]}/api/zonos-elements/log-error`,{body:JSON.stringify(i),method:"POST"})}})({endpoint:g[i]+n,errors:a.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:i,nextFallbackApiType:u,requestHeaders:null==t?void 0:t.headers,requestPayload:S(null===(r=null==t?void 0:t.body)||void 0===r?void 0:r.toString())||(null===(s=null==t?void 0:t.body)||void 0===s?void 0:s.toString()),status:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText},shouldPostReleaseErrorReporting:!0}),m?(o(`=== "${n}" failed to fetch, trying next fallback ${u}`),O({basePathType:u,options:t,path:n})):Object.assign({errors:a,response:c},d)},C=async e=>{const{errors:t,json:n}=await(async(e,t)=>{const n=y(t||{},[]),r=n.body?JSON.stringify(n.body):void 0,s=n.method||"GET",i=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"},n.headers),l=Object.assign(Object.assign({},n),{body:"GET"===s?void 0:r,headers:i,method:s}),a=new URLSearchParams(window.location.search).get("useFallbackApi");return o(e,"info"),O({basePathType:a||f,options:l,path:e})})("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"});return!n||t.length?null:n};var k;const E=(()=>{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","dev.assets-checkout.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})(),A="https://v1.3.85.js.zonos.com",U=E||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.85",Z="https://rsms.me",T="https://fonts.googleapis.com",$=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class N{}k=N,N.doneInit=!1,N.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),N.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),N._paypalMockResponse=null,N.isBigCommerce=!1,N.releaseDate="1728761845132",N.isLegacyCheckout=!1,N.isNpm=!0,N.zonosQaUrl=null,N.zonosQaUrlApi=null,N.version="v1.3.85",N.modeAlerted=!1,N.cartData=null,N.paypal=null,N.getCurrentTimestamp=()=>(new Date).getTime(),N.zonosController=null,N.init=async({appearance:e,checkoutSettings:t,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l,storeId:a,zonosApiKey:c})=>{if(k.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!k.doneInit){if(o(`====== ZONOS DEBUG MODE: on (${k.version}) ======`),k.zonosApiKey=c,k.storeId=a,k.isNpm){if(o("====== ZONOS LOADING FROM NPM ======"),!c&&!k.cartId)return void n("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!k.cartData&&k.cartId){o("Initialize cart data");const e=await(async e=>{const t=await C(e);return o("[ZONOS - loadZonos] getting temp cart data","info",t),t?{cartData:t.cartData,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}:(n("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(k.cartId);if(!e)return void n("Failed to get cart data");k.cartData=e.cartData,k.zonosApiKey=e.zonosApiKey}}if(k.cartId&&k.cartData){o("Cart data is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id="zonos--checkout-hidden-button",document.body.appendChild(e)}o("init zonos"),k.injectZonosCdn(),k.injectZonosCss(),k.injectFonts(),k.injectController({config:{appearance:e,checkoutSettings:t,currencyConverter:r,helloSettings:s,onCountryChange:i,overrideCurrencyFormat:l}}),k.doneInit=!0}},N.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},N.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},N.showNotification=e=>{var t;null===(t=k.zonosController)||void 0===t||t.showNotification(e)},N.updateOrganizationName=e=>{var t;null===(t=k.zonosController)||void 0===t||t.updateOrganizationName(e)},N.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)}},N.injectController=({config:e})=>{var t;if(document.querySelector("zonos-controller"))return;if(null===(t=e.checkoutSettings)||void 0===t?void 0:t.placeOrderButtonSelector){const t=e.checkoutSettings.placeOrderButtonSelector;k.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:t});new MutationObserver((()=>{k.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:t})})).observe(document.body,{childList:!0,subtree:!0})}const r=document.createElement("zonos-controller");r.config=e,r.zonosApiKey=k.zonosApiKey||"",r.addEventListener("stripeInitEvent",(async e=>{const{detail:t}=e;o("loading Stripe");const s=await(async(...e)=>{h=!0;const t=Date.now();return m.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)))})(t.publishableKey);s?(window.Zonos.stripe=s,r.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(r),k.zonosController=r,o("Zonos controller injected!")},N.injectScript=({cdnType:e,isModule:t,theRestUrl:r})=>{const s=`${k.getZonosUrl(e)}/${r}`;if(document.querySelector(`script[src="${s}"]`))return void o(`Zonos script "${s}" already exists in the document`,"warn");const l=document.head||document.body,a=document.createElement("script");t?a.type="module":a.noModule=!0,a.src=s,a.crossOrigin="anonymous",a.onerror=()=>{n(`Failed to load ${a.src}`);const o=i(e);o&&k.injectScript({cdnType:o,isModule:t,theRestUrl:r})},l.appendChild(a)},N.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return U;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.85";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.85";case"vercel":return A}};if(k.isNpm){return l()||t()}return t()},N.injectZonosCdn=()=>{k.injectScript({cdnType:s,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),k.injectScript({cdnType:s,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),o("Zonos cdn script injected!")},N.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const o=k.getZonosUrl(e),r=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${A}/`,r.appendChild(s);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${t}`,l.onerror=()=>{n(`Failed to load ${l.href}`);const o=i(e);o&&k.injectStylesheet({cdnType:o,theRestUrl:t})},r.appendChild(l)},N.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?o("Zonos style links already injected","warn"):(k.injectStylesheet({cdnType:s,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),o("Zonos style css injected!"))},N.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${Z}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&!$.test(o.href))return o}return null})())return void o("Inter font already injected","warn");const e=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=Z,e.appendChild(t);const n=document.createElement("link");n.rel="stylesheet",n.href=`${Z}/inter/inter.css`,e.appendChild(n),o("Zonos font injected!")},N.setupGoogleFont=e=>{var t;null===(t=k.zonosController)||void 0===t||t.setupGoogleFont(e)},N.injectSupportGoogleFont=e=>{var t;o(`[FONT] injecting ${e}`);const n=null===(t=e.match(/family=(.*?):/))||void 0===t?void 0:t[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${T}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=T,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void o(`[FONT] ${n} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,r.appendChild(s),o(`[FONT] ${n} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=N)})();
@@ -28,6 +28,10 @@ type ILocaleMessageForUse = {
28
28
  message?: string;
29
29
  pageName: Locale_PageName_Enum;
30
30
  };
31
+ /**
32
+ * CHORE: This is mostly for legacy checkout as the country param is not guaranteed.
33
+ */
34
+ export declare const DEFAULT_COUNTRY_CODE_LEGACY_CHECKOUT: CountryCode;
31
35
  declare const localizationDispose: () => void, localizationStoreOnUpdate: import("@stencil/store/dist/types").OnChangeHandler<LocalizationStore>, localizationStore: LocalizationStore;
32
36
  declare const localizationStoreUpdateSelectedCountryCode: (newSelectedCountryCode: CountryCode | null) => void;
33
37
  declare const initLocalizationStore: () => Promise<void>;
@@ -137,7 +137,7 @@ export declare const stringsArabic: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsArabic: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsArabic: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsBase: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsBase: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsBase: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsChinese: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsChinese: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsChinese: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsDanish: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsDanish: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsDanish: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsDutch: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsDutch: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsDutch: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsFrench: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsFrench: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsFrench: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsGerman: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsGerman: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsGerman: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsHebrew: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsHebrew: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsHebrew: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsIndonesian: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsIndonesian: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsIndonesian: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsItalian: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsItalian: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsItalian: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsJapanese: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsJapanese: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsJapanese: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsKorean: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsKorean: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsKorean: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsNorwegian: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsNorwegian: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsNorwegian: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsPolish: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsPolish: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsPolish: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsPortuguese: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsPortuguese: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsPortuguese: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsRussian: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsRussian: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsRussian: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsSpanish: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsSpanish: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsSpanish: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsSwedish: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsSwedish: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsSwedish: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsTurkish: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsTurkish: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsTurkish: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };
@@ -137,7 +137,7 @@ export declare const stringsVietnamese: {
137
137
  Hide: {
138
138
  value: string;
139
139
  };
140
- 'Hide non prepaid methods': {
140
+ 'Hide non-prepaid options': {
141
141
  value: string;
142
142
  };
143
143
  'Invalid promo code': {
@@ -284,7 +284,7 @@ export declare const stringsVietnamese: {
284
284
  Show: {
285
285
  value: string;
286
286
  };
287
- 'Show non prepaid methods': {
287
+ 'Show non-prepaid options': {
288
288
  value: string;
289
289
  };
290
290
  'Something went wrong.': {
@@ -386,9 +386,6 @@ export declare const stringsVietnamese: {
386
386
  days: {
387
387
  value: string;
388
388
  };
389
- or: {
390
- value: string;
391
- };
392
389
  'restricted items': {
393
390
  value: string;
394
391
  };