@zonos/elements 1.3.4-alpha.0 → 1.3.4-alpha.2
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-cfa5d5fd.js → cart-f31374d4.js} +4 -4
- package/dist/cjs/{getBorderRadius-c3c63ee6.js → getBorderRadius-cd7ef574.js} +1 -1
- package/dist/cjs/{index-0dcccc22.js → index-3ead02fe.js} +56 -22
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{isDarkColor-fc8c294a.js → isDarkColor-5eda1323.js} +7 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-4746acf7.js → localization-d43e1540.js} +1 -1
- package/dist/cjs/{submitGtag-ca175427.js → submitGtag-42f29b3a.js} +2 -2
- package/dist/cjs/zonos-address_2.cjs.entry.js +12 -10
- package/dist/cjs/zonos-badge.cjs.entry.js +7 -6
- package/dist/cjs/zonos-banner.cjs.entry.js +4 -3
- package/dist/cjs/zonos-button_2.cjs.entry.js +11 -9
- package/dist/cjs/zonos-card_2.cjs.entry.js +10 -8
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +36 -26
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -8
- package/dist/cjs/zonos-component.cjs.entry.js +4 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +9 -8
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +19 -15
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +7 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +44 -27
- package/dist/cjs/zonos-icon.cjs.entry.js +4 -3
- package/dist/cjs/zonos-notification.cjs.entry.js +6 -5
- package/dist/cjs/zonos-payment.cjs.entry.js +9 -8
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +6 -5
- package/dist/cjs/zonos-text.cjs.entry.js +4 -3
- package/dist/cjs/{zonosStore-10d1d6ff.js → zonosStore-b88b5671.js} +571 -332
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -2
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +2 -2
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/components/isDarkColor.js +7 -3
- package/dist/components/zonos-address2.js +3 -2
- package/dist/components/zonos-badge2.js +6 -5
- package/dist/components/zonos-banner2.js +3 -2
- package/dist/components/zonos-button2.js +6 -5
- package/dist/components/zonos-card2.js +5 -4
- package/dist/components/zonos-cart-items2.js +3 -2
- package/dist/components/zonos-cart-subtotal2.js +2 -1
- package/dist/components/zonos-checkout-finish2.js +3 -2
- package/dist/components/zonos-checkout-payment2.js +2 -1
- package/dist/components/zonos-checkout.js +2 -1
- package/dist/components/zonos-collapse2.js +5 -4
- package/dist/components/zonos-component.js +3 -2
- package/dist/components/zonos-controller.js +4 -3
- package/dist/components/zonos-country-flag2.js +3 -2
- package/dist/components/zonos-country-select2.js +6 -5
- package/dist/components/zonos-custom-message2.js +5 -4
- package/dist/components/zonos-customer-info2.js +2 -1
- package/dist/components/zonos-dialog2.js +6 -5
- package/dist/components/zonos-hello-dialog-footer2.js +4 -3
- package/dist/components/zonos-hello-dialog2.js +4 -3
- package/dist/components/zonos-hello.js +42 -25
- package/dist/components/zonos-icon2.js +3 -2
- package/dist/components/zonos-link-authentication2.js +3 -2
- package/dist/components/zonos-logo2.js +5 -4
- package/dist/components/zonos-notification2.js +5 -4
- package/dist/components/zonos-payment2.js +3 -2
- package/dist/components/zonos-review2.js +2 -1
- package/dist/components/zonos-shipping-rich-radio2.js +4 -3
- package/dist/components/zonos-shipping2.js +2 -1
- package/dist/components/zonos-spinner2.js +2 -1
- package/dist/components/zonos-text2.js +3 -2
- package/dist/components/zonos-v-stack2.js +5 -4
- package/dist/components/zonosStore.js +571 -331
- package/dist/esm/{cart-d81b92ea.js → cart-c9124cc3.js} +4 -4
- package/dist/esm/{getBorderRadius-77e97943.js → getBorderRadius-9e4cb3b1.js} +1 -1
- package/dist/esm/{index-36ff6342.js → index-81a199ef.js} +56 -22
- package/dist/esm/index.js +6 -6
- package/dist/esm/{isDarkColor-69090b29.js → isDarkColor-8696cb70.js} +7 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{localization-0c5b29fd.js → localization-5d83fde2.js} +1 -1
- package/dist/esm/{submitGtag-8a0fbd41.js → submitGtag-a7d07aec.js} +2 -2
- package/dist/esm/zonos-address_2.entry.js +12 -10
- package/dist/esm/zonos-badge.entry.js +7 -6
- package/dist/esm/zonos-banner.entry.js +4 -3
- package/dist/esm/zonos-button_2.entry.js +11 -9
- package/dist/esm/zonos-card_2.entry.js +10 -8
- package/dist/esm/zonos-cart-items_10.entry.js +36 -26
- package/dist/esm/zonos-checkout.entry.js +9 -8
- package/dist/esm/zonos-component.entry.js +4 -3
- package/dist/esm/zonos-controller.entry.js +9 -8
- package/dist/esm/zonos-country-flag_4.entry.js +19 -15
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +7 -6
- package/dist/esm/zonos-hello.entry.js +44 -27
- package/dist/esm/zonos-icon.entry.js +4 -3
- package/dist/esm/zonos-notification.entry.js +6 -5
- package/dist/esm/zonos-payment.entry.js +9 -8
- package/dist/esm/zonos-shipping-rich-radio.entry.js +6 -5
- package/dist/esm/zonos-text.entry.js +4 -3
- package/dist/esm/{zonosStore-34f07ee8.js → zonosStore-e59617f8.js} +572 -332
- package/dist/esm-es5/{cart-d81b92ea.js → cart-c9124cc3.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-77e97943.js → getBorderRadius-9e4cb3b1.js} +1 -1
- package/dist/esm-es5/index-81a199ef.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isDarkColor-8696cb70.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-0c5b29fd.js → localization-5d83fde2.js} +1 -1
- package/dist/esm-es5/{submitGtag-8a0fbd41.js → submitGtag-a7d07aec.js} +1 -1
- package/dist/esm-es5/zonos-address_2.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag_4.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-icon.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-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonosStore-e59617f8.js +1 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-0024f8c2.js +1 -0
- package/dist/zonos-elements/p-027abb50.entry.js +1 -0
- package/dist/zonos-elements/{p-a54d8db3.system.js → p-12ecf765.system.js} +1 -1
- package/dist/zonos-elements/p-139fc767.entry.js +1 -0
- package/dist/zonos-elements/p-1c00ffea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c1e298d5.system.entry.js → p-21793192.entry.js} +1 -1
- package/dist/zonos-elements/p-26edde4d.system.entry.js +1 -0
- package/dist/zonos-elements/p-28d7b75d.entry.js +1 -0
- package/dist/zonos-elements/p-2ac66cea.system.entry.js +1 -0
- package/dist/zonos-elements/p-39d12bf0.entry.js +1 -0
- package/dist/zonos-elements/p-3d965e88.entry.js +1 -0
- package/dist/zonos-elements/p-410045c5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c0494ed6.entry.js → p-43220d68.entry.js} +1 -1
- package/dist/zonos-elements/p-4d39efb6.system.js +2 -0
- package/dist/zonos-elements/p-4d8545e1.js +2 -0
- package/dist/zonos-elements/{p-ed074fbf.system.js → p-51a40ddf.system.js} +1 -1
- package/dist/zonos-elements/{p-5bada106.system.entry.js → p-5a0264e8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5d91e45c.entry.js +1 -0
- package/dist/zonos-elements/p-62851827.system.entry.js +1 -0
- package/dist/zonos-elements/p-73174d0c.system.entry.js +1 -0
- package/dist/zonos-elements/p-741a1402.system.entry.js +1 -0
- package/dist/zonos-elements/p-7748735d.entry.js +1 -0
- package/dist/zonos-elements/p-7cae86a0.system.entry.js +1 -0
- package/dist/zonos-elements/p-7f68c103.system.js +1 -0
- package/dist/zonos-elements/p-83bb8727.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a244579e.js → p-8ebc0b64.js} +1 -1
- package/dist/zonos-elements/p-97e659b7.entry.js +1 -0
- package/dist/zonos-elements/p-9f3cad08.entry.js +1 -0
- package/dist/zonos-elements/{p-ab179c88.system.js → p-a6f2e282.system.js} +1 -1
- package/dist/zonos-elements/p-afed9236.entry.js +1 -0
- package/dist/zonos-elements/{p-24fbe845.system.js → p-b035f9e5.system.js} +1 -1
- package/dist/zonos-elements/{p-3509ffaa.entry.js → p-b1ffb37b.entry.js} +1 -1
- package/dist/zonos-elements/{p-17ef815f.entry.js → p-b494d540.entry.js} +1 -1
- package/dist/zonos-elements/{p-06a332cd.js → p-b87fa3a1.js} +1 -1
- package/dist/zonos-elements/{p-ab00288a.entry.js → p-bd02a65c.entry.js} +1 -1
- package/dist/zonos-elements/p-be23cc91.system.entry.js +1 -0
- package/dist/zonos-elements/p-bea31a7b.system.entry.js +1 -0
- package/dist/zonos-elements/p-c134eecd.system.js +1 -0
- package/dist/zonos-elements/p-d170748c.system.entry.js +1 -0
- package/dist/zonos-elements/p-dc09ca69.system.js +1 -0
- package/dist/zonos-elements/{p-2b41549a.js → p-e59b6648.js} +1 -1
- package/dist/zonos-elements/p-e8da4463.js +1 -0
- package/dist/zonos-elements/{p-ccd1794a.system.entry.js → p-eb96f893.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5066955b.system.js → p-ee8b44c0.system.js} +1 -1
- package/dist/zonos-elements/{p-935fa685.system.entry.js → p-efd1544b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f2733cc7.js +1 -0
- package/dist/zonos-elements/{p-e6556b0d.entry.js → p-f342e7c7.entry.js} +1 -1
- package/dist/zonos-elements/p-f7b1dfd0.system.entry.js +1 -0
- package/dist/zonos-elements/p-f82e000f.system.entry.js +1 -0
- package/dist/zonos-elements/p-ffc91e42.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +29 -29
- package/dist/esm-es5/index-36ff6342.js +0 -2
- package/dist/esm-es5/isDarkColor-69090b29.js +0 -1
- package/dist/esm-es5/zonosStore-34f07ee8.js +0 -1
- package/dist/zonos-elements/p-02175f85.entry.js +0 -1
- package/dist/zonos-elements/p-124857ae.entry.js +0 -1
- package/dist/zonos-elements/p-18904b7c.system.js +0 -2
- package/dist/zonos-elements/p-1f494581.system.entry.js +0 -1
- package/dist/zonos-elements/p-2e1e9074.js +0 -1
- package/dist/zonos-elements/p-3c8763a7.entry.js +0 -1
- package/dist/zonos-elements/p-3e7444c6.entry.js +0 -1
- package/dist/zonos-elements/p-4b3baf99.js +0 -1
- package/dist/zonos-elements/p-53ea93c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-67154df2.system.entry.js +0 -1
- package/dist/zonos-elements/p-684ed483.entry.js +0 -1
- package/dist/zonos-elements/p-72cfaee2.system.entry.js +0 -1
- package/dist/zonos-elements/p-7730250d.system.js +0 -1
- package/dist/zonos-elements/p-80748529.system.entry.js +0 -1
- package/dist/zonos-elements/p-86f22026.js +0 -1
- package/dist/zonos-elements/p-88600956.entry.js +0 -1
- package/dist/zonos-elements/p-8b1cb8a4.entry.js +0 -1
- package/dist/zonos-elements/p-8bd04aaa.entry.js +0 -1
- package/dist/zonos-elements/p-956efa27.js +0 -2
- package/dist/zonos-elements/p-9c1f19b6.entry.js +0 -1
- package/dist/zonos-elements/p-a063c4b7.entry.js +0 -1
- package/dist/zonos-elements/p-a174d834.system.js +0 -1
- package/dist/zonos-elements/p-b3a71ae4.system.entry.js +0 -1
- package/dist/zonos-elements/p-b3e034bb.system.entry.js +0 -1
- package/dist/zonos-elements/p-bb7de2c4.system.entry.js +0 -1
- package/dist/zonos-elements/p-c1665c4f.system.js +0 -1
- package/dist/zonos-elements/p-c520d819.system.entry.js +0 -1
- package/dist/zonos-elements/p-ca875e60.system.entry.js +0 -1
- package/dist/zonos-elements/p-e2c7adaa.system.entry.js +0 -1
- package/dist/zonos-elements/p-e3bca405.entry.js +0 -1
- package/dist/zonos-elements/p-e58cc024.entry.js +0 -1
- package/dist/zonos-elements/p-f1e9b431.system.entry.js +0 -1
- package/dist/zonos-elements/p-fbc09dae.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host,d as getElement}from"./index-
|
|
1
|
+
import{r as registerInstance,h,H as Host,d as getElement}from"./index-81a199ef.js";import{s as stripeStore}from"./cart-c9124cc3.js";import"./zonosStore-e59617f8.js";import"./localization-5d83fde2.js";import"./isDarkColor-8696cb70.js";import"./getBorderRadius-9e4cb3b1.js";var zonosPaymentCss=".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 ZonosPaymentStyle0=zonosPaymentCss;var ZonosPayment=function(){function n(n){registerInstance(this,n);this.titleText=undefined;this.stripe=stripeStore.stripe;this.stripeElements=stripeStore.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=stripeStore.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var o=this.el.querySelector(".zonos--payment-component");if(!o){console.error("Cannot find container element for paymentElement");return}n.mount(o);n.on("change",(function(n){stripeStore.stripePaymentEventData=n}));stripeStore.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return h(Host,{key:"8a674f72e9235f9b6afcc8d8e0374639423e0bb3",class:"zonos--payment zonos--elements"},this.titleText&&h("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),h("div",{key:"94a0a064e6f6d8058bc11d114ecc4c3ab495e802",class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}();ZonosPayment.style=ZonosPaymentStyle0;export{ZonosPayment as zonos_payment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-81a199ef.js";import{d as zonosStoreFontFamily,z as zonosStore}from"./zonosStore-e59617f8.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-9e4cb3b1.js";import{i as isColorVariable}from"./isColorVariable-91c33804.js";var zonosShippingRichRadioCss=":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}";var ZonosShippingRichRadioStyle0=zonosShippingRichRadioCss;var ZonosShippingRichRadio=function(){function o(o){var i=this;registerInstance(this,o);this.radioSelected=createEvent(this,"radioSelected",7);this.handleRichRadioSelect=function(o){var s;i.selectedItem=o;(s=i.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=i.borderColor||zonosStore.appearance.colorSecondary;var s=isColorVariable(o)?"var(--amino-".concat(o,")"):o;return{"--border-radius":getBorderRadius(i.borderStyle),"--selected-border-color":s||"unset"}};this.items=undefined;this.borderColor=undefined;this.borderStyle=undefined;this.theme=undefined;this.selectedItem=null}o.prototype.render=function(){var o=this;var i;return h(Host,{key:"0dc36a16b2f51816755010c46b416b8b1f4b4744",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--font-family":zonosStoreFontFamily()})},(i=this.items)===null||i===void 0?void 0:i.map((function(i){var s;var e=((s=o.selectedItem)===null||s===void 0?void 0:s.value)===i.value;return h("div",{"aria-hidden":"true",class:classes(["zonos--shipping-rich-radio-item",e&&"selected"]),onClick:function(){return o.handleRichRadioSelect(i)}},h("input",{checked:e,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:i.value}),h("div",{class:"zonos--shipping-info"},h("div",{class:"zonos--shipping-detail"},h("zonos-text",{class:"zonos--shipping-label",type:"label"},i.label),(i.sublabel||i.caption)&&h("div",{class:"zonos--sub-detail"},i.sublabel&&h("zonos-text",{color:"gray-800"},i.sublabel),i.caption&&h("zonos-text",{color:"gray-400"},i.caption))),h("zonos-text",{type:"semiBoldLabel"},i.price)))})))};return o}();ZonosShippingRichRadio.style=ZonosShippingRichRadioStyle0;export{ZonosShippingRichRadio as zonos_shipping_rich_radio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h,H as Host}from"./index-
|
|
1
|
+
import{r as registerInstance,h,H as Host}from"./index-81a199ef.js";import{d as zonosStoreFontFamily}from"./zonosStore-e59617f8.js";import{c as classes}from"./classes-0d95c529.js";var textOptions={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}};var zonosTextCss=":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}";var ZonosTextStyle0=zonosTextCss;var ZonosText=function(){function t(t){registerInstance(this,t);this.class="";this.color="gray-1200";this.size=undefined;this.type="body";this.weight=undefined;this.content=undefined;this.ready=false}t.prototype.componentDidRender=function(){var t=this;setTimeout((function(){t.ready=true}),100)};t.prototype.render=function(){var t=textOptions.body,e=t.size,s=t.tag,o=t.weight;var i=textOptions[this.type],a=i.size,n=i.tag,l=i.weight;var r=this.size||a||e;var z=this.weight||l||o;var x=n||s;var g=function(){switch(x){case"h2":return h("h2",null,h("slot",null));case"h3":return h("h3",null,h("slot",null));case"h4":return h("h4",null,h("slot",null));case"h5":return h("h5",null,h("slot",null));case"span":default:return h("span",null,h("slot",null))}};return h(Host,{class:classes(["zonos--text-size-".concat(r),"zonos--text-weight-".concat(z),this.class]),style:{"--color":this.color?"var(--amino-".concat(this.color,")"):"","--font-family":zonosStoreFontFamily()}},g())};return t}();ZonosText.style=ZonosTextStyle0;export{ZonosText as zonos_text};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(e,r,a){if(a||arguments.length===2)for(var t=0,n=r.length,s;t<n;t++){if(s||!(t in r)){if(!s)s=Array.prototype.slice.call(r,0,t);s[t]=r[t]}}return e.concat(s||Array.prototype.slice.call(r))};import{g as getRenderingRef,f as forceUpdate}from"./index-81a199ef.js";var appendToMap=function(e,r,a){var t=e.get(r);if(!t){e.set(r,[a])}else if(!t.includes(a)){t.push(a)}};var debounce=function(e,r){var a;return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}if(a){clearTimeout(a)}a=setTimeout((function(){a=0;e.apply(void 0,t)}),r)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var r=0,a=e.keys();r<a.length;r++){var t=a[r];e.set(t,e.get(t).filter(isConnected))}}),2e3);var stencilSubscription=function(){if(typeof getRenderingRef!=="function"){return{}}var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var a=getRenderingRef();if(a){appendToMap(e,r,a)}},set:function(r){var a=e.get(r);if(a){e.set(r,a.filter(forceUpdate))}cleanupElements(e)},reset:function(){e.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(e)}}};var unwrap=function(e){return typeof e==="function"?e():e};var createObservableMap=function(e,r){if(r===void 0){r=function(e,r){return e!==r}}var a=unwrap(e);var t=new Map(Object.entries(a!==null&&a!==void 0?a:{}));var n={dispose:[],get:[],set:[],reset:[]};var s=function(){var r;t=new Map(Object.entries((r=unwrap(e))!==null&&r!==void 0?r:{}));n.reset.forEach((function(e){return e()}))};var i=function(){n.dispose.forEach((function(e){return e()}));s()};var o=function(e){n.get.forEach((function(r){return r(e)}));return t.get(e)};var c=function(e,a){var s=t.get(e);if(r(a,s,e)){t.set(e,a);n.set.forEach((function(r){return r(e,a,s)}))}};var u=typeof Proxy==="undefined"?{}:new Proxy(a,{get:function(e,r){return o(r)},ownKeys:function(e){return Array.from(t.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,r){return t.has(r)},set:function(e,r,a){c(r,a);return true}});var v=function(e,r){n[e].push(r);return function(){removeFromArray(n[e],r)}};var f=function(r,a){var t=v("set",(function(e,t){if(e===r){a(t)}}));var n=v("reset",(function(){return a(unwrap(e)[r])}));return function(){t();n()}};var l=function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var a=e.reduce((function(e,r){if(r.set){e.push(v("set",r.set))}if(r.get){e.push(v("get",r.get))}if(r.reset){e.push(v("reset",r.reset))}if(r.dispose){e.push(v("dispose",r.dispose))}return e}),[]);return function(){return a.forEach((function(e){return e()}))}};var $=function(e){var r=t.get(e);n.set.forEach((function(a){return a(e,r,r)}))};return{state:u,get:o,set:c,on:v,onChange:f,use:l,dispose:i,reset:s,forceUpdate:$}};var removeFromArray=function(e,r){var a=e.indexOf(r);if(a>=0){e[a]=e[e.length-1];e.length--}};var createStore=function(e,r){var a=createObservableMap(e,r);a.use(stencilSubscription());return a};var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function listCacheClear$1(){this.__data__=[];this.size=0}var _listCacheClear=listCacheClear$1;function eq$4(e,r){return e===r||e!==e&&r!==r}var eq_1=eq$4;var eq$3=eq_1;function assocIndexOf$4(e,r){var a=e.length;while(a--){if(eq$3(e[a][0],r)){return a}}return-1}var _assocIndexOf=assocIndexOf$4;var assocIndexOf$3=_assocIndexOf;var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete$1(e){var r=this.__data__,a=assocIndexOf$3(r,e);if(a<0){return false}var t=r.length-1;if(a==t){r.pop()}else{splice.call(r,a,1)}--this.size;return true}var _listCacheDelete=listCacheDelete$1;var assocIndexOf$2=_assocIndexOf;function listCacheGet$1(e){var r=this.__data__,a=assocIndexOf$2(r,e);return a<0?undefined:r[a][1]}var _listCacheGet=listCacheGet$1;var assocIndexOf$1=_assocIndexOf;function listCacheHas$1(e){return assocIndexOf$1(this.__data__,e)>-1}var _listCacheHas=listCacheHas$1;var assocIndexOf=_assocIndexOf;function listCacheSet$1(e,r){var a=this.__data__,t=assocIndexOf(a,e);if(t<0){++this.size;a.push([e,r])}else{a[t][1]=r}return this}var _listCacheSet=listCacheSet$1;var listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}ListCache$4.prototype.clear=listCacheClear;ListCache$4.prototype["delete"]=listCacheDelete;ListCache$4.prototype.get=listCacheGet;ListCache$4.prototype.has=listCacheHas;ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4;var ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3;this.size=0}var _stackClear=stackClear$1;function stackDelete$1(e){var r=this.__data__,a=r["delete"](e);this.size=r.size;return a}var _stackDelete=stackDelete$1;function stackGet$1(e){return this.__data__.get(e)}var _stackGet=stackGet$1;function stackHas$1(e){return this.__data__.has(e)}var _stackHas=stackHas$1;var freeGlobal$1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;var _freeGlobal=freeGlobal$1;var freeGlobal=_freeGlobal;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root$4=freeGlobal||freeSelf||Function("return this")();var _root=root$4;var root$3=_root;var Symbol$2=root$3.Symbol;var _Symbol=Symbol$2;var Symbol$1=_Symbol;var objectProto$a=Object.prototype;var hasOwnProperty$8=objectProto$a.hasOwnProperty;var nativeObjectToString$1=objectProto$a.toString;var symToStringTag$1=Symbol$1?Symbol$1.toStringTag:undefined;function getRawTag$1(e){var r=hasOwnProperty$8.call(e,symToStringTag$1),a=e[symToStringTag$1];try{e[symToStringTag$1]=undefined;var t=true}catch(e){}var n=nativeObjectToString$1.call(e);if(t){if(r){e[symToStringTag$1]=a}else{delete e[symToStringTag$1]}}return n}var _getRawTag=getRawTag$1;var objectProto$9=Object.prototype;var nativeObjectToString=objectProto$9.toString;function objectToString$1(e){return nativeObjectToString.call(e)}var _objectToString=objectToString$1;var Symbol=_Symbol,getRawTag=_getRawTag,objectToString=_objectToString;var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol?Symbol.toStringTag:undefined;function baseGetTag$4(e){if(e==null){return e===undefined?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(e)?getRawTag(e):objectToString(e)}var _baseGetTag=baseGetTag$4;function isObject$7(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var isObject_1=isObject$7;var baseGetTag$3=_baseGetTag,isObject$6=isObject_1;var asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$3(e){if(!isObject$6(e)){return false}var r=baseGetTag$3(e);return r==funcTag$1||r==genTag||r==asyncTag||r==proxyTag}var isFunction_1=isFunction$3;var root$2=_root;var coreJsData$1=root$2["__core-js_shared__"];var _coreJsData=coreJsData$1;var coreJsData=_coreJsData;var maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked$1(e){return!!maskSrcKey&&maskSrcKey in e}var _isMasked=isMasked$1;var funcProto$2=Function.prototype;var funcToString$2=funcProto$2.toString;function toSource$1(e){if(e!=null){try{return funcToString$2.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var _toSource=toSource$1;var isFunction$2=isFunction_1,isMasked=_isMasked,isObject$5=isObject_1,toSource=_toSource;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto$1=Function.prototype,objectProto$8=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$7=objectProto$8.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$7).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(e){if(!isObject$5(e)||isMasked(e)){return false}var r=isFunction$2(e)?reIsNative:reIsHostCtor;return r.test(toSource(e))}var _baseIsNative=baseIsNative$1;function getValue$1(e,r){return e==null?undefined:e[r]}var _getValue=getValue$1;var baseIsNative=_baseIsNative,getValue=_getValue;function getNative$3(e,r){var a=getValue(e,r);return baseIsNative(a)?a:undefined}var _getNative=getNative$3;var getNative$2=_getNative,root$1=_root;var Map$3=getNative$2(root$1,"Map");var _Map=Map$3;var getNative$1=_getNative;var nativeCreate$4=getNative$1(Object,"create");var _nativeCreate=nativeCreate$4;var nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{};this.size=0}var _hashClear=hashClear$1;function hashDelete$1(e){var r=this.has(e)&&delete this.__data__[e];this.size-=r?1:0;return r}var _hashDelete=hashDelete$1;var nativeCreate$2=_nativeCreate;var HASH_UNDEFINED$1="__lodash_hash_undefined__";var objectProto$7=Object.prototype;var hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashGet$1(e){var r=this.__data__;if(nativeCreate$2){var a=r[e];return a===HASH_UNDEFINED$1?undefined:a}return hasOwnProperty$6.call(r,e)?r[e]:undefined}var _hashGet=hashGet$1;var nativeCreate$1=_nativeCreate;var objectProto$6=Object.prototype;var hasOwnProperty$5=objectProto$6.hasOwnProperty;function hashHas$1(e){var r=this.__data__;return nativeCreate$1?r[e]!==undefined:hasOwnProperty$5.call(r,e)}var _hashHas=hashHas$1;var nativeCreate=_nativeCreate;var HASH_UNDEFINED="__lodash_hash_undefined__";function hashSet$1(e,r){var a=this.__data__;this.size+=this.has(e)?0:1;a[e]=nativeCreate&&r===undefined?HASH_UNDEFINED:r;return this}var _hashSet=hashSet$1;var hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}Hash$1.prototype.clear=hashClear;Hash$1.prototype["delete"]=hashDelete;Hash$1.prototype.get=hashGet;Hash$1.prototype.has=hashHas;Hash$1.prototype.set=hashSet;var _Hash=Hash$1;var Hash=_Hash,ListCache$2=_ListCache,Map$2=_Map;function mapCacheClear$1(){this.size=0;this.__data__={hash:new Hash,map:new(Map$2||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var _isKeyable=isKeyable$1;var isKeyable=_isKeyable;function getMapData$4(e,r){var a=e.__data__;return isKeyable(r)?a[typeof r=="string"?"string":"hash"]:a.map}var _getMapData=getMapData$4;var getMapData$3=_getMapData;function mapCacheDelete$1(e){var r=getMapData$3(this,e)["delete"](e);this.size-=r?1:0;return r}var _mapCacheDelete=mapCacheDelete$1;var getMapData$2=_getMapData;function mapCacheGet$1(e){return getMapData$2(this,e).get(e)}var _mapCacheGet=mapCacheGet$1;var getMapData$1=_getMapData;function mapCacheHas$1(e){return getMapData$1(this,e).has(e)}var _mapCacheHas=mapCacheHas$1;var getMapData=_getMapData;function mapCacheSet$1(e,r){var a=getMapData(this,e),t=a.size;a.set(e,r);this.size+=a.size==t?0:1;return this}var _mapCacheSet=mapCacheSet$1;var mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$1(e){var r=-1,a=e==null?0:e.length;this.clear();while(++r<a){var t=e[r];this.set(t[0],t[1])}}MapCache$1.prototype.clear=mapCacheClear;MapCache$1.prototype["delete"]=mapCacheDelete;MapCache$1.prototype.get=mapCacheGet;MapCache$1.prototype.has=mapCacheHas;MapCache$1.prototype.set=mapCacheSet;var _MapCache=MapCache$1;var ListCache$1=_ListCache,Map$1=_Map,MapCache=_MapCache;var LARGE_ARRAY_SIZE=200;function stackSet$1(e,r){var a=this.__data__;if(a instanceof ListCache$1){var t=a.__data__;if(!Map$1||t.length<LARGE_ARRAY_SIZE-1){t.push([e,r]);this.size=++a.size;return this}a=this.__data__=new MapCache(t)}a.set(e,r);this.size=a.size;return this}var _stackSet=stackSet$1;var ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$1(e){var r=this.__data__=new ListCache(e);this.size=r.size}Stack$1.prototype.clear=stackClear;Stack$1.prototype["delete"]=stackDelete;Stack$1.prototype.get=stackGet;Stack$1.prototype.has=stackHas;Stack$1.prototype.set=stackSet;var _Stack=Stack$1;var getNative=_getNative;var defineProperty$2=function(){try{var e=getNative(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var _defineProperty=defineProperty$2;var defineProperty$1=_defineProperty;function baseAssignValue$3(e,r,a){if(r=="__proto__"&&defineProperty$1){defineProperty$1(e,r,{configurable:true,enumerable:true,value:a,writable:true})}else{e[r]=a}}var _baseAssignValue=baseAssignValue$3;var baseAssignValue$2=_baseAssignValue,eq$2=eq_1;function assignMergeValue$2(e,r,a){if(a!==undefined&&!eq$2(e[r],a)||a===undefined&&!(r in e)){baseAssignValue$2(e,r,a)}}var _assignMergeValue=assignMergeValue$2;function createBaseFor$1(e){return function(r,a,t){var n=-1,s=Object(r),i=t(r),o=i.length;while(o--){var c=i[e?o:++n];if(a(s[c],c,s)===false){break}}return r}}var _createBaseFor=createBaseFor$1;var createBaseFor=_createBaseFor;var baseFor$1=createBaseFor();var _baseFor=baseFor$1;var _cloneBuffer={exports:{}};(function(e,r){var a=_root;var t=r&&!r.nodeType&&r;var n=t&&"object"=="object"&&e&&!e.nodeType&&e;var s=n&&n.exports===t;var i=s?a.Buffer:undefined,o=i?i.allocUnsafe:undefined;function c(e,r){if(r){return e.slice()}var a=e.length,t=o?o(a):new e.constructor(a);e.copy(t);return t}e.exports=c})(_cloneBuffer,_cloneBuffer.exports);var root=_root;var Uint8Array$1=root.Uint8Array;var _Uint8Array=Uint8Array$1;var Uint8Array=_Uint8Array;function cloneArrayBuffer$1(e){var r=new e.constructor(e.byteLength);new Uint8Array(r).set(new Uint8Array(e));return r}var _cloneArrayBuffer=cloneArrayBuffer$1;var cloneArrayBuffer=_cloneArrayBuffer;function cloneTypedArray$1(e,r){var a=r?cloneArrayBuffer(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var _cloneTypedArray=cloneTypedArray$1;function copyArray$1(e,r){var a=-1,t=e.length;r||(r=Array(t));while(++a<t){r[a]=e[a]}return r}var _copyArray=copyArray$1;var isObject$4=isObject_1;var objectCreate=Object.create;var baseCreate$1=function(){function e(){}return function(r){if(!isObject$4(r)){return{}}if(objectCreate){return objectCreate(r)}e.prototype=r;var a=new e;e.prototype=undefined;return a}}();var _baseCreate=baseCreate$1;function overArg$1(e,r){return function(a){return e(r(a))}}var _overArg=overArg$1;var overArg=_overArg;var getPrototype$2=overArg(Object.getPrototypeOf,Object);var _getPrototype=getPrototype$2;var objectProto$5=Object.prototype;function isPrototype$2(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||objectProto$5;return e===a}var _isPrototype=isPrototype$2;var baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype$1=_isPrototype;function initCloneObject$1(e){return typeof e.constructor=="function"&&!isPrototype$1(e)?baseCreate(getPrototype$1(e)):{}}var _initCloneObject=initCloneObject$1;function isObjectLike$5(e){return e!=null&&typeof e=="object"}var isObjectLike_1=isObjectLike$5;var baseGetTag$2=_baseGetTag,isObjectLike$4=isObjectLike_1;var argsTag$1="[object Arguments]";function baseIsArguments$1(e){return isObjectLike$4(e)&&baseGetTag$2(e)==argsTag$1}var _baseIsArguments=baseIsArguments$1;var baseIsArguments=_baseIsArguments,isObjectLike$3=isObjectLike_1;var objectProto$4=Object.prototype;var hasOwnProperty$4=objectProto$4.hasOwnProperty;var propertyIsEnumerable=objectProto$4.propertyIsEnumerable;var isArguments$2=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike$3(e)&&hasOwnProperty$4.call(e,"callee")&&!propertyIsEnumerable.call(e,"callee")};var isArguments_1=isArguments$2;var isArray$2=Array.isArray;var isArray_1=isArray$2;var MAX_SAFE_INTEGER$1=9007199254740991;function isLength$2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER$1}var isLength_1=isLength$2;var isFunction$1=isFunction_1,isLength$1=isLength_1;function isArrayLike$3(e){return e!=null&&isLength$1(e.length)&&!isFunction$1(e)}var isArrayLike_1=isArrayLike$3;var isArrayLike$2=isArrayLike_1,isObjectLike$2=isObjectLike_1;function isArrayLikeObject$1(e){return isObjectLike$2(e)&&isArrayLike$2(e)}var isArrayLikeObject_1=isArrayLikeObject$1;var isBuffer$2={exports:{}};function stubFalse(){return false}var stubFalse_1=stubFalse;(function(e,r){var a=_root,t=stubFalse_1;var n=r&&!r.nodeType&&r;var s=n&&"object"=="object"&&e&&!e.nodeType&&e;var i=s&&s.exports===n;var o=i?a.Buffer:undefined;var c=o?o.isBuffer:undefined;var u=c||t;e.exports=u})(isBuffer$2,isBuffer$2.exports);var baseGetTag$1=_baseGetTag,getPrototype=_getPrototype,isObjectLike$1=isObjectLike_1;var objectTag$1="[object Object]";var funcProto=Function.prototype,objectProto$3=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty$3=objectProto$3.hasOwnProperty;var objectCtorString=funcToString.call(Object);function isPlainObject$1(e){if(!isObjectLike$1(e)||baseGetTag$1(e)!=objectTag$1){return false}var r=getPrototype(e);if(r===null){return true}var a=hasOwnProperty$3.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&funcToString.call(a)==objectCtorString}var isPlainObject_1=isPlainObject$1;var baseGetTag=_baseGetTag,isLength=isLength_1,isObjectLike=isObjectLike_1;var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;function baseIsTypedArray$1(e){return isObjectLike(e)&&isLength(e.length)&&!!typedArrayTags[baseGetTag(e)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(e){return function(r){return e(r)}}var _baseUnary=baseUnary$1;var _nodeUtil={exports:{}};(function(e,r){var a=_freeGlobal;var t=r&&!r.nodeType&&r;var n=t&&"object"=="object"&&e&&!e.nodeType&&e;var s=n&&n.exports===t;var i=s&&a.process;var o=function(){try{var e=n&&n.require&&n.require("util").types;if(e){return e}return i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o})(_nodeUtil,_nodeUtil.exports);var baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtil.exports;var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray$2=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;var isTypedArray_1=isTypedArray$2;function safeGet$2(e,r){if(r==="constructor"&&typeof e[r]==="function"){return}if(r=="__proto__"){return}return e[r]}var _safeGet=safeGet$2;var baseAssignValue$1=_baseAssignValue,eq$1=eq_1;var objectProto$2=Object.prototype;var hasOwnProperty$2=objectProto$2.hasOwnProperty;function assignValue$1(e,r,a){var t=e[r];if(!(hasOwnProperty$2.call(e,r)&&eq$1(t,a))||a===undefined&&!(r in e)){baseAssignValue$1(e,r,a)}}var _assignValue=assignValue$1;var assignValue=_assignValue,baseAssignValue=_baseAssignValue;function copyObject$1(e,r,a,t){var n=!a;a||(a={});var s=-1,i=r.length;while(++s<i){var o=r[s];var c=t?t(a[o],e[o],o,a,e):undefined;if(c===undefined){c=e[o]}if(n){baseAssignValue(a,o,c)}else{assignValue(a,o,c)}}return a}var _copyObject=copyObject$1;function baseTimes$1(e,r){var a=-1,t=Array(e);while(++a<e){t[a]=r(a)}return t}var _baseTimes=baseTimes$1;var MAX_SAFE_INTEGER=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(e,r){var a=typeof e;r=r==null?MAX_SAFE_INTEGER:r;return!!r&&(a=="number"||a!="symbol"&&reIsUint.test(e))&&(e>-1&&e%1==0&&e<r)}var _isIndex=isIndex$2;var baseTimes=_baseTimes,isArguments$1=isArguments_1,isArray$1=isArray_1,isBuffer$1=isBuffer$2.exports,isIndex$1=_isIndex,isTypedArray$1=isTypedArray_1;var objectProto$1=Object.prototype;var hasOwnProperty$1=objectProto$1.hasOwnProperty;function arrayLikeKeys$1(e,r){var a=isArray$1(e),t=!a&&isArguments$1(e),n=!a&&!t&&isBuffer$1(e),s=!a&&!t&&!n&&isTypedArray$1(e),i=a||t||n||s,o=i?baseTimes(e.length,String):[],c=o.length;for(var u in e){if((r||hasOwnProperty$1.call(e,u))&&!(i&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex$1(u,c)))){o.push(u)}}return o}var _arrayLikeKeys=arrayLikeKeys$1;function nativeKeysIn$1(e){var r=[];if(e!=null){for(var a in Object(e)){r.push(a)}}return r}var _nativeKeysIn=nativeKeysIn$1;var isObject$3=isObject_1,isPrototype=_isPrototype,nativeKeysIn=_nativeKeysIn;var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseKeysIn$1(e){if(!isObject$3(e)){return nativeKeysIn(e)}var r=isPrototype(e),a=[];for(var t in e){if(!(t=="constructor"&&(r||!hasOwnProperty.call(e,t)))){a.push(t)}}return a}var _baseKeysIn=baseKeysIn$1;var arrayLikeKeys=_arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$1=isArrayLike_1;function keysIn$2(e){return isArrayLike$1(e)?arrayLikeKeys(e,true):baseKeysIn(e)}var keysIn_1=keysIn$2;var copyObject=_copyObject,keysIn$1=keysIn_1;function toPlainObject$1(e){return copyObject(e,keysIn$1(e))}var toPlainObject_1=toPlainObject$1;var assignMergeValue$1=_assignMergeValue,cloneBuffer=_cloneBuffer.exports,cloneTypedArray=_cloneTypedArray,copyArray=_copyArray,initCloneObject=_initCloneObject,isArguments=isArguments_1,isArray=isArray_1,isArrayLikeObject=isArrayLikeObject_1,isBuffer=isBuffer$2.exports,isFunction=isFunction_1,isObject$2=isObject_1,isPlainObject=isPlainObject_1,isTypedArray=isTypedArray_1,safeGet$1=_safeGet,toPlainObject=toPlainObject_1;function baseMergeDeep$1(e,r,a,t,n,s,i){var o=safeGet$1(e,a),c=safeGet$1(r,a),u=i.get(c);if(u){assignMergeValue$1(e,a,u);return}var v=s?s(o,c,a+"",e,r,i):undefined;var f=v===undefined;if(f){var l=isArray(c),$=!l&&isBuffer(c),g=!l&&!$&&isTypedArray(c);v=c;if(l||$||g){if(isArray(o)){v=o}else if(isArrayLikeObject(o)){v=copyArray(o)}else if($){f=false;v=cloneBuffer(c,true)}else if(g){f=false;v=cloneTypedArray(c,true)}else{v=[]}}else if(isPlainObject(c)||isArguments(c)){v=o;if(isArguments(o)){v=toPlainObject(o)}else if(!isObject$2(o)||isFunction(o)){v=initCloneObject(c)}}else{f=false}}if(f){i.set(c,v);n(v,c,t,s,i);i["delete"](c)}assignMergeValue$1(e,a,v)}var _baseMergeDeep=baseMergeDeep$1;var Stack=_Stack,assignMergeValue=_assignMergeValue,baseFor=_baseFor,baseMergeDeep=_baseMergeDeep,isObject$1=isObject_1,keysIn=keysIn_1,safeGet=_safeGet;function baseMerge$1(e,r,a,t,n){if(e===r){return}baseFor(r,(function(s,i){n||(n=new Stack);if(isObject$1(s)){baseMergeDeep(e,r,i,a,baseMerge$1,t,n)}else{var o=t?t(safeGet(e,i),s,i+"",e,r,n):undefined;if(o===undefined){o=s}assignMergeValue(e,i,o)}}),keysIn)}var _baseMerge=baseMerge$1;function identity$2(e){return e}var identity_1=identity$2;function apply$1(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}var _apply=apply$1;var apply=_apply;var nativeMax=Math.max;function overRest$1(e,r,a){r=nativeMax(r===undefined?e.length-1:r,0);return function(){var t=arguments,n=-1,s=nativeMax(t.length-r,0),i=Array(s);while(++n<s){i[n]=t[r+n]}n=-1;var o=Array(r+1);while(++n<r){o[n]=t[n]}o[r]=a(i);return apply(e,this,o)}}var _overRest=overRest$1;function constant$1(e){return function(){return e}}var constant_1=constant$1;var constant=constant_1,defineProperty=_defineProperty,identity$1=identity_1;var baseSetToString$1=!defineProperty?identity$1:function(e,r){return defineProperty(e,"toString",{configurable:true,enumerable:false,value:constant(r),writable:true})};var _baseSetToString=baseSetToString$1;var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut$1(e){var r=0,a=0;return function(){var t=nativeNow(),n=HOT_SPAN-(t-a);a=t;if(n>0){if(++r>=HOT_COUNT){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var _shortOut=shortOut$1;var baseSetToString=_baseSetToString,shortOut=_shortOut;var setToString$1=shortOut(baseSetToString);var _setToString=setToString$1;var identity=identity_1,overRest=_overRest,setToString=_setToString;function baseRest$1(e,r){return setToString(overRest(e,r,identity),e+"")}var _baseRest=baseRest$1;var eq=eq_1,isArrayLike=isArrayLike_1,isIndex=_isIndex,isObject=isObject_1;function isIterateeCall$1(e,r,a){if(!isObject(a)){return false}var t=typeof r;if(t=="number"?isArrayLike(a)&&isIndex(r,a.length):t=="string"&&r in a){return eq(a[r],e)}return false}var _isIterateeCall=isIterateeCall$1;var baseRest=_baseRest,isIterateeCall=_isIterateeCall;function createAssigner$1(e){return baseRest((function(r,a){var t=-1,n=a.length,s=n>1?a[n-1]:undefined,i=n>2?a[2]:undefined;s=e.length>3&&typeof s=="function"?(n--,s):undefined;if(i&&isIterateeCall(a[0],a[1],i)){s=n<3?undefined:s;n=1}r=Object(r);while(++t<n){var o=a[t];if(o){e(r,o,t,s)}}return r}))}var _createAssigner=createAssigner$1;var baseMerge=_baseMerge,createAssigner=_createAssigner;var merge=createAssigner((function(e,r,a){baseMerge(e,r,a)}));var merge_1=merge;var mergeConfig=function(e,r){var a=[];for(var t=2;t<arguments.length;t++){a[t-2]=arguments[t]}var n=__spreadArray([e,r],a,true).filter(Boolean);return merge_1.apply(null,n)};var _d=createStore((function(){return{appearance:{colorPrimary:"purple",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{analyticsProviders:[],orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",helloSettings:{anchorElementSelector:"",cartUrlPattern:"",currencyBehavior:"ENABLED",currencyElementSelector:".money",dutyTaxEstimationBehavior:"ENABLED",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productPriceElementSelector:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED"},loadedConfig:false,organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:""}})),reset=_d.reset,zonosStore=_d.state;var savedZonosSettings=null;var zonosStoreInitSetting=function(e){var r=e.overrideSettings,a=e.zonosSettings;var t,n,s;reset();if(a){savedZonosSettings=a}zonosStore.appearance=mergeConfig(zonosStore.appearance,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.appearanceSettings)||(a===null||a===void 0?void 0:a.appearanceSettings)||null,r.appearance);zonosStore.checkoutSettings=mergeConfig(zonosStore.checkoutSettings,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.checkoutSettings)||(a===null||a===void 0?void 0:a.checkoutSettings)||null,r.checkoutSettings);zonosStore.helloSettings=mergeConfig(zonosStore.helloSettings,(savedZonosSettings===null||savedZonosSettings===void 0?void 0:savedZonosSettings.helloSettings)||(a===null||a===void 0?void 0:a.helloSettings)||null,r.helloSettings);zonosStore.loadedConfig=true;zonosStore.organizationName=((t=a===null||a===void 0?void 0:a.organization)===null||t===void 0?void 0:t.name)||"";zonosStore.storeId=((s=(n=a===null||a===void 0?void 0:a.organization)===null||n===void 0?void 0:n.references)===null||s===void 0?void 0:s.storeId)||null;zonosStore.currencyConverter=r.currencyConverter};var zonosStoreFontFamily=function(){var e=zonosStore.appearance.fontFamily||"Inter";return e};export{_root as _,commonjsGlobal as a,zonosStoreInitSetting as b,createStore as c,zonosStoreFontFamily as d,_baseGetTag as e,isObject_1 as f,isObjectLike_1 as i,mergeConfig as m,zonosStore as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";"function"==typeof SuppressedError&&SuppressedError;const e=async({response:e,shouldLog:o=!0,shouldThrow:n=!1})=>{try{return await e.json()}catch(e){if(n)throw e;return o&&console.error(e),null}};const o=async(o,n)=>{const t=(function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)o.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(n[t[s]]=e[t[s]])}return n})(n||{},[]),s=t.body?JSON.stringify(t.body):void 0,r=t.method||"GET",i=new URL(o);i.searchParams.set("zToken",(function(e){try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));const c=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey},t.headers),a=Object.assign(Object.assign({},t),{body:"GET"===r?void 0:s,headers:c,method:r});return(async(o,n)=>{let t;try{t=await fetch(o,n)}catch(e){return e instanceof Error?{errors:[{message:e.message,type:"unknown"}],json:null,response:null}:{errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null}}const s=t.headers.get("Zonos-Mode"),r=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&s&&r&&("production"===s&&alert("Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!"),"test"===s&&alert("For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration"),window.Zonos.modeAlerted=!0),t.ok)return{errors:[],json:await e({response:t}),response:t};const i=t.status.toString();try{const o=await e({response:t,shouldThrow:!0});return{errors:[{message:`${i}: ${JSON.stringify(o)}`,type:i}],json:null,response:t}}catch(e){return{errors:[{message:`${i}: Unknown error`,type:i}],json:null,response:null}}})(i.toString(),a)};var n;class t{}n=t,t.isBigCommerce=!1,t.requested=!1,t.internationalHideSelector="",t.injectZonos=({initConfig:e,url:o,version:t})=>{const s=o.replace("https://","").replace("http://",""),r=document.createElement("script"),i=t&&t<"1.2.5"?"loadZonos.js":"zonos.js";r.src=`https://${s}/dist/scripts/${i}`,r.addEventListener("load",(()=>{n.isBigCommerce||(n.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.internationalHideSelector=n.internationalHideSelector,window.Zonos.isBigCommerce=n.isBigCommerce,window.Zonos.version&&window.Zonos.init(e)})),document.head.appendChild(r)},t.init=async e=>{var t;const s="https://v1.3.4-alpha.
|
|
1
|
+
(function(){"use strict";"function"==typeof SuppressedError&&SuppressedError;const e=async({response:e,shouldLog:o=!0,shouldThrow:n=!1})=>{try{return await e.json()}catch(e){if(n)throw e;return o&&console.error(e),null}};const o=async(o,n)=>{const t=(function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(t=Object.getOwnPropertySymbols(e);s<t.length;s++)o.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(n[t[s]]=e[t[s]])}return n})(n||{},[]),s=t.body?JSON.stringify(t.body):void 0,r=t.method||"GET",i=new URL(o);i.searchParams.set("zToken",(function(e){try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(window.location.hostname));const c=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey},t.headers),a=Object.assign(Object.assign({},t),{body:"GET"===r?void 0:s,headers:c,method:r});return(async(o,n)=>{let t;try{t=await fetch(o,n)}catch(e){return e instanceof Error?{errors:[{message:e.message,type:"unknown"}],json:null,response:null}:{errors:[{message:"Fail to fetch",type:"unknown"}],json:null,response:null}}const s=t.headers.get("Zonos-Mode"),r=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&s&&r&&("production"===s&&alert("Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!"),"test"===s&&alert("For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration"),window.Zonos.modeAlerted=!0),t.ok)return{errors:[],json:await e({response:t}),response:t};const i=t.status.toString();try{const o=await e({response:t,shouldThrow:!0});return{errors:[{message:`${i}: ${JSON.stringify(o)}`,type:i}],json:null,response:t}}catch(e){return{errors:[{message:`${i}: Unknown error`,type:i}],json:null,response:null}}})(i.toString(),a)};var n;class t{}n=t,t.isBigCommerce=!1,t.requested=!1,t.internationalHideSelector="",t.injectZonos=({initConfig:e,url:o,version:t})=>{const s=o.replace("https://","").replace("http://",""),r=document.createElement("script"),i=(new Date).getTime(),c=t&&t<"1.2.5"?"loadZonos.js":"zonos.js";r.src=`https://${s}/dist/scripts/${c}?timestamp=${i}`,r.addEventListener("load",(()=>{n.isBigCommerce||(n.isBigCommerce=!!window.stencilBootstrap||!!window.bcConfig||!!document.querySelector('script[src*="bigcommerce.com"]')),window.Zonos.internationalHideSelector=n.internationalHideSelector,window.Zonos.isBigCommerce=n.isBigCommerce,window.Zonos.version&&window.Zonos.init(e)})),document.head.appendChild(r)},t.init=async e=>{var t;const s="https://v1.3.4-alpha.2.js.zonos.com",r=null===(t=document.querySelector("script[src*='/loadZonos.js']"))||void 0===t?void 0:t.src,i=document.querySelector('script[src*="/zonos.js"]'),c=null==r?void 0:r.includes("timestamp=");if(!r||!c)return void console.error("[ZONOS] A timestamp is required as a query parameter in the loadZonos.js script source. This timestamp ensures that you are loading the most recent version of the script, avoiding any cached versions.");if(i||!r||n.requested)return;if(n.requested=!0,!e.storeId)return console.log("[ZONOS] loading latest script since storeId is not provided."),void n.injectZonos({initConfig:e,url:s,version:null});const a=new URL("https://v1.route.js.zonos.com/api/get-store-version");a.searchParams.set("storeId",e.storeId.toString());const{errors:l,json:d}=await o(a.toString());if(l.length||!d)return void n.injectZonos({initConfig:e,url:s,version:null});const{version:u}=d;if(!i){const o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"],t=["qa.js.zonos.com"],s=new URL(r).origin,i=o.some((e=>s.includes(e))),c=t.some((e=>s.includes(e))),a=i&&!c?s:`v${u}.js.zonos.com`,l=i&&!c?null:u;n.injectZonos({initConfig:e,url:a,version:l})}},void 0===window.Zonos&&(window.Zonos=t)})();
|
package/dist/scripts/zonos.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const e=(e,t,...n)=>{var o;if(!window.Zonos.debug)return;let r=document.querySelector("iframe#zonos---debug-logging-iframe");r||(r=document.createElement("iframe"),r.id="zonos---debug-logging-iframe",r.style.display="none",r.style.opacity="0",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="1px",r.style.height="1px",r.style.border="none",r.style.overflow="hidden",r.style.visibility="hidden",document.body.appendChild(r));const s=(null===(o=r.contentWindow)||void 0===o?void 0:o.window.console)||window.console;switch(t){case"warn":s.warn(e,...n);break;case"info":s.info(e,...n);break;default:s.groupCollapsed(e,...n),s.trace(),s.groupEnd()}},t=(e,...t)=>{console.error(e,...t)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var a;const d=(()=>{const e=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!e)return null;const t=`https://${e}.preview.js.zonos.com`;return console.warn(`[ZONOS-WARNING] using '${t}' for loading script`),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState({},"",o),window.location.reload(),null})),t})(),u=d||"https://v1.3.4-alpha.
|
|
1
|
+
(function(){"use strict";const e=(e,t,...n)=>{var o;if(!window.Zonos.debug)return;let r=document.querySelector("iframe#zonos---debug-logging-iframe");r||(r=document.createElement("iframe"),r.id="zonos---debug-logging-iframe",r.style.display="none",r.style.opacity="0",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="1px",r.style.height="1px",r.style.border="none",r.style.overflow="hidden",r.style.visibility="hidden",document.body.appendChild(r));const s=(null===(o=r.contentWindow)||void 0===o?void 0:o.window.console)||window.console;switch(t){case"warn":s.warn(e,...n);break;case"info":s.info(e,...n);break;default:s.groupCollapsed(e,...n),s.trace(),s.groupEnd()}},t=(e,...t)=>{console.error(e,...t)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var a;const d=(()=>{const e=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!e)return null;const t=`https://${e}.preview.js.zonos.com`;return console.warn(`[ZONOS-WARNING] using '${t}' for loading script`),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState({},"",o),window.location.reload(),null})),t})(),u=d||"https://v1.3.4-alpha.2.js.zonos.com",p="https://unpkg.com/@zonos/elements@1.3.4-alpha.2",m="https://rsms.me",h="https://fonts.googleapis.com",y=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}a=w,w.doneInit=!1,w.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.isBigCommerce=!1,w.internationalHideSelector="",w.zonosQaUrl=d,w.version="v1.3.4-alpha.2",w.modeAlerted=!1,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{a.doneInit||(e(`====== ZONOS DEBUG MODE: on (${a.version}) ======`),l?(a.zonosApiKey=l,a.storeId=i,e("init zonos"),a.injectSentryScript(),a.injectZonosCdn(),a.injectZonosCss(),a.injectFonts(),a.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),a.doneInit=!0):t("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.showNotification=e=>{var t;null===(t=a.zonosController)||void 0===t||t.showNotification(e)},w.updateOrganizationName=e=>{var t;null===(t=a.zonosController)||void 0===t||t.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},w.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),a.zonosController=s,e("Zonos controller injected!")},w.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${a.version}`})},o.appendChild(r)},w.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&a.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},w.injectZonosCdn=()=>{a.injectScript({fallBackDomain:p,isModule:!0,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),a.injectScript({fallBackDomain:p,isModule:!1,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${u}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&a.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(a.injectStylesheet({fallBackDomain:p,stylesheetDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!y.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},w.setupGoogleFont=e=>{var t;null===(t=a.zonosController)||void 0===t||t.setupGoogleFont(e)},w.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${h}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=h,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},window.Zonos=w})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const e=(e,t,...n)=>{var o;if(!window.Zonos.debug)return;let r=document.querySelector("iframe#zonos---debug-logging-iframe");r||(r=document.createElement("iframe"),r.id="zonos---debug-logging-iframe",r.style.display="none",r.style.opacity="0",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="1px",r.style.height="1px",r.style.border="none",r.style.overflow="hidden",r.style.visibility="hidden",document.body.appendChild(r));const s=(null===(o=r.contentWindow)||void 0===o?void 0:o.window.console)||window.console;switch(t){case"warn":s.warn(e,...n);break;case"info":s.info(e,...n);break;default:s.groupCollapsed(e,...n),s.trace(),s.groupEnd()}},t=(e,...t)=>{console.error(e,...t)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var a;const d=(()=>{const e=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!e)return null;const t=`https://${e}.preview.js.zonos.com`;return console.warn(`[ZONOS-WARNING] using '${t}' for loading script`),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState({},"",o),window.location.reload(),null})),t})(),u=d||"https://v1.3.4-alpha.
|
|
1
|
+
(function(){"use strict";const e=(e,t,...n)=>{var o;if(!window.Zonos.debug)return;let r=document.querySelector("iframe#zonos---debug-logging-iframe");r||(r=document.createElement("iframe"),r.id="zonos---debug-logging-iframe",r.style.display="none",r.style.opacity="0",r.style.position="absolute",r.style.top="-9999px",r.style.left="-9999px",r.style.width="1px",r.style.height="1px",r.style.border="none",r.style.overflow="hidden",r.style.visibility="hidden",document.body.appendChild(r));const s=(null===(o=r.contentWindow)||void 0===o?void 0:o.window.console)||window.console;switch(t){case"warn":s.warn(e,...n);break;case"info":s.info(e,...n);break;default:s.groupCollapsed(e,...n),s.trace(),s.groupEnd()}},t=(e,...t)=>{console.error(e,...t)},n="https://js.stripe.com/v3",o=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,r="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let s=null;const i=e=>(null!==s||(s=new Promise(((s,i)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(r),window.Stripe)s(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${n}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&o.test(n.src))return n}return null})();l&&e?console.warn(r):l||(l=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src=`${n}${o}`;const s=document.head||document.body;return s?(s.appendChild(r),r):(t("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?s(window.Stripe):i(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{i(new Error("Failed to load Stripe.js"))}))}catch(e){return void i(e)}else s(null)}))),s),l=Promise.resolve().then((()=>i(null)));let c=!1;l.catch((e=>{c||console.warn(e)}));var a;const d=(()=>{const e=(e=>{if(!e)return null;const t=new URL(e).searchParams.get("zonosQaUrl");return t?/[^a-zA-Z0-9-_]+/.test(t)?null:t:null})(window.location.href);if(!e)return null;const t=`https://${e}.preview.js.zonos.com`;return console.warn(`[ZONOS-WARNING] using '${t}' for loading script`),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState({},"",o),window.location.reload(),null})),t})(),u=d||"https://v1.3.4-alpha.2.js.zonos.com",p="https://unpkg.com/@zonos/elements@1.3.4-alpha.2",m="https://rsms.me",h="https://fonts.googleapis.com",y=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}a=w,w.doneInit=!1,w.debug=!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.isBigCommerce=!1,w.internationalHideSelector="",w.zonosQaUrl=d,w.version="v1.3.4-alpha.2",w.modeAlerted=!1,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s,storeId:i,zonosApiKey:l})=>{a.doneInit||(e(`====== ZONOS DEBUG MODE: on (${a.version}) ======`),l?(a.zonosApiKey=l,a.storeId=i,e("init zonos"),a.injectSentryScript(),a.injectZonosCdn(),a.injectZonosCss(),a.injectFonts(),a.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:r,helloSettings:s},zonosApiKey:l}),a.doneInit=!0):t("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.showNotification=e=>{var t;null===(t=a.zonosController)||void 0===t||t.showNotification(e)},w.updateOrganizationName=e=>{var t;null===(t=a.zonosController)||void 0===t||t.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:t,placeOrderButtonSelector:n})=>{if(n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},w.injectController=({config:n,zonosApiKey:o})=>{var r;if(document.querySelector("zonos-controller"))return;if(null===(r=n.checkoutSettings)||void 0===r?void 0:r.placeOrderButtonSelector){const e=n.checkoutSettings.placeOrderButtonSelector;a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e});new MutationObserver((()=>{a.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=n,s.zonosApiKey=o,s.addEventListener("stripeInitEvent",(async n=>{const{detail:o}=n;e("loading Stripe");const r=await(async(...e)=>{c=!0;const t=Date.now();return l.then((n=>((e,t,n)=>{if(null===e)return null;const o=e.apply(void 0,t);return((e,t)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:t})})(o,n),o})(n,e,t)))})(o.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):t("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),a.zonosController=s,e("Zonos controller injected!")},w.injectSentryScript=()=>{const n="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${n}"]`))return void e("Sentry script already exists in the document","warn");const o=document.head||document.body,r=document.createElement("script");r.crossOrigin="anonymous",r.src=n,r.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",r.setAttribute("data-lazy","no"),r.onerror=()=>{t(`Failed to load ${r.src}`)},r.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({allowUrls:[/js.zonos.com/],dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",release:`zonos-elements@${a.version}`})},o.appendChild(r)},w.injectScript=({fallBackDomain:n,isModule:o,scriptDomain:r,theRestUrl:s})=>{const i=`${r}/${s}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");o?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{/\/\/v\d+\./g.test(r)?(n&&a.injectScript({isModule:o,scriptDomain:n,theRestUrl:s}),t(`Failed to load ${c.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(c)},w.injectZonosCdn=()=>{a.injectScript({fallBackDomain:p,isModule:!0,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),a.injectScript({fallBackDomain:p,isModule:!1,scriptDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:n,stylesheetDomain:o,theRestUrl:r})=>{const s=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${u}/`,s.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${o}/${r}`,l.onerror=()=>{const s=/\/\/v\d+\./g.test(o);s?(n&&s&&a.injectStylesheet({stylesheetDomain:n,theRestUrl:r}),t(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},s.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(a.injectStylesheet({fallBackDomain:p,stylesheetDomain:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${m}"]`);for(let t=0;t<e.length;t++){const n=e[t];if(n&&!y.test(n.href))return n}return null})())return void e("Inter font already injected","warn");const t=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=m,t.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${m}/inter/inter.css`,t.appendChild(o),e("Zonos font injected!")},w.setupGoogleFont=e=>{var t;null===(t=a.zonosController)||void 0===t||t.setupGoogleFont(e)},w.injectSupportGoogleFont=t=>{var n;e(`[FONT] injecting ${t}`);const o=null===(n=t.match(/family=(.*?):/))||void 0===n?void 0:n[1],r=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${h}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=h,r.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=t,r.appendChild(s),e(`[FONT] ${o} font injected!`)},exports.Zonos=w})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as cartStore,a as cartStoreApplySubtotals,b as cartStoreGetShippingTransitInfo,d as cartStoreNextStep,e as cartStorePreviousStep,f as cartStoreReCalculateTotal,g as cartStoreReset,h as cartStoreUpdateItems,i as cartStoreUpdateSelectedShippingOption,j as cartStoreUpdateToErrorState}from"./p-
|
|
1
|
+
export{c as cartStore,a as cartStoreApplySubtotals,b as cartStoreGetShippingTransitInfo,d as cartStoreNextStep,e as cartStorePreviousStep,f as cartStoreReCalculateTotal,g as cartStoreReset,h as cartStoreUpdateItems,i as cartStoreUpdateSelectedShippingOption,j as cartStoreUpdateToErrorState}from"./p-e59b6648.js";import"./p-e8da4463.js";import"./p-4d8545e1.js";import"./p-8ebc0b64.js";import"./p-0024f8c2.js";import"./p-f2733cc7.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./p-e8da4463.js";var e={exports:{}};e.exports=function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,r=/\s+$/;function a(n,i){if(i=i||{},(n=n||"")instanceof a)return n;if(!(this instanceof a))return new a(n,i);var f=function(a){var n={r:0,g:0,b:0},i=1,f=null,h=null,s=null,o=!1,u=!1;return"string"==typeof a&&(a=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var a,n=!1;if(y[t])t=y[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(a=$.rgb.exec(t))?{r:a[1],g:a[2],b:a[3]}:(a=$.rgba.exec(t))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=$.hsl.exec(t))?{h:a[1],s:a[2],l:a[3]}:(a=$.hsla.exec(t))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=$.hsv.exec(t))?{h:a[1],s:a[2],v:a[3]}:(a=$.hsva.exec(t))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=$.hex8.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),a:E(a[4]),format:n?"name":"hex8"}:(a=$.hex6.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:n?"name":"hex"}:(a=$.hex4.exec(t))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),a:E(a[4]+""+a[4]),format:n?"name":"hex8"}:!!(a=$.hex3.exec(t))&&{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:n?"name":"hex"}}(a)),"object"==t(a)&&(j(a.r)&&j(a.g)&&j(a.b)?(l=a.r,c=a.g,d=a.b,n={r:255*w(l,255),g:255*w(c,255),b:255*w(d,255)},o=!0,u="%"===String(a.r).substr(-1)?"prgb":"rgb"):j(a.h)&&j(a.s)&&j(a.v)?(f=R(a.s),h=R(a.v),n=function(t,e,r){t=6*w(t,360),e=w(e,100),r=w(r,100);var a=Math.floor(t),n=t-a,i=r*(1-e),f=r*(1-n*e),h=r*(1-(1-n)*e),s=a%6;return{r:255*[r,f,i,i,h,r][s],g:255*[h,r,r,f,i,i][s],b:255*[i,i,h,r,r,f][s]}}(a.h,f,h),o=!0,u="hsv"):j(a.h)&&j(a.s)&&j(a.l)&&(f=R(a.s),s=R(a.l),n=function(t,e,r){var a,n,i;function f(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=w(t,360),e=w(e,100),r=w(r,100),0===e)a=n=i=r;else{var h=r<.5?r*(1+e):r+e-r*e,s=2*r-h;a=f(s,h,t+1/3),n=f(s,h,t),i=f(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(a.h,f,s),o=!0,u="hsl"),a.hasOwnProperty("a")&&(i=a.a)),i=A(i),{ok:o,format:a.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,c,d}(n);this._originalInput=n,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||f.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}function n(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=(i+f)/2;if(i==f)a=n=0;else{var s=i-f;switch(n=h>.5?s/(2-i-f):s/(i+f),i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,l:h}}function i(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=i,s=i-f;if(n=0===i?0:s/i,i==f)a=0;else{switch(i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,v:h}}function f(t,e,r,a){var n=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))];return a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function h(t,e,r,a){return[S(q(a)),S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))].join("")}function s(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s-=e/100,r.s=x(r.s),a(r)}function o(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s+=e/100,r.s=x(r.s),a(r)}function u(t){return a(t).desaturate(100)}function l(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l+=e/100,r.l=x(r.l),a(r)}function c(t,e){e=0===e?0:e||10;var r=a(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),a(r)}function d(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l-=e/100,r.l=x(r.l),a(r)}function g(t,e){var r=a(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,a(r)}function b(t){var e=a(t).toHsl();return e.h=(e.h+180)%360,a(e)}function m(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=a(t).toHsl(),n=[a(t)],i=360/e,f=1;f<e;f++)n.push(a({h:(r.h+f*i)%360,s:r.s,l:r.l}));return n}function v(t){var e=a(t).toHsl(),r=e.h;return[a(t),a({h:(r+72)%360,s:e.s,l:e.l}),a({h:(r+216)%360,s:e.s,l:e.l})]}function M(t,e,r){e=e||6,r=r||30;var n=a(t).toHsl(),i=360/r,f=[a(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,f.push(a(n));return f}function p(t,e){e=e||6;for(var r=a(t).toHsv(),n=r.h,i=r.s,f=r.v,h=[],s=1/e;e--;)h.push(a({h:n,s:i,v:f})),f=(f+s)%1;return h}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,a=this.toRgb();return e=a.g/255,r=a.b/255,.2126*((t=a.r/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+a+"%)":"hsva("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,a,n){var i=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16)),S(q(a))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*w(this._r,255))+"%",g:Math.round(100*w(this._g,255))+"%",b:Math.round(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%)":"rgba("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=a(t);r="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1;return e||!(this._a<1&&this._a>=0)||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return a(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(o,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(p,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},a.fromRatio=function(e,r){if("object"==t(e)){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:R(e[i]));e=n}return a(e,r)},a.equals=function(t,e){return!(!t||!e)&&a(t).toRgbString()==a(e).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(t,e,r){r=0===r?0:r||50;var n=a(t).toRgb(),i=a(e).toRgb(),f=r/100;return a({r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a})},a.readability=function(t,e){var r=a(t),n=a(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},a.isReadable=function(t,e,r){var n,i,f,h,s,o=a.readability(t,e);switch(i=!1,(f=r,"AA"!==(h=((f=f||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==h&&(h="AA"),"small"!==(s=(f.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:h,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},a.mostReadable=function(t,e,r){var n,i,f,h,s=null,o=0;i=(r=r||{}).includeFallbackColors,f=r.level,h=r.size;for(var u=0;u<e.length;u++)(n=a.readability(t,e[u]))>o&&(o=n,s=a(e[u]));return a.isReadable(t,s,{level:f,size:h})||!i?s:(r.includeFallbackColors=!1,a.mostReadable(t,["#fff","#000"],r))};var y=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(y);function A(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function w(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function x(t){return Math.min(1,Math.max(0,t))}function F(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function R(t){return t<=1&&(t=100*t+"%"),t}function q(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return F(t)/255}var H,N,I,$=(N="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",I="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(t){return!!$.CSS_UNIT.exec(t)}return a}();const r=e.exports,a=t=>r(t).isDark();export{a as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,H as i}from"./p-4d8545e1.js";import{d as s}from"./p-e8da4463.js";import{c as n}from"./p-b4b7f705.js";const a=class{constructor(o){t(this,o),this.class="",this.notificationArray=[]}async showNotification(t){const o=`id-${Math.random().toString(36).substring(2,9)}`,i=Object.assign(Object.assign({},t),{id:o,timeout:t.timeout||5e3,transitionClass:"",type:t.type||"success"});this.notificationArray=[...this.notificationArray,i],setTimeout((()=>{this.updateTransitionClass({id:o,transitionClass:"show"})}),50),setTimeout((()=>{this.removeNotification(o)}),i.timeout)}updateTransitionClass({id:t,transitionClass:o}){this.notificationArray=this.notificationArray.map((i=>i.id===t?Object.assign(Object.assign({},i),{transitionClass:o}):i))}removeNotification(t){this.updateTransitionClass({id:t,transitionClass:""}),setTimeout((()=>{this.notificationArray=this.notificationArray.filter((o=>o.id!==t))}),300)}render(){return o(i,{key:"0846607651bce1e7acfc92cc775f86ce399dc789",class:n(["zonos--elements zonos--notification",this.class]),style:{"--font-family":s()}},o("div",{key:"1a4dd6b138b21b8a626d3df3a9c353590d51fd8c",class:"zonos--notification-items"},this.notificationArray.map((t=>o("div",{"aria-hidden":"true",class:n(["zonos--notification-item",t.type,t.transitionClass]),key:t.id,onClick:()=>{this.removeNotification(t.id)}},o("zonos-text",{color:"gray-0"},t.message))))))}};a.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-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;bottom:var(--amino-space-24);gap:var(--amino-space-8);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:var(--amino-space-8);border-radius:var(--border-radius, var(--amino-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--amino-green-700)}:host .zonos--notification-item.error{background-color:var(--amino-red-700)}:host .zonos--notification-item.warning{background-color:var(--amino-orange-700)}";export{a as zonos_notification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-dc09ca69.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.z}],execute:function(){var n=t("g",(function(t){if(t){return t==="SHARP"?"0px":"10px"}return e.appearance.style==="SHARP"?"0px":"10px"}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,a as s,h as t,H as n,F as e,c as i,d as a}from"./p-4d8545e1.js";import{c,s as r,p as h,o as l,i as d,b as p}from"./p-e59b6648.js";import{t as m,h as u}from"./p-8ebc0b64.js";import{z,d as f}from"./p-e8da4463.js";import{g}from"./p-f2733cc7.js";import{s as b,i as y}from"./p-b87fa3a1.js";import{c as v}from"./p-b4b7f705.js";import"./p-0024f8c2.js";const x=({amount:o,currency:s,showCurrencyText:t})=>t?`${new Intl.NumberFormat("en-US",{currency:s,style:"currency"}).format(o)} ${s}`:new Intl.NumberFormat("en-US",{currency:s,style:"currency"}).format(o),w=class{constructor(s){o(this,s),this.errorImages=[]}render(){var o;const e=s("./assets/empty-item.jpeg"),i=(null===(o=c.exchangeRate)||void 0===o?void 0:o.rate)||1;return t(n,{key:"945bd402bb5f8a73bc02dc8f30d187c43b78050e",class:"zonos--cart-items zonos--elements"},t("table",{key:"600b545e20eb81d7e744c2bf66a9cec2eb68c8e7",class:"zonos--cart-table"},t("tbody",{key:"cd12a4372e97b8018af37433e6b2daba5403e621"},c.items.map((o=>{const s=o.imageUrl;return t("tr",{class:"zonos--cart-item"},t("td",{class:"zonos--column zonos--cart-item-image"},s&&!this.errorImages.includes(s)?t("img",{alt:o.name,onError:()=>{this.errorImages=[...this.errorImages,s]},src:o.imageUrl,style:{"min-width":"40px"},width:40}):t("img",{alt:o.name,src:e,width:40})),t("td",{class:"zonos--column zonos--cart-item-name"},t("zonos-text",{type:"label"},o.name)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"semiBoldLabel"},x({amount:o.amount*o.quantity*i,currency:c.currency}))))})))))}static get assetsDirs(){return["assets"]}};w.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-8);font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}";const k=class{constructor(s){o(this,s)}render(){const o=c.total-c.dutiesTaxFees,s="payment"===c.step||"shipping"===c.step;return t(n,{class:"zonos--cart-subtotal zonos--elements"},t("table",{class:"zonos--cart-table"},t("tr",{class:"zonos--row zonos--cart-subtotal"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("zonos-text",{type:"semiBoldLabel"},m("Cart subtotal"))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("zonos-text",{type:"semiBoldLabel"},x({amount:c.subtotal,currency:c.currency})))),t("tr",{class:"zonos--row zonos--cart-shipping"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},c.selectedShippingOption?t(e,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},c.selectedShippingOption.displayName),c.selectedShippingOptionTransitTime&&t("zonos-text",{class:"zonos--caption",type:"caption"},c.selectedShippingOptionTransitTime," ",m("business days"))):t(e,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Shipping")),t("zonos-text",{class:"zonos--caption",type:"caption"},m("No shipping method selected")))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},c.shipping?x({amount:c.shipping,currency:c.currency}):"-")),s&&t("tr",{class:"zonos--row zonos--cart-duties"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("div",{class:"zonos--title-with-icon"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Duties, taxes, and fees")),t("zonos-icon",{content:'<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.58543 4.66016C8.95096 4.66016 9.24728 4.95863 9.24728 5.32682V5.33349C9.24728 5.70168 8.95096 6.00016 8.58543 6.00016C8.2199 6.00016 7.92358 5.70168 7.92358 5.33349V5.32682C7.92358 4.95863 8.2199 4.66016 8.58543 4.66016ZM8.58543 7.33349C8.95096 7.33349 9.24728 7.63197 9.24728 8.00016V10.6668C9.24728 11.035 8.95096 11.3335 8.58543 11.3335C8.2199 11.3335 7.92358 11.035 7.92358 10.6668V8.00016C7.92358 7.63197 8.2199 7.33349 8.58543 7.33349Z" fill="#4D505A"/>\n</svg>\n',size:16})),!!c.isSelectedShippingAboveDeminimis&&t("zonos-text",{color:"gray-800",type:"body"},m("Order is over the de minimis threshold for both duty and tax"))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("div",{class:"zonos--cart-duty-tax-price"},c.dutiesTaxFees?x({amount:c.dutiesTaxFees,currency:c.currency}):"-",c.isSelectedShippingGuarantee&&t("zonos-badge",null,m("Guaranteed"))))),t("tr",{class:"zonos--row zonos--cart-pay-total"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Order total"))),t("td",{class:"zonos--column"},t("zonos-text",{type:"semiBoldLabel"},x({amount:"shipping"===c.step?o:c.total,currency:c.currency}))))))}static get assetsDirs(){return["assets"]}};k.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}";const C=class{constructor(s){o(this,s),this.closeClick=i(this,"closeClick",7),this.pullOrder=async()=>{var o,s;const t=c.checkoutSessionId,{errors:n,json:e}=await u(`https://v1.route.js.zonos.com/api/zonos-elements/get-order?checkoutSessionId=${t}`);return n.length||!(null==e?void 0:e.id)?null:(await(null===(s=(o=z.checkoutSettings).onOrderSuccess)||void 0===s?void 0:s.call(o,e)),e)},this.handleSuccessBehavior=o=>{const{successBehavior:s}=z.checkoutSettings;switch(s){case"REDIRECT_TO_SUCCESS_PAGE":const s=z.checkoutSettings.successRedirectUrl;s&&(window.location.href=`${s}?zOrderNumber=${o}`);break;case"CLOSE_MODAL":this.closeClickHandler()}},this.getPullOrder=async(o=0)=>{const s=await this.pullOrder();if(s)this.order=s,this.handleSuccessBehavior(s.id),this.isLoading=!1;else if(!s&&o<5)await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1);else{this.isLoading=!1;const o={endpoint:"https://v1.route.js.zonos.com/api/zonos-elements/get-order",errors:["Order not found after multiple attempts"],metadata:{checkoutSessionId:c.checkoutSessionId||"",domain:window.location.hostname,storeId:z.storeId}};u("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:o,method:"POST"})}},this.checkPaymentStatus=async()=>{this.isLoading=!0;const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||r.clientSecret;if(o||this.storybookForceStatus){const{error:s,messages:t}=await h({clientSecret:o,storybookForceStatus:this.storybookForceStatus});if(this.notificationType=s?"error":"success",this.notificationMessages=t||[],this.notificationTitle=m(s?"Payment failed":"You're all set!"),s)b("zonos-checkout-payment-fail");else{b("zonos-checkout-success");const o=new CustomEvent("zonos-checkout-success",{detail:{message:"Zonos Checkout successfully processed order"}});document.dispatchEvent(o)}"success"===this.notificationType&&(this.isLoading=!0,this.getPullOrder())}l(),this.isLoading=!1},this.closeClickHandler=()=>{this.closeClick.emit()},this.borderRadius="ROUNDED",this.storybookForceStatus=void 0,this.overrideNotification=void 0,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.order=null}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);this.checkPaymentStatus()}render(){return t(n,{key:"bdf824c48f7f01bcafd88b17ad758d05ab589ffd",class:"zonos--checkout-finish zonos--elements",style:{"--border-radius":g(this.borderRadius)}},this.isLoading&&t("div",{class:"loading-wrapper"},t("zonos-spinner",null)),!this.isLoading&&t(e,null,t("div",{class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{color:"blue-800",content:'<svg color="var(--amino-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--amino-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',size:50}:{color:"red-800",content:'<svg color="var(--amino-red-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-red-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>',size:50}),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),t("zonos-text",null,this.notificationMessages.map((o=>t(e,null,o,t("br",null))))),t("zonos-button",{onClick:()=>this.closeClickHandler(),size:"md",variant:"primary"},m("Keep shopping")))))}static get assetsDirs(){return["assets"]}};C.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:var(--amino-space-24);border-radius:var(--border-radius, 10px);gap:var(--amino-space-24);max-width:360px;width:auto;margin:auto;margin-top:var(--amino-space-24);background-color:var(--amino-gray-50);padding:var(--amino-space-20)}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}";const I=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.continueClickHandler=()=>{this.continueClicked.emit()},this.paymentError=!1,this.submitBtnType=void 0,this.continueLoading=!1,this.submitBtnColor=void 0,this.disabled=!0}watchFormComplete(){this.disabled||b("zonos-checkout-payment-info")}render(){var o;return r.stripeElements?(this.disabled=!(null===(o=r.stripePaymentEventData)||void 0===o?void 0:o.complete),t(n,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Payment method")),this.paymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},m("We couldn't complete your payment. Please verify the payment details and try again.")),t("zonos-payment",null)),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},"Pay"," ",x({amount:c.total,currency:c.currency}))))):null}static get watchers(){return{disabled:["watchFormComplete"]}}};I.style=".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:calc(100% - 10px)}";const L=class{constructor(s){o(this,s),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var o,s,t;null===(t=null===(s=null===(o=this.el.shadowRoot)||void 0===o?void 0:o.querySelector("iframe"))||void 0===s?void 0:s.contentWindow)||void 0===t||t.addEventListener("resize",(()=>{this.height=this.el.scrollHeight}))}render(){return this.height=this.el.scrollHeight,t(n,{key:"fb0d16e7e638d45b3469d7f7d26cd3f3ce9bf318",class:"zonos--elements zonos--collapse",style:{"--font-family":f(),height:this.getElementHeight()}},t("div",{key:"9da00237f8f14edd9c5bf4b68da545b8c7ab4786"},t("iframe",{key:"402e19d6e96d019a4eccd49af6afdac428c9fae9",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),t("slot",{key:"de6751ac4955c073cc34188ebe22fabed38f780d"})))}get el(){return a(this)}};L.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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";const j=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.continueClickHandler=()=>{this.continueClicked.emit()},this.continueLoading=!1,this.submitBtnType=void 0,this.submitBtnColor=void 0,this.defaultAddress=null,this.disabled=!0}watchFormComplete(){this.disabled||b("zonos-checkout-customer-info")}render(){var o,s;return r.stripeElements?(this.disabled=!(null===(o=r.stripeAddressEventData)||void 0===o?void 0:o.complete)||!(null===(s=r.stripeLinkEventData)||void 0===s?void 0:s.complete),t(n,{class:"zonos--customer-info zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Customer information")),t("zonos-link-authentication",{titleText:m("Contact")}),t("zonos-address",{defaultAddress:this.defaultAddress,titleText:m("Address"),type:"shipping"})),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,isDisabled:this.disabled,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},m("Continue to shipping"))))):null}static get watchers(){return{disabled:["watchFormComplete"]}}};j.style=".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:calc(100% - 10px)}";const S=class{constructor(s){o(this,s),this.closeDialog=i(this,"closeDialog",7),this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.closeDialog.emit()},this.clickOutsideDialogHandler=o=>{o.target!==o.currentTarget||this.noClickOutside||this.closeDialog.emit()},this.open=!1,this.headerText="",this.width="460px",this.height=void 0,this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.footerRightAction=null,this.borderStyle=void 0,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1}handleWindowResize(){this.isMobile=this.isMobileMode()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){document.body.style.overflow=this.open?"hidden":"auto";const o=g(this.borderStyle);return t(n,{key:"5a331d58bfd2a0414e9577c4f515cfcd0c630ad5",class:v(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--font-family":f(),"--height":this.height||"initial","--width":this.width}},t("div",{key:"74e3ed8fcdf55e3ae11d6be9c1e18691f1115bb9",class:"zonos--backdrop"}),t("div",{key:"dae7aa8261feeb43d62550832b6b91437da07f9d","aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},t("div",{key:"ea919a80d1c0589908af64d48845c5263d1b18f4",class:"zonos--dialog"},this.isLoading&&t("div",{class:"zonos--loading"},t("zonos-spinner",{size:30})),(this.headerText||!this.noCloseButton)&&t("div",{class:"zonos--header"},this.headerText&&t("h3",{class:"zonos--header-text"},this.headerText),!this.noCloseButton&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:this.closeButtonHandler})),t("div",{key:"77de036f1fd7ea16936a5521a646df427115e99b",class:v(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},t("slot",{key:"9da41cdcfe580bb41b672f8185552e29b269e5dd"})),this.footerRightAction&&t("div",{class:"zonos--footer"},t("div",{class:"zonos--footer-right-action"},this.footerRightAction)))))}static get assetsDirs(){return["assets"]}};S.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:10002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:10001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:10001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:10002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";const B=class{constructor(s){o(this,s),this.theme="LIGHT",this.width="auto",this.class=""}render(){const o="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 t(n,{key:"7ddd949ab91ed0c61ee34ce6ee80da54b3ba3664",class:v(["zonos--elements zonos--logo",this.class]),style:{"--filter-color":o,"--font-family":f(),"--width":this.width}},t("img",{key:"1a8d98f7d836f253a21654c84ab0251969362e2f",alt:"Zonos Logo",src:s("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};B.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)}";const _=class{constructor(s){o(this,s),this.mobile=!1,this.collapsed=!1,this.isMobile=!1}handleWindowResize(){this.isMobile=y(this.mobile)}componentWillLoad(){this.isMobile=y(this.mobile)}render(){const o=this.isMobile?"boldSubheader":"semiBoldLabel",s=this.isMobile?"boldSubheader":"secondaryPageHeader",e=this.isMobile?"gray-1200":"gray-800",i=c.total-c.dutiesTaxFees;return t(n,{class:v(["zonos--review zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--title"},t("zonos-text",{color:e,type:o},m("Pay")," ",z.organizationName),(()=>this.isMobile?t("zonos-icon",this.collapsed?{color:"gray-1200",content:'<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}:{color:"gray-1200",content:'<svg color="var(--amino-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>'}):null)()),t("div",{class:"zonos--total-pay"},t("zonos-text",{type:s},x({amount:"shipping"===c.step?i:c.total,currency:c.currency}))))}static get assetsDirs(){return["assets"]}};_.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8)}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";const D=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.handleRadioSelected=async o=>{var s;if(this.selectedShippingMethod=o.detail,!this.selectedShippingMethod)return;const t=(null===(s=c.shippingData)||void 0===s?void 0:s.find((o=>{var s;return o.id===(null===(s=this.selectedShippingMethod)||void 0===s?void 0:s.value)})))||null;t&&await d(t)&&(this.disabled=!1)},this.continueClickHandler=()=>{this.continueClicked.emit()},this.continueLoading=!1,this.submitBtnColor=void 0,this.submitBtnType=void 0,this.selectedShippingMethod=null,this.disabled=!0}watchFormComplete(){this.disabled||b("zonos-checkout-shipping-info")}render(){var o;const s=null===(o=c.shippingData)||void 0===o?void 0:o.flatMap((o=>{var s,t;const{expectedDate:n,maxTransit:e,minTransit:i}=p(o),a=n?`${m("Expected delivery")} ${n}`:"",r=i&&e?`(${i}-${e} ${m("business days")})`:"",h=(null===(t=null===(s=c.landedCostData)||void 0===s?void 0:s.find((s=>{var t;return(null===(t=s.landedCost)||void 0===t?void 0:t.shipmentRating.id)===o.id})))||void 0===t?void 0:t.subtotals.shipping)||0;return{caption:r,label:o.displayName,price:x({amount:h,currency:c.currency}),sublabel:a,value:o.id}}));return t(n,{class:"zonos--shipping zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Shipping information")),t("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},m("Shipping method")),(null==s?void 0:s.length)?t("zonos-shipping-rich-radio",{items:s||[],onRadioSelected:o=>this.handleRadioSelected(o)}):t("zonos-banner",{bannerTitle:"No shipping methods found - try editing your address or contacting support if the error persists",intent:"error"})),t("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},m("Go to payment")))}static get watchers(){return{disabled:["watchFormComplete"]}}};D.style=".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";export{w as zonos_cart_items,k as zonos_cart_subtotal,C as zonos_checkout_finish,I as zonos_checkout_payment,L as zonos_collapse,j as zonos_customer_info,S as zonos_dialog,B as zonos_logo,_ as zonos_review,D as zonos_shipping}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-4d39efb6.system.js","./p-dc09ca69.system.js","./p-23e7c655.system.js"],(function(o){"use strict";var r,a,e,n,s;return{setters:[function(o){r=o.r;a=o.h;e=o.H},function(o){n=o.d},function(o){s=o.c}],execute:function(){var t=':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{border-radius:var(--amino-radius-10);padding:var(--amino-space-16);background:var(--amino-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:var(--amino-space-0);grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:var(--amino-space-4)}:host(.info){background-color:var(--amino-blue-100);border:1px solid var(--amino-blue-200)}:host(.success){background-color:var(--amino-green-100);border:1px solid var(--amino-green-200)}:host(.error){background-color:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host(.warning){background-color:var(--amino-orange-100);border:1px solid var(--amino-orange-200)}';var i=t;var l=o("zonos_banner",function(){function o(o){var a=this;r(this,o);this.handleSlotChange=function(){a.hasContent=true};this.bannerTitle=undefined;this.intent=undefined;this.class="";this.hasContent=false}o.prototype.render=function(){var o=this;var r=function(r){var e=r.color;var n="var(--amino-".concat(e,"-800)");var t="var(--amino-".concat(e,"-300)");var i=[o.bannerTitle,a("slot",{onSlotchange:o.handleSlotChange})].filter(Boolean),l=i[0],c=i[1];var d=e==="gray"?"gray-1200":"".concat(e,"-800");return a("div",{class:s(["zonos--container"])},a("div",{class:"zonos--icon-wrapper"},a("svg",{color:n,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},a("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:t,"fill-rule":"evenodd"}),a("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),a("div",{class:"zonos--header-wrapper"},a("zonos-text",{color:d,type:"label",weight:600},l)),c&&a("div",{class:"zonos--content-wrapper"},a("zonos-text",{color:d},c)))};var t=s(["zonos--elements zonos--banner",this.class,this.intent]);var i=n();switch(this.intent){case"error":return a(e,{class:t,style:{"--font-family":i}},r({color:"red"}));case"info":return a(e,{class:t,style:{"--font-family":i}},r({color:"blue"}));case"success":return a(e,{class:t,style:{"--font-family":i}},r({color:"green"}));case"warning":return a(e,{class:t,style:{"--font-family":i}},r({color:"orange"}));default:return a(e,{class:t,style:{"--font-family":i}},r({color:"gray"}))}};return o}());l.style=i}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{r as o,h as a,H as r}from"./p-4d8545e1.js";import{d as n}from"./p-e8da4463.js";import{c as e}from"./p-b4b7f705.js";const s=class{constructor(a){o(this,a),this.bold=!1,this.color="gray",this.icon=void 0,this.iconRight=!1,this.size="default",this.rounded=!1,this.class=""}render(){return a(r,{key:"2d111e91f403ef5c03f742f5dabe9491623be91d",class:e(["zonos--elements zonos--badge",this.class]),style:{"--font-family":n()}},a("div",{key:"e6debe091b732b857f180cee19bec4be435ea524",class:e(["zonos--badge-content",this.color,this.rounded&&"rounded",this.iconRight&&"icon-right",this.size,this.bold&&"bold"])},this.icon,a("zonos-text",{key:"e92c97d77fa5ce279059953f7d7fbc5a0030aa5d"},a("slot",{key:"c93852c3225ba57dd26c26300254f348e349f9ad"}))))}};s.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 .zonos--badge-content{display:-ms-flexbox;display:flex;gap:var(--amino-space-8);font-size:var(--amino-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--amino-radius-6);background-color:var(--amino-gray-100);color:var(--amino-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--amino-gray-600);color:var(--amino-gray-100)}:host .blue{background-color:var(--amino-blue-100);color:var(--amino-blue-800)}:host .blue.bold{background-color:var(--amino-blue-600);color:var(--amino-blue-100)}:host .green{background-color:var(--amino-green-100);color:var(--amino-green-800)}:host .green.bold{background-color:var(--amino-green-600);color:var(--amino-green-100)}:host .red{background-color:var(--amino-red-100);color:var(--amino-red-800)}:host .red.bold{background-color:var(--amino-red-600);color:var(--amino-red-100)}:host .orange{background-color:var(--amino-orange-100);color:var(--amino-orange-800)}:host .orange.bold{background-color:var(--amino-orange-600);color:var(--amino-orange-100)}:host .purple{background-color:var(--amino-purple-100);color:var(--amino-purple-800)}:host .purple.bold{background-color:var(--amino-purple-600);color:var(--amino-purple-100)}:host .cyan{background-color:var(--amino-cyan-100);color:var(--amino-cyan-800)}:host .cyan.bold{background-color:var(--amino-cyan-600);color:var(--amino-cyan-100)}";export{s as zonos_badge}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-4d39efb6.system.js","./p-dc09ca69.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var a,s,e,i,o;return{setters:[function(t){a=t.r;s=t.h;e=t.H},function(t){i=t.d},function(t){o=t.c}],execute:function(){var r=":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 .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";var n=r;var d=t("zonos_card",function(){function t(t){a(this,t);this.actions=undefined;this.class=undefined;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}t.prototype.render=function(){return s(e,{key:"f2f7929742862b9806ddc568155e7cddf954252e",style:{"--font-family":i()}},s("div",{key:"ce3568d7ded3cfb9acb0f4ff3d4184a17b88f33b",class:o(["styled-card",this.class]),style:{padding:this.spacing}},this.label&&s("header",{class:"card-header",style:{padding:this.spacing}},s("zonos-text",{type:"subheader"},this.label),s("h-stack",{spacing:8},this.actions)),s("slot",{key:"3cc9f896df1899da73eab80dfbb3aac3a0046956"}),(this.footerActions||this.footerContent)&&s("footer",{class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},s("div",null,this.footerContent),s("h-stack",{spacing:8},this.footerActions))))};return t}());d.style=n;var c=":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";var h=c;var f=t("zonos_v_stack",function(){function t(t){a(this,t);this.spacing=24;this.class=""}t.prototype.render=function(){return s(e,{key:"d363ffeb2bbae49e7318b26ab56b4b8871844daf",style:{"--font-family":i()}},s("div",{key:"5d9fa5ae9ffca787ca42f38e4ec75fedc24823f9",class:o(["vstack",this.class]),style:{"grid-row-gap":"".concat(this.spacing,"px")}},s("slot",{key:"e1d6fef3378b92c18c2c43ec8616e8c733a4290c"})))};return t}());f.style=h}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as e,H as t}from"./p-4d8545e1.js";import{_ as s,e as i,i as n,f as r,z as a,m as l}from"./p-e8da4463.js";import{h,b as d,a as m,i as c,t as p,g as f,s as g,l as u,e as w,f as z,j as b,k as v}from"./p-8ebc0b64.js";import{c as x}from"./p-b4b7f705.js";import{g as y}from"./p-5883217a.js";var k=s,T=/\s/,E=/^\s+/,L=i,C=n,j=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(E,""):o},D=r,I=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,X=/^0o[0-7]+$/i,S=parseInt,O=r,B=function(){return k.Date.now()},N=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||C(o)&&"[object Symbol]"==L(o)}(o))return NaN;if(D(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=D(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=j(o);var t=R.test(o);return t||X.test(o)?S(o.slice(2),t?2:8):I.test(o)?NaN:+o},$=Math.max,A=Math.min,H=function(o,e,t){var s,i,n,r,a,l,h=0,d=!1,m=!1,c=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function f(o){var t=o-l;return void 0===l||t>=e||t<0||m&&o-h>=n}function g(){var o=B();if(f(o))return u(o);a=setTimeout(g,function(o){var t=e-(o-l);return m?A(t,n-(o-h)):t}(o))}function u(o){return a=void 0,c&&s?p(o):(s=i=void 0,r)}function w(){var o=B(),t=f(o);if(s=arguments,i=this,l=o,t){if(void 0===a)return function(o){return h=o,a=setTimeout(g,e),d?p(o):r}(l);if(m)return clearTimeout(a),a=setTimeout(g,e),p(l)}return void 0===a&&(a=setTimeout(g,e)),r}return e=N(e)||0,O(t)&&(d=!!t.leading,n=(m="maxWait"in t)?$(N(t.maxWait)||0,e):n,c="trailing"in t?!!t.trailing:c),w.cancel=function(){void 0!==a&&clearTimeout(a),h=0,s=l=i=a=void 0},w.flush=function(){return void 0===a?r:u(B())},w};const M=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=a.helloSettings;i&&s||d("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&c(i)&&document.querySelectorAll(i)||[],l=s&&c(s)&&document.querySelectorAll(s)||[];if(r.length!==l.length)return d("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,m=h&&t&&c(t)&&document.querySelectorAll(t)||[];h&&m.length!==l.length&&d('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const p=[];for(let t=0;t<r.length;t++){const s=r[t],i=l[t];if(s&&i){const n={cartButtonNode:m[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};p.push(n)}}return p},P=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===a.currentHelloPage||"productList"===a.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===a.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(a.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return`${p("Welcome to")} ${o}`}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==a.currentHelloPage&&"productList"!==a.currentHelloPage||"DISABLED"===a.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=m;if(!e)return d("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await h("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(d(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(a.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=a.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=M();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage(),this.displayCurrency()},this.handleProductCountChange=H((()=>{const{productTitleElementSelector:o}=a.helloSettings;if(o){const o=M();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==m.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,a.currentHelloPage=(()=>{const{href:o}=window.location,{cartUrlPattern:e,homepageUrlPattern:t,productDetailUrlPattern:s,productListUrlPattern:i}=a.helloSettings;return e&&new RegExp(e).test(o)?"cart":s&&new RegExp(s).test(o)?"productDetail":i&&new RegExp(i).test(o)?"productList":t&&new RegExp(t).test(o)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void g(m.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return y(this.helloRef)},this.isShippableCountry=(o=!0)=>!(!m.localizationLoaded||!m.isShippableCountry&&(o&&u("Hello: not shippable country"),1)),this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=a.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[]}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&a.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),clearInterval(o))}),100)}async displayCurrency(){m.exchangeRate?w():console.error("Could not display currency. Exchange rate and format data is not available.")}async convertAndFormat(o){z(o)}async convert(o){b(o)}async format(o){v(o)}handleResize(){H(this.render.bind(this),500)}render(){var o,s;if(null===(o=a.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return u("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i}=m,n=this.mobileLocationOverride||a.helloSettings.mobileLocation,r=window.innerWidth<768,h=this.animateFromLeftOverride||r&&n.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,d=n.includes("TOP"),c=l(a.appearance,this.appearanceSettingsOverride),{theme:p}=c,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(a.organizationName);const g=this.isShippableCountry()&&!!i;return e(t,{class:"zonos--hello zonos--elements","data-theme":p},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:x(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",h&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",d&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:x(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}};P.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";export{P as zonos_hello}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,s,o){function e(n){return n instanceof s?n:new s((function(t){t(n)}))}return new(s||(s=Promise))((function(s,i){function a(n){try{r(o.next(n))}catch(n){i(n)}}function c(n){try{r(o["throw"](n))}catch(n){i(n)}}function r(n){n.done?s(n.value):e(n.value).then(a,c)}r((o=o.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var s={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,e,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(n){return function(t){return r([n,t])}}function r(c){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(s=0)),s)try{if(o=1,e&&(i=c[0]&2?e["return"]:c[0]?e["throw"]||((i=e["return"])&&i.call(e),0):e.next)&&!(i=i.call(e,c[1])).done)return i;if(e=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:s.label++;return{value:c[1],done:false};case 5:s.label++;e=c[1];c=[0];continue;case 7:c=s.ops.pop();s.trys.pop();continue;default:if(!(i=s.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){s=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(c[0]===6&&s.label<i[1]){s.label=i[1];i=c;break}if(i&&s.label<i[2]){s.label=i[2];s.ops.push(c);break}if(i[2])s.ops.pop();s.trys.pop();continue}c=t.call(n,s)}catch(n){c=[6,n];e=0}finally{o=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-4d39efb6.system.js","./p-51a40ddf.system.js","./p-a6f2e282.system.js","./p-dc09ca69.system.js","./p-7f68c103.system.js","./p-12ecf765.system.js"],(function(n){"use strict";var t,s,o,e,i,a,c,r;return{setters:[function(n){t=n.r;s=n.h;o=n.H;e=n.d},function(n){i=n.s;a=n.m},function(n){c=n.b;r=n.a},function(){},function(){},function(){}],execute:function(){var u=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";var d=u;var h=n("zonos_address",function(){function n(n){t(this,n);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe}n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,s,o,e;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;if(!this.stripe||!i.stripeElements){c("Stripe is not initialized. Couldn't load stripe element.");return[2]}s=(n=this.defaultAddress)===null||n===void 0?void 0:n.phone;if(!s){(t=this.defaultAddress)===null||t===void 0?true:delete t.phone}o=r.shippingZoneCountries;e=i.stripeAddressElement||i.stripeElements.create("address",{allowedCountries:o?Object.values(o).map((function(n){return n.code})):[],contacts:this.defaultAddress?[this.defaultAddress]:undefined,defaultValues:{address:{country:r.selectedCountryCode||"AL"}},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});e.mount(this.el.querySelector(".zonos--address-component"));e.on("change",(function(n){var t=n.value;i.stripeAddressEventData=Object.assign(Object.assign({},n),{elementMode:"shipping",elementType:"address",empty:false,value:Object.assign(Object.assign({},t),{firstName:t.firstName||t.name.split(" ")[0],lastName:t.lastName||t.name.split(" ").pop()})});void a()}));i.stripeAddressElement=e;return[2]}))}))};n.prototype.componentDidLoad=function(){void this.watchInitStripe()};n.prototype.render=function(){return s(o,{key:"47fa225123b7c944732b018fbb374bcb6da0f4ca",class:"zonos--address zonos--elements"},s("zonos-text",{key:"4d0d9d4f9c09d6b2f29bc6a44164a0ef8db0acc9",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"d279ba97287890e489230f9e449a344db76556f2",class:"zonos--address-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());h.style=d;var l=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";var f=l;var z=n("zonos_link_authentication",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=i.stripe}n.prototype.watchInitStripe=function(){if(!this.stripe||!i.stripeElements){return}var n=i.stripeLinkElement||i.stripeElements.create("linkAuthentication");var t=this.el.querySelector(".zonos--link-authentication-component");if(!t){console.error("Cannot find container element for linkAuthenticationElement");return}n.mount(t);n.on("change",(function(n){i.stripeLinkEventData=n;void a()}));i.stripeLinkElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return s(o,{key:"48ec92ca8a1500c3b8e85222c3df069c32074e72",class:"zonos--link-authentication zonos--elements"},s("zonos-text",{key:"9060fab8ab9f88157ee6951af830e106e6ff9509",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"dac7e96170d15faa8c1013fb298ae86e2ce99f0b",class:"zonos--link-authentication-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());z.style=f}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,H as a,d as r}from"./p-4d8545e1.js";import{z as n,d as e}from"./p-e8da4463.js";import{c as i}from"./p-b4b7f705.js";import{g as s}from"./p-f2733cc7.js";import{i as d}from"./p-4c414a92.js";import{i as c}from"./p-0024f8c2.js";const h=class{constructor(t){o(this,t),this.handleSlotChange=()=>{this.hasContent=!0},this.class="",this.color=void 0,this.backgroundColor=void 0,this.borderStyle=void 0,this.isDisabled=!1,this.icon=null,this.iconRight=!1,this.size="sm",this.variant="standard",this.noBackground=!1,this.noPaddingLeft=!1,this.noPaddingRight=!1,this.loading=!1,this.theme=void 0,this.hasIcon=!!this.icon,this.hasContent=!1}iconChangeHandler(){this.hasIcon=!!this.icon}clickHandler(o){(this.loading||this.isDisabled)&&(o.preventDefault(),o.stopPropagation())}componentWillLoad(){this.iconChangeHandler()}render(){const o=this.loading||this.isDisabled,r=this.color&&d(this.color)?`var(--amino-${this.color})`:this.color,h=this.backgroundColor||n.appearance.colorSecondary,b="standard"===this.variant?(o=>{const t=o||n.appearance.colorSecondary,a=t&&d(t)?`var(--amino-${t})`:t;return a&&c(a)?"DARK":"LIGHT"})(h):void 0,u=s(this.borderStyle);return t(a,{key:"af41b1035e5ea776d47580647a65997bb41730e3",class:i(["zonos--elements",this.class]),"data-theme":this.theme||b,disabled:o,style:{"--background-color":h,"--border-radius":u,"--color":r,"--font-family":e()}},t("button",{key:"af3fdc9aa0440cf5a7e49c4c0c76826d7a700d32",class:i([this.hasIcon&&"has-icon",this.hasContent&&"has-content",this.noBackground&&"no-background",this.noPaddingLeft&&"no-padding-left",this.noPaddingRight&&"no-padding-right",this.iconRight&&"icon-right",this.variant,this.size,this.backgroundColor&&"standard"===this.variant&&"override-background"]),disabled:o},this.loading&&t("div",{class:"zonos--spinner-wrapper"},t("zonos-spinner",{size:16})),!this.loading&&!this.iconRight&&this.icon,t("slot",{key:"32b6a079ba98ab9d62b5df34ddc15e4ac7a87a8e",onSlotchange:this.handleSlotChange}),!this.loading&&this.iconRight&&this.icon))}static get watchers(){return{icon:["iconChangeHandler"]}}};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{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--spinner-wrapper{position:absolute;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background-color:var(--amino-surface-color);-ms-flex-pack:center;justify-content:center;border-radius:var(--amino-radius-10);gap:var(--amino-space-8)}:host button{width:100%;position:relative;font-size:14px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-surface-color);border:none;outline:1px solid var(--amino-surface-color);border-radius:var(--border-radius, var(--amino-radius-10));-webkit-transition:var(--amino-transition);transition:var(--amino-transition);font-weight:500;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:var(--font-family, Inter), Inter;letter-spacing:normal;cursor:pointer;white-space:nowrap;padding:var(--amino-space-8) var(--amino-space-24);color:var(--color, var(--amino-gray-1200));}:host button.sm.no-background,:host button.md.no-background,:host button.lg.no-background{background:none;outline:none}:host button.sm.no-padding-left,:host button.md.no-padding-left,:host button.lg.no-padding-left{padding-left:0}:host button.sm.no-padding-right,:host button.md.no-padding-right,:host button.lg.no-padding-right{padding-right:0}:host button[disabled]{cursor:not-allowed;background-color:var(--amino-gray-200)}:host button[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-200)}:host button:active{-webkit-transform:scale(0.99);transform:scale(0.99)}:host button.sm{height:var(--amino-size-sm);line-height:var(--amino-size-sm);padding:var(--amino-space-4) var(--amino-space-8)}:host button.sm:not(.has-content).has-icon{padding:0 var(--amino-space-4)}:host button.md{height:var(--amino-size-md);line-height:var(--amino-size-md);padding:var(--amino-space-8) var(--amino-space-16)}:host button.md:not(.has-content).has-icon{padding:0 var(--amino-space-8)}:host button.lg{height:var(--amino-size-lg);line-height:var(--amino-size-lg);padding:var(--amino-space-12) var(--amino-space-24)}:host button.lg:not(.has-content).has-icon{padding:0 var(--amino-space-16)}:host button:not(.only-icon).has-icon{gap:var(--amino-space-8)}:host button.override-background{background-color:var(--background-color, var(--amino-gray-0));color:var(--color, var(--amino-gray-1200));outline:1px solid var(--background-color, var(--amino-gray-0))}:host button.override-background:disabled{opacity:0.8}:host button.override-background:not(:disabled):hover{opacity:0.9}:host button:not(.override-background){}:host button:not(.override-background).primary{background:var(--amino-blue-600);outline:1px solid var(--amino-blue-600);color:var(--amino-gray-0)}:host button:not(.override-background).primary:not([disabled]):hover{background-image:var(--amino-button-primary-hover)}:host button:not(.override-background).primary:not([disabled]):active{background:var(--amino-blue-700)}:host button:not(.override-background).primary:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).primary[disabled]{background:var(--amino-blue-400)}:host button:not(.override-background).primary[disabled] .zonos--spinner-wrapper{background-color:var(--amino-blue-400)}:host button:not(.override-background).primary .zonos--spinner-wrapper{background-color:var(--amino-blue-600)}:host button:not(.override-background).success{background:var(--amino-green-600);outline:1px solid var(--amino-green-600);color:var(--amino-gray-0)}:host button:not(.override-background).success:not([disabled]):hover{background-image:var(--amino-button-success-hover)}:host button:not(.override-background).success:not([disabled]):active{background:var(--amino-green-700)}:host button:not(.override-background).success:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).success[disabled]{background:var(--amino-green-400)}:host button:not(.override-background).success[disabled] .zonos--spinner-wrapper{background-color:var(--amino-green-400)}:host button:not(.override-background).danger{background:var(--amino-red-600);outline:1px solid var(--amino-red-600);color:var(--amino-gray-0)}:host button:not(.override-background).danger:not([disabled]):hover{background-image:var(--amino-button-danger-hover)}:host button:not(.override-background).danger:not([disabled]):active{background:var(--amino-red-700)}:host button:not(.override-background).danger:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).danger[disabled]{background:var(--amino-red-400)}:host button:not(.override-background).danger[disabled] .zonos--spinner-wrapper{background-color:var(--amino-red-400)}:host button:not(.override-background).warning{background:var(--amino-orange-600);outline:1px solid var(--amino-orange-600);color:var(--amino-gray-0)}:host button:not(.override-background).warning:not([disabled]):hover{background-image:var(--amino-button-warning-hover)}:host button:not(.override-background).warning:not([disabled]):active{background:var(--amino-orange-700)}:host button:not(.override-background).warning:not([disabled]):focus{-webkit-box-shadow:var(--amino-focus-button);box-shadow:var(--amino-focus-button)}:host button:not(.override-background).warning[disabled]{background:var(--amino-orange-400)}:host button:not(.override-background).warning[disabled] .zonos--spinner-wrapper{background-color:var(--amino-orange-400)}:host button:not(.override-background).subtle{background:transparent;color:var(--color)}:host button:not(.override-background).subtle:not([disabled]):hover{background:var(--amino-gray-100)}:host button:not(.override-background).subtle:not([disabled]):active{background:var(--amino-gray-200)}:host button:not(.override-background).subtle:focus{-webkit-box-shadow:var(--amino-button-focus-ring);box-shadow:var(--amino-button-focus-ring)}:host button:not(.override-background).subtle[disabled] .content{opacity:0.6}:host button:not(.override-background).subtle[disabled] .zonos--spinner-wrapper{background-color:var(--amino-gray-0)}:host button:not(.override-background).outline{background:transparent;outline:1px solid var(--amino-gray-700)}:host button:not(.override-background).outline:not([disabled]):hover{background-color:var(--amino-gray-100)}:host button:not(.override-background).outline:not([disabled]):active{background:var(--amino-gray-200)}";const b=class{constructor(t){o(this,t),this.size=32,this.color=void 0}render(){return this.el.shadowRoot?t(a,{class:i(["zonos--elements",this.color]),style:{"--size":`${this.size}px`}},t("svg",{viewBox:"0 0 50 50"},t("circle",{class:"track",cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}),t("circle",{cx:"25",cy:"25",fill:"none",id:"loading-spinner-circle",r:"20","stroke-width":"5"}))):null}get el(){return r(this)}};b.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{position:relative;overflow:hidden;width:var(--size);height:var(--size);display:-ms-inline-flexbox;display:inline-flex}:host svg{width:var(--size);height:var(--size);stroke:var(--amino-blue-600);-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite}:host circle.track{stroke:var(--amino-gray-200)}:host.black{stroke:var(--amino-spinner-stroke-black)}:host.black circle.track{stroke:var(--amino-spinner-track-black)}:host.white{stroke:var(--amino-spinner-stroke-white)}:host.white circle.track{stroke:var(--amino-spinner-track-white)}:host.info{stroke:var(--amino-blue-600)}:host.info circle.track{stroke:var(--amino-blue-100)}:host.success{stroke:var(--amino-green-600)}:host.success circle.track{stroke:var(--amino-green-100)}:host.danger{stroke:var(--amino-red-600)}:host.danger circle.track{stroke:var(--amino-red-100)}:host.warning{stroke:var(--amino-orange-600)}:host.warning circle.track{stroke:var(--amino-orange-100)}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}:host circle:not(.track){stroke-linecap:round;-webkit-animation:dash 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite}";export{h as zonos_button,b as zonos_spinner}
|