@zonos/elements 1.3.7-alpha.1 → 1.3.7

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 (91) hide show
  1. package/dist/cjs/{cart-89d9fff4.js → cart-eee85bda.js} +3 -13
  2. package/dist/cjs/{submitGtag-24740560.js → submitGtag-a2e1f652.js} +1 -1
  3. package/dist/cjs/zonos-address_4.cjs.entry.js +3 -4
  4. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-cart-items_9.cjs.entry.js +2 -2
  6. package/dist/cjs/zonos-checkout.cjs.entry.js +3 -4
  7. package/dist/cjs/zonos-controller.cjs.entry.js +2 -3
  8. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello.cjs.entry.js +2 -3
  12. package/dist/cjs/zonos-payment.cjs.entry.js +3 -4
  13. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  14. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +2 -2
  15. package/dist/collection/components/main/zonos-controller.js +1 -2
  16. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +3 -3
  17. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -3
  18. package/dist/collection/components/utils/api/getLocaleMessages.js +2 -2
  19. package/dist/collection/components/utils/hello/currencyConversion/getCurrencyElements.js +0 -2
  20. package/dist/collection/components/utils/logging/log.js +2 -8
  21. package/dist/collection/components/utils/logging/logError.js +0 -1
  22. package/dist/collection/scripts/zonosBase.js +0 -3
  23. package/dist/components/stripe.js +3 -13
  24. package/dist/components/zonos-checkout.js +1 -2
  25. package/dist/components/zonos-controller.js +1 -2
  26. package/dist/components/zonos-hello.js +1 -2
  27. package/dist/components/zonos-link-authentication2.js +3 -4
  28. package/dist/components/zonos-payment2.js +3 -4
  29. package/dist/esm/{cart-1bbb7662.js → cart-e261efc1.js} +3 -13
  30. package/dist/esm/{submitGtag-d3d11f1a.js → submitGtag-dfc6f1dc.js} +1 -1
  31. package/dist/esm/zonos-address_4.entry.js +3 -4
  32. package/dist/esm/zonos-card_2.entry.js +1 -1
  33. package/dist/esm/zonos-cart-items_9.entry.js +2 -2
  34. package/dist/esm/zonos-checkout.entry.js +3 -4
  35. package/dist/esm/zonos-controller.entry.js +2 -3
  36. package/dist/esm/zonos-country-flag.entry.js +1 -1
  37. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  38. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  39. package/dist/esm/zonos-hello.entry.js +2 -3
  40. package/dist/esm/zonos-payment.entry.js +3 -4
  41. package/dist/esm-es5/{cart-1bbb7662.js → cart-e261efc1.js} +1 -1
  42. package/dist/esm-es5/{submitGtag-d3d11f1a.js → submitGtag-dfc6f1dc.js} +1 -1
  43. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  44. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  45. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
  46. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  47. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  48. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  49. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  50. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  51. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  52. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  53. package/dist/scripts/loadStripe.js +1 -1
  54. package/dist/scripts/loadZonos.js +1 -1
  55. package/dist/scripts/stripe.js +1 -1
  56. package/dist/scripts/zonos.js +1 -1
  57. package/dist/scripts/zonosBase.js +1 -1
  58. package/dist/types/components/store/hello/localization.d.ts +1 -2
  59. package/dist/zonos-elements/p-066c5893.system.js +1 -1
  60. package/dist/zonos-elements/{p-87e9c42f.entry.js → p-0c91720b.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-fdb72530.system.entry.js → p-1119dddf.system.entry.js} +1 -1
  62. package/dist/zonos-elements/{p-fd642725.entry.js → p-14c3ef38.entry.js} +1 -1
  63. package/dist/zonos-elements/{p-5ee03db0.system.entry.js → p-165d469e.system.entry.js} +1 -1
  64. package/dist/zonos-elements/{p-b2c0ec71.system.entry.js → p-389599d3.system.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-ec37439e.entry.js → p-3a1e685f.entry.js} +1 -1
  66. package/dist/zonos-elements/p-3b23e462.entry.js +1 -0
  67. package/dist/zonos-elements/{p-f862b97f.system.entry.js → p-4fb77a38.system.entry.js} +1 -1
  68. package/dist/zonos-elements/{p-58c1ddef.system.js → p-5496951a.system.js} +1 -1
  69. package/dist/zonos-elements/{p-f478c814.system.entry.js → p-5c176b23.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-57b65321.system.entry.js → p-5d9a000a.system.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-0318632a.entry.js → p-5f4ba44c.entry.js} +1 -1
  72. package/dist/zonos-elements/p-69e2c59e.entry.js +1 -0
  73. package/dist/zonos-elements/p-745cd869.system.entry.js +1 -0
  74. package/dist/zonos-elements/{p-d054788b.system.js → p-78ba2928.system.js} +1 -1
  75. package/dist/zonos-elements/{p-d407c93a.system.entry.js → p-79b24786.system.entry.js} +1 -1
  76. package/dist/zonos-elements/p-7f4f45b3.entry.js +1 -0
  77. package/dist/zonos-elements/{p-135ab559.system.entry.js → p-9e6b489d.system.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-bef54fb1.entry.js → p-9f4e02a1.entry.js} +1 -1
  79. package/dist/zonos-elements/p-c060d475.js +1 -0
  80. package/dist/zonos-elements/{p-b0462325.system.entry.js → p-c2e58ee1.system.entry.js} +1 -1
  81. package/dist/zonos-elements/{p-ae82a9ae.js → p-da767f8b.js} +1 -1
  82. package/dist/zonos-elements/p-dd9e8589.entry.js +1 -0
  83. package/dist/zonos-elements/{p-84f4f00f.entry.js → p-f11a3d9e.entry.js} +1 -1
  84. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  85. package/package.json +1 -1
  86. package/dist/zonos-elements/p-15a80c4a.entry.js +0 -1
  87. package/dist/zonos-elements/p-7a32526c.entry.js +0 -1
  88. package/dist/zonos-elements/p-a5f12396.entry.js +0 -1
  89. package/dist/zonos-elements/p-c0d431f6.system.entry.js +0 -1
  90. package/dist/zonos-elements/p-e55dd932.js +0 -1
  91. package/dist/zonos-elements/p-edace42b.entry.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as o,h as e,H as t}from"./p-58127116.js";import{_ as s,e as i,i as n,f as r,z as a,m as l}from"./p-7b87b82f.js";import{u as h,d,l as m,v as c,t as p,x as f,y as u,a as g,z as w,A as z,B as b,C as v}from"./p-da767f8b.js";import{c as x}from"./p-b4b7f705.js";import{g as y}from"./p-5883217a.js";import"./p-95e0fc06.js";import"./p-0c0aa552.js";var k=s,T=/\s/,E=/^\s+/,L=i,C=n,j=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(E,""):o},D=r,I=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,X=/^0o[0-7]+$/i,O=parseInt,S=r,B=function(){return k.Date.now()},A=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||C(o)&&"[object Symbol]"==L(o)}(o))return NaN;if(D(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=D(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=j(o);var t=R.test(o);return t||X.test(o)?O(o.slice(2),t?2:8):I.test(o)?NaN:+o},H=Math.max,M=Math.min,N=function(o,e,t){var s,i,n,r,a,l,h=0,d=!1,m=!1,c=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function f(o){var t=o-l;return void 0===l||t>=e||t<0||m&&o-h>=n}function u(){var o=B();if(f(o))return g(o);a=setTimeout(u,function(o){var t=e-(o-l);return m?M(t,n-(o-h)):t}(o))}function g(o){return a=void 0,c&&s?p(o):(s=i=void 0,r)}function w(){var o=B(),t=f(o);if(s=arguments,i=this,l=o,t){if(void 0===a)return function(o){return h=o,a=setTimeout(u,e),d?p(o):r}(l);if(m)return clearTimeout(a),a=setTimeout(u,e),p(l)}return void 0===a&&(a=setTimeout(u,e)),r}return e=A(e)||0,S(t)&&(d=!!t.leading,n=(m="maxWait"in t)?H(A(t.maxWait)||0,e):n,c="trailing"in t?!!t.trailing:c),w.cancel=function(){void 0!==a&&clearTimeout(a),h=0,s=l=i=a=void 0},w.flush=function(){return void 0===a?r:g(B())},w};const $=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=a.helloSettings;i&&s||d("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&c(i)&&document.querySelectorAll(i)||[],l=s&&c(s)&&document.querySelectorAll(s)||[];if(r.length!==l.length)return d("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,m=h&&t&&c(t)&&document.querySelectorAll(t)||[];h&&m.length!==l.length&&d('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const p=[];for(let t=0;t<r.length;t++){const s=r[t],i=l[t];if(s&&i){const n={cartButtonNode:m[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};p.push(n)}}return p},P=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===a.currentHelloPage||"productList"===a.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===a.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(a.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return`${p("Welcome to")} ${o}`}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==a.currentHelloPage&&"productList"!==a.currentHelloPage||"DISABLED"===a.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=m;if(!e)return d("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await h("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(d(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(a.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=a.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=$();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=N((()=>{const{productTitleElementSelector:o}=a.helloSettings;if(o){const o=$();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==m.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,a.currentHelloPage=(()=>{const{href:o}=window.location,{cartUrlPattern:e,homepageUrlPattern:t,productDetailUrlPattern:s,productListUrlPattern:i}=a.helloSettings;return e&&new RegExp(e).test(o)?"cart":s&&new RegExp(s).test(o)?"productDetail":i&&new RegExp(i).test(o)?"productList":t&&new RegExp(t).test(o)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void u(m.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return y(this.helloRef)},this.isShippableCountry=(o=!0)=>!(!m.localizationLoaded||!m.isShippableCountry&&(o&&g("Hello: not shippable country"),1)),this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=a.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[]}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&a.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),clearInterval(o))}),100)}async displayCurrency(){m.exchangeRate?w():d("Could not display currency. Exchange rate and format data is not available.")}async convertAndFormat(o){return z(o)}async convert(o){return b(o)}async format(o){return v(o)}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){N(this.render.bind(this),500)}render(){var o,s;if(null===(o=a.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return g("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i}=m,n=this.mobileLocationOverride||a.helloSettings.mobileLocation,r=window.innerWidth<768,h=this.animateFromLeftOverride||r&&n.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,d=n.includes("TOP"),c=l(a.appearance,this.appearanceSettingsOverride),{theme:p}=c,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(a.organizationName);const u=this.isShippableCountry()&&!!i;return e(t,{class:"zonos--hello zonos--elements","data-theme":p},u&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:x(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",h&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",d&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:x(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}};P.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";export{P as zonos_hello}
@@ -0,0 +1 @@
1
+ System.register(["./p-d1ab0823.system.js","./p-5496951a.system.js","./p-49f6a985.system.js","./p-91797d4e.system.js","./p-b4725505.system.js"],(function(n){"use strict";var t,e,s,o,a,c;return{setters:[function(n){t=n.r;e=n.h;s=n.H;o=n.d},function(n){a=n.j;c=n.d},function(){},function(){},function(){}],execute:function(){var m=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";var i=m;var p=n("zonos_payment",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=a.stripe;this.stripeElements=a.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var t=this.el.querySelector(".zonos--payment-component");if(!t){c("Cannot find container element for paymentElement");return}n.mount(t);n.on("change",(function(n){a.stripePaymentEventData=n}));a.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return e(s,{key:"e10a4ce1a9ecf05ad8efaceeb861284a92e475d2",class:"zonos--payment zonos--elements"},this.titleText&&e("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"a1b52de6a2cec2f707e00c39ebcd7752ad191af6",class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());p.style=i}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(n,t,e,r){function o(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(r.next(n))}catch(n){i(n)}}function a(n){try{c(r["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):o(n.value).then(u,a)}c((r=r.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:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-58c1ddef.system.js","./p-49f6a985.system.js"],(function(n){"use strict";var t,e,r,o;return{setters:[function(n){t=n.u;e=n.l;r=n.a},function(n){o=n.z}],execute:function(){var i=this;var u=n("t",(function(n,r){return __awaiter(i,void 0,void 0,(function(){var i,u,a,c;return __generator(this,(function(s){switch(s.label){case 0:if(window.location.href.includes("zonos.com")){return[2]}i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");u=e.selectedCountryCode;a=o.organizationId;c={countryCode:u,eventName:n,metadata:r,organizationId:a};return[4,t(i,{body:c,method:"POST"})];case 1:s.sent();return[2]}}))}))}));var a=n("s",(function(n){var e=n.endpoint,r=n.errors,o=n.metadata;return __awaiter(i,void 0,void 0,(function(){var n;return __generator(this,(function(i){n={endpoint:e,errors:r,metadata:o};void t("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:n,method:"POST"});return[2]}))}))}));var c=n("a",(function(n){var t=o.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"){r("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(n,t,e,r){function o(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{c(r.next(n))}catch(n){i(n)}}function a(n){try{c(r["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):o(n.value).then(u,a)}c((r=r.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:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-5496951a.system.js","./p-49f6a985.system.js"],(function(n){"use strict";var t,e,r,o;return{setters:[function(n){t=n.u;e=n.l;r=n.a},function(n){o=n.z}],execute:function(){var i=this;var u=n("t",(function(n,r){return __awaiter(i,void 0,void 0,(function(){var i,u,a,c;return __generator(this,(function(s){switch(s.label){case 0:if(window.location.href.includes("zonos.com")){return[2]}i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");u=e.selectedCountryCode;a=o.organizationId;c={countryCode:u,eventName:n,metadata:r,organizationId:a};return[4,t(i,{body:c,method:"POST"})];case 1:s.sent();return[2]}}))}))}));var a=n("s",(function(n){var e=n.endpoint,r=n.errors,o=n.metadata;return __awaiter(i,void 0,void 0,(function(){var n;return __generator(this,(function(i){n={endpoint:e,errors:r,metadata:o};void t("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:n,method:"POST"});return[2]}))}))}));var c=n("a",(function(n){var t=o.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"){r("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}))}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,e,s){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,i){function a(t){try{c(s.next(t))}catch(t){i(t)}}function r(t){try{c(s["throw"](t))}catch(t){i(t)}}function c(t){t.done?e(t.value):o(t.value).then(a,r)}c((s=s.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,o,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(n){return c([t,n])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(s=1,o&&(i=r[0]&2?o["return"]:r[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;if(o=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;o=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){e.label=r[1];break}if(r[0]===6&&e.label<i[1]){e.label=i[1];i=r;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(r);break}if(i[2])e.ops.pop();e.trys.pop();continue}r=n.call(t,e)}catch(t){r=[6,t];o=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-58c1ddef.system.js","./p-aed0098c.system.js","./p-49f6a985.system.js","./p-23e7c655.system.js","./p-b4725505.system.js","./p-91797d4e.system.js"],(function(t){"use strict";var n,e,s,o,i,a,r,c,h,l,d,u,f,b;return{setters:[function(t){n=t.r;e=t.h;s=t.H;o=t.d;i=t.c},function(t){a=t.j;r=t.n;c=t.d;h=t.l},function(t){l=t.i},function(t){d=t.d},function(t){u=t.c},function(t){f=t.g},function(t){b=t.i}],execute:function(){var m=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";var v=m;var p=t("zonos_address",function(){function t(t){n(this,t);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};t.prototype.updateAddressEventData=function(t){var n=t.event,e=t.type;switch(e){case"billing":a.stripeBillingAddressEventData=n;break;default:a.stripeAddressEventData=n;break}void r()};t.prototype.updateAddressElement=function(t){var n=t.stripeAddressElement,e=t.type;if(e==="shipping"){a.stripeAddressElement=n;return}a.stripeBillingAddressElement=n};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,s,o,i,a,r,d;var u=this;return __generator(this,(function(f){this.stripe=window.Zonos.stripe;e=this.getStripeAddressInstance(),s=e.stripeAddressEventData,o=e.stripeElements;if(!this.stripe||!o){c("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(t=this.defaultAddress)===null||t===void 0?void 0:t.phone;if(!i){(n=this.defaultAddress)===null||n===void 0?true:delete n.phone}a=h.shippingZoneCountries;r=a?Object.values(a).map((function(t){return t.code})):[];d=o.create("address",{allowedCountries:this.type==="shipping"?r:[],contacts:this.defaultAddress?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:(s===null||s===void 0?void 0:s.value.address.country)||h.selectedCountryCode||"AL"}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));d.on("change",(function(t){var n=t.value;if(!u.isDirtyAddress&&n.address.line1.length>=3){u.isDirtyAddress=true;setTimeout((function(){if(l()){u.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=u.type==="shipping"?100:600;var n=u.el.closest(".zonos--group");var e=u.el.getBoundingClientRect().top+t;n===null||n===void 0?void 0:n.scrollTo({behavior:"smooth",top:e})}}),600)}u.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:u.type,elementType:"address",empty:false,value:Object.assign(Object.assign({},n),{firstName:n.firstName||n.name.split(" ")[0],lastName:n.lastName||n.name.split(" ").pop()})}),type:u.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy()};t.prototype.componentDidLoad=function(){var t=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!t&&t.value.address.line1.length>0;void this.watchInitStripe()};t.prototype.render=function(){return e(s,{key:"8d762300d8f599a277806d861d13d2beb6a0a5a6",class:"zonos--address zonos--elements"},e("zonos-text",{key:"c355eece2f193cb0595ede434238f062b2c07c7c",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"59c3bd68cd67c8d733fd2ca5d9f4b4114c84db4a",class:"zonos--address-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());p.style=v;var z=["blue","cyan","green","orange","purple","red","gray","glass"];var k=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var y=k;var g=t("zonos_checkbox",function(){function t(t){n(this,t);this.checkboxSelected=i(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}t.prototype.render=function(){var t=this;var n=z.includes(this.backgroundColor);var o=n?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=n?"var(--amino-".concat(this.backgroundColor,"-200)"):!b(o)?"var(--amino-gray-800)":"var(--amino-gray-0)";var a=f(this.borderStyle,"4px");return e(s,{key:"5f8516f5933b739cc3f21d901e50dec1c761fa58",class:u(["zonos--elements zonos--checkbox"]),style:{"--background-color":o,"--border-radius":a,"--font-family":d(),"--size":"".concat(this.size,"px")}},e("label",{key:"6544f51a8c892d616123ab4194d069b055e3dc86",class:u([this.isDisabled&&"disabled"])},e("input",{key:"958e35bf16be575230748fccdb1a3916942c3a30",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(n){t.checkboxSelected.emit(n.target.checked)},type:"checkbox"}),e("span",{key:"2c55e0a190b092dd083c433c35143e253910f54f",class:"checkmark-container"},e("svg",{key:"0aa1f705b728055835159a399173a170aee4f7c0",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"d526bbafde4d4399be3f3a0a7cc87e92634d9548","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{size:this.fontSize},this.label)))};return t}());g.style=y;var w=":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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var x=w;var j=t("zonos_collapse",function(){function t(t){n(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var n="".concat(this.collapseSize,"px");return this.collapsed?n:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var n,e,s;this.iframe=((n=this.el.shadowRoot)===null||n===void 0?void 0:n.querySelector("iframe"))||null;(s=(e=this.iframe)===null||e===void 0?void 0:e.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return e(s,{key:"7ac8b898feadfb4424b3b48a98135cb18994f4e0",class:"zonos--elements zonos--collapse",style:{"--font-family":d(),height:this.getElementHeight()}},e("div",{key:"4a527ec319b59041196284d4d9a8f22b943a74e6"},e("iframe",{key:"2fb51c16e13ca90561b1b1e6cab89d87e4a37a47",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),e("slot",{key:"6d7849f6c35be611446b0da36d657396e5ca3122"})))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());j.style=x;var I=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";var _=I;var O=t("zonos_link_authentication",function(){function t(t){n(this,t);this.titleText=undefined;this.stripe=a.stripe}t.prototype.watchInitStripe=function(){if(!this.stripe||!a.stripeElements){return}var t=a.stripeLinkElement||a.stripeElements.create("linkAuthentication");var n=this.el.querySelector(".zonos--link-authentication-component");if(!n){console.error("Cannot find container element for linkAuthenticationElement");return}t.mount(n);t.on("change",(function(t){a.stripeLinkEventData=t;void r()}));a.stripeLinkElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return e(s,{key:"62b8e4a5c1902cb2c8fe032d7c43ba68742e8c0a",class:"zonos--link-authentication zonos--elements"},e("zonos-text",{key:"b86acc15bfc6eba0c7174c1e229205b34747f57d",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"f0734254d41ff9f221f97143e0df1f28017b9a61",class:"zonos--link-authentication-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());O.style=_}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,n,e,s){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,i){function a(t){try{c(s.next(t))}catch(t){i(t)}}function r(t){try{c(s["throw"](t))}catch(t){i(t)}}function c(t){t.done?e(t.value):o(t.value).then(a,r)}c((s=s.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,o,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(n){return c([t,n])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(s=1,o&&(i=r[0]&2?o["return"]:r[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;if(o=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;o=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){e.label=r[1];break}if(r[0]===6&&e.label<i[1]){e.label=i[1];i=r;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(r);break}if(i[2])e.ops.pop();e.trys.pop();continue}r=n.call(t,e)}catch(t){r=[6,t];o=0}finally{s=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-5496951a.system.js","./p-aed0098c.system.js","./p-49f6a985.system.js","./p-23e7c655.system.js","./p-b4725505.system.js","./p-91797d4e.system.js"],(function(t){"use strict";var n,e,s,o,i,a,r,c,h,l,d,u,f,b;return{setters:[function(t){n=t.r;e=t.h;s=t.H;o=t.d;i=t.c},function(t){a=t.j;r=t.n;c=t.d;h=t.l},function(t){l=t.i},function(t){d=t.d},function(t){u=t.c},function(t){f=t.g},function(t){b=t.i}],execute:function(){var m=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";var v=m;var p=t("zonos_address",function(){function t(t){n(this,t);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.isDirtyAddress=false}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};t.prototype.updateAddressEventData=function(t){var n=t.event,e=t.type;switch(e){case"billing":a.stripeBillingAddressEventData=n;break;default:a.stripeAddressEventData=n;break}void r()};t.prototype.updateAddressElement=function(t){var n=t.stripeAddressElement,e=t.type;if(e==="shipping"){a.stripeAddressElement=n;return}a.stripeBillingAddressElement=n};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,s,o,i,a,r,d;var u=this;return __generator(this,(function(f){this.stripe=window.Zonos.stripe;e=this.getStripeAddressInstance(),s=e.stripeAddressEventData,o=e.stripeElements;if(!this.stripe||!o){c("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=(t=this.defaultAddress)===null||t===void 0?void 0:t.phone;if(!i){(n=this.defaultAddress)===null||n===void 0?true:delete n.phone}a=h.shippingZoneCountries;r=a?Object.values(a).map((function(t){return t.code})):[];d=o.create("address",{allowedCountries:this.type==="shipping"?r:[],contacts:this.defaultAddress?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:(s===null||s===void 0?void 0:s.value.address.country)||h.selectedCountryCode||"AL"}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));d.on("change",(function(t){var n=t.value;if(!u.isDirtyAddress&&n.address.line1.length>=3){u.isDirtyAddress=true;setTimeout((function(){if(l()){u.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=u.type==="shipping"?100:600;var n=u.el.closest(".zonos--group");var e=u.el.getBoundingClientRect().top+t;n===null||n===void 0?void 0:n.scrollTo({behavior:"smooth",top:e})}}),600)}u.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:u.type,elementType:"address",empty:false,value:Object.assign(Object.assign({},n),{firstName:n.firstName||n.name.split(" ")[0],lastName:n.lastName||n.name.split(" ").pop()})}),type:u.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy()};t.prototype.componentDidLoad=function(){var t=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!t&&t.value.address.line1.length>0;void this.watchInitStripe()};t.prototype.render=function(){return e(s,{key:"8d762300d8f599a277806d861d13d2beb6a0a5a6",class:"zonos--address zonos--elements"},e("zonos-text",{key:"c355eece2f193cb0595ede434238f062b2c07c7c",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"59c3bd68cd67c8d733fd2ca5d9f4b4114c84db4a",class:"zonos--address-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());p.style=v;var z=["blue","cyan","green","orange","purple","red","gray","glass"];var k=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var y=k;var g=t("zonos_checkbox",function(){function t(t){n(this,t);this.checkboxSelected=i(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}t.prototype.render=function(){var t=this;var n=z.includes(this.backgroundColor);var o=n?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var i=n?"var(--amino-".concat(this.backgroundColor,"-200)"):!b(o)?"var(--amino-gray-800)":"var(--amino-gray-0)";var a=f(this.borderStyle,"4px");return e(s,{key:"5f8516f5933b739cc3f21d901e50dec1c761fa58",class:u(["zonos--elements zonos--checkbox"]),style:{"--background-color":o,"--border-radius":a,"--font-family":d(),"--size":"".concat(this.size,"px")}},e("label",{key:"6544f51a8c892d616123ab4194d069b055e3dc86",class:u([this.isDisabled&&"disabled"])},e("input",{key:"958e35bf16be575230748fccdb1a3916942c3a30",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(n){t.checkboxSelected.emit(n.target.checked)},type:"checkbox"}),e("span",{key:"2c55e0a190b092dd083c433c35143e253910f54f",class:"checkmark-container"},e("svg",{key:"0aa1f705b728055835159a399173a170aee4f7c0",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"d526bbafde4d4399be3f3a0a7cc87e92634d9548","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{size:this.fontSize},this.label)))};return t}());g.style=y;var w=":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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var x=w;var j=t("zonos_collapse",function(){function t(t){n(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var n="".concat(this.collapseSize,"px");return this.collapsed?n:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var n,e,s;this.iframe=((n=this.el.shadowRoot)===null||n===void 0?void 0:n.querySelector("iframe"))||null;(s=(e=this.iframe)===null||e===void 0?void 0:e.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return e(s,{key:"7ac8b898feadfb4424b3b48a98135cb18994f4e0",class:"zonos--elements zonos--collapse",style:{"--font-family":d(),height:this.getElementHeight()}},e("div",{key:"4a527ec319b59041196284d4d9a8f22b943a74e6"},e("iframe",{key:"2fb51c16e13ca90561b1b1e6cab89d87e4a37a47",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),e("slot",{key:"6d7849f6c35be611446b0da36d657396e5ca3122"})))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());j.style=x;var I=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";var _=I;var O=t("zonos_link_authentication",function(){function t(t){n(this,t);this.titleText=undefined;this.stripe=a.stripe}t.prototype.watchInitStripe=function(){if(!this.stripe||!a.stripeElements){return}var t=a.stripeLinkElement||a.stripeElements.create("linkAuthentication");var n=this.el.querySelector(".zonos--link-authentication-component");if(!n){c("Cannot find container element for linkAuthenticationElement");return}t.mount(n);t.on("change",(function(t){a.stripeLinkEventData=t;void r()}));a.stripeLinkElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return e(s,{key:"671681b3ca3e95ab25a70cb44e84db7e2b3903e8",class:"zonos--link-authentication zonos--elements"},e("zonos-text",{key:"8d20c795500e3ce27b92cdeb0446908e550f9f13",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("div",{key:"b8374d7d7a4844b4c2cf6363b8d2d225bb52b21d",class:"zonos--link-authentication-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());O.style=_}}}));
@@ -0,0 +1 @@
1
+ import{r as o,h as s,F as e,H as c}from"./p-58127116.js";import{l as t,a as n,s as i,b as a,c as r,d as h,e as d,i as l,f as u,g as z,h as m,j as k,k as p,m as g,n as f,o as v,p as b,q as w,r as y,t as x}from"./p-da767f8b.js";import{z as C,m as B}from"./p-7b87b82f.js";import{s as S,a as A,t as I}from"./p-c060d475.js";import{i as L}from"./p-81a54668.js";import{c as j}from"./p-b4b7f705.js";import{g as O}from"./p-0c0aa552.js";import{i as H}from"./p-95e0fc06.js";const M=(o=!0)=>!(!t.localizationLoaded||!t.isShippableCountry&&(o&&n("Checkout: not shippable country"),1)),N='<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',P='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--amino-gray-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',_=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,e,c;const t=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||C.appearance.theme;await l({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(c=this.appearanceSettingsOverride)||void 0===c?void 0:c.colorSecondary,overrideTheme:this.isMobile?t:void 0})},this.getCurrentLocalePageEnum=()=>{switch(u.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.appearanceSettingsOverride=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!1,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}async initCartInfoHandler(o){z(o.detail)}async closeDialogHandler(){A("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==u.step||m(),u.step="customer-info"}async buildCartAndInit(){if(C.checkoutSettings.buildCartDetail){n("build cart detail");const o=await C.checkoutSettings.buildCartDetail();await z(o)}if(!k.clientSecret){const o=await p();if(n(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=C.checkoutSettings.placeOrderButtonSelector;o&&document.querySelectorAll(`${o}, ${this.domesticRedirectedBtnSelector}`).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(M()){o.preventDefault(),o.stopPropagation(),n("zonos checkout button clicked"),k.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");A("zonos-checkout-start"),I("checkout_open")}catch(o){k.isFetchingSession=!1,g({messages:[x("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:x("Error creating Checkout")})}}})),o.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"),o.matches(this.domesticRedirectedBtnSelector)&&(o.dispatchEvent(new CustomEvent("click")),r(),o.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}async init(){k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const c=document.querySelector(o),t=i();if(!c&&t){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(t),void e.disconnect()}const n=document.querySelector('select[name="shippingAddress.countryCode"]'),l=document.querySelector("#checkout-shipping-continue");n&&l&&(e.disconnect(),l.addEventListener("click",(async o=>{var s,e;const c=n.value;if(!c)return;if(a(c),!M(!1))return void r();const t=document.querySelector("form");if(!t)return;const i=new FormData(t),l=document.querySelector("input#addressLine1Input"),u={address1:null!==(s=i.get("shippingAddress.address1"))&&void 0!==s?s:l&&l.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=i.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(u).some((o=>null==o)))return h("One or more shipping address field is missing",Object.entries(u)),void S({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(u))],metadata:{domain:window.location.hostname,storeId:C.storeId}});d({address1:u.address1,address2:u.address2,city:u.city,countryCode:u.countryCode,firstName:u.firstName,lastName:u.lastName,phone:u.phone,postalCode:u.postalCode,state:u.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:`${o.firstName} ${o.lastName}`,phone:o.phone}}});const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const e=M(!1),c=document.querySelectorAll(s);e?null==c||c.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==c||c.forEach((o=>{const s=o,e=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=e||"initial"}))}),100),s=setInterval((()=>{k.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(n("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(s)):n("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){u.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await f();const o=setInterval((()=>{!u.landedCostData&&k.isFetchingLandedCost||(u.landedCostData&&v(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{v(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await b(),v()}catch(o){h(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(w(),this.preview)return u.step="customer-info",void await this.init();m();const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}async handleBackClick(){"customer-info"!==u.step?y():await this.closeDialogHandler()}handleWindowResize(){this.isMobile=L(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=L(this.mobile),this.applyStripeTheme(),n(`mobile: ${this.isMobile}`)}componentWillLoad(){this.init(),this.isMobile=L(this.mobile),n(`mobile: ${this.isMobile}`)}disconnectedCallback(){w(),m()}render(){var o;const n="finish"!==u.step&&"error"!==u.step&&!k.stripeElements||k.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:h}=B(C.appearance,this.appearanceSettingsOverride),d="ENABLED"===C.appearance.zonosAttribution,l=C.appearance.theme,z=i&&H(i)?"DARK":"LIGHT",m=this.isMobile?l:z,p=this.isMobile?void 0:a,{customMessages:g}=t,f=null===(o=g.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),b=g.filter((o=>o.pageName===v)),w=()=>s("div",{class:"zonos--logo"},r&&s("img",{alt:`${C.organizationName} logo`,src:r,width:100})),y=()=>s("zonos-v-stack",null,w(),b.map((o=>s("zonos-custom-message",{icon:N,message:o.message}))),s("div",null,s("zonos-button",{class:"zonos--back-button",icon:s("zonos-icon",{"aria-label":"Back to previous step",content:'<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}),noBackground:!0,noPaddingLeft:!0,noPaddingRight:!0,onClick:()=>this.handleBackClick(),theme:m},x("Back")))),S=()=>s("div",{class:"zonos--content",style:{"--border-radius":O(h)}},"finish"!==u.step&&"error"!==u.step&&s(e,null,s("div",{class:"zonos--left","data-theme":m,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&y(),"customer-info"===u.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:p}),"shipping"===u.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:p}),"payment"===u.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:p})),s("div",{class:"zonos--right","data-theme":l},this.isMobile&&y(),!this.isMobile&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null))),s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:N,message:f}))))),("finish"===u.step||"error"===u.step)&&s("div",{class:"zonos--done","data-theme":l},s("div",{class:"zonos--header"},w(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:P}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:l})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===u.step&&u.error?Object.assign(Object.assign({},u.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",null));return s(c,{class:j(["zonos--checkout zonos--elements",d&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?S():s("zonos-dialog",{borderStyle:h,"data-theme":l,height:"980px",isLoading:n,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},S()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}}};_.style=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56) var(--amino-space-76)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";export{_ as zonos_checkout}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,t,e,n){function i(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?e(o.value):i(o.value).then(a,r)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(t){return l([o,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;i=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=t.call(o,e)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-58c1ddef.system.js","./p-49f6a985.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-91797d4e.system.js","./p-b4725505.system.js"],(function(o){"use strict";var t,e,n,i,s,a,r,l,h,d,c;return{setters:[function(o){t=o.r;e=o.c;n=o.h;i=o.H},function(o){s=o.C;a=o.l;r=o.t},function(o){l=o.z},function(o){h=o.c},function(o){d=o.f},function(o){c=o.g},function(){},function(){}],execute:function(){var u=function(o){var t=o.getBoundingClientRect();var e=t.top;var n=window.innerHeight-t.bottom;return e>=n};var f='<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';var m='<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';var g='<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';var v='<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>';var p=":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(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-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(--amino-radius-12);border-bottom-right-radius:var(--amino-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:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-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(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-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:var(--amino-space-12)}: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)}}";var b=p;var w=o("zonos_hello_dialog",function(){function o(o){var n=this;t(this,o);this.closeDialog=e(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){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=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showLanguageSelect=o;return[2]}))}))};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var t;var e=a.countryLandedCost,p=a.selectedCountryCode;var b=(e===null||e===void 0?void 0:e.dutyDeminimus)?s(e.dutyDeminimus):null;var w=a.selectedCountryCode==="CA"?s(40):b;var z=w?"".concat(r("Spend")," ").concat(w," ").concat(r("duty free")):r("Duties will apply to all orders");var x=(e===null||e===void 0?void 0:e.vatTaxDeminimus)?s(e.vatTaxDeminimus):null;var C=a.selectedCountryCode==="CA"?s(150):x;var y=C?"".concat(r("Spend")," ").concat(C," ").concat(r("tax free")):r("Taxes will apply to all orders");var k=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var H=this.dialogRef&&u(this.dialogRef);var _=a.customMessages;var V="".concat(r("Welcome to")," ").concat(l.organizationName,"!");var M=((t=_.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var Z=d(M);var L=this.getCurrentPageEnum();var S=_.filter((function(o){return o.pageName===L}));return n(i,{key:"d5ac86955cf9f9a22e47fe2154dee6e10f6a9361",class:"zonos--elements"},n("div",{key:"d34dd3f937330cd5fdd2d7a11dc321c215983146","aria-hidden":"true",class:h(["zonos--hello-dialog",k&&"zonos--hello-dialog-animate-from-left",H&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(t){return t&&(o.dialogRef=t)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",null,n("div",{class:"zonos--hello-dialog-content"},n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:v}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{spacing:24},n("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:p}),n("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{type:"boldSubheader"},V),n("zonos-text",{innerHTML:Z,textColor:"gray-800"})),n("zonos-v-stack",{spacing:8},this.restrictedItems.map((function(o){var t;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(t=o.itemRestrictions)===null||t===void 0?void 0:t.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{spacing:"12px"},n("zonos-v-stack",{spacing:12},n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:f}),n("zonos-text",null,z)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:g}),n("zonos-text",null,y)))),S.map((function(o){return n("zonos-custom-message",{icon:m,message:o.message})}))))),n("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(t){return o.setShowCountrySelect(t)},setShowLanguageSelect:function(t){return o.setShowLanguageSelect(t)}})),this.showCountrySelect&&n("div",null,n("zonos-country-select",{handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",null,n("zonos-language-select",{handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());w.style=b}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,t,e,n){function i(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,s){function a(o){try{l(n.next(o))}catch(o){s(o)}}function r(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?e(o.value):i(o.value).then(a,r)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(t){return l([o,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(n=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;i=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=t.call(o,e)}catch(o){r=[6,o];i=0}finally{n=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-5496951a.system.js","./p-49f6a985.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-91797d4e.system.js","./p-b4725505.system.js"],(function(o){"use strict";var t,e,n,i,s,a,r,l,h,d,c;return{setters:[function(o){t=o.r;e=o.c;n=o.h;i=o.H},function(o){s=o.C;a=o.l;r=o.t},function(o){l=o.z},function(o){h=o.c},function(o){d=o.f},function(o){c=o.g},function(){},function(){}],execute:function(){var u=function(o){var t=o.getBoundingClientRect();var e=t.top;var n=window.innerHeight-t.bottom;return e>=n};var f='<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';var m='<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';var g='<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';var v='<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>';var p=":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(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-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(--amino-radius-12);border-bottom-right-radius:var(--amino-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:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-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(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-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:var(--amino-space-12)}: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)}}";var b=p;var w=o("zonos_hello_dialog",function(){function o(o){var n=this;t(this,o);this.closeDialog=e(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){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=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showLanguageSelect=o;return[2]}))}))};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var t;var e=a.countryLandedCost,p=a.selectedCountryCode;var b=(e===null||e===void 0?void 0:e.dutyDeminimus)?s(e.dutyDeminimus):null;var w=a.selectedCountryCode==="CA"?s(40):b;var z=w?"".concat(r("Spend")," ").concat(w," ").concat(r("duty free")):r("Duties will apply to all orders");var x=(e===null||e===void 0?void 0:e.vatTaxDeminimus)?s(e.vatTaxDeminimus):null;var C=a.selectedCountryCode==="CA"?s(150):x;var y=C?"".concat(r("Spend")," ").concat(C," ").concat(r("tax free")):r("Taxes will apply to all orders");var k=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var H=this.dialogRef&&u(this.dialogRef);var _=a.customMessages;var V="".concat(r("Welcome to")," ").concat(l.organizationName,"!");var M=((t=_.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||r("Know about duties and taxes before you buy. Shop with confidence!");var Z=d(M);var L=this.getCurrentPageEnum();var S=_.filter((function(o){return o.pageName===L}));return n(i,{key:"d5ac86955cf9f9a22e47fe2154dee6e10f6a9361",class:"zonos--elements"},n("div",{key:"d34dd3f937330cd5fdd2d7a11dc321c215983146","aria-hidden":"true",class:h(["zonos--hello-dialog",k&&"zonos--hello-dialog-animate-from-left",H&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(t){return t&&(o.dialogRef=t)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",null,n("div",{class:"zonos--hello-dialog-content"},n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:v}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{spacing:24},n("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:p}),n("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{type:"boldSubheader"},V),n("zonos-text",{innerHTML:Z,textColor:"gray-800"})),n("zonos-v-stack",{spacing:8},this.restrictedItems.map((function(o){var t;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(t=o.itemRestrictions)===null||t===void 0?void 0:t.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{spacing:"12px"},n("zonos-v-stack",{spacing:12},n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:f}),n("zonos-text",null,z)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:g}),n("zonos-text",null,y)))),S.map((function(o){return n("zonos-custom-message",{icon:m,message:o.message})}))))),n("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(t){return o.setShowCountrySelect(t)},setShowLanguageSelect:function(t){return o.setShowLanguageSelect(t)}})),this.showCountrySelect&&n("div",null,n("zonos-country-select",{handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",null,n("zonos-language-select",{handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());w.style=b}}}));
@@ -1 +1 @@
1
- import{r as o,c as t,h as n,H as e}from"./p-58127116.js";import{u as s,d as i,v as a,a as r,j as c,w as l,b as d}from"./p-ae82a9ae.js";import{z as h,b as u,d as f}from"./p-7b87b82f.js";import"./p-95e0fc06.js";import"./p-0c0aa552.js";const m=o=>{const t=document.querySelector(o);if(!document.querySelector("zonos-hello")&&t){const o=document.createElement("zonos-hello");return t.appendChild(o),!0}return!1},p=class{constructor(n){o(this,n),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(c.stripe=o,(t=h.checkoutSettings).placeOrderButtonSelector&&(a(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():i(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),r("init checkout element")):r("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||f();if("Inter"===e){if(!o)return;r("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:o})}const{errors:i,json:a}=await s(`https://v1.route.js.zonos.com/api/zonos-elements/get-font-detail?family=${e}`);i.length>0||!a?r(`Failed to load font ${e}`,"warn"):(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,a.fontUrl),o&&(r(`[FONT] ${o} font override applied`),h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:o})))}async componentWillLoad(){h.zonosApiKey=this.zonosApiKey,(async()=>{var o,t;const{errors:n,json:e}=await(async()=>{const{errors:o,json:t}=await s("https://v1.route.js.zonos.com/api/zonos-elements/zonos-settings");return o.length?(i("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null}):{errors:[],json:t}})();if("403"===(null===(o=n[0])||void 0===o?void 0:o.type.toString()))return void r("Failed to load zonos settings. This domain may not have access","warn");this.initZonosNotification(),u({overrideSettings:this.config,zonosSettings:e}),this.setupGoogleFont(),h.helloSettings&&(async o=>{const{anchorElementSelector:t}=o;if(t&&a(t)){if(r("Hello init complete"),!m(t)){const o=new MutationObserver((()=>{m(t)&&o.disconnect()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{o.disconnect()}),5e3)}}else i(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`)})(h.helloSettings),await l();const c=(null===(t=null==e?void 0:e.checkoutSettings)||void 0===t?void 0:t.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(c&&this.stripeInitEvent){if("INACTIVE"===h.checkoutSettings.subscriptionStatus)return r('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void r("zonos controller loaded");if("DISABLED"===h.checkoutSettings.visibilityStatus)return r("=== Checkout is disabled by store owner ===","warn"),void r("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:c.token}),r("zonos controller loaded")}else r("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):r("Failed to show notification - zonos-notification not found","warn")}async overrideConfig(o){u({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){d(o)}async getAppearanceSetting(){return h.appearance}async updateOrganizationName(o){h.organizationName=o}render(){return n(e,{key:"a220a3ebe75df167eefc892c59efdcaf05a53601",class:"zonos--elements"})}};p.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{visibility:hidden;opacity:0;height:0}";export{p as zonos_controller}
1
+ import{r as o,c as t,h as n,H as e}from"./p-58127116.js";import{u as s,d as i,v as a,a as r,j as c,w as l,b as d}from"./p-da767f8b.js";import{z as h,b as u,d as m}from"./p-7b87b82f.js";import"./p-95e0fc06.js";import"./p-0c0aa552.js";const f=o=>{const t=document.querySelector(o);if(!document.querySelector("zonos-hello")&&t){const o=document.createElement("zonos-hello");return t.appendChild(o),!0}return!1},p=class{constructor(n){o(this,n),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(c.stripe=o,(t=h.checkoutSettings).placeOrderButtonSelector&&(a(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():i(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),r("init checkout element")):r("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||m();if("Inter"===e){if(!o)return;r("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:o})}const{errors:i,json:a}=await s(`https://v1.route.js.zonos.com/api/zonos-elements/get-font-detail?family=${e}`);i.length>0||!a?r(`Failed to load font ${e}`,"warn"):(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,a.fontUrl),o&&(r(`[FONT] ${o} font override applied`),h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:o})))}async componentWillLoad(){h.zonosApiKey=this.zonosApiKey,(async()=>{var o,t;const{errors:n,json:e}=await(async()=>{const{errors:o,json:t}=await s("https://v1.route.js.zonos.com/api/zonos-elements/zonos-settings");return o.length?(i("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null}):{errors:[],json:t}})();if("403"===(null===(o=n[0])||void 0===o?void 0:o.type.toString()))return void r("Failed to load zonos settings. This domain may not have access","warn");this.initZonosNotification(),u({overrideSettings:this.config,zonosSettings:e}),this.setupGoogleFont(),h.helloSettings&&(async o=>{const{anchorElementSelector:t}=o;if(t&&a(t)){if(r("Hello init complete"),!f(t)){const o=new MutationObserver((()=>{f(t)&&o.disconnect()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{o.disconnect()}),5e3)}}else i(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`)})(h.helloSettings),await l();const c=(null===(t=null==e?void 0:e.checkoutSettings)||void 0===t?void 0:t.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(c&&this.stripeInitEvent){if("INACTIVE"===h.checkoutSettings.subscriptionStatus)return r('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void r("zonos controller loaded");if("DISABLED"===h.checkoutSettings.visibilityStatus)return r("=== Checkout is disabled by store owner ===","warn"),void r("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:c.token}),r("zonos controller loaded")}else r("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):r("Failed to show notification - zonos-notification not found","warn")}async overrideConfig(o){u({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){d(o)}async getAppearanceSetting(){return h.appearance}async updateOrganizationName(o){h.organizationName=o}render(){return n(e,{key:"0b734aaa82bd08277fb3a2694197b13242a4d0a6",class:"zonos--elements"})}};p.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{visibility:hidden;opacity:0;height:0}";export{p as zonos_controller}
@@ -0,0 +1 @@
1
+ import{u as o,l as t,a as n}from"./p-da767f8b.js";import{z as e}from"./p-7b87b82f.js";const s=async(n,s)=>{if(window.location.href.includes("zonos.com"))return;const a={countryCode:t.selectedCountryCode,eventName:n,metadata:s,organizationId:e.organizationId};await o("https://v1.route.js.zonos.com/api/zonos-elements/track-conversion-event",{body:a,method:"POST"})},a=async({endpoint:t,errors:n,metadata:e})=>{o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:{endpoint:t,errors:n,metadata:e},method:"POST"})},r=o=>{const t=e.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));t&&"DISABLED"!==(null==t?void 0:t.status)&&"function"==typeof window.gtag&&(n("Zonos submits gtag event","log",o),window.gtag("event",o,{}))};export{r as a,a as s,s as t}