@zonos/elements 1.3.106 → 1.3.108

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 (146) hide show
  1. package/dist/cjs/{cart-31e4e866.js → cart-d25b699a.js} +244 -2
  2. package/dist/cjs/{createCustomEvent-18fbf653.js → createCustomEvent-4ea7b6dc.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{paypal-a101e3ca.js → paypal-fd423375.js} +7 -1
  6. package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
  7. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +36 -13
  8. package/dist/cjs/zonos-checkout.cjs.entry.js +90 -5
  9. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-elements.cjs.js +1 -1
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +28 -5
  18. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +91 -4
  19. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.css +1 -1
  20. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +26 -3
  21. package/dist/collection/components/store/checkout/paypal.js +3 -1
  22. package/dist/collection/components/store/checkout/stripe.js +4 -2
  23. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  24. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  25. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  26. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  27. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  28. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  29. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  30. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  31. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  32. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  33. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  34. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  35. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  36. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  37. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  38. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  39. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  40. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  41. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  42. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  43. package/dist/collection/types/checkout/OrderPlacedInfo.js +1 -0
  44. package/dist/collection/utils/generateCloudflareDeployUrl.js +2 -1
  45. package/dist/esm/{cart-5621d0fe.js → cart-911ba5dd.js} +244 -2
  46. package/dist/esm/{createCustomEvent-a9206df5.js → createCustomEvent-6ba5bcde.js} +1 -1
  47. package/dist/esm/index.js +7 -7
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/{paypal-869c30e1.js → paypal-04a10fc2.js} +7 -2
  50. package/dist/esm/zonos-address_7.entry.js +1 -1
  51. package/dist/esm/zonos-cart-items_13.entry.js +37 -14
  52. package/dist/esm/zonos-checkout.entry.js +91 -6
  53. package/dist/esm/zonos-controller.entry.js +1 -1
  54. package/dist/esm/zonos-country-flag.entry.js +1 -1
  55. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  56. package/dist/esm/zonos-elements.js +1 -1
  57. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  58. package/dist/esm/zonos-hello.entry.js +1 -1
  59. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  60. package/dist/esm/zonos-notification_3.entry.js +2 -2
  61. package/dist/esm-es5/cart-911ba5dd.js +1 -0
  62. package/dist/esm-es5/{createCustomEvent-a9206df5.js → createCustomEvent-6ba5bcde.js} +1 -1
  63. package/dist/esm-es5/index.js +1 -1
  64. package/dist/esm-es5/loader.js +1 -1
  65. package/dist/esm-es5/{paypal-869c30e1.js → paypal-04a10fc2.js} +2 -2
  66. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  67. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  68. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  69. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  70. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  71. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  72. package/dist/esm-es5/zonos-elements.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.d.ts +10 -0
  78. package/dist/scripts/index.js +1 -1
  79. package/dist/scripts/loadZonos.js +1 -1
  80. package/dist/scripts/zonos.js +1 -1
  81. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
  82. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
  83. package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +5 -0
  84. package/dist/types/components/store/checkout/stripe.d.ts +1 -0
  85. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  86. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  87. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  88. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  89. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  90. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  91. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  92. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  93. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  94. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  95. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  96. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  97. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  98. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  99. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  100. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  101. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  102. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  103. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  104. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  105. package/dist/types/components/store/translationStore.d.ts +1 -1
  106. package/dist/types/components.d.ts +10 -0
  107. package/dist/types/types/checkout/OrderPlacedInfo.d.ts +19 -0
  108. package/dist/zonos-elements/index.esm.js +1 -1
  109. package/dist/zonos-elements/{p-523c0f7d.js → p-018a4b36.js} +1 -1
  110. package/dist/zonos-elements/{p-82fec811.system.entry.js → p-123cabaa.system.entry.js} +1 -1
  111. package/dist/zonos-elements/{p-2babfaa4.system.js → p-14de27ff.system.js} +1 -1
  112. package/dist/zonos-elements/{p-23b042ad.entry.js → p-1e1397fe.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-e3b110c7.system.entry.js → p-24813754.system.entry.js} +1 -1
  114. package/dist/zonos-elements/p-27188a22.system.entry.js +1 -0
  115. package/dist/zonos-elements/p-39c09f18.system.entry.js +1 -0
  116. package/dist/zonos-elements/{p-7f93ce41.system.entry.js → p-45323a2f.system.entry.js} +1 -1
  117. package/dist/zonos-elements/p-60303c84.js +1 -0
  118. package/dist/zonos-elements/{p-1c295409.system.js → p-631570f0.system.js} +1 -1
  119. package/dist/zonos-elements/{p-5b6fa002.system.entry.js → p-6927d227.system.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-c2e463b7.system.entry.js → p-76a4a647.system.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-7152f8ca.entry.js → p-8632c8f1.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-7562828c.entry.js → p-8b0feb0e.entry.js} +1 -1
  123. package/dist/zonos-elements/p-8d98fed0.entry.js +1 -0
  124. package/dist/zonos-elements/{p-65512b26.entry.js → p-a0af6dc1.entry.js} +1 -1
  125. package/dist/zonos-elements/{p-f5e54692.entry.js → p-adbcf21c.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-cfda42ba.entry.js → p-ba3d2965.entry.js} +1 -1
  127. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  128. package/dist/zonos-elements/{p-139e32ba.system.entry.js → p-c9e8f159.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-43ef8bf8.entry.js → p-d6de8661.entry.js} +1 -1
  130. package/dist/zonos-elements/p-e2fa7600.entry.js +1 -0
  131. package/dist/zonos-elements/{p-21586642.system.entry.js → p-e5d1d031.system.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-062b6df4.system.js → p-e880ab28.system.js} +2 -2
  133. package/dist/zonos-elements/p-e9771827.system.js +1 -0
  134. package/dist/zonos-elements/{p-a8b27301.entry.js → p-eaf09ccb.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-1bb59ce2.system.entry.js → p-ee14ba06.system.entry.js} +1 -1
  136. package/dist/zonos-elements/p-ef9d6106.js +17 -0
  137. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  138. package/package.json +1 -1
  139. package/dist/esm-es5/cart-5621d0fe.js +0 -1
  140. package/dist/zonos-elements/p-239331fa.system.js +0 -1
  141. package/dist/zonos-elements/p-39346436.js +0 -1
  142. package/dist/zonos-elements/p-5a704905.system.entry.js +0 -1
  143. package/dist/zonos-elements/p-6a310417.js +0 -17
  144. package/dist/zonos-elements/p-a0c012a5.system.entry.js +0 -1
  145. package/dist/zonos-elements/p-d002dd35.entry.js +0 -1
  146. package/dist/zonos-elements/p-fb624d44.entry.js +0 -1
@@ -1 +1 @@
1
- (function(){"use strict";function e(e,o){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)o.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(n[r[t]]=e[r[t]])}return n}"function"==typeof SuppressedError&&SuppressedError;const o=["cloudflare","vercel"],n=o[0],r={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},t=r[n],s=(e=n)=>{const r=o.indexOf(e),t=o[r+1];return t||null},i=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},a=performance.now(),c=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(o){if(e&&"function"==typeof e.toString){return e.toString()}return"Unable to stringify info"}},l=(e,o,...n)=>{var r,t;const{elapsedTimePretty:s}=(()=>{const e=performance.now()-a,o=e>1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(2)}ms`;return{elapsedTime:e,elapsedTimePretty:o}})(),i=[`(${s})`,...n];i.map(c).join(" ");if(!(!!(null===(r=window.Zonos)||void 0===r?void 0:r.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===o&&console.error(e,...i));let l=document.querySelector("iframe#zonos---debug-logging-iframe");l||(l=document.createElement("iframe"),l.id="zonos---debug-logging-iframe",l.style.display="none",l.style.opacity="0",l.style.position="absolute",l.style.top="-9999px",l.style.left="-9999px",l.style.width="1px",l.style.height="1px",l.style.border="none",l.style.overflow="hidden",l.style.visibility="hidden",document.body.appendChild(l));const d=(null===(t=l.contentWindow)||void 0===t?void 0:t.window.console)||window.console;switch(o){case"warn":d.warn(e,...i);break;case"info":d.info(e,...i);break;case"error":d.error(e,...i);break;default:d.groupCollapsed(e,...i),d.trace(),d.groupEnd()}},d=async({endpoint:e,errors:o,metadata:n,shouldPostReleaseErrorReporting:i})=>{if(l("sendErrorLog","warn",e,n,o),i){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const a="userAgentData"in window.navigator?window.navigator.userAgentData:null,c={endpoint:e,errors:o,href:window.location.href,metadata:Object.assign({userAgent:a&&a.brands.length>0?a:window.navigator.userAgent},n)};try{fetch(`${t}/api/zonos-elements/log-error`,{body:JSON.stringify(c),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const o=s();if(!o)return;fetch(`${r[o]}/api/zonos-elements/log-error`,{body:JSON.stringify(c),method:"POST"})}},p=async({response:e,shouldLog:o=!0,shouldThrow:n=!1})=>{try{return await e.json()}catch(e){if(n)throw e;return o&&console.error(e),null}},u=async({basePathType:e,options:o,path:t})=>{let s;const i=window.Zonos.zonosQaUrlApi||r[e]||n,a=new URL(i+t);a.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));try{s=await fetch(a.toString(),o)}catch(e){if(e instanceof Error)return{baseUrl:i,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null};return{baseUrl:i,errors:[{message:"Failed to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const c=s.headers.get("Zonos-Mode"),l=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&c&&l&&(window.Zonos.modeAlerted=!0),s.ok){return{baseUrl:i,errors:[],json:await p({response:s}),response:s,zonosMode:c}}const d=s.status.toString();try{const e=await p({response:s,shouldThrow:!0});return{baseUrl:i,errors:[{message:JSON.stringify(e),type:d}],json:null,response:s,zonosMode:c}}catch(e){return{baseUrl:i,errors:[{message:`${d}: ${"Unknown error"}`,type:d}],json:null,response:null,zonosMode:c}}},m=async({basePathType:o,options:n,path:t})=>{var a,c;const p=t.startsWith("/api/bigcommerce")?"vercel":o,g=await u({basePathType:p,options:n,path:t}),{errors:w,response:f}=g,h=e(g,["errors","response"]),y=s(p),v=!!w.find((({type:e})=>"unknown"===e))||404===(null==f?void 0:f.status),S=y&&v;return v&&d({endpoint:r[p]+t,errors:w.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:p,nextFallbackApiType:y,requestHeaders:null==n?void 0:n.headers,requestPayload:i(null===(a=null==n?void 0:n.body)||void 0===a?void 0:a.toString())||(null===(c=null==n?void 0:n.body)||void 0===c?void 0:c.toString()),status:null==f?void 0:f.status,statusText:null==f?void 0:f.statusText},shouldPostReleaseErrorReporting:!0}),S?(l(`=== "${t}" failed to fetch, trying next fallback ${y}`),m({basePathType:y,options:n,path:t})):Object.assign({errors:w,response:f},h)},g=async(o,r)=>{const t=e(r||{},[]),s=t.body?JSON.stringify(t.body):void 0,i=t.method||"GET",a=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"},t.headers),c=Object.assign(Object.assign({},t),{body:"GET"===i?void 0:s,headers:a,method:i}),d=new URLSearchParams(window.location.search).get("useFallbackApi");return l(o,"info"),m({basePathType:d||n,options:c,path:o})},w=(e,...o)=>{l(e,"error",...o)},f=["jsdelivr","cdnjs","unpkg","vercel"],h=e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrl");if(!o)return null;return/[^a-zA-Z0-9-_]+/.test(o)?null:o},y=async({cartId:e,retries:o})=>{const n="1"===new URLSearchParams(window.location.search).get("zonosTestMode"),{errors:r,json:t}=await g("/api/zonos-elements/get-temp-cart",{body:{isTestMode:n,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),s=!t||r.length;return s&&o?(l("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:o}),await new Promise((e=>setTimeout(e,1e3))),y({cartId:e,retries:o-1})):s?null:t};var v;const S=(()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const o=h(window.location.href),n="https://v1.3.106.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 l(`[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:o}=window.location,n=`${o}?${e.toString()}`;return window.history.replaceState(window.history.state,"",n),window.location.reload(),null})),r})(),z=(()=>{const e=(e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrlApi");return o?/[^a-zA-Z0-9-_]+/.test(o)?null:o:null})(window.location.href),o=h(window.location.href),n=e||o;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.demo.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.demo.elements.zonos.com";if(!e)return null;const r=`https://${e}.route.js.zonos.com`;return l(`[ZONOS-WARNING] using '${r}' for serverless API`,"warn"),r})();class L{static get isNpm(){return!1}}v=L,L.isBigCommerce=!1,L.requested=!1,L.cartData=null,L.isLegacyCheckout=!1,L.legacyStoreLogo=null,L.legacyStoreFavicon=null,L.parallelLoadTimes=[],L.parallelLoadState="off",L.releaseDate="1729704481191",L.loadScriptLogHandler=async({cdnLoadTime:e,fallbackLoadTime:o,isError:n,metadata:r,scriptLoadUrl:t,storeId:s,type:i})=>{try{const e=window.performance.getEntriesByType("resource").find((e=>{const o=e;return o.name.includes(t)&&"script"===o.initiatorType}));null==e||e.transferSize;(async e=>{})((e&&(null==e?void 0:e.duration)>0?parseFloat(e.duration.toFixed(2)):parseFloat(o.toFixed(2)),Object.assign({decodedBodySize:null==e?void 0:e.decodedBodySize,encodedBodySize:null==e?void 0:e.encodedBodySize,fallbackLoadTime:o,isError:!!n},r)))}catch(e){}},L.loadScriptLogParallelHandler=async e=>{try{if(v.parallelLoadTimes.push(e),2===v.parallelLoadTimes.length){const e=v.parallelLoadTimes.find((e=>"vercel"===e.type)),o=v.parallelLoadTimes.find((e=>"jsdelivr"===e.type));if(!e||!o)return;if(e.isError&&o.isError)return void d({endpoint:`<${e.scriptLoadUrl}> <${o.scriptLoadUrl}>`,errors:["Failed to fetch both Vercel and jsdelivr CDN. Perhaps network issue on customer site."],metadata:{cdnLoadTime:o.fallbackLoadTime,cdnType:o.type,vercelLoadTime:e.fallbackLoadTime}});v.loadScriptLogHandler({cdnLoadTime:o.fallbackLoadTime,fallbackLoadTime:e.fallbackLoadTime,isError:e.isError,metadata:{cdnScriptFallbackTime:o.fallbackLoadTime,cdnScriptIsError:!!o.isError,cdnScriptLoadUrl:o.scriptLoadUrl,cdnScriptType:o.type},scriptLoadUrl:e.scriptLoadUrl,storeId:e.storeId,type:e.type})}}catch(e){}},L.legacyCheckoutErrorHandler=({message:e})=>{w(`[ZONOS - loadZonos] ${e}`),d({endpoint:"LegacyCheckoutInit",errors:[e],metadata:{tempCartUUID:v.cartId}}),document.dispatchEvent(new CustomEvent("legacyCheckoutError",{detail:e}))},L.getGithubCdn=({type:e,version:o})=>{let n="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.106";"cdnjs"===e?n="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.106":"unpkg"===e&&(n="https://unpkg.com/@zonos/elements@1.3.106");return o&&"alpha"!==o?n.replace(/@zonos\/elements@(.+)/,`@zonos/elements@${o}`).replace(/\/zonos-elements\/(.+)/,`/zonos-elements/${o}`):n},L.injectZonos=({cdnType:e="jsdelivr",initConfig:o,parallelLoaded:n,vercelUrl:r,version:t})=>{var s;const i="vercel"===e?r:v.getGithubCdn({type:e,version:t}),a=S||i,c=a.replace("https://","").replace("http://",""),p=document.createElement("script"),u=t&&t<"1.2.5"?"loadZonos.js":"zonos.js";p.src=`https://${c}/dist/scripts/${u}`,l(`[ZONOS - loadZonos] Injecting "${u}" from "${c}"`,"info");const m="4g"===(null===(s=(()=>{const e="connection"in window.navigator?window.navigator.connection:null,o="mozConnection"in window.navigator?window.navigator.mozConnection:null,n="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return e||o||n})())||void 0===s?void 0:s.effectiveType),g=["dev.elements.zonos.com","zonos.com"].some((e=>window.location.href.includes(e))),w=f[0]===e,h=f[1],y="on"===v.parallelLoadState&&m&&w&&h&&!g;y&&v.injectZonos({cdnType:h,initConfig:o,parallelLoaded:!0,vercelUrl:r,version:t});const L=performance.now();p.addEventListener("load",(()=>{var r;if(y||n?v.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-L,scriptLoadUrl:p.src,storeId:v.storeId,type:e}):v.loadScriptLogHandler({fallbackLoadTime:performance.now()-L,scriptLoadUrl:p.src,storeId:v.storeId,type:e}),v.isBigCommerce||(v.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.isNpm=!1,window.Zonos.zonosQaUrl=S,window.Zonos.zonosQaUrlApi=z,window.Zonos.isBigCommerce=v.isBigCommerce,v.cartId){if(!v.zonosApiKey)throw v.legacyCheckoutErrorHandler({message:"zonosApiKey is missing to initiate checkout"}),new Error("zonosApiKey is required for legacy checkout");if(!v.cartData)throw v.legacyCheckoutErrorHandler({message:"cartData is missing to initiate legacy checkout"}),new Error("cartData is required for legacy checkout");if(v.legacyStoreFavicon&&v.isLegacyCheckout){const e=document.createElement("link");e.rel="shortcut icon",e.type="image/x-icon",e.href=v.legacyStoreFavicon,document.head.appendChild(e)}window.Zonos.cartData=v.cartData,window.Zonos.isLegacyCheckout=v.isLegacyCheckout;const e=v.isLegacyCheckout&&"CLOSE_MODAL"===(null===(r=o.checkoutSettings)||void 0===r?void 0:r.successBehavior),n=Object.assign(Object.assign({},o),{appearance:Object.assign(Object.assign({},o.appearance),{logoUrl:v.legacyStoreLogo||""}),checkoutSettings:Object.assign(Object.assign({},o.checkoutSettings),{successBehavior:e?"ZONOS_SUCCESS_PAGE":void 0,successRedirectUrl:e?v.cartData.storeBaseUrl:void 0}),zonosApiKey:v.zonosApiKey});o=n}window.Zonos.version&&(l(`[ZONOS - loadZonos] Execute "Zonos.init" from "${u}" from "${c}"`,"info"),window.Zonos.init(o))})),p.addEventListener("error",(async()=>{const s=(e=>{const o=f.indexOf(e);return f[o+1]||null})(e);if(!y&&!n){if(!s)return;v.injectZonos({cdnType:s,initConfig:o,vercelUrl:r,version:t})}if(["localhost",".zonos.com"].some((e=>window.location.href.includes(e)))||S)return;if(y||n)return void v.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-L,isError:!0,scriptLoadUrl:p.src,storeId:v.storeId,type:e});["unpkg","cdnjs","vercel"].includes(e)?d({endpoint:p.src,errors:[`zonos.js - Failed to fetch ${e} CDN.`],metadata:{cdnLoadTime:performance.now()-L,cdnType:e,loadUrl:a,version:t},shouldPostReleaseErrorReporting:!!s}):d({endpoint:p.src,errors:["[Info] Using alternative CDN. Failed to fetch script"],metadata:{cdnType:e,vercelLoadTime:performance.now()-L}})})),document.head.appendChild(p)},L.init=async e=>{var o;v.cartId=new URLSearchParams(window.location.search).get("tempCartUUID");const n="https://v1.3.106.js.zonos.com",r=document.querySelector('script[src*="/zonos.js"]'),t=null===(o=document.querySelector("script[src*='/loadZonos.js']"))||void 0===o?void 0:o.src;l(`[ZONOS - init] first load script src: ${t}`,"info"),window.Zonos.zonosQaUrl=S,window.Zonos.zonosQaUrlApi=z,window.Zonos.zonosQaUrl&&l(`[ZONOS - init] using zonosQaUrl: ${window.Zonos.zonosQaUrl}`,"info"),window.Zonos.zonosQaUrlApi&&l(`[ZONOS - init] using zonosQaUrlApi: ${window.Zonos.zonosQaUrlApi}`,"info");const s=null==t?void 0:t.includes("timestamp=");if(!(v.isNpm||t&&s))return void w("[ZONOS - loadZonos] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(r||!t||v.requested)return void l("[ZONOS - loadZonos] script is already loaded or requested","info");if(!e.zonosApiKey&&!v.cartId)return v.legacyCheckoutErrorHandler({message:"Zonos API key is required unless `tempCartUUID` is provided in url query params."}),void w("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(v.requested=!0,v.zonosApiKey=e.zonosApiKey,v.storeId=e.storeId,v.cartId){const e=await(async e=>{if("cart_"===e||!e)return w("[ZONOS - loadZonos] Error due to bad cart id"),null;const o=await y({cartId:e,retries:5});return l("[ZONOS - loadZonos] getting temp cart data","info",o),o?{cartData:o.cartData,storeFavicon:o.storeFaviconUrl,storeId:o.cartData.storeId,storeLogo:o.storeLogoUrl,zonosApiKey:o.cartData.credentialToken}:(w("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(v.cartId);if(!e)throw v.legacyCheckoutErrorHandler({message:"Error getting cart data"}),new Error("Error getting cart data");v.cartData=e.cartData,v.zonosApiKey=e.zonosApiKey,v.legacyStoreLogo=e.storeLogo,v.legacyStoreFavicon=e.storeFavicon,v.storeId=e.storeId,v.zonosApiKey=e.zonosApiKey}if(!v.zonosApiKey)return void w('"zonosApiKey" is required to initialize Zonos');if(!v.storeId)return l("[ZONOS - loadZonos] loading latest script since storeId is not provided."),void v.injectZonos({initConfig:e,vercelUrl:n,version:null});const i=v.storeId||e.storeId;l(`[ZONOS - loadZonos] Store ID: ${i}`,"info");const a=new URLSearchParams;a.set("storeId",i.toString());const{errors:c,json:d}=await g(`/api/get-store-version?${a.toString()}`);if(c.length||!d)return l("[ZONOS - loadZonos] Error getting store version, loading the latest version.","error"),void v.injectZonos({initConfig:e,vercelUrl:n,version:null});const{isDifferent:p,source:u,version:m}=d;if(l(`[ZONOS - loadZonos] Store version: ${m}, source: ${u}`,"info"),p){l(`[ZONOS - loadZonos] Updating saved store version to ${m}`,"info");const e={storeId:i,version:m};g(`/api/set-store-version?${a.toString()}`,{body:e,method:"POST"}).catch((e=>w("Unable to save store's vesrion",e)))}if(!r){const{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const o=new URL(e).origin,n=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>o.includes(e))),r=["qa.js.zonos.com"].some((e=>o.includes(e)));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:r,isWhiteListed:n}})({loadScriptSrc:t}),s=r&&!n?o:`${"alpha"===m?"alpha":`v${m}`}.js.zonos.com`,i=r&&!n?null:m;l("[ZONOS - loadZonos] injecting zonos script","info",{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r,loadUrl:s,loadVersion:i,version:m}),v.injectZonos({initConfig:e,vercelUrl:s,version:i})}},void 0===window.Zonos&&(window.Zonos=L)})();
1
+ (function(){"use strict";function e(e,o){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)o.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(n[r[t]]=e[r[t]])}return n}"function"==typeof SuppressedError&&SuppressedError;const o=["cloudflare","vercel"],n=o[0],r={cloudflare:"https://route.elements.zonos.com",vercel:"https://v1.route.js.zonos.com"},t=r[n],s=(e=n)=>{const r=o.indexOf(e),t=o[r+1];return t||null},i=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},a=performance.now(),c=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(o){if(e&&"function"==typeof e.toString){return e.toString()}return"Unable to stringify info"}},l=(e,o,...n)=>{var r,t;const{elapsedTimePretty:s}=(()=>{const e=performance.now()-a,o=e>1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(2)}ms`;return{elapsedTime:e,elapsedTimePretty:o}})(),i=[`(${s})`,...n];i.map(c).join(" ");if(!(!!(null===(r=window.Zonos)||void 0===r?void 0:r.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return void("error"===o&&console.error(e,...i));let l=document.querySelector("iframe#zonos---debug-logging-iframe");l||(l=document.createElement("iframe"),l.id="zonos---debug-logging-iframe",l.style.display="none",l.style.opacity="0",l.style.position="absolute",l.style.top="-9999px",l.style.left="-9999px",l.style.width="1px",l.style.height="1px",l.style.border="none",l.style.overflow="hidden",l.style.visibility="hidden",document.body.appendChild(l));const d=(null===(t=l.contentWindow)||void 0===t?void 0:t.window.console)||window.console;switch(o){case"warn":d.warn(e,...i);break;case"info":d.info(e,...i);break;case"error":d.error(e,...i);break;default:d.groupCollapsed(e,...i),d.trace(),d.groupEnd()}},d=async({endpoint:e,errors:o,metadata:n,shouldPostReleaseErrorReporting:i})=>{if(l("sendErrorLog","warn",e,n,o),i){const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const a="userAgentData"in window.navigator?window.navigator.userAgentData:null,c={endpoint:e,errors:o,href:window.location.href,metadata:Object.assign({userAgent:a&&a.brands.length>0?a:window.navigator.userAgent},n)};try{fetch(`${t}/api/zonos-elements/log-error`,{body:JSON.stringify(c),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const o=s();if(!o)return;fetch(`${r[o]}/api/zonos-elements/log-error`,{body:JSON.stringify(c),method:"POST"})}},p=async({response:e,shouldLog:o=!0,shouldThrow:n=!1})=>{try{return await e.json()}catch(e){if(n)throw e;return o&&console.error(e),null}},u=async({basePathType:e,options:o,path:t})=>{let s;const i=window.Zonos.zonosQaUrlApi||r[e]||n,a=new URL(i+t);a.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));try{s=await fetch(a.toString(),o)}catch(e){if(e instanceof Error)return{baseUrl:i,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null};return{baseUrl:i,errors:[{message:"Failed to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const c=s.headers.get("Zonos-Mode"),l=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&c&&l&&(window.Zonos.modeAlerted=!0),s.ok){return{baseUrl:i,errors:[],json:await p({response:s}),response:s,zonosMode:c}}const d=s.status.toString();try{const e=await p({response:s,shouldThrow:!0});return{baseUrl:i,errors:[{message:JSON.stringify(e),type:d}],json:null,response:s,zonosMode:c}}catch(e){return{baseUrl:i,errors:[{message:`${d}: ${"Unknown error"}`,type:d}],json:null,response:null,zonosMode:c}}},m=async({basePathType:o,options:n,path:t})=>{var a,c;const p=t.startsWith("/api/bigcommerce")?"vercel":o,g=await u({basePathType:p,options:n,path:t}),{errors:w,response:f}=g,h=e(g,["errors","response"]),y=s(p),v=!!w.find((({type:e})=>"unknown"===e))||404===(null==f?void 0:f.status),S=y&&v;return v&&d({endpoint:r[p]+t,errors:w.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:p,nextFallbackApiType:y,requestHeaders:null==n?void 0:n.headers,requestPayload:i(null===(a=null==n?void 0:n.body)||void 0===a?void 0:a.toString())||(null===(c=null==n?void 0:n.body)||void 0===c?void 0:c.toString()),status:null==f?void 0:f.status,statusText:null==f?void 0:f.statusText},shouldPostReleaseErrorReporting:!0}),S?(l(`=== "${t}" failed to fetch, trying next fallback ${y}`),m({basePathType:y,options:n,path:t})):Object.assign({errors:w,response:f},h)},g=async(o,r)=>{const t=e(r||{},[]),s=t.body?JSON.stringify(t.body):void 0,i=t.method||"GET",a=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"},t.headers),c=Object.assign(Object.assign({},t),{body:"GET"===i?void 0:s,headers:a,method:i}),d=new URLSearchParams(window.location.search).get("useFallbackApi");return l(o,"info"),m({basePathType:d||n,options:c,path:o})},w=(e,...o)=>{l(e,"error",...o)},f=["jsdelivr","cdnjs","unpkg","vercel"],h=e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrl");if(!o)return null;return/[^a-zA-Z0-9-_]+/.test(o)?null:o},y=async({cartId:e,retries:o})=>{const n="1"===new URLSearchParams(window.location.search).get("zonosTestMode"),{errors:r,json:t}=await g("/api/zonos-elements/get-temp-cart",{body:{isTestMode:n,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),s=!t||r.length;return s&&o?(l("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:o}),await new Promise((e=>setTimeout(e,1e3))),y({cartId:e,retries:o-1})):s?null:t};var v;const S=(()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const o=h(window.location.href),n="https://v1.3.108.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 l(`[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:o}=window.location,n=`${o}?${e.toString()}`;return window.history.replaceState(window.history.state,"",n),window.location.reload(),null})),r})(),z=(()=>{const e=(e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrlApi");return o?/[^a-zA-Z0-9-_]+/.test(o)?null:o:null})(window.location.href),o=h(window.location.href),n=e||o;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.demo.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.demo.elements.zonos.com";if(!e)return null;const r=`https://${e}.route.js.zonos.com`;return l(`[ZONOS-WARNING] using '${r}' for serverless API`,"warn"),r})();class L{static get isNpm(){return!1}}v=L,L.isBigCommerce=!1,L.requested=!1,L.cartData=null,L.isLegacyCheckout=!1,L.legacyStoreLogo=null,L.legacyStoreFavicon=null,L.parallelLoadTimes=[],L.parallelLoadState="off",L.releaseDate="1729779959768",L.loadScriptLogHandler=async({cdnLoadTime:e,fallbackLoadTime:o,isError:n,metadata:r,scriptLoadUrl:t,storeId:s,type:i})=>{try{const e=window.performance.getEntriesByType("resource").find((e=>{const o=e;return o.name.includes(t)&&"script"===o.initiatorType}));null==e||e.transferSize;(async e=>{})((e&&(null==e?void 0:e.duration)>0?parseFloat(e.duration.toFixed(2)):parseFloat(o.toFixed(2)),Object.assign({decodedBodySize:null==e?void 0:e.decodedBodySize,encodedBodySize:null==e?void 0:e.encodedBodySize,fallbackLoadTime:o,isError:!!n},r)))}catch(e){}},L.loadScriptLogParallelHandler=async e=>{try{if(v.parallelLoadTimes.push(e),2===v.parallelLoadTimes.length){const e=v.parallelLoadTimes.find((e=>"vercel"===e.type)),o=v.parallelLoadTimes.find((e=>"jsdelivr"===e.type));if(!e||!o)return;if(e.isError&&o.isError)return void d({endpoint:`<${e.scriptLoadUrl}> <${o.scriptLoadUrl}>`,errors:["Failed to fetch both Vercel and jsdelivr CDN. Perhaps network issue on customer site."],metadata:{cdnLoadTime:o.fallbackLoadTime,cdnType:o.type,vercelLoadTime:e.fallbackLoadTime}});v.loadScriptLogHandler({cdnLoadTime:o.fallbackLoadTime,fallbackLoadTime:e.fallbackLoadTime,isError:e.isError,metadata:{cdnScriptFallbackTime:o.fallbackLoadTime,cdnScriptIsError:!!o.isError,cdnScriptLoadUrl:o.scriptLoadUrl,cdnScriptType:o.type},scriptLoadUrl:e.scriptLoadUrl,storeId:e.storeId,type:e.type})}}catch(e){}},L.legacyCheckoutErrorHandler=({message:e})=>{w(`[ZONOS - loadZonos] ${e}`),d({endpoint:"LegacyCheckoutInit",errors:[e],metadata:{tempCartUUID:v.cartId}}),document.dispatchEvent(new CustomEvent("legacyCheckoutError",{detail:e}))},L.getGithubCdn=({type:e,version:o})=>{let n="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.108";"cdnjs"===e?n="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.108":"unpkg"===e&&(n="https://unpkg.com/@zonos/elements@1.3.108");return o&&"alpha"!==o?n.replace(/@zonos\/elements@(.+)/,`@zonos/elements@${o}`).replace(/\/zonos-elements\/(.+)/,`/zonos-elements/${o}`):n},L.injectZonos=({cdnType:e="jsdelivr",initConfig:o,parallelLoaded:n,vercelUrl:r,version:t})=>{var s;const i="vercel"===e?r:v.getGithubCdn({type:e,version:t}),a=S||i,c=a.replace("https://","").replace("http://",""),p=document.createElement("script"),u=t&&t<"1.2.5"?"loadZonos.js":"zonos.js";p.src=`https://${c}/dist/scripts/${u}`,l(`[ZONOS - loadZonos] Injecting "${u}" from "${c}"`,"info");const m="4g"===(null===(s=(()=>{const e="connection"in window.navigator?window.navigator.connection:null,o="mozConnection"in window.navigator?window.navigator.mozConnection:null,n="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return e||o||n})())||void 0===s?void 0:s.effectiveType),g=["dev.elements.zonos.com","zonos.com"].some((e=>window.location.href.includes(e))),w=f[0]===e,h=f[1],y="on"===v.parallelLoadState&&m&&w&&h&&!g;y&&v.injectZonos({cdnType:h,initConfig:o,parallelLoaded:!0,vercelUrl:r,version:t});const L=performance.now();p.addEventListener("load",(()=>{var r;if(y||n?v.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-L,scriptLoadUrl:p.src,storeId:v.storeId,type:e}):v.loadScriptLogHandler({fallbackLoadTime:performance.now()-L,scriptLoadUrl:p.src,storeId:v.storeId,type:e}),v.isBigCommerce||(v.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.isNpm=!1,window.Zonos.zonosQaUrl=S,window.Zonos.zonosQaUrlApi=z,window.Zonos.isBigCommerce=v.isBigCommerce,v.cartId){if(!v.zonosApiKey)throw v.legacyCheckoutErrorHandler({message:"zonosApiKey is missing to initiate checkout"}),new Error("zonosApiKey is required for legacy checkout");if(!v.cartData)throw v.legacyCheckoutErrorHandler({message:"cartData is missing to initiate legacy checkout"}),new Error("cartData is required for legacy checkout");if(v.legacyStoreFavicon&&v.isLegacyCheckout){const e=document.createElement("link");e.rel="shortcut icon",e.type="image/x-icon",e.href=v.legacyStoreFavicon,document.head.appendChild(e)}window.Zonos.cartData=v.cartData,window.Zonos.isLegacyCheckout=v.isLegacyCheckout;const e=v.isLegacyCheckout&&"CLOSE_MODAL"===(null===(r=o.checkoutSettings)||void 0===r?void 0:r.successBehavior),n=Object.assign(Object.assign({},o),{appearance:Object.assign(Object.assign({},o.appearance),{logoUrl:v.legacyStoreLogo||""}),checkoutSettings:Object.assign(Object.assign({},o.checkoutSettings),{successBehavior:e?"ZONOS_SUCCESS_PAGE":void 0,successRedirectUrl:e?v.cartData.storeBaseUrl:void 0}),zonosApiKey:v.zonosApiKey});o=n}window.Zonos.version&&(l(`[ZONOS - loadZonos] Execute "Zonos.init" from "${u}" from "${c}"`,"info"),window.Zonos.init(o))})),p.addEventListener("error",(async()=>{const s=(e=>{const o=f.indexOf(e);return f[o+1]||null})(e);if(!y&&!n){if(!s)return;v.injectZonos({cdnType:s,initConfig:o,vercelUrl:r,version:t})}if(["localhost",".zonos.com"].some((e=>window.location.href.includes(e)))||S)return;if(y||n)return void v.loadScriptLogParallelHandler({fallbackLoadTime:performance.now()-L,isError:!0,scriptLoadUrl:p.src,storeId:v.storeId,type:e});["unpkg","cdnjs","vercel"].includes(e)?d({endpoint:p.src,errors:[`zonos.js - Failed to fetch ${e} CDN.`],metadata:{cdnLoadTime:performance.now()-L,cdnType:e,loadUrl:a,version:t},shouldPostReleaseErrorReporting:!!s}):d({endpoint:p.src,errors:["[Info] Using alternative CDN. Failed to fetch script"],metadata:{cdnType:e,vercelLoadTime:performance.now()-L}})})),document.head.appendChild(p)},L.init=async e=>{var o;v.cartId=new URLSearchParams(window.location.search).get("tempCartUUID");const n="https://v1.3.108.js.zonos.com",r=document.querySelector('script[src*="/zonos.js"]'),t=null===(o=document.querySelector("script[src*='/loadZonos.js']"))||void 0===o?void 0:o.src;l(`[ZONOS - init] first load script src: ${t}`,"info"),window.Zonos.zonosQaUrl=S,window.Zonos.zonosQaUrlApi=z,window.Zonos.zonosQaUrl&&l(`[ZONOS - init] using zonosQaUrl: ${window.Zonos.zonosQaUrl}`,"info"),window.Zonos.zonosQaUrlApi&&l(`[ZONOS - init] using zonosQaUrlApi: ${window.Zonos.zonosQaUrlApi}`,"info");const s=null==t?void 0:t.includes("timestamp=");if(!(v.isNpm||t&&s))return void w("[ZONOS - loadZonos] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(r||!t||v.requested)return void l("[ZONOS - loadZonos] script is already loaded or requested","info");if(!e.zonosApiKey&&!v.cartId)return v.legacyCheckoutErrorHandler({message:"Zonos API key is required unless `tempCartUUID` is provided in url query params."}),void w("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(v.requested=!0,v.zonosApiKey=e.zonosApiKey,v.storeId=e.storeId,v.cartId){const e=await(async e=>{if("cart_"===e||!e)return w("[ZONOS - loadZonos] Error due to bad cart id"),null;const o=await y({cartId:e,retries:5});return l("[ZONOS - loadZonos] getting temp cart data","info",o),o?{cartData:o.cartData,storeFavicon:o.storeFaviconUrl,storeId:o.cartData.storeId,storeLogo:o.storeLogoUrl,zonosApiKey:o.cartData.credentialToken}:(w("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(v.cartId);if(!e)throw v.legacyCheckoutErrorHandler({message:"Error getting cart data"}),new Error("Error getting cart data");v.cartData=e.cartData,v.zonosApiKey=e.zonosApiKey,v.legacyStoreLogo=e.storeLogo,v.legacyStoreFavicon=e.storeFavicon,v.storeId=e.storeId,v.zonosApiKey=e.zonosApiKey}if(!v.zonosApiKey)return void w('"zonosApiKey" is required to initialize Zonos');if(!v.storeId)return l("[ZONOS - loadZonos] loading latest script since storeId is not provided."),void v.injectZonos({initConfig:e,vercelUrl:n,version:null});const i=v.storeId||e.storeId;l(`[ZONOS - loadZonos] Store ID: ${i}`,"info");const a=new URLSearchParams;a.set("storeId",i.toString());const{errors:c,json:d}=await g(`/api/get-store-version?${a.toString()}`);if(c.length||!d)return l("[ZONOS - loadZonos] Error getting store version, loading the latest version.","error"),void v.injectZonos({initConfig:e,vercelUrl:n,version:null});const{isDifferent:p,source:u,version:m}=d;if(l(`[ZONOS - loadZonos] Store version: ${m}, source: ${u}`,"info"),p){l(`[ZONOS - loadZonos] Updating saved store version to ${m}`,"info");const e={storeId:i,version:m};g(`/api/set-store-version?${a.toString()}`,{body:e,method:"POST"}).catch((e=>w("Unable to save store's vesrion",e)))}if(!r){const{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const o=new URL(e).origin,n=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>o.includes(e))),r=["qa.js.zonos.com"].some((e=>o.includes(e)));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:r,isWhiteListed:n}})({loadScriptSrc:t}),s=r&&!n?o:`${"alpha"===m?"alpha":`v${m}`}.js.zonos.com`,i=r&&!n?null:m;l("[ZONOS - loadZonos] injecting zonos script","info",{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:r,loadUrl:s,loadVersion:i,version:m}),v.injectZonos({initConfig:e,vercelUrl:s,version:i})}},void 0===window.Zonos&&(window.Zonos=L)})();
@@ -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{elapsedTimePretty:l}=(()=>{const t=performance.now()-e,o=t>1e3?`${(t/1e3).toFixed(2)}s`:`${t.toFixed(2)}ms`;return{elapsedTime:t,elapsedTimePretty:o}})(),a=[`(${l})`,...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.106.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,href:window.location.href,metadata:Object.assign({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({cartId:e,retries:t})=>{const n="1"===new URLSearchParams(window.location.search).get("zonosTestMode"),{errors:r,json:s}=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:{isTestMode:n,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),i=!s||r.length;return i&&t?(o("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:t}),await new Promise((e=>setTimeout(e,1e3))),C({cartId:e,retries:t-1})):i?null:s};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})(),Z="https://v1.3.106.js.zonos.com",A=E||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.106",T="https://rsms.me",U="https://fonts.googleapis.com",P=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class I{}k=I,I.doneInit=!1,I.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),I.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),I._paypalMockResponse=null,I.isBigCommerce=!1,I.releaseDate="1729704481191",I.isLegacyCheckout=!1,I.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),I.isNpm=!0,I.zonosQaUrl=null,I.zonosQaUrlApi=null,I.version="v1.3.106",I.modeAlerted=!1,I.cartData=null,I.paypal=null,I.getCurrentTimestamp=()=>(new Date).getTime(),I.zonosController=null,I.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=>{if("cart_"===e||!e)return n("[ZONOS - loadZonos] Error due to bad cart id"),null;const t=await C({cartId:e,retries:5});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}},I.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},I.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},I.showNotification=e=>{var t;null===(t=k.zonosController)||void 0===t||t.showNotification(e)},I.updateOrganizationName=e=>{var t;null===(t=k.zonosController)||void 0===t||t.updateOrganizationName(e)},I.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)}},I.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!")},I.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)},I.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return A;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.106";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.106";case"vercel":return Z}};if(k.isNpm){return l()||t()}return t()},I.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!")},I.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const o=k.getZonosUrl(e),r=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,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)},I.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!"))},I.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${T}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&!P.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=T,e.appendChild(t);const n=document.createElement("link");n.rel="stylesheet",n.href=`${T}/inter/inter.css`,e.appendChild(n),o("Zonos font injected!")},I.setupGoogleFont=e=>{var t;null===(t=k.zonosController)||void 0===t||t.setupGoogleFont(e)},I.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^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,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=I)})();
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{elapsedTimePretty:l}=(()=>{const t=performance.now()-e,o=t>1e3?`${(t/1e3).toFixed(2)}s`:`${t.toFixed(2)}ms`;return{elapsedTime:t,elapsedTimePretty:o}})(),a=[`(${l})`,...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.108.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,href:window.location.href,metadata:Object.assign({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({cartId:e,retries:t})=>{const n="1"===new URLSearchParams(window.location.search).get("zonosTestMode"),{errors:r,json:s}=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:{isTestMode:n,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),i=!s||r.length;return i&&t?(o("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:t}),await new Promise((e=>setTimeout(e,1e3))),C({cartId:e,retries:t-1})):i?null:s};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})(),Z="https://v1.3.108.js.zonos.com",A=E||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.108",T="https://rsms.me",U="https://fonts.googleapis.com",P=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class I{}k=I,I.doneInit=!1,I.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),I.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),I._paypalMockResponse=null,I.isBigCommerce=!1,I.releaseDate="1729779959768",I.isLegacyCheckout=!1,I.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),I.isNpm=!0,I.zonosQaUrl=null,I.zonosQaUrlApi=null,I.version="v1.3.108",I.modeAlerted=!1,I.cartData=null,I.paypal=null,I.getCurrentTimestamp=()=>(new Date).getTime(),I.zonosController=null,I.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=>{if("cart_"===e||!e)return n("[ZONOS - loadZonos] Error due to bad cart id"),null;const t=await C({cartId:e,retries:5});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}},I.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},I.openHelloDialog=e=>{const t=document.querySelector("zonos-hello");t&&t.openHelloDialog(null==e||e)},I.showNotification=e=>{var t;null===(t=k.zonosController)||void 0===t||t.showNotification(e)},I.updateOrganizationName=e=>{var t;null===(t=k.zonosController)||void 0===t||t.updateOrganizationName(e)},I.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)}},I.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!")},I.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)},I.getZonosUrl=e=>{const t=()=>{switch(e){case"jsdelivr":return A;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.108";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.108";case"vercel":return Z}};if(k.isNpm){return l()||t()}return t()},I.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!")},I.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const o=k.getZonosUrl(e),r=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,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)},I.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!"))},I.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${T}"]`);for(let t=0;t<e.length;t++){const o=e[t];if(o&&!P.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=T,e.appendChild(t);const n=document.createElement("link");n.rel="stylesheet",n.href=`${T}/inter/inter.css`,e.appendChild(n),o("Zonos font injected!")},I.setupGoogleFont=e=>{var t;null===(t=k.zonosController)||void 0===t||t.setupGoogleFont(e)},I.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^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,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=I)})();
@@ -38,6 +38,7 @@ export declare class ZonosCheckoutFinish {
38
38
  private checkStripePaymentStatus;
39
39
  private checkPaypalPaymentStatus;
40
40
  private closeClickHandler;
41
+ private saveOrderIdForDuplicationIssue;
41
42
  componentDidLoad(): void;
42
43
  render(): any;
43
44
  }
@@ -2,6 +2,7 @@ import type { PaymentIntent, Stripe } from '@stripe/stripe-js';
2
2
  import { type CartItem } from "../../store/checkout/cart";
3
3
  import { type StripeStoreContactOption } from "../../store/checkout/stripe";
4
4
  import { type AppearanceConfig } from "../../store/zonosStore";
5
+ import type { OrderPlacedInfo } from "../../../types/checkout/OrderPlacedInfo";
5
6
  import type { CheckoutSessionDetailsFragment } from "../../../types/generated/graphql.internal.types";
6
7
  export declare class ZonosCheckout {
7
8
  /**
@@ -58,6 +59,10 @@ export declare class ZonosCheckout {
58
59
  * Error message from onInventoryCheck callback
59
60
  */
60
61
  inventoryCheckErrorMessage: string | null;
62
+ /**
63
+ * Placed order info to show the confirm dialog to the user
64
+ */
65
+ placedOrderInfo: OrderPlacedInfo | null;
61
66
  /**
62
67
  * Init cart info handler event
63
68
  */
@@ -75,7 +80,12 @@ export declare class ZonosCheckout {
75
80
  private applyStripeTheme;
76
81
  private buildCartAndInit;
77
82
  private reloadCheckoutSession;
83
+ private handleOrderDuplication;
84
+ private confirmProceedWithOrderDuplication;
85
+ private handleCancelOrderDuplication;
78
86
  private attachCheckout;
87
+ private formatDate;
88
+ private formatTime;
79
89
  appearanceSettingsOverrideChanged(): void;
80
90
  /**
81
91
  * Set default address from query param if it's valid
@@ -24,6 +24,11 @@ export declare class ZonosConfirmDialog {
24
24
  * Confirm button text
25
25
  */
26
26
  dialogConfirmBtnText: string;
27
+ /**
28
+ * Dialog width
29
+ * @default 350 px
30
+ */
31
+ dialogWidth: number;
27
32
  /**
28
33
  * Cancel button text
29
34
  */
@@ -69,6 +69,7 @@ declare const initStripeElements: (props?: {
69
69
  overridePrimaryColor?: string;
70
70
  overrideSecondaryColor?: string;
71
71
  overrideTheme?: ElementsUiTheme;
72
+ paypalEnabled?: boolean;
72
73
  }) => Promise<void>;
73
74
  declare const stripeStoreReset: () => void;
74
75
  declare const stripeCalculateLandedCost: () => Promise<void>;
@@ -143,6 +143,12 @@ export declare const stringsArabic: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsArabic: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsArabic: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsBase: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsBase: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsBase: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsChinese: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsChinese: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsChinese: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsDanish: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsDanish: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsDanish: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsDutch: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsDutch: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsDutch: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsFrench: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsFrench: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsFrench: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsGerman: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsGerman: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsGerman: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsHebrew: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsHebrew: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsHebrew: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsIndonesian: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsIndonesian: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsIndonesian: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsItalian: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsItalian: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsItalian: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsJapanese: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsJapanese: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsJapanese: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };
@@ -143,6 +143,12 @@ export declare const stringsKorean: {
143
143
  'Invalid promo code': {
144
144
  value: string;
145
145
  };
146
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?': {
147
+ value: string;
148
+ };
149
+ 'It looks like you placed an order just a few minutes ago ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?': {
150
+ value: string;
151
+ };
146
152
  'Keep shopping': {
147
153
  value: string;
148
154
  };
@@ -221,6 +227,9 @@ export declare const stringsKorean: {
221
227
  'Prepay duties and taxes at checkout': {
222
228
  value: string;
223
229
  };
230
+ 'Proceed with order': {
231
+ value: string;
232
+ };
224
233
  'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
225
234
  value: string;
226
235
  };
@@ -257,6 +266,9 @@ export declare const stringsKorean: {
257
266
  'Return to cart': {
258
267
  value: string;
259
268
  };
269
+ 'Return to merchant site': {
270
+ value: string;
271
+ };
260
272
  'Search countries': {
261
273
  value: string;
262
274
  };