@zonos/elements 1.3.8-alpha.0 → 1.3.8-alpha.1
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.
- package/dist/cjs/{cart-eee85bda.js → cart-c22d66c8.js} +98 -21
- package/dist/cjs/{getBorderRadius-d8f18958.js → getBorderRadius-d9a954a3.js} +1 -1
- package/dist/cjs/{isDarkColor-57860b44.js → isDarkColor-c01f24df.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a2e1f652.js → submitGtag-9c0a8038.js} +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +60 -7
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +32 -17
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-138c5555.js → zonosStore-2a8612a4.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +27 -10
- package/dist/collection/components/store/checkout/stripe.js +3 -3
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +3 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +63 -4
- package/dist/collection/components/utils/containsNonLatinChars.js +13 -0
- package/dist/collection/styles/stripe/addressRuleStyle.js +32 -15
- package/dist/collection/types/generated/graphql.customer.types.js +37 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +19 -0
- package/dist/components/stripe.js +95 -18
- package/dist/components/zonos-address2.js +67 -6
- package/dist/components/zonos-checkout-finish2.js +3 -3
- package/dist/components/zonos-customer-info2.js +35 -12
- package/dist/components/zonosStore.js +1 -0
- package/dist/esm/{cart-e261efc1.js → cart-f70b9be6.js} +98 -21
- package/dist/esm/{getBorderRadius-19787feb.js → getBorderRadius-0d133844.js} +1 -1
- package/dist/esm/{isDarkColor-2344e7a5.js → isDarkColor-8eeda28e.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-dfc6f1dc.js → submitGtag-1d7ee6b8.js} +2 -2
- package/dist/esm/zonos-address_4.entry.js +61 -8
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_9.entry.js +32 -17
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +4 -4
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-00bce01b.js → zonosStore-807f931f.js} +1 -0
- package/dist/esm-es5/cart-f70b9be6.js +1 -0
- package/dist/esm-es5/{getBorderRadius-19787feb.js → getBorderRadius-0d133844.js} +1 -1
- package/dist/esm-es5/{isDarkColor-2344e7a5.js → isDarkColor-8eeda28e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-dfc6f1dc.js → submitGtag-1d7ee6b8.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-00bce01b.js → zonosStore-807f931f.js} +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/containsNonLatinChars.d.ts +16 -0
- package/dist/types/components.d.ts +19 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +53 -0
- package/dist/types/types/generated/graphql.customer.types.ts +71 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +20 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +23 -1
- package/dist/zonos-elements/p-039803aa.system.js +1 -0
- package/dist/zonos-elements/{p-0c91720b.entry.js → p-04acf5ef.entry.js} +1 -1
- package/dist/zonos-elements/p-066c5893.system.js +1 -1
- package/dist/zonos-elements/{p-14c3ef38.entry.js → p-0ed00121.entry.js} +1 -1
- package/dist/zonos-elements/{p-143dc0d9.system.entry.js → p-121c551d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6eaef7b.system.entry.js → p-166ec0c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1e0dd491.entry.js → p-1691b167.entry.js} +1 -1
- package/dist/zonos-elements/{p-07966463.entry.js → p-25de098d.entry.js} +1 -1
- package/dist/zonos-elements/{p-c2e58ee1.system.entry.js → p-2eb62b45.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a1e685f.entry.js → p-32f43296.entry.js} +1 -1
- package/dist/zonos-elements/{p-14d27ce1.system.entry.js → p-35e878eb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-373e579c.entry.js +1 -0
- package/dist/zonos-elements/{p-354603b3.system.entry.js → p-3a406969.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3d4fc5aa.js +1 -0
- package/dist/zonos-elements/{p-c060d475.js → p-4679840f.js} +1 -1
- package/dist/zonos-elements/{p-78ba2928.system.js → p-4c4ccf82.system.js} +1 -1
- package/dist/zonos-elements/{p-4fb77a38.system.entry.js → p-4da6d5bb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-328b7f6f.system.entry.js → p-50460bf4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3cc0f84.entry.js → p-55cbb4cd.entry.js} +1 -1
- package/dist/zonos-elements/{p-745cd869.system.entry.js → p-56318a1f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7c36fcc.entry.js → p-58a25a6a.entry.js} +1 -1
- package/dist/zonos-elements/{p-389599d3.system.entry.js → p-5d73cde0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-857cfe35.entry.js → p-6d2ba24a.entry.js} +1 -1
- package/dist/zonos-elements/p-6dc7222d.js +1 -0
- package/dist/zonos-elements/{p-ac0a7b8f.entry.js → p-701d0fef.entry.js} +1 -1
- package/dist/zonos-elements/{p-49f6a985.system.js → p-75490d7c.system.js} +1 -1
- package/dist/zonos-elements/{p-165d469e.system.entry.js → p-7736198d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69e2c59e.entry.js → p-780ab968.entry.js} +1 -1
- package/dist/zonos-elements/{p-7f4f45b3.entry.js → p-7da1d7da.entry.js} +1 -1
- package/dist/zonos-elements/{p-1119dddf.system.entry.js → p-824882ce.system.entry.js} +1 -1
- package/dist/zonos-elements/p-86fe18ea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-91797d4e.system.js → p-95dee6f4.system.js} +1 -1
- package/dist/zonos-elements/{p-279d1c5f.entry.js → p-96e2cde7.entry.js} +1 -1
- package/dist/zonos-elements/p-9a9902ca.entry.js +1 -0
- package/dist/zonos-elements/p-9cdc6b5f.js +1 -0
- package/dist/zonos-elements/{p-61e5cf29.system.entry.js → p-af946fb3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4725505.system.js → p-c476a347.system.js} +1 -1
- package/dist/zonos-elements/p-c97cb066.system.entry.js +1 -0
- package/dist/zonos-elements/p-cbc7edb4.entry.js +1 -0
- package/dist/zonos-elements/{p-17e87be1.entry.js → p-d427adf2.entry.js} +1 -1
- package/dist/zonos-elements/{p-5c176b23.system.entry.js → p-d93d74c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e6b489d.system.entry.js → p-d9ba11cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd9e8589.entry.js → p-e043e830.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c45ce37.system.entry.js → p-e28d648c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-95e0fc06.js → p-e71fbec9.js} +1 -1
- package/dist/zonos-elements/{p-799d8a17.system.entry.js → p-e76069cc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5f4ba44c.entry.js → p-fc0a051b.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-e261efc1.js +0 -1
- package/dist/zonos-elements/p-0c0aa552.js +0 -1
- package/dist/zonos-elements/p-3b23e462.entry.js +0 -1
- package/dist/zonos-elements/p-5496951a.system.js +0 -1
- package/dist/zonos-elements/p-5d9a000a.system.entry.js +0 -1
- package/dist/zonos-elements/p-79b24786.system.entry.js +0 -1
- package/dist/zonos-elements/p-7b87b82f.js +0 -1
- package/dist/zonos-elements/p-9f4e02a1.entry.js +0 -1
- package/dist/zonos-elements/p-da767f8b.js +0 -1
- package/dist/zonos-elements/p-f11a3d9e.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,n,e,t){function s(o){return o instanceof e?o:new e((function(n){n(o)}))}return new(e||(e=Promise))((function(e,c){function i(o){try{u(t.next(o))}catch(o){c(o)}}function r(o){try{u(t["throw"](o))}catch(o){c(o)}}function u(o){o.done?e(o.value):s(o.value).then(i,r)}u((t=t.apply(o,n||[])).next())}))};var __generator=this&&this.__generator||function(o,n){var e={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},t,s,c,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(o){return function(n){return u([o,n])}}function u(r){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(t=1,s&&(c=r[0]&2?s["return"]:r[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,r[1])).done)return c;if(s=0,c)r=[r[0]&2,c.value];switch(r[0]){case 0:case 1:c=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(c=e.trys,c=c.length>0&&c[c.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!c||r[1]>c[0]&&r[1]<c[3])){e.label=r[1];break}if(r[0]===6&&e.label<c[1]){e.label=c[1];c=r;break}if(c&&e.label<c[2]){e.label=c[2];e.ops.push(r);break}if(c[2])e.ops.pop();e.trys.pop();continue}r=n.call(o,e)}catch(o){r=[6,o];s=0}finally{t=c=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-78ba2928.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-b4725505.system.js","./p-91797d4e.system.js"],(function(o){"use strict";var n,e,t,s,c,i,r,u,a,h,d,l,f,z,m,k,v,p,g,b,w,y,x,_,C,j,B,O,L,A,I,S,H;return{setters:[function(o){n=o.r;e=o.h;t=o.F;s=o.H},function(o){c=o.l;i=o.a;r=o.s;u=o.b;a=o.c;h=o.d;d=o.e;l=o.i;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.m;g=o.n;b=o.o;w=o.p;y=o.q;x=o.r;_=o.t},function(o){C=o.z;j=o.m},function(o){B=o.s;O=o.a;L=o.t},function(o){A=o.i},function(o){I=o.c},function(o){S=o.g},function(o){H=o.i}],execute:function(){var M=this;var N=function(o){if(o===void 0){o=true}if(!c.localizationLoaded){return false}if(!c.isShippableCountry){if(o){i("Checkout: not shippable country")}return false}return true};var P=function(o){var n=o.domesticRedirectedBtnSelector,e=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var t=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,i,l;var f=this;return __generator(this,(function(z){o=document.querySelector(n);s=r();if(!o&&s){c=document.createElement("button");c.style.display="none";c.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(c);e===null||e===void 0?void 0:e(s);t.disconnect();return[2]}i=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!i||!l){return[2]}t.disconnect();l.addEventListener("click",(function(o){return __awaiter(f,void 0,void 0,(function(){var n,e,t,s,c,r,l;return __generator(this,(function(f){t=i.value;if(!t){return[2]}u(t);if(!N(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}c=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(n=c.get("shippingAddress.address1"))!==null&&n!==void 0?n:r&&r.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:(e=c.get("shippingAddress.stateOrProvince"))!==null&&e!==void 0?e:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){h("One or more shipping address field is missing",Object.entries(l));void B({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:C.storeId}});return[2]}d({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));t.observe(document.body,{childList:true,subtree:true})};var E='<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>';var Z='<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 D='<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>';var T=".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}";var R=T;var V=o("zonos_checkout",function(){function o(o){var e=this;n(this,o);this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o,n,e,t,s;return __generator(this,(function(c){switch(c.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||C.appearance.theme;return[4,l({overrideBorderRaidus:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.style,overridePrimaryColor:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.colorPrimary,overrideSecondaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorSecondary,overrideTheme:this.isMobile?s:undefined})];case 1:c.sent();return[2]}}))}))};this.getCurrentLocalePageEnum=function(){switch(f.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=undefined;this.preview=false;this.mobile=false;this.defaultAddress=null;this.forceDialogOpen=false;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.paymentError=false;this.collapseReviewMobile=false;this.isAttachError=false;this.isMobile=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=o.detail;void z(n);return[2]}))}))};o.prototype.closeDialogHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){O("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&f.step==="finish"){m()}f.step="customer-info";return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(e){switch(e.label){case 0:if(!C.checkoutSettings.buildCartDetail)return[3,3];i("build cart detail");return[4,C.checkoutSettings.buildCartDetail()];case 1:o=e.sent();return[4,z(o)];case 2:e.sent();e.label=3;case 3:if(!!k.clientSecret)return[3,5];return[4,v()];case 4:n=e.sent();i("stripeStoreInitCheckoutSession: ".concat(n));if(!n){return[2,false]}e.label=5;case 5:return[4,this.applyStripeTheme()];case 6:e.sent();return[2,true]}}))}))};o.prototype.attachCheckout=function(){var o=this;var n=C.checkoutSettings.placeOrderButtonSelector;if(!n){return}var e=document.querySelectorAll("".concat(n,", ").concat(this.domesticRedirectedBtnSelector));e.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}n.addEventListener("click",(function(n){return __awaiter(o,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){switch(t.label){case 0:if(!N()){return[2]}n.preventDefault();n.stopPropagation();i("zonos checkout button clicked");k.isFetchingSession=true;this.open=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,this.buildCartAndInit()];case 2:o=t.sent();if(!o){throw new Error("Error building cart")}O("zonos-checkout-start");void L("checkout_open");return[3,4];case 3:e=t.sent();k.isFetchingSession=false;p({messages:[_("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:_("Error creating Checkout")});return[3,4];case 4:return[2]}}))}))}));n.removeAttribute("disabled");n.setAttribute("data-zonos-checkout-attached","true");if(n.matches(o.domesticRedirectedBtnSelector)){n.dispatchEvent(new CustomEvent("click"));a();n.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;var e=this;return __generator(this,(function(t){k.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;P({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){e.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});o=setInterval((function(){var n=window.Zonos.internationalHideSelector;if(!n){clearInterval(o);return}var e=N(false);var t=document.querySelectorAll(n);if(!e){t===null||t===void 0?void 0:t.forEach((function(o){var n=o;var e=n.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(n).display;n.style.display=e||"initial"}));return}t===null||t===void 0?void 0:t.forEach((function(o){var n=o;var e=n.style.display;n.setAttribute("data-zonos-checkout-original-display",e);n.style.display="none"}))}),100);n=setInterval((function(){k.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){i("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(n);return}i("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else{e.attachCheckout();var o=new MutationObserver((function(){e.attachCheckout()}));o.observe(document.body,{childList:true,subtree:true})}clearInterval(n)}),50);setTimeout((function(){clearInterval(n)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var n=this;return __generator(this,(function(e){switch(e.label){case 0:this.submitLoading=true;return[4,g()];case 1:e.sent();o=setInterval((function(){if(f.landedCostData||!k.isFetchingLandedCost){if(f.landedCostData){b()}n.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(n){this.submitLoading=true;setTimeout((function(){b();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(n){switch(n.label){case 0:this.paymentError=false;this.submitLoading=true;n.label=1;case 1:n.trys.push([1,3,,4]);return[4,w()];case 2:n.sent();b();return[3,4];case 3:o=n.sent();h(o);this.paymentError=true;return[3,4];case 4:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(e){switch(e.label){case 0:y();if(!this.preview)return[3,2];f.step="customer-info";return[4,this.init()];case 1:e.sent();return[2];case 2:m();o=window.location.href;n=o.split("?")[0];window.history.replaceState({},document.title,n);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleBackClick=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(f.step==="customer-info"))return[3,2];return[4,this.closeDialogHandler()];case 1:o.sent();return[2];case 2:x();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.componentWillLoad=function(){void this.init();this.isMobile=A(this.mobile);i("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){y();m()};o.prototype.render=function(){var o=this;var n;var i=f.step!=="finish"&&f.step!=="error"&&!k.stripeElements||k.isFetchingSession;var r=j(C.appearance,this.appearanceSettingsOverride),u=r.colorPrimary,a=r.colorSecondary,h=r.logoUrl,d=r.style;var l=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var m=u&&H(u)?"DARK":"LIGHT";var v=this.isMobile?z:m;var p=!this.isMobile?a:undefined;var g=c.customMessages;var b=(n=g.find((function(o){return o.pageName==="checkout_default"})))===null||n===void 0?void 0:n.message;var w=this.getCurrentLocalePageEnum();var y=g.filter((function(o){return o.pageName===w}));var x=function(){return e("div",{class:"zonos--logo"},h&&e("img",{alt:"".concat(C.organizationName," logo"),src:h,width:100}))};var B=function(){return e("zonos-v-stack",null,x(),y.map((function(o){return e("zonos-custom-message",{icon:Z,message:o.message})})),e("div",null,e("zonos-button",{class:"zonos--back-button",icon:e("zonos-icon",{"aria-label":"Back to previous step",content:E}),noBackground:true,noPaddingLeft:true,noPaddingRight:true,onClick:function(){return o.handleBackClick()},theme:v},_("Back"))))};var O=function(){return e("div",{class:"zonos--content",style:{"--border-radius":S(d)}},f.step!=="finish"&&f.step!=="error"&&e(t,null,e("div",{class:"zonos--left","data-theme":v,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&B(),f.step==="customer-info"&&e("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:p}),f.step==="shipping"&&e("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:p}),f.step==="payment"&&e("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:p})),e("div",{class:"zonos--right","data-theme":z},o.isMobile&&B(),!o.isMobile&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.closeDialogHandler()}}),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),e("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},e("zonos-cart-items",null))),e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Z,message:b}))))),(f.step==="finish"||f.step==="error")&&e("div",{class:"zonos--done","data-theme":z},e("div",{class:"zonos--header"},x(),e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),e("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:f.step==="error"&&!!f.error?Object.assign(Object.assign({},f.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),e("zonos-checkout-footer",null))};return e(s,{class:I(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?O():e("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:i,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},O()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());V.style=R}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,n,e,t){function s(o){return o instanceof e?o:new e((function(n){n(o)}))}return new(e||(e=Promise))((function(e,c){function i(o){try{u(t.next(o))}catch(o){c(o)}}function r(o){try{u(t["throw"](o))}catch(o){c(o)}}function u(o){o.done?e(o.value):s(o.value).then(i,r)}u((t=t.apply(o,n||[])).next())}))};var __generator=this&&this.__generator||function(o,n){var e={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},t,s,c,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(o){return function(n){return u([o,n])}}function u(r){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(t=1,s&&(c=r[0]&2?s["return"]:r[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,r[1])).done)return c;if(s=0,c)r=[r[0]&2,c.value];switch(r[0]){case 0:case 1:c=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(c=e.trys,c=c.length>0&&c[c.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!c||r[1]>c[0]&&r[1]<c[3])){e.label=r[1];break}if(r[0]===6&&e.label<c[1]){e.label=c[1];c=r;break}if(c&&e.label<c[2]){e.label=c[2];e.ops.push(r);break}if(c[2])e.ops.pop();e.trys.pop();continue}r=n.call(o,e)}catch(o){r=[6,o];s=0}finally{t=c=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-039803aa.system.js","./p-75490d7c.system.js","./p-4c4ccf82.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-c476a347.system.js","./p-95dee6f4.system.js"],(function(o){"use strict";var n,e,t,s,c,i,r,u,a,h,d,l,f,z,m,k,v,p,g,b,w,y,x,_,C,j,B,O,L,A,I,S,H;return{setters:[function(o){n=o.r;e=o.h;t=o.F;s=o.H},function(o){c=o.l;i=o.a;r=o.s;u=o.b;a=o.c;h=o.d;d=o.e;l=o.i;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.m;g=o.n;b=o.o;w=o.p;y=o.q;x=o.r;_=o.t},function(o){C=o.z;j=o.m},function(o){B=o.s;O=o.a;L=o.t},function(o){A=o.i},function(o){I=o.c},function(o){S=o.g},function(o){H=o.i}],execute:function(){var M=this;var N=function(o){if(o===void 0){o=true}if(!c.localizationLoaded){return false}if(!c.isShippableCountry){if(o){i("Checkout: not shippable country")}return false}return true};var P=function(o){var n=o.domesticRedirectedBtnSelector,e=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var t=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,i,l;var f=this;return __generator(this,(function(z){o=document.querySelector(n);s=r();if(!o&&s){c=document.createElement("button");c.style.display="none";c.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(c);e===null||e===void 0?void 0:e(s);t.disconnect();return[2]}i=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!i||!l){return[2]}t.disconnect();l.addEventListener("click",(function(o){return __awaiter(f,void 0,void 0,(function(){var n,e,t,s,c,r,l;return __generator(this,(function(f){t=i.value;if(!t){return[2]}u(t);if(!N(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}c=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(n=c.get("shippingAddress.address1"))!==null&&n!==void 0?n:r&&r.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:(e=c.get("shippingAddress.stateOrProvince"))!==null&&e!==void 0?e:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){h("One or more shipping address field is missing",Object.entries(l));void B({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:C.storeId}});return[2]}d({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));t.observe(document.body,{childList:true,subtree:true})};var E='<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>';var Z='<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 D='<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>';var T=".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}";var R=T;var V=o("zonos_checkout",function(){function o(o){var e=this;n(this,o);this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o,n,e,t,s;return __generator(this,(function(c){switch(c.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||C.appearance.theme;return[4,l({overrideBorderRaidus:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.style,overridePrimaryColor:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.colorPrimary,overrideSecondaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorSecondary,overrideTheme:this.isMobile?s:undefined})];case 1:c.sent();return[2]}}))}))};this.getCurrentLocalePageEnum=function(){switch(f.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=undefined;this.preview=false;this.mobile=false;this.defaultAddress=null;this.forceDialogOpen=false;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.paymentError=false;this.collapseReviewMobile=false;this.isAttachError=false;this.isMobile=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=o.detail;void z(n);return[2]}))}))};o.prototype.closeDialogHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){O("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&f.step==="finish"){m()}f.step="customer-info";return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(e){switch(e.label){case 0:if(!C.checkoutSettings.buildCartDetail)return[3,3];i("build cart detail");return[4,C.checkoutSettings.buildCartDetail()];case 1:o=e.sent();return[4,z(o)];case 2:e.sent();e.label=3;case 3:if(!!k.clientSecret)return[3,5];return[4,v()];case 4:n=e.sent();i("stripeStoreInitCheckoutSession: ".concat(n));if(!n){return[2,false]}e.label=5;case 5:return[4,this.applyStripeTheme()];case 6:e.sent();return[2,true]}}))}))};o.prototype.attachCheckout=function(){var o=this;var n=C.checkoutSettings.placeOrderButtonSelector;if(!n){return}var e=document.querySelectorAll("".concat(n,", ").concat(this.domesticRedirectedBtnSelector));e.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}n.addEventListener("click",(function(n){return __awaiter(o,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){switch(t.label){case 0:if(!N()){return[2]}n.preventDefault();n.stopPropagation();i("zonos checkout button clicked");k.isFetchingSession=true;this.open=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,this.buildCartAndInit()];case 2:o=t.sent();if(!o){throw new Error("Error building cart")}O("zonos-checkout-start");void L("checkout_open");return[3,4];case 3:e=t.sent();k.isFetchingSession=false;p({messages:[_("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:_("Error creating Checkout")});return[3,4];case 4:return[2]}}))}))}));n.removeAttribute("disabled");n.setAttribute("data-zonos-checkout-attached","true");if(n.matches(o.domesticRedirectedBtnSelector)){n.dispatchEvent(new CustomEvent("click"));a();n.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;var e=this;return __generator(this,(function(t){k.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;P({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){e.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});o=setInterval((function(){var n=window.Zonos.internationalHideSelector;if(!n){clearInterval(o);return}var e=N(false);var t=document.querySelectorAll(n);if(!e){t===null||t===void 0?void 0:t.forEach((function(o){var n=o;var e=n.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(n).display;n.style.display=e||"initial"}));return}t===null||t===void 0?void 0:t.forEach((function(o){var n=o;var e=n.style.display;n.setAttribute("data-zonos-checkout-original-display",e);n.style.display="none"}))}),100);n=setInterval((function(){k.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){i("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(n);return}i("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else{e.attachCheckout();var o=new MutationObserver((function(){e.attachCheckout()}));o.observe(document.body,{childList:true,subtree:true})}clearInterval(n)}),50);setTimeout((function(){clearInterval(n)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var n=this;return __generator(this,(function(e){switch(e.label){case 0:this.submitLoading=true;return[4,g()];case 1:e.sent();o=setInterval((function(){if(f.landedCostData||!k.isFetchingLandedCost){if(f.landedCostData){b()}n.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(n){this.submitLoading=true;setTimeout((function(){b();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(n){switch(n.label){case 0:this.paymentError=false;this.submitLoading=true;n.label=1;case 1:n.trys.push([1,3,,4]);return[4,w()];case 2:n.sent();b();return[3,4];case 3:o=n.sent();h(o);this.paymentError=true;return[3,4];case 4:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(e){switch(e.label){case 0:y();if(!this.preview)return[3,2];f.step="customer-info";return[4,this.init()];case 1:e.sent();return[2];case 2:m();o=window.location.href;n=o.split("?")[0];window.history.replaceState({},document.title,n);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleBackClick=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(f.step==="customer-info"))return[3,2];return[4,this.closeDialogHandler()];case 1:o.sent();return[2];case 2:x();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.componentWillLoad=function(){void this.init();this.isMobile=A(this.mobile);i("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){y();m()};o.prototype.render=function(){var o=this;var n;var i=f.step!=="finish"&&f.step!=="error"&&!k.stripeElements||k.isFetchingSession;var r=j(C.appearance,this.appearanceSettingsOverride),u=r.colorPrimary,a=r.colorSecondary,h=r.logoUrl,d=r.style;var l=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var m=u&&H(u)?"DARK":"LIGHT";var v=this.isMobile?z:m;var p=!this.isMobile?a:undefined;var g=c.customMessages;var b=(n=g.find((function(o){return o.pageName==="checkout_default"})))===null||n===void 0?void 0:n.message;var w=this.getCurrentLocalePageEnum();var y=g.filter((function(o){return o.pageName===w}));var x=function(){return e("div",{class:"zonos--logo"},h&&e("img",{alt:"".concat(C.organizationName," logo"),src:h,width:100}))};var B=function(){return e("zonos-v-stack",null,x(),y.map((function(o){return e("zonos-custom-message",{icon:Z,message:o.message})})),e("div",null,e("zonos-button",{class:"zonos--back-button",icon:e("zonos-icon",{"aria-label":"Back to previous step",content:E}),noBackground:true,noPaddingLeft:true,noPaddingRight:true,onClick:function(){return o.handleBackClick()},theme:v},_("Back"))))};var O=function(){return e("div",{class:"zonos--content",style:{"--border-radius":S(d)}},f.step!=="finish"&&f.step!=="error"&&e(t,null,e("div",{class:"zonos--left","data-theme":v,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&B(),f.step==="customer-info"&&e("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:p}),f.step==="shipping"&&e("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:p}),f.step==="payment"&&e("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:p})),e("div",{class:"zonos--right","data-theme":z},o.isMobile&&B(),!o.isMobile&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.closeDialogHandler()}}),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),e("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},e("zonos-cart-items",null))),e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Z,message:b}))))),(f.step==="finish"||f.step==="error")&&e("div",{class:"zonos--done","data-theme":z},e("div",{class:"zonos--header"},x(),e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),e("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:f.step==="error"&&!!f.error?Object.assign(Object.assign({},f.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),e("zonos-checkout-footer",null))};return e(s,{class:I(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?O():e("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:i,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},O()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());V.style=R}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-d1ab0823.system.js","./p-
|
|
1
|
+
System.register(["./p-d1ab0823.system.js","./p-75490d7c.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,e,o,i,n,r;return{setters:[function(t){s=t.r;e=t.h;o=t.a;i=t.H},function(t){n=t.d},function(t){r=t.c}],execute:function(){var a=":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 img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var h=a;var f=t("zonos_logo",function(){function t(t){s(this,t);this.theme="LIGHT";this.width="auto"}t.prototype.render=function(){var t=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return e(i,{key:"b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1",class:r(["zonos--elements zonos--logo"]),style:{"--filter-color":t,"--font-family":n(),"--width":this.width}},e("img",{key:"026162477b24250e4204318fa3018b1cfd383ab5",alt:"Zonos Logo",src:o("./assets/ZonosLogo.png")}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());f.style=h}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as i,h as s,H as t}from"./p-58127116.js";import{d as r,z as e}from"./p-
|
|
1
|
+
import{r as o,c as i,h as s,H as t}from"./p-58127116.js";import{d as r,z as e}from"./p-9cdc6b5f.js";import{c as a}from"./p-b4b7f705.js";import{g as n}from"./p-3d4fc5aa.js";import{i as l}from"./p-4c414a92.js";const d=class{constructor(s){o(this,s),this.radioSelected=i(this,"radioSelected",7),this.handleRichRadioSelect=o=>{var i;this.selectedItem=o,null===(i=this.radioSelected)||void 0===i||i.emit(o)},this.getRadioItemStyleVariables=()=>{const o=this.borderColor||e.appearance.colorSecondary,i=l(o)?`var(--amino-${o})`:o;return{"--border-radius":n(this.borderStyle),"--selected-border-color":i||"unset"}},this.items=void 0,this.borderColor=void 0,this.borderStyle=void 0,this.theme=void 0,this.selectedItem=null}render(){var o;return s(t,{key:"0dc36a16b2f51816755010c46b416b8b1f4b4744",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--font-family":r()})},null===(o=this.items)||void 0===o?void 0:o.map((o=>{var i;const t=(null===(i=this.selectedItem)||void 0===i?void 0:i.value)===o.value;return s("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",t&&"selected"]),onClick:()=>this.handleRichRadioSelect(o)},s("input",{checked:t,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:o.value}),s("div",{class:"zonos--shipping-info"},s("div",{class:"zonos--shipping-detail"},s("zonos-text",{class:"zonos--shipping-label",type:"label"},o.label),(o.sublabel||o.caption)&&s("div",{class:"zonos--sub-detail"},o.sublabel&&s("zonos-text",{textColor:"gray-800"},o.sublabel),o.caption&&s("zonos-text",{textColor:"gray-600"},o.caption))),s("zonos-text",{type:"semiBoldLabel"},o.price)))})))}};d.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";export{d as zonos_shipping_rich_radio}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-d1ab0823.system.js","./p-
|
|
1
|
+
System.register(["./p-d1ab0823.system.js","./p-039803aa.system.js","./p-75490d7c.system.js","./p-95dee6f4.system.js","./p-c476a347.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
|
-
import{r as e,h as t,H as s}from"./p-58127116.js";import{d as o}from"./p-
|
|
1
|
+
import{r as e,h as t,H as s}from"./p-58127116.js";import{d as o}from"./p-9cdc6b5f.js";import{c as i}from"./p-b4b7f705.js";const a={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}},h=class{constructor(t){e(this,t),this.textColor="gray-1200",this.size=void 0,this.type="body",this.weight=void 0,this.content=void 0,this.ready=!1}componentDidRender(){setTimeout((()=>{this.ready=!0}),100)}render(){const{size:e,tag:h,weight:l}=a.body,{size:n,tag:r,weight:z}=a[this.type],x=r||h;return t(s,{class:i([`zonos--text-size-${this.size||n||e}`,`zonos--text-weight-${this.weight||z||l}`]),style:{"--color":this.textColor?`var(--amino-${this.textColor})`:"","--font-family":o()}},(()=>{switch(x){case"h2":return t("h2",null,t("slot",null));case"h3":return t("h3",null,t("slot",null));case"h4":return t("h4",null,t("slot",null));case"h5":return t("h5",null,t("slot",null));default:return t("span",null,t("slot",null))}})())}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--amino-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--amino-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--amino-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--amino-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--amino-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--amino-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--amino-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";export{h as zonos_text}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{l(n.next(o))}catch(o){r(o)}}function a(o){try{l(n["throw"](o))}catch(o){r(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-49f6a985.system.js","./p-5496951a.system.js","./p-23e7c655.system.js","./p-bc7bf53e.system.js","./p-91797d4e.system.js","./p-b4725505.system.js"],(function(o){"use strict";var e,t,n,i,r,s,a,l,h,d,u,f,c,m,v,w,g,p,z,b,x,y,k;return{setters:[function(o){e=o.r;t=o.h;n=o.H},function(o){i=o._;r=o.e;s=o.i;a=o.f;l=o.z;h=o.m},function(o){d=o.u;u=o.d;f=o.l;c=o.v;m=o.t;v=o.x;w=o.y;g=o.a;p=o.z;z=o.A;b=o.B;x=o.C},function(o){y=o.c},function(o){k=o.g},function(){},function(){}],execute:function(){var _=this;var T=i;var E=function(){return T.Date.now()};var L=E;var j=/\s/;function I(o){var e=o.length;while(e--&&j.test(o.charAt(e))){}return e}var X=I;var O=X;var R=/^\s+/;function D(o){return o?o.slice(0,O(o)+1).replace(R,""):o}var S=D;var C=r,B=s;var H="[object Symbol]";function M(o){return typeof o=="symbol"||B(o)&&C(o)==H}var A=M;var F=S,N=a,P=A;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var W=/^0b[01]+$/i;var G=/^0o[0-7]+$/i;var K=parseInt;function q(o){if(typeof o=="number"){return o}if(P(o)){return $}if(N(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=N(e)?e+"":e}if(typeof o!="string"){return o===0?o:+o}o=F(o);var t=W.test(o);return t||G.test(o)?K(o.slice(2),t?2:8):U.test(o)?$:+o}var J=q;var Q=a,V=L,Y=J;var Z="Expected a function";var oo=Math.max,eo=Math.min;function to(o,e,t){var n,i,r,s,a,l,h=0,d=false,u=false,f=true;if(typeof o!="function"){throw new TypeError(Z)}e=Y(e)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oo(Y(t.maxWait)||0,e):r;f="trailing"in t?!!t.trailing:f}function c(e){var t=n,r=i;n=i=undefined;h=e;s=o.apply(r,t);return s}function m(o){h=o;a=setTimeout(g,e);return d?c(o):s}function v(o){var t=o-l,n=o-h,i=e-t;return u?eo(i,r-n):i}function w(o){var t=o-l,n=o-h;return l===undefined||t>=e||t<0||u&&n>=r}function g(){var o=V();if(w(o)){return p(o)}a=setTimeout(g,v(o))}function p(o){a=undefined;if(f&&n){return c(o)}n=i=undefined;return s}function z(){if(a!==undefined){clearTimeout(a)}h=0;n=l=i=a=undefined}function b(){return a===undefined?s:p(V())}function x(){var o=V(),t=w(o);n=arguments;i=this;l=o;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(g,e);return c(l)}}if(a===undefined){a=setTimeout(g,e)}return s}x.cancel=z;x.flush=b;return x}var no=to;var io=function(o){var e=o.items,t=o.shipFrom,n=o.shipTo;return __awaiter(_,void 0,void 0,(function(){var o,i,r,s,a,l;return __generator(this,(function(h){switch(h.label){case 0:i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");r={items:e,shipFrom:t,shipTo:n};return[4,d(i,{body:r,method:"POST"})];case 1:s=h.sent(),a=s.errors,l=s.json;if(a.length||!l){u("Error fetching item restrictions: ".concat((o=a.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,l.filter(Boolean)]}}))}))};var ro=function(o){return __awaiter(_,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=f.selectedCountryCode;if(!e){u("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,io({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var so=function(){var o=window.location.href;var e=l.helloSettings,t=e.cartUrlPattern,n=e.homepageUrlPattern,i=e.productDetailUrlPattern,r=e.productListUrlPattern;if(t&&new RegExp(t).test(o)){return"cart"}if(i&&new RegExp(i).test(o)){return"productDetail"}if(r&&new RegExp(r).test(o)){return"productList"}if(n&&new RegExp(n).test(o)){return"home"}return""};var ao=function(){var o,e;var t=l.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){u("Hello Could not check item restrictions - must provide title and description selectors.")}var a=r&&c(r)&&document.querySelectorAll(r)||[];var h=i&&c(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){u("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var f=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&f.length!==h.length){u('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var m=[];for(var v=0;v<a.length;v++){var w=a[v];var g=h[v];var p=f[v];if(w&&g){var z={cartButtonNode:p||null,description:((o=g.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=w.textContent)===null||e===void 0?void 0:e.trim())||""};m.push(z)}}return m};var lo=":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}";var ho=lo;var uo=3e3;var fo=500;var co=o("zonos_hello",function(){function o(o){var t=this;e(this,o);this.getHelloPeekMessage=function(o){var e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(e&&t.allRestrictedItems.length){var n=m("click to learn more");var i=l.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(i," - ").concat(n)}switch(l.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return"".concat(m("Welcome to")," ").concat(o)}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(!e||l.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,ro(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(l.organizationName);var o=l.helloSettings,e=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(e==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var o=t.allRestrictedItems.some((function(o){return t.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){t.showPeekMessage=false}),uo)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(o){var e,n;var i=t.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(e=o.cartButtonNode)===null||e===void 0?void 0:e.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=ao();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=no((function(){var o=l.helloSettings.productTitleElementSelector;if(o){var e=ao();if(t.allFoundProducts.length!==e.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o=new MutationObserver(t.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var o=new MutationObserver((function(){return void t.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var o=t.initialUrl&&new URL(t.initialUrl);var e=o&&v(o.searchParams);if(e!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;l.currentHelloPage=so();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){w(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){t.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&o==="relative"){var e=k(t.helloRef);return e}};this.isShippableCountry=function(o){if(o===void 0){o=true}if(!f.localizationLoaded){return false}if(!f.isShippableCountry){if(o){g("Hello: not shippable country")}return false}return true};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=l.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[]}o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(l.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(!f.exchangeRate){u("Could not display currency. Exchange rate and format data is not available.");return[2]}p();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,z(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,b(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,x(o)]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){no(this.render.bind(this),fo)};o.prototype.render=function(){var o=this;var e,i;var r=(e=l.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return new RegExp(o).test(window.location.href)}));if(r){g("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode;var a=this.mobileLocationOverride||l.helloSettings.mobileLocation;var d=window.innerWidth<768;var u=this.animateFromLeftOverride||d&&a.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var c=a.includes("TOP");var m=h(l.appearance,this.appearanceSettingsOverride);var v=m.theme;var w=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(l.organizationName);var p=this.isShippableCountry()&&!!s;return t(n,{class:"zonos--hello zonos--elements","data-theme":v},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:y(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:y(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:w,setIsOpen:this.changeShowDialog}))))};return o}());co.style=ho}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{l(n.next(o))}catch(o){r(o)}}function a(o){try{l(n["throw"](o))}catch(o){r(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-75490d7c.system.js","./p-039803aa.system.js","./p-23e7c655.system.js","./p-bc7bf53e.system.js","./p-95dee6f4.system.js","./p-c476a347.system.js"],(function(o){"use strict";var e,t,n,i,r,s,a,l,h,d,u,f,c,m,v,w,g,p,z,b,x,y,k;return{setters:[function(o){e=o.r;t=o.h;n=o.H},function(o){i=o._;r=o.e;s=o.i;a=o.f;l=o.z;h=o.m},function(o){d=o.u;u=o.d;f=o.l;c=o.v;m=o.t;v=o.x;w=o.y;g=o.a;p=o.z;z=o.A;b=o.B;x=o.C},function(o){y=o.c},function(o){k=o.g},function(){},function(){}],execute:function(){var _=this;var T=i;var E=function(){return T.Date.now()};var L=E;var j=/\s/;function I(o){var e=o.length;while(e--&&j.test(o.charAt(e))){}return e}var X=I;var O=X;var R=/^\s+/;function D(o){return o?o.slice(0,O(o)+1).replace(R,""):o}var S=D;var C=r,B=s;var H="[object Symbol]";function M(o){return typeof o=="symbol"||B(o)&&C(o)==H}var A=M;var F=S,N=a,P=A;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var W=/^0b[01]+$/i;var G=/^0o[0-7]+$/i;var K=parseInt;function q(o){if(typeof o=="number"){return o}if(P(o)){return $}if(N(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=N(e)?e+"":e}if(typeof o!="string"){return o===0?o:+o}o=F(o);var t=W.test(o);return t||G.test(o)?K(o.slice(2),t?2:8):U.test(o)?$:+o}var J=q;var Q=a,V=L,Y=J;var Z="Expected a function";var oo=Math.max,eo=Math.min;function to(o,e,t){var n,i,r,s,a,l,h=0,d=false,u=false,f=true;if(typeof o!="function"){throw new TypeError(Z)}e=Y(e)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oo(Y(t.maxWait)||0,e):r;f="trailing"in t?!!t.trailing:f}function c(e){var t=n,r=i;n=i=undefined;h=e;s=o.apply(r,t);return s}function m(o){h=o;a=setTimeout(g,e);return d?c(o):s}function v(o){var t=o-l,n=o-h,i=e-t;return u?eo(i,r-n):i}function w(o){var t=o-l,n=o-h;return l===undefined||t>=e||t<0||u&&n>=r}function g(){var o=V();if(w(o)){return p(o)}a=setTimeout(g,v(o))}function p(o){a=undefined;if(f&&n){return c(o)}n=i=undefined;return s}function z(){if(a!==undefined){clearTimeout(a)}h=0;n=l=i=a=undefined}function b(){return a===undefined?s:p(V())}function x(){var o=V(),t=w(o);n=arguments;i=this;l=o;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(g,e);return c(l)}}if(a===undefined){a=setTimeout(g,e)}return s}x.cancel=z;x.flush=b;return x}var no=to;var io=function(o){var e=o.items,t=o.shipFrom,n=o.shipTo;return __awaiter(_,void 0,void 0,(function(){var o,i,r,s,a,l;return __generator(this,(function(h){switch(h.label){case 0:i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");r={items:e,shipFrom:t,shipTo:n};return[4,d(i,{body:r,method:"POST"})];case 1:s=h.sent(),a=s.errors,l=s.json;if(a.length||!l){u("Error fetching item restrictions: ".concat((o=a.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,l.filter(Boolean)]}}))}))};var ro=function(o){return __awaiter(_,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=f.selectedCountryCode;if(!e){u("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,io({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var so=function(){var o=window.location.href;var e=l.helloSettings,t=e.cartUrlPattern,n=e.homepageUrlPattern,i=e.productDetailUrlPattern,r=e.productListUrlPattern;if(t&&new RegExp(t).test(o)){return"cart"}if(i&&new RegExp(i).test(o)){return"productDetail"}if(r&&new RegExp(r).test(o)){return"productList"}if(n&&new RegExp(n).test(o)){return"home"}return""};var ao=function(){var o,e;var t=l.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){u("Hello Could not check item restrictions - must provide title and description selectors.")}var a=r&&c(r)&&document.querySelectorAll(r)||[];var h=i&&c(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){u("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var f=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&f.length!==h.length){u('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var m=[];for(var v=0;v<a.length;v++){var w=a[v];var g=h[v];var p=f[v];if(w&&g){var z={cartButtonNode:p||null,description:((o=g.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=w.textContent)===null||e===void 0?void 0:e.trim())||""};m.push(z)}}return m};var lo=":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}";var ho=lo;var uo=3e3;var fo=500;var co=o("zonos_hello",function(){function o(o){var t=this;e(this,o);this.getHelloPeekMessage=function(o){var e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(e&&t.allRestrictedItems.length){var n=m("click to learn more");var i=l.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(i," - ").concat(n)}switch(l.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return"".concat(m("Welcome to")," ").concat(o)}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(!e||l.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,ro(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(l.organizationName);var o=l.helloSettings,e=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(e==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var o=t.allRestrictedItems.some((function(o){return t.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){t.showPeekMessage=false}),uo)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(o){var e,n;var i=t.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(e=o.cartButtonNode)===null||e===void 0?void 0:e.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=ao();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=no((function(){var o=l.helloSettings.productTitleElementSelector;if(o){var e=ao();if(t.allFoundProducts.length!==e.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o=new MutationObserver(t.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var o=new MutationObserver((function(){return void t.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var o=t.initialUrl&&new URL(t.initialUrl);var e=o&&v(o.searchParams);if(e!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;l.currentHelloPage=so();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){w(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){t.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&o==="relative"){var e=k(t.helloRef);return e}};this.isShippableCountry=function(o){if(o===void 0){o=true}if(!f.localizationLoaded){return false}if(!f.isShippableCountry){if(o){g("Hello: not shippable country")}return false}return true};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=l.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[]}o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(l.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(!f.exchangeRate){u("Could not display currency. Exchange rate and format data is not available.");return[2]}p();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,z(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,b(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,x(o)]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){no(this.render.bind(this),fo)};o.prototype.render=function(){var o=this;var e,i;var r=(e=l.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return new RegExp(o).test(window.location.href)}));if(r){g("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode;var a=this.mobileLocationOverride||l.helloSettings.mobileLocation;var d=window.innerWidth<768;var u=this.animateFromLeftOverride||d&&a.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var c=a.includes("TOP");var m=h(l.appearance,this.appearanceSettingsOverride);var v=m.theme;var w=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(l.organizationName);var p=this.isShippableCountry()&&!!s;return t(n,{class:"zonos--hello zonos--elements","data-theme":v},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:y(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:y(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:w,setIsOpen:this.changeShowDialog}))))};return o}());co.style=ho}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as s,a as o,H as e}from"./p-58127116.js";import{d as a}from"./p-
|
|
1
|
+
import{r as t,h as s,a as o,H as e}from"./p-58127116.js";import{d as a}from"./p-9cdc6b5f.js";import{c as r}from"./p-b4b7f705.js";const i=class{constructor(s){t(this,s),this.theme="LIGHT",this.width="auto"}render(){const t="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return s(e,{key:"b93db6ec62ecaacb3ded0ab07dd2f38ed488f8d1",class:r(["zonos--elements zonos--logo"]),style:{"--filter-color":t,"--font-family":a(),"--width":this.width}},s("img",{key:"026162477b24250e4204318fa3018b1cfd383ab5",alt:"Zonos Logo",src:o("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";export{i as zonos_logo}
|