@zonos/elements 1.3.26 → 1.3.27

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 (131) hide show
  1. package/dist/cjs/{cart-7e817cad.js → cart-61caeb84.js} +280 -160
  2. package/dist/cjs/index.cjs.js +3 -54
  3. package/dist/cjs/{submitGtag-7e0065da.js → submitGtag-d3898668.js} +1 -1
  4. package/dist/cjs/zonos-address_8.cjs.entry.js +3 -3
  5. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  6. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  9. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-select_3.cjs.entry.js +3 -3
  11. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +58 -21
  12. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
  14. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  15. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -20
  16. package/dist/collection/components/main/zonos-controller.js +1 -1
  17. package/dist/collection/components/store/translationStore/strings.arabic.js +14 -8
  18. package/dist/collection/components/store/translationStore/strings.base.js +14 -8
  19. package/dist/collection/components/store/translationStore/strings.chinese.js +14 -8
  20. package/dist/collection/components/store/translationStore/strings.danish.js +14 -8
  21. package/dist/collection/components/store/translationStore/strings.dutch.js +14 -8
  22. package/dist/collection/components/store/translationStore/strings.french.js +14 -8
  23. package/dist/collection/components/store/translationStore/strings.german.js +14 -8
  24. package/dist/collection/components/store/translationStore/strings.hebrew.js +14 -8
  25. package/dist/collection/components/store/translationStore/strings.indonesian.js +14 -8
  26. package/dist/collection/components/store/translationStore/strings.italian.js +14 -8
  27. package/dist/collection/components/store/translationStore/strings.japanese.js +14 -8
  28. package/dist/collection/components/store/translationStore/strings.korean.js +14 -8
  29. package/dist/collection/components/store/translationStore/strings.norwegian.js +14 -8
  30. package/dist/collection/components/store/translationStore/strings.polish.js +14 -8
  31. package/dist/collection/components/store/translationStore/strings.portuguese.js +14 -8
  32. package/dist/collection/components/store/translationStore/strings.russian.js +14 -8
  33. package/dist/collection/components/store/translationStore/strings.spanish.js +14 -8
  34. package/dist/collection/components/store/translationStore/strings.swedish.js +14 -8
  35. package/dist/collection/components/store/translationStore/strings.turkish.js +14 -8
  36. package/dist/collection/components/store/translationStore/strings.vietnamese.js +14 -8
  37. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  38. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  39. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  40. package/dist/collection/components/utils/wrapStringWithLink.js +3 -0
  41. package/dist/collection/scripts/_zonosBase.js +0 -51
  42. package/dist/esm/{cart-13e6a811.js → cart-530a8750.js} +280 -160
  43. package/dist/esm/index.js +3 -54
  44. package/dist/esm/{submitGtag-c8bb6f2e.js → submitGtag-44ba0846.js} +1 -1
  45. package/dist/esm/zonos-address_8.entry.js +3 -3
  46. package/dist/esm/zonos-card_2.entry.js +1 -1
  47. package/dist/esm/zonos-cart-items_12.entry.js +2 -2
  48. package/dist/esm/zonos-checkout.entry.js +2 -2
  49. package/dist/esm/zonos-controller.entry.js +2 -2
  50. package/dist/esm/zonos-country-flag.entry.js +1 -1
  51. package/dist/esm/zonos-country-select_3.entry.js +3 -3
  52. package/dist/esm/zonos-hello-dialog.entry.js +58 -21
  53. package/dist/esm/zonos-hello.entry.js +1 -1
  54. package/dist/esm/zonos-payment.entry.js +2 -2
  55. package/dist/esm-es5/cart-530a8750.js +1 -0
  56. package/dist/esm-es5/index.js +1 -1
  57. package/dist/esm-es5/{submitGtag-c8bb6f2e.js → submitGtag-44ba0846.js} +1 -1
  58. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  59. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  60. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  61. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  62. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  63. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  64. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  65. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  66. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  67. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  68. package/dist/scripts/index.d.ts +0 -1
  69. package/dist/scripts/index.js +1 -1
  70. package/dist/scripts/loadZonos.js +1 -1
  71. package/dist/scripts/zonos.js +1 -1
  72. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +8 -0
  73. package/dist/types/components/store/translationStore/strings.arabic.d.ts +13 -7
  74. package/dist/types/components/store/translationStore/strings.base.d.ts +13 -7
  75. package/dist/types/components/store/translationStore/strings.chinese.d.ts +13 -7
  76. package/dist/types/components/store/translationStore/strings.danish.d.ts +13 -7
  77. package/dist/types/components/store/translationStore/strings.dutch.d.ts +13 -7
  78. package/dist/types/components/store/translationStore/strings.french.d.ts +13 -7
  79. package/dist/types/components/store/translationStore/strings.german.d.ts +13 -7
  80. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +13 -7
  81. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +13 -7
  82. package/dist/types/components/store/translationStore/strings.italian.d.ts +13 -7
  83. package/dist/types/components/store/translationStore/strings.japanese.d.ts +13 -7
  84. package/dist/types/components/store/translationStore/strings.korean.d.ts +13 -7
  85. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +13 -7
  86. package/dist/types/components/store/translationStore/strings.polish.d.ts +13 -7
  87. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +13 -7
  88. package/dist/types/components/store/translationStore/strings.russian.d.ts +13 -7
  89. package/dist/types/components/store/translationStore/strings.spanish.d.ts +13 -7
  90. package/dist/types/components/store/translationStore/strings.swedish.d.ts +13 -7
  91. package/dist/types/components/store/translationStore/strings.turkish.d.ts +13 -7
  92. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +13 -7
  93. package/dist/types/components/store/translationStore.d.ts +1 -1
  94. package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
  95. package/dist/types/scripts/_zonosBase.d.ts +0 -1
  96. package/dist/zonos-elements/index.esm.js +1 -1
  97. package/dist/zonos-elements/p-094bfe56.system.entry.js +1 -0
  98. package/dist/zonos-elements/{p-60621085.entry.js → p-099e229a.entry.js} +1 -1
  99. package/dist/zonos-elements/{p-b88e52b5.entry.js → p-11f87d7d.entry.js} +1 -1
  100. package/dist/zonos-elements/{p-f7e2d33b.system.entry.js → p-18d04e89.system.entry.js} +1 -1
  101. package/dist/zonos-elements/{p-492b8e12.entry.js → p-2a5a0bae.entry.js} +1 -1
  102. package/dist/zonos-elements/{p-e975b187.entry.js → p-35d00c30.entry.js} +1 -1
  103. package/dist/zonos-elements/{p-3e488bff.entry.js → p-37685139.entry.js} +1 -1
  104. package/dist/zonos-elements/{p-452ed1a7.entry.js → p-4eaae82e.entry.js} +1 -1
  105. package/dist/zonos-elements/p-5d006b02.system.js +1 -0
  106. package/dist/zonos-elements/{p-eea8111c.system.entry.js → p-5f580c9b.system.entry.js} +1 -1
  107. package/dist/zonos-elements/{p-99da2348.entry.js → p-687dbccc.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-a5d823d3.system.entry.js → p-68dfcd25.system.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-3baf7a18.entry.js → p-6fe27968.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-58edaab6.system.entry.js → p-7b5a0a18.system.entry.js} +1 -1
  111. package/dist/zonos-elements/{p-d3e61deb.system.entry.js → p-84f7a3a2.system.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-43c1dd27.system.entry.js → p-a5704be4.system.entry.js} +1 -1
  113. package/dist/zonos-elements/p-b4ccc72c.js +1 -0
  114. package/dist/zonos-elements/{p-eabe2abc.js → p-bb032c2f.js} +1 -1
  115. package/dist/zonos-elements/p-c4154737.system.js +1 -0
  116. package/dist/zonos-elements/{p-094c7343.system.entry.js → p-cbed004d.system.entry.js} +1 -1
  117. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  118. package/dist/zonos-elements/{p-089c3737.system.entry.js → p-e15ef12e.system.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-2011cb03.entry.js → p-e3978982.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-cab01f64.system.entry.js → p-ecd994c8.system.entry.js} +1 -1
  121. package/dist/zonos-elements/p-fb1120a2.system.js +1 -0
  122. package/dist/zonos-elements/p-fb1b98a8.entry.js +1 -0
  123. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  124. package/package.json +1 -1
  125. package/dist/esm-es5/cart-13e6a811.js +0 -1
  126. package/dist/zonos-elements/p-121be462.system.js +0 -1
  127. package/dist/zonos-elements/p-1f2077df.entry.js +0 -1
  128. package/dist/zonos-elements/p-74488e31.system.js +0 -1
  129. package/dist/zonos-elements/p-875a311d.js +0 -1
  130. package/dist/zonos-elements/p-d1771035.system.js +0 -1
  131. package/dist/zonos-elements/p-e80a5ed7.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{a(r.next(n))}catch(n){i(n)}}function s(n){try{a(r["throw"](n))}catch(n){i(n)}}function a(n){n.done?t(n.value):o(n.value).then(u,s)}a((r=r.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(t=0)),t)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=e.call(n,t)}catch(n){s=[6,n];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-63db40b9.system.js"],(function(n){"use strict";var e,t;return{setters:[function(n){e=n.l;t=n.a}],execute:function(){var r=this;var o=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(e).origin;var i=t.some((function(n){return o.includes(n)}));var u=r.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var i=function(n){if(!n){return null}var e=new URL(n).searchParams;var t=e.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var u=function(){if(typeof window==="undefined"){return null}var n=i(window.location.href);if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var t="preview.js.zonos.com";var r="https://".concat(n,".").concat(t);e("[ZONOS-WARNING] using '".concat(r,"' for loading script"),"warn");void fetch(r).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(r,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var t="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return r};var s="https://js.stripe.com/v3";var a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var c="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var l=function(){var n=document.querySelectorAll('script[src^="'.concat(s,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(!a.test(t.src)){continue}return t}return null};var d=null;var f=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var r=document.createElement("script");r.src="".concat(s).concat(e);var o=document.head||document.body;if(!o){t("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}o.appendChild(r);return r};var v=function(n){if(d!==null){return d}d=new Promise((function(e,t){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(c)}if(window.Stripe){e(window.Stripe);return}try{var r=l();if(r&&n){console.warn(c)}else if(!r){r=f(n)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(n){t(n);return}}));return d};var m=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var w=function(n,e,t){if(n===null){return null}var r=n.apply(undefined,e);m(r,t);return r};var h=Promise.resolve().then((function(){return v(null)}));var p=false;h.catch((function(n){if(!p){console.warn(n)}}));var y=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(t){p=true;e=Date.now();return[2,h.then((function(t){return w(t,n,e)}))]}))}))};var z;var b=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=o({loadScriptSrc:n===null||n===void 0?void 0:n.src}),t=e.currentLoadScriptUrl,r=e.isWhiteListed;if(r){return t}return null}();var g=b||"https://v1.3.26.js.zonos.com";var j="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.26";var S="https://rsms.me";var k="https://fonts.googleapis.com";var D=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;var N=function(){function n(){}return n}();n("Zonos",N);z=N;N.doneInit=false;N.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);N.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);N.isBigCommerce=false;N.isNpm=true;N.zonosQaUrl=null;N.version="v".concat("1.3.26");N.modeAlerted=false;N.tempCartData=null;N.getCurrentTimestamp=function(){return(new Date).getTime()};N.zonosController=null;N.init=function(n){return __awaiter(r,[n],void 0,(function(n){var r=n.appearance,o=n.checkoutSettings,i=n.currencyConverter,u=n.helloSettings,s=n.onCountryChange,a=n.overrideCurrencyFormat,c=n.storeId,l=n.zonosApiKey;return __generator(this,(function(n){if(z.doneInit){return[2]}e("====== ZONOS DEBUG MODE: on (".concat(z.version,") ======"));if(!l){t("Missing Zonos API key");return[2]}z.zonosApiKey=l;z.storeId=c;e("init zonos");z.injectSentryScript();z.injectZonosCdn();z.injectZonosCss();z.injectFonts();z.injectController({config:{appearance:r,checkoutSettings:o,currencyConverter:i,helloSettings:u,onCountryChange:s,overrideCurrencyFormat:a},zonosApiKey:l});z.doneInit=true;return[2]}))}))};N.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};N.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};N.showNotification=function(n){var e;void((e=z.zonosController)===null||e===void 0?void 0:e.showNotification(n))};N.updateOrganizationName=function(n){var e;void((e=z.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};N.disablePlaceOrderButtons=function(n){var e=n.autoEnable,t=e===void 0?true:e,r=n.disable,o=n.placeOrderButtonSelector;if(o){var i=document.querySelectorAll(o);var u=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};i.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(r){n.setAttribute("disabled","true");n.addEventListener("click",u)}else{n.removeAttribute("disabled");n.removeEventListener("click",u)}}));if(t&&r){setTimeout((function(){i.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",u)}))}),5e3)}}};N.injectController=function(n){var o=n.config,i=n.zonosApiKey;var u;if(document.querySelector("zonos-controller")){return}if((u=o.checkoutSettings)===null||u===void 0?void 0:u.placeOrderButtonSelector){var s=o.checkoutSettings.placeOrderButtonSelector;z.disablePlaceOrderButtons({disable:true,placeOrderButtonSelector:s});var a=new MutationObserver((function(){z.disablePlaceOrderButtons({disable:true,placeOrderButtonSelector:s})}));a.observe(document.body,{childList:true,subtree:true})}var c=document.createElement("zonos-controller");c.config=o;c.zonosApiKey=i;c.addEventListener("stripeInitEvent",(function(n){return __awaiter(r,void 0,void 0,(function(){var r,o;return __generator(this,(function(i){switch(i.label){case 0:r=n.detail;e("loading Stripe");return[4,y(r.publishableKey)];case 1:o=i.sent();if(!o){t("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;void c.initCheckoutElement(o);return[2]}}))}))}));document.body.appendChild(c);z.zonosController=c;e("Zonos controller injected!")};N.injectSentryScript=function(){var n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";var r=function(){var e=document.querySelector('script[src="'.concat(n,'"]'));return!!e};if(r()){e("Sentry script already exists in the document","warn");return}var o=document.head||document.body;var i=document.createElement("script");i.crossOrigin="anonymous";i.src=n;i.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l";i.setAttribute("data-lazy","no");i.onerror=function(){t("Failed to load ".concat(i.src))};i.onload=function(){var n;(n=window.Sentry)===null||n===void 0?void 0:n.init({beforeSend:function(n){var e,t,r,o,i,u;var s=(u=(i=(o=(r=(t=(e=n.exception)===null||e===void 0?void 0:e.values)===null||t===void 0?void 0:t[0])===null||r===void 0?void 0:r.stacktrace)===null||o===void 0?void 0:o.frames)===null||i===void 0?void 0:i[0])===null||u===void 0?void 0:u.filename;var a=(s===null||s===void 0?void 0:s.includes("js.zonos.com"))||(s===null||s===void 0?void 0:s.includes("@zonos/elements"));var c=window.location.href.includes("dev.elements")||window.location.href.includes("route.js.zonos.com");if(a&&!c){return n}return null},dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",ignoreErrors:["Failed to load Stripe.js"],release:"zonos-elements@".concat(z.version),tracesSampler:function(){return.01}})};o.appendChild(i)};N.injectScript=function(n){var r=n.fallBackDomain,o=n.isModule,i=n.scriptDomain,u=n.theRestUrl;var s="".concat(i,"/").concat(u);var a=function(){var n=document.querySelector('script[src="'.concat(s,'"]'));return!!n};if(a()){e('Zonos script "'.concat(s,'" already exists in the document'),"warn");return}var c=document.head||document.body;var l=document.createElement("script");if(!!o){l.type="module"}else{l.noModule=true}l.src=s;l.crossOrigin="anonymous";l.onerror=function(){var n=/\/\/v\d+\./g.test(i);if(!n){e("No need to fallback since this is not a versioned domain","warn");return}if(r){z.injectScript({isModule:o,scriptDomain:r,theRestUrl:u})}t("Failed to load ".concat(l.src))};c.appendChild(l)};N.getZonosUrl=function(){if(z.isNpm){var n=u();return n||g}return g};N.injectZonosCdn=function(){var n=z.getZonosUrl();z.injectScript({fallBackDomain:j,isModule:true,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});z.injectScript({fallBackDomain:j,isModule:false,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.js"});e("Zonos cdn script injected!")};N.injectStylesheet=function(n){var r=n.fallBackDomain,o=n.stylesheetDomain,i=n.theRestUrl;var u=document.head||document.body;var s=document.createElement("link");s.rel="preconnect";s.href="".concat(g,"/");u.appendChild(s);var a=document.createElement("link");a.rel="stylesheet";a.href="".concat(o,"/").concat(i);a.onerror=function(){var n=/\/\/v\d+\./g.test(o);if(!n){e("No need to fallback since this is not a versioned domain","warn");return}if(r&&n){z.injectStylesheet({stylesheetDomain:r,theRestUrl:i})}t("Failed to load ".concat(a.href))};u.appendChild(a)};N.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){e("Zonos style links already injected","warn");return}z.injectStylesheet({fallBackDomain:j,stylesheetDomain:g,theRestUrl:"dist/zonos-elements/zonos-elements.css"});e("Zonos style css injected!")};N.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(S,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(D.test(t.href)){continue}return t}return null};if(n()){e("Inter font already injected","warn");return}var t=document.head||document.body;var r=document.createElement("link");r.rel="preconnect";r.href=S;t.appendChild(r);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(S,"/inter/inter.css");t.appendChild(o);e("Zonos font injected!")};N.setupGoogleFont=function(n){var e;void((e=z.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};N.injectSupportGoogleFont=function(n){var t;e("[FONT] injecting ".concat(n));var r=(t=n.match(/family=(.*?):/))===null||t===void 0?void 0:t[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(k,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=k;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){e("[FONT] ".concat(r," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);e("[FONT] ".concat(r," font injected!"))}}}}));
@@ -1 +0,0 @@
1
- import{r as o,c as e,h as t,H as s}from"./p-ce347974.js";import{B as i,t as a,l as n}from"./p-875a311d.js";import{z as l}from"./p-5821856c.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const c=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.getDutyMessage=()=>{const{countryLandedCost:o}=n,e=(null==o?void 0:o.dutyDeminimus)?i({amount:o.dutyDeminimus}):null;return e?`${a("Spend")} ${e} ${a("duty free")}`:a("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n,e=(null==o?void 0:o.vatTaxDeminimus)?i({amount:o.vatTaxDeminimus}):null;return e?`${a("Spend")} ${e} ${a("tax free")}`:a("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:i({amount:o.dutyDeminimus})}),this.getAustraliaDutyTaxMessage=o=>a("[percentage] GST due on any order above [threshold].",{percentage:100*o.vatTaxRate+"%",threshold:i({amount:o.vatTaxDeminimus})}),this.getNewZealandDutyTaxMessge=o=>a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:i({amount:o.vatTaxDeminimus})}),this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(!n.countryLandedCost.hasTaxId)return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=n,i=this.getDutyMessage(),c=this.getTaxMessage(),f=this.getAdditionalDutyTaxMessage(),m=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),b=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=n,p=a("Welcome to [storeName]!",{storeName:l.organizationName}),u=(null===(o=g.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),z=h(u),w=this.getCurrentPageEnum(),v=g.filter((o=>o.pageName===w));return t(s,{key:"354758888accf5c5f44e321cc36f3126fe161596",class:"zonos--elements"},t("div",{key:"b6e9ef3ac53035b578f1ccb6940e04561a6c7362","aria-hidden":"true",class:r(["zonos--hello-dialog",m&&"zonos--hello-dialog-animate-from-left",b&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"cba389a7107bf0505743237a7e61e27988955a44"},t("div",{key:"3cef5f247dca70671ad0c304f29980f7147cf21c",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"013764140f25f64ab52f4588a50b5148f4b170d0",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"099dc23581474e5167cfa8bd90be9987b3caa47f",spacing:24},t("zonos-country-flag",{key:"c545313157e3a488433619292306419588e20e50",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"f8be1b95571b28be7ed4fc3caee5d13177845150",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"9ac86d0f247cecd0bfa19ffc041eee89bd19b168",type:"boldSubheader"},p),t("zonos-text",{key:"3234c9640aa1d484c6dcb78e7e3bf43e3545d67e",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"2f090b934ede76c8400b7891b6caa391e1f039b0",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"e7ec890c1673b4025e650ed737ee4ba0e37ceb5d",spacing:"12px"},t("zonos-v-stack",{key:"a09bc2634da2795a4f0e2ef8b66680db9b0e403d",spacing:12},t("div",{key:"2182aac10dc9b654b81234188cf0ef4decb2328a",class:"zonos--flex-message"},t("zonos-icon",{key:"362807633b9a55a4438e95a9150c4c80f5bd836b","aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"10bbbd399a255ad3a593b246d4b8b475e1c089e1"},i)),t("div",{key:"451c58a91d38413cc295a377e08ffa9947411112",class:"zonos--flex-message"},t("zonos-icon",{key:"2eceeced9d2b0ab482c94b8edd768134ba936d2d","aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"f4284b8e56522de93d5ca1160103ca2fac85250e"},c)),f&&t("div",{key:"f9f0a09a1a7bfa85b2a70f843aabea7961250141",class:"zonos--flex-message"},t("zonos-icon",{key:"147ee865b2708d662c185e4fe5d4dba7f099c310","aria-label":"Low value order shipping restriction",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"ccb671b31672ebfd41369a9b0fda8e49ed3739cc"},f)))),v.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"16b584281762c987d375b15e5cd3b5784fce5cd4",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"1122d535ce9bf451aa823726764a1a662c0378df"},t("zonos-country-select",{key:"73c417e435dcbb15be72879ecde8271cb5cc01a1",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"4555dcf5260fa976458f6d612efce72a39564abf"},t("zonos-language-select",{key:"c19ca73913d2b026976acc36c1d9eb68bf90f07c",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};c.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{c as zonos_hello_dialog}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{a(o.next(n))}catch(n){i(n)}}function c(n){try{a(o["throw"](n))}catch(n){i(n)}}function a(n){n.done?e(n.value):r(n.value).then(u,c)}a((o=o.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(n){return function(t){return a([n,t])}}function a(c){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,c[0]&&(e=0)),e)try{if(o=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;r=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(n,e)}catch(n){c=[6,n];r=0}finally{o=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-d1771035.system.js","./p-0b538ed4.system.js","./p-63db40b9.system.js"],(function(n){"use strict";var t,e,o,r,i;return{setters:[function(n){t=n.r;e=n.d;o=n.l},function(n){r=n.z},function(n){i=n.l}],execute:function(){var u=this;var c=n("t",(function(n,i){return __awaiter(u,void 0,void 0,(function(){var u,c,a,s,f,d,w,v;return __generator(this,(function(l){switch(l.label){case 0:a=window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||!!((u=window.Zonos)===null||u===void 0?void 0:u.zonosQaUrl)||!!((c=window.Zonos)===null||c===void 0?void 0:c.debug);if(a&&!window.Zonos.zonosConversionTest){return[2]}s="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");f=o.selectedCountryCode;d=r.organizationId;w=e.checkoutSessionId;if(!w){return[2]}v={checkoutSessionId:w,countryCode:f,eventName:n,metadata:i,organizationId:d};return[4,t(s,{body:v,method:"POST"})];case 1:l.sent();return[2]}}))}))}));var a=n("c",(function(n,t){return new CustomEvent(n,{detail:t})}));var s=n("s",(function(n){return __awaiter(u,[n],void 0,(function(n){var e,o;var r=n.endpoint,i=n.errors,u=n.metadata;return __generator(this,(function(n){e="userAgentData"in window.navigator?window.navigator.userAgentData:null;o={endpoint:r,errors:i,metadata:Object.assign({href:window.location.href,userAgent:e&&e.brands.length>0?e:window.navigator.userAgent},u)};void t("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:o,method:"POST"});return[2]}))}))}));var f=n("a",(function(n){var t=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!t||(t===null||t===void 0?void 0:t.status)==="DISABLED"){return}if(typeof window.gtag==="function"){i("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}))}}}));