@zonos/elements 1.3.12-alpha.9 → 1.3.12
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-37e23be9.js → cart-b32bfb92.js} +1 -1
- package/dist/cjs/{sendErrorLog-7b3d82e4.js → sendErrorLog-5f732a8a.js} +1 -1
- package/dist/cjs/{submitGtag-d0718b63.js → submitGtag-fe94f3a0.js} +12 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
- package/dist/collection/components/utils/api/trackConversionEvent.js +12 -3
- package/dist/collection/components/utils/hello/currencyConversion/getInitialElementAmount.js +1 -1
- package/dist/collection/components/utils/logging/sendLoadScriptLog.js +5 -0
- package/dist/collection/scripts/zonosBase.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +11 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +4 -0
- package/dist/components/stripe.js +1 -1
- package/dist/components/trackConversionEvent.js +12 -4
- package/dist/esm/{cart-7961927b.js → cart-9f9f26f9.js} +1 -1
- package/dist/esm/{sendErrorLog-4d9581da.js → sendErrorLog-283f65ab.js} +1 -1
- package/dist/esm/{submitGtag-4c1f09dc.js → submitGtag-5847d1a1.js} +12 -4
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_10.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/{cart-7961927b.js → cart-9f9f26f9.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-4d9581da.js → sendErrorLog-283f65ab.js} +1 -1
- package/dist/esm-es5/{submitGtag-4c1f09dc.js → submitGtag-5847d1a1.js} +1 -1
- package/dist/esm-es5/zonos-address_4.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-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/scripts/zonosBase.d.ts +5 -0
- package/dist/types/types/LogLoadScriptRequestBody.d.ts +1 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +15 -2
- package/dist/types/types/generated/graphql.customer.types.ts +21 -2
- package/dist/types/types/generated/graphql.frontend.types.d.ts +16 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +29 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/{p-63775f6d.js → p-03da9e9d.js} +1 -1
- package/dist/zonos-elements/{p-7efb9c12.system.entry.js → p-0b3cb5c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e4919505.entry.js → p-11d1645b.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdb72353.system.entry.js → p-14c7d651.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3eb402c8.entry.js → p-29034d9c.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd4f3724.system.js → p-3639f458.system.js} +1 -1
- package/dist/zonos-elements/{p-5a3ceb49.entry.js → p-50777610.entry.js} +1 -1
- package/dist/zonos-elements/{p-0bdac452.system.js → p-5a464374.system.js} +1 -1
- package/dist/zonos-elements/{p-e5fd850c.system.entry.js → p-62c458ac.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6e81adba.system.js +1 -1
- package/dist/zonos-elements/{p-44842b39.system.entry.js → p-70c1f877.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-431648d8.system.entry.js → p-76ac5680.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8eb876e8.system.entry.js → p-887bfef2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d6aa3011.system.entry.js → p-8f2e4f81.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2191b884.entry.js → p-9726ff53.entry.js} +1 -1
- package/dist/zonos-elements/{p-e1796e2a.entry.js → p-9ab6e2b5.entry.js} +1 -1
- package/dist/zonos-elements/{p-4eba3abe.entry.js → p-a17fcb0a.entry.js} +1 -1
- package/dist/zonos-elements/{p-a6c9c505.system.js → p-ad9c7245.system.js} +1 -1
- package/dist/zonos-elements/{p-33f5634a.entry.js → p-b2d9dc9d.entry.js} +1 -1
- package/dist/zonos-elements/{p-f0b5d2fb.entry.js → p-b4a086e0.entry.js} +1 -1
- package/dist/zonos-elements/p-c43da0c6.js +1 -0
- package/dist/zonos-elements/{p-e4be7bd8.js → p-c5321a31.js} +1 -1
- package/dist/zonos-elements/{p-e90e2126.entry.js → p-e1bb026f.entry.js} +1 -1
- package/dist/zonos-elements/{p-339c505b.system.entry.js → p-e237784c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2da8e12a.system.entry.js → p-f254612d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4b3923d2.system.entry.js → p-f7da5199.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-44f4dd4b.entry.js → p-ff699d46.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-0c5d3595.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as t,h as e,H as i}from"./p-07bb1bed.js";import{B as s,l as n,t as l}from"./p-e4be7bd8.js";import{z as a}from"./p-1bbdfae5.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-9a90fb56.js";import"./p-07022f11.js";const c=class{constructor(e){o(this,e),this.closeDialog=t(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(a.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.getDutyMessage=()=>{const{countryLandedCost:o}=n,t=(null==o?void 0:o.dutyDeminimus)?s(o.dutyDeminimus):null,e="CA"===n.selectedCountryCode?s(40):t;return e?`${l("Spend")} ${e} ${l("duty free")}`:l("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n,t=(null==o?void 0:o.vatTaxDeminimus)?s(o.vatTaxDeminimus):null,e="CA"===n.selectedCountryCode?s(150):t;return e?`${l("Spend")} ${e} ${l("tax free")}`:l("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:l("Orders to ${countryName} must be over ${threshold} to ship.",{countryName:"United Kingdom",threshold:s(o.dutyDeminimus)}),this.getAustraliaDutyTaxMessage=o=>l("${percentage} GST due on any order above ${threshold}.",{percentage:100*o.vatTaxRate+"%",threshold:s(o.vatTaxDeminimus)}),this.getNewZealandDutyTaxMessge=o=>l("${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:s(o.vatTaxDeminimus)}),this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(!n.countryLandedCost.hasTaxId)return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:t}=n,s=this.getDutyMessage(),c=this.getTaxMessage(),m=this.getAdditionalDutyTaxMessage(),g=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),f=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:u}=n,p=`${l("Welcome to")} ${a.organizationName}!`,b=(null===(o=u.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),w=h(b),v=this.getCurrentPageEnum(),z=u.filter((o=>o.pageName===v));return e(i,{key:"ccabd686943b009ed6bb9c0ec64a6a4e7cc917f5",class:"zonos--elements"},e("div",{key:"6bfbae15f5b43413fc76d21b94d0d56a2ce48f4d","aria-hidden":"true",class:r(["zonos--hello-dialog",g&&"zonos--hello-dialog-animate-from-left",f&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&e("div",null,e("div",{class:"zonos--hello-dialog-content"},e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),e("zonos-v-stack",{spacing:24},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:t}),e("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},e("zonos-text",{type:"boldSubheader"},p),e("zonos-text",{innerHTML:w,textColor:"gray-800"})),e("zonos-v-stack",{spacing:8},this.restrictedItems.map((o=>{var t;return o&&e("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(t=o.itemRestrictions)||void 0===t?void 0:t.map((o=>e("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),e("zonos-card",{spacing:"12px"},e("zonos-v-stack",{spacing:12},e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,s)),e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,c)),m&&e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Low value order shipping restriction",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,m)))),z.map((o=>e("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),e("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&e("div",null,e("zonos-country-select",{handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&e("div",null,e("zonos-language-select",{handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};c.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{c as zonos_hello_dialog}
|
|
1
|
+
import{r as o,c as t,h as e,H as i}from"./p-07bb1bed.js";import{B as s,l as n,t as l}from"./p-c5321a31.js";import{z as a}from"./p-1bbdfae5.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-9a90fb56.js";import"./p-07022f11.js";const c=class{constructor(e){o(this,e),this.closeDialog=t(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(a.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.getDutyMessage=()=>{const{countryLandedCost:o}=n,t=(null==o?void 0:o.dutyDeminimus)?s(o.dutyDeminimus):null,e="CA"===n.selectedCountryCode?s(40):t;return e?`${l("Spend")} ${e} ${l("duty free")}`:l("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n,t=(null==o?void 0:o.vatTaxDeminimus)?s(o.vatTaxDeminimus):null,e="CA"===n.selectedCountryCode?s(150):t;return e?`${l("Spend")} ${e} ${l("tax free")}`:l("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:l("Orders to ${countryName} must be over ${threshold} to ship.",{countryName:"United Kingdom",threshold:s(o.dutyDeminimus)}),this.getAustraliaDutyTaxMessage=o=>l("${percentage} GST due on any order above ${threshold}.",{percentage:100*o.vatTaxRate+"%",threshold:s(o.vatTaxDeminimus)}),this.getNewZealandDutyTaxMessge=o=>l("${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:s(o.vatTaxDeminimus)}),this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(!n.countryLandedCost.hasTaxId)return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:t}=n,s=this.getDutyMessage(),c=this.getTaxMessage(),m=this.getAdditionalDutyTaxMessage(),g=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),f=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:u}=n,p=`${l("Welcome to")} ${a.organizationName}!`,b=(null===(o=u.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),w=h(b),v=this.getCurrentPageEnum(),z=u.filter((o=>o.pageName===v));return e(i,{key:"ccabd686943b009ed6bb9c0ec64a6a4e7cc917f5",class:"zonos--elements"},e("div",{key:"6bfbae15f5b43413fc76d21b94d0d56a2ce48f4d","aria-hidden":"true",class:r(["zonos--hello-dialog",g&&"zonos--hello-dialog-animate-from-left",f&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&e("div",null,e("div",{class:"zonos--hello-dialog-content"},e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),e("zonos-v-stack",{spacing:24},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:t}),e("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},e("zonos-text",{type:"boldSubheader"},p),e("zonos-text",{innerHTML:w,textColor:"gray-800"})),e("zonos-v-stack",{spacing:8},this.restrictedItems.map((o=>{var t;return o&&e("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(t=o.itemRestrictions)||void 0===t?void 0:t.map((o=>e("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),e("zonos-card",{spacing:"12px"},e("zonos-v-stack",{spacing:12},e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,s)),e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,c)),m&&e("div",{class:"zonos--flex-message"},e("zonos-icon",{"aria-label":"Low value order shipping restriction",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),e("zonos-text",null,m)))),z.map((o=>e("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),e("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&e("div",null,e("zonos-country-select",{handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&e("div",null,e("zonos-language-select",{handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};c.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{c as zonos_hello_dialog}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,e,r){function i(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,o){function u(n){try{c(r.next(n))}catch(n){o(n)}}function a(n){try{c(r["throw"](n))}catch(n){o(n)}}function c(n){n.done?e(n.value):i(n.value).then(u,a)}c((r=r.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;i=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){e.label=a[1];break}if(a[0]===6&&e.label<o[1]){e.label=o[1];o=a;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(a);break}if(o[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,e,r){function i(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,o){function u(n){try{c(r.next(n))}catch(n){o(n)}}function a(n){try{c(r["throw"](n))}catch(n){o(n)}}function c(n){n.done?e(n.value):i(n.value).then(u,a)}c((r=r.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(t){return c([n,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,a[0]&&(e=0)),e)try{if(r=1,i&&(o=a[0]&2?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;if(i=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;i=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){e.label=a[1];break}if(a[0]===6&&e.label<o[1]){e.label=o[1];o=a;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(a);break}if(o[2])e.ops.pop();e.trys.pop();continue}a=t.call(n,e)}catch(n){a=[6,n];i=0}finally{r=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-3639f458.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.r}],execute:function(){var e=this;var r=890;var i=n("i",(function(n){return n||window.innerWidth<r}));var o=n("s",(function(n){var r=n.endpoint,i=n.errors,o=n.metadata;return __awaiter(e,void 0,void 0,(function(){var n,e;return __generator(this,(function(u){n="userAgentData"in window.navigator?window.navigator.userAgentData:null;e={endpoint:r,errors:i,metadata:Object.assign({href:window.location.href,userAgent:n&&n.brands.length>0?n:window.navigator.userAgent},o)};void t("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:e,method:"POST"});return[2]}))}))}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-52de4d70.system.js","./p-
|
|
1
|
+
System.register(["./p-52de4d70.system.js","./p-3639f458.system.js","./p-167b3369.system.js","./p-23e7c655.system.js","./p-86034f1e.system.js","./p-41c2b1c5.system.js"],(function(t){"use strict";var s,o,e,n,i,a,h;return{setters:[function(t){s=t.r;o=t.h;e=t.H;n=t.d},function(t){i=t.l},function(t){a=t.d},function(t){h=t.c},function(){},function(){}],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{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";var f=r;var l="https://zonos-store-assets.s3.amazonaws.com/images/elements-flags";var c=t("zonos_country_flag",function(){function t(t){s(this,t);this.countryCode=i.selectedCountryCode;this.size=undefined}t.prototype.render=function(){if(!this.el.shadowRoot||!this.countryCode){return null}var t="".concat(l,"/").concat(this.countryCode,".svg");var s=a();return o(e,{class:"zonos--elements",style:this.size?{"--font-family":s,height:"".concat(this.size,"px"),width:"".concat(this.size,"px")}:{"--font-family":s}},o("div",{class:h(["flag-container"])},o("div",{class:"flag-icon",style:{backgroundImage:"url(".concat(t,")")}})))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());c.style=f}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):i(e.value).then(s,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-56ba5cbf.system.js"],(function(e,o){"use strict";var t,n,i;return{setters:[function(o){t=o.p;n=o.b;e("setNonce",o.s)},function(e){i=e.g}],execute:function(){var e=this;var r=function(){var e=o.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};r().then((function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function i(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?t(e.value):i(e.value).then(s,a)}l((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(o){return l([e,o])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-56ba5cbf.system.js"],(function(e,o){"use strict";var t,n,i;return{setters:[function(o){t=o.p;n=o.b;e("setNonce",o.s)},function(e){i=e.g}],execute:function(){var e=this;var r=function(){var e=o.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};r().then((function(o){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-f254612d.system",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"]}]]],["p-14c7d651.system",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-8f2e4f81.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-f62b49aa.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-20b080d1.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-4d7b27af.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-a144d26a.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-70c1f877.system",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-6c5c5377.system",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-e237784c.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-160cdf4e.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-f42bffad.system",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-62c458ac.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-15cd4a76.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-1d833f22.system",[[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-5c9c2973.system",[[1,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}]]],["p-001518eb.system",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["p-0b3cb5c2.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-f7da5199.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-76ac5680.system",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],reportedInvalidCharacters:[32],invalidCharacterList:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-887bfef2.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32],hasInvalidShippingCharacters:[32],hasInvalidBillingCharacters:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],disabled:[32],serviceLevels:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],o)]}}))}))}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,t,e,n){function i(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,s){function r(o){try{l(n.next(o))}catch(o){s(o)}}function a(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?e(o.value):i(o.value).then(r,a)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(t){return l([o,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(e=0)),e)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;i=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){e.label=a[1];break}if(a[0]===6&&e.label<s[1]){e.label=s[1];s=a;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(a);break}if(s[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-dd4f3724.system.js","./p-167b3369.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-86034f1e.system.js","./p-41c2b1c5.system.js"],(function(o){"use strict";var t,e,n,i,s,r,a,l,h,d,c;return{setters:[function(o){t=o.r;e=o.c;n=o.h;i=o.H},function(o){s=o.B;r=o.l;a=o.t},function(o){l=o.z},function(o){h=o.c},function(o){d=o.f},function(o){c=o.g},function(){},function(){}],execute:function(){var u=function(o){var t=o.getBoundingClientRect();var e=t.top;var n=window.innerHeight-t.bottom;return e>=n};var f='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var g='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var m='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var v='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var p='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var b=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var w=b;var z=o("zonos_hello_dialog",function(){function o(o){var n=this;t(this,o);this.closeDialog=e(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showLanguageSelect=o;return[2]}))}))};this.getDutyMessage=function(){var o=r.countryLandedCost;var t=(o===null||o===void 0?void 0:o.dutyDeminimus)?s(o.dutyDeminimus):null;var e=r.selectedCountryCode==="CA"?s(40):t;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("duty free")):a("Duties will apply to all orders")};this.getTaxMessage=function(){var o=r.countryLandedCost;var t=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?s(o.vatTaxDeminimus):null;var e=r.selectedCountryCode==="CA"?s(150):t;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("tax free")):a("Taxes will apply to all orders")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var t=o.dutyDeminimus;return a("Orders to ${countryName} must be over ${threshold} to ship.",{countryName:"United Kingdom",threshold:s(t)})};this.getAustraliaDutyTaxMessage=function(o){return a("${percentage} GST due on any order above ${threshold}.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getNewZealandDutyTaxMessge=function(o){return a("${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!r.countryLandedCost.hasTaxId){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var t;var e=r.selectedCountryCode;var s=this.getDutyMessage();var b=this.getTaxMessage();var w=this.getAdditionalDutyTaxMessage();var z=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var x=this.dialogRef&&u(this.dialogRef);var C=r.customMessages;var y="".concat(a("Welcome to")," ").concat(l.organizationName,"!");var k=((t=C.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var H=d(k);var L=this.getCurrentPageEnum();var V=C.filter((function(o){return o.pageName===L}));return n(i,{key:"ccabd686943b009ed6bb9c0ec64a6a4e7cc917f5",class:"zonos--elements"},n("div",{key:"6bfbae15f5b43413fc76d21b94d0d56a2ce48f4d","aria-hidden":"true",class:h(["zonos--hello-dialog",z&&"zonos--hello-dialog-animate-from-left",x&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(t){return t&&(o.dialogRef=t)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",null,n("div",{class:"zonos--hello-dialog-content"},n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:p}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{spacing:24},n("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:e}),n("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{type:"boldSubheader"},y),n("zonos-text",{innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{spacing:8},this.restrictedItems.map((function(o){var t;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(t=o.itemRestrictions)===null||t===void 0?void 0:t.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{spacing:"12px"},n("zonos-v-stack",{spacing:12},n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:g}),n("zonos-text",null,s)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:v}),n("zonos-text",null,b)),w&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Low value order shipping restriction",content:f}),n("zonos-text",null,w)))),V.map((function(o){return n("zonos-custom-message",{icon:m,message:o.message})}))))),n("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(t){return o.setShowCountrySelect(t)},setShowLanguageSelect:function(t){return o.setShowLanguageSelect(t)}})),this.showCountrySelect&&n("div",null,n("zonos-country-select",{handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",null,n("zonos-language-select",{handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());z.style=w}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,t,e,n){function i(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,s){function r(o){try{l(n.next(o))}catch(o){s(o)}}function a(o){try{l(n["throw"](o))}catch(o){s(o)}}function l(o){o.done?e(o.value):i(o.value).then(r,a)}l((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(o){return function(t){return l([o,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(e=0)),e)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;i=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){e.label=a[1];break}if(a[0]===6&&e.label<s[1]){e.label=s[1];s=a;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(a);break}if(s[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-3639f458.system.js","./p-167b3369.system.js","./p-23e7c655.system.js","./p-2d6557ee.system.js","./p-bc7bf53e.system.js","./p-86034f1e.system.js","./p-41c2b1c5.system.js"],(function(o){"use strict";var t,e,n,i,s,r,a,l,h,d,c;return{setters:[function(o){t=o.r;e=o.c;n=o.h;i=o.H},function(o){s=o.B;r=o.l;a=o.t},function(o){l=o.z},function(o){h=o.c},function(o){d=o.f},function(o){c=o.g},function(){},function(){}],execute:function(){var u=function(o){var t=o.getBoundingClientRect();var e=t.top;var n=window.innerHeight-t.bottom;return e>=n};var f='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n';var g='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n';var m='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var v='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';var p='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var b=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";var w=b;var z=o("zonos_hello_dialog",function(){function o(o){var n=this;t(this,o);this.closeDialog=e(this,"closeDialog",7);this.clickOutsideDialogHandler=function(o){if(!o.composedPath().includes(n.dialogRef)&&n.isOpen){n.setIsOpen(false)}};this.getCurrentPageEnum=function(){switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}};this.setShowCountrySelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showCountrySelect=o;return[2]}))}))};this.setShowLanguageSelect=function(o){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(t){this.showLanguageSelect=o;return[2]}))}))};this.getDutyMessage=function(){var o=r.countryLandedCost;var t=(o===null||o===void 0?void 0:o.dutyDeminimus)?s(o.dutyDeminimus):null;var e=r.selectedCountryCode==="CA"?s(40):t;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("duty free")):a("Duties will apply to all orders")};this.getTaxMessage=function(){var o=r.countryLandedCost;var t=(o===null||o===void 0?void 0:o.vatTaxDeminimus)?s(o.vatTaxDeminimus):null;var e=r.selectedCountryCode==="CA"?s(150):t;return e?"".concat(a("Spend")," ").concat(e," ").concat(a("tax free")):a("Taxes will apply to all orders")};this.getUkDutyTaxMessage=function(o){if(o.allowLowValueOrders){return null}var t=o.dutyDeminimus;return a("Orders to ${countryName} must be over ${threshold} to ship.",{countryName:"United Kingdom",threshold:s(t)})};this.getAustraliaDutyTaxMessage=function(o){return a("${percentage} GST due on any order above ${threshold}.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getNewZealandDutyTaxMessge=function(o){return a("${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.",{percentage:"".concat(o.vatTaxRate*100,"%"),threshold:s(o.vatTaxDeminimus)})};this.getAdditionalDutyTaxMessage=function(){if(!r.countryLandedCost){return null}if(!r.countryLandedCost.hasTaxId){return null}switch(r.countryLandedCost.countryCode){case"GB":return n.getUkDutyTaxMessage(r.countryLandedCost);case"AU":return n.getAustraliaDutyTaxMessage(r.countryLandedCost);case"NZ":return n.getNewZealandDutyTaxMessge(r.countryLandedCost);default:return null}};this.isOpen=false;this.setIsOpen=function(){};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettings=undefined;this.restrictedItems=[];this.welcomeMessage="Welcome to our Demo App!";this.showCountrySelect=false;this.showLanguageSelect=false}o.prototype.globalClickHandler=function(o){this.clickOutsideDialogHandler(o)};o.prototype.isOpenHandler=function(o){if(!o){void this.setShowCountrySelect(false);void this.setShowLanguageSelect(false)}};o.prototype.render=function(){var o=this;var t;var e=r.selectedCountryCode;var s=this.getDutyMessage();var b=this.getTaxMessage();var w=this.getAdditionalDutyTaxMessage();var z=this.animateFromLeftOverride||this.dialogRef&&c(this.dialogRef);var x=this.dialogRef&&u(this.dialogRef);var C=r.customMessages;var y="".concat(a("Welcome to")," ").concat(l.organizationName,"!");var k=((t=C.find((function(o){return o.pageName==="hello_default"})))===null||t===void 0?void 0:t.message)||a("Know about duties and taxes before you buy. Shop with confidence!");var H=d(k);var L=this.getCurrentPageEnum();var V=C.filter((function(o){return o.pageName===L}));return n(i,{key:"ccabd686943b009ed6bb9c0ec64a6a4e7cc917f5",class:"zonos--elements"},n("div",{key:"6bfbae15f5b43413fc76d21b94d0d56a2ce48f4d","aria-hidden":"true",class:h(["zonos--hello-dialog",z&&"zonos--hello-dialog-animate-from-left",x&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:function(t){return t&&(o.dialogRef=t)}},!this.showCountrySelect&&!this.showLanguageSelect&&n("div",null,n("div",{class:"zonos--hello-dialog-content"},n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:p}),noBackground:true,onClick:function(){return o.setIsOpen(false)}}),n("zonos-v-stack",{spacing:24},n("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:e}),n("zonos-v-stack",{class:"zonos--hello-dialog-header",spacing:4},n("zonos-text",{type:"boldSubheader"},y),n("zonos-text",{innerHTML:H,textColor:"gray-800"})),n("zonos-v-stack",{spacing:8},this.restrictedItems.map((function(o){var t;return o&&n("zonos-banner",{bannerTitle:o.name,intent:"error"},(t=o.itemRestrictions)===null||t===void 0?void 0:t.map((function(o){return n("zonos-text",{textColor:"red-800"},o===null||o===void 0?void 0:o.note)})))})),n("zonos-card",{spacing:"12px"},n("zonos-v-stack",{spacing:12},n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Duty de minimis",content:g}),n("zonos-text",null,s)),n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Tax de minimis",content:v}),n("zonos-text",null,b)),w&&n("div",{class:"zonos--flex-message"},n("zonos-icon",{"aria-label":"Low value order shipping restriction",content:f}),n("zonos-text",null,w)))),V.map((function(o){return n("zonos-custom-message",{icon:m,message:o.message})}))))),n("zonos-hello-dialog-footer",{appearanceSettings:this.appearanceSettings,setShowCountrySelect:function(t){return o.setShowCountrySelect(t)},setShowLanguageSelect:function(t){return o.setShowLanguageSelect(t)}})),this.showCountrySelect&&n("div",null,n("zonos-country-select",{handleOnClose:function(){return o.setShowCountrySelect(false)}})),this.showLanguageSelect&&n("div",null,n("zonos-language-select",{handleOnClose:function(){return o.setShowLanguageSelect(false)}}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{isOpen:["isOpenHandler"]}},enumerable:false,configurable:true});return o}());z.style=w}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,e,s){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{c(s.next(t))}catch(t){o(t)}}function r(t){try{c(s["throw"](t))}catch(t){o(t)}}function c(t){t.done?e(t.value):i(t.value).then(a,r)}c((s=s.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,i,o,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(n){return c([t,n])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(s=1,i&&(o=r[0]&2?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;if(i=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;i=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){e.label=r[1];break}if(r[0]===6&&e.label<o[1]){e.label=o[1];o=r;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(r);break}if(o[2])e.ops.pop();e.trys.pop();continue}r=n.call(t,e)}catch(t){r=[6,t];i=0}finally{s=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-dd4f3724.system.js","./p-167b3369.system.js","./p-0bdac452.system.js","./p-23e7c655.system.js","./p-41c2b1c5.system.js","./p-86034f1e.system.js"],(function(t){"use strict";var n,e,s,i,o,a,r,c,h,l,d,u,f,b,v,m,p;return{setters:[function(t){n=t.r;e=t.c;s=t.h;i=t.H;o=t.d},function(t){a=t.j;r=t.d;c=t.l;h=t.t;l=t.n},function(t){d=t.z;u=t.d},function(t){f=t.s;b=t.i},function(t){v=t.c},function(t){m=t.g},function(t){p=t.i}],execute:function(){var z=function(t){var n=/[ʼˮ՚ߴߵ']{1}/u;var e=/[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;var s=Object.entries(t).reduce((function(t,s){var i;var o=s[0],a=s[1];return e.test(a)&&!n.test(a)?Object.assign(Object.assign({},t),(i={},i[o]=true,i)):t}),{});return s};var k=".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)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";var y=k;var g={city:"City",country:"Country",line1:"Address line 1",line2:"Address line 2",name:"Name",postal_code:"Postal code",state:"State"};var w=t("zonos_address",function(){function t(t){n(this,t);this.invalidCharacters=e(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.reportedInvalidCharacters=false;this.invalidCharacterList=null;this.isDirtyAddress=false}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};t.prototype.updateAddressEventData=function(t){var n=t.event,e=t.type;switch(e){case"billing":a.stripeBillingAddressEventData=n;break;default:a.stripeAddressEventData=n;break}var s=this.checkInvalidCharacters(n);this.invalidCharacterList=s;this.invalidCharacters.emit(!!s)};t.prototype.updateAddressElement=function(t){var n=t.stripeAddressElement,e=t.type;if(e==="shipping"){a.stripeAddressElement=n;return}a.stripeBillingAddressElement=n};t.prototype.checkInvalidCharacters=function(t){if(!t.complete||d.checkoutSettings.allowedCharacterSets==="ALL"){return null}var n=t.value,e=n.address,s=n.firstName,i=n.lastName,o=n.name;var a=e.city,r=e.country,c=e.line1,h=e.line2,l=e.postal_code,u=e.state;var b=z({city:a,country:r,line1:c,line2:h||"",name:o||"".concat(s," ").concat(i),postal_code:l,state:u});if(!Object.keys(b).length){return null}if(!this.reportedInvalidCharacters){this.reportedInvalidCharacters=true;void f({endpoint:"NonLatinInput",errors:Object.keys(b).map((function(t){var n;if(t!=="name"){var a=(n=e[t])===null||n===void 0?void 0:n.replace(/[\d\w]+/g,"");return"Invalid character found ".concat(t,': "').concat(a,'"')}var r=o||"".concat(s," ").concat(i);var c=r.replace(/[\d\w]+/g,"");return"Invalid character found ".concat(t,': "').concat(c,'"')})),metadata:{}})}return b};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,s,i,o,a,h,l;var d=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;e=this.getStripeAddressInstance(),s=e.stripeAddressEventData,i=e.stripeElements;if(!this.stripe||!i){r("Stripe is not initialized. Couldn't load stripe element.");return[2]}o=(t=this.defaultAddress)===null||t===void 0?void 0:t.phone;if(!o){(n=this.defaultAddress)===null||n===void 0?true:delete n.phone}a=c.shippingZoneCountries;h=a?Object.values(a).map((function(t){return t.code})):[];l=i.create("address",{allowedCountries:this.type==="shipping"?h:[],contacts:this.defaultAddress&&!s?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:(s===null||s===void 0?void 0:s.value.address.country)||c.selectedCountryCode||"AL"}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});l.mount(this.el.querySelector(".zonos--address-component"));l.on("change",(function(t){var n=t.value;if(!d.isDirtyAddress&&n.address.line1.length>=3){d.isDirtyAddress=true;setTimeout((function(){if(b()){d.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=d.type==="shipping"?100:600;var n=d.el.closest(".zonos--group");var e=d.el.getBoundingClientRect().top+t;n===null||n===void 0?void 0:n.scrollTo({behavior:"smooth",top:e})}}),600)}d.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:d.type,elementType:"address",value:Object.assign(Object.assign({},n),{firstName:n.firstName||n.name.split(" ")[0],lastName:n.lastName||n.name.split(" ")[1]})}),type:d.type})}));this.updateAddressElement({stripeAddressElement:l,type:this.type});return[2]}))}))};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy()};t.prototype.componentDidLoad=function(){var t=this;var n=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!n&&n.value.address.line1.length>0;void this.watchInitStripe();setTimeout((function(){var n=t.getStripeAddressInstance().stripeAddressEventData;if(n){t.checkInvalidCharacters(n)}}),500)};t.prototype.render=function(){return s(i,{key:"b1ad2f6c9c23e6411bf1adccdd34b3aa4f5250b1",class:"zonos--address zonos--elements"},s("zonos-text",{key:"786a733a44925a670393b72bf0ae3db5ba59f9a1",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"b9d58cbc17abf5daf5d13ffdebc7485c3ac6457d",class:"zonos--address-component"}),this.invalidCharacterList&&s("zonos-banner",{bannerTitle:h("Please resolve the following errors:"),intent:"error"},Object.keys(this.invalidCharacterList).map((function(t){return s("zonos-text",null,"- ".concat(h(g[t]),": ").concat(h("only supports Latin characters (A-Z, a-z)")))}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());w.style=y;var x=["blue","cyan","green","orange","purple","red","gray","glass"];var j=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var I=j;var O=t("zonos_checkbox",function(){function t(t){n(this,t);this.checkboxSelected=e(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}t.prototype.render=function(){var t=this;var n=x.includes(this.backgroundColor);var e=n?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var o=n?"var(--amino-".concat(this.backgroundColor,"-200)"):!p(e)?"var(--amino-gray-800)":"var(--amino-gray-0)";var a=m(this.borderStyle,"4px");return s(i,{key:"2ae2a0d33d34aafe96cc91e1cd7c7ee530dede4b",class:v(["zonos--elements zonos--checkbox"]),style:{"--background-color":e,"--border-radius":a,"--font-family":u(),"--size":"".concat(this.size,"px")}},s("label",{key:"b9630027581a9f20374c2dfe88faa94cb50203c9",class:v([this.isDisabled&&"disabled"])},s("input",{key:"d1b2411d9f906692f18514a15df1bb290f662164",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(n){t.checkboxSelected.emit(n.target.checked)},type:"checkbox"}),s("span",{key:"8fc3cda232615f446aff5db71cd992de5327b8e7",class:"checkmark-container"},s("svg",{key:"5b91a7a26abfd80850eb3c2bb2e045ef73abfd7a",class:"checkmark",color:o,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"2046a40a75da63ac288c5def90d82ab0d0e0523c","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&s("zonos-text",{size:this.fontSize},this.label)))};return t}());O.style=I;var _=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var A=_;var S=t("zonos_collapse",function(){function t(t){n(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var n="".concat(this.collapseSize,"px");return this.collapsed?n:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var n,e,s;this.iframe=((n=this.el.shadowRoot)===null||n===void 0?void 0:n.querySelector("iframe"))||null;(s=(e=this.iframe)===null||e===void 0?void 0:e.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return s(i,{key:"032f5818dd8394b5111927907c8fa135a55fef5c",class:"zonos--elements zonos--collapse",style:{"--font-family":u(),height:this.getElementHeight()}},s("div",{key:"5ddbf406c93f37c9e23375f11dd8439934c0d2a5"},s("iframe",{key:"b3efa8bc198918dbb3284e8ce658ffca6249eaa8",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),s("slot",{key:"ffcd123c3a046e62855a650da9972cde94a7774c"})))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());S.style=A;var C=".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 E=C;var L=t("zonos_link_authentication",function(){function t(t){n(this,t);this.titleText=undefined;this.stripe=a.stripe}t.prototype.watchInitStripe=function(){if(!this.stripe||!a.stripeElements){return}var t=a.stripeLinkElement||a.stripeElements.create("linkAuthentication");var n=this.el.querySelector(".zonos--link-authentication-component");if(!n){r("Cannot find container element for linkAuthenticationElement");return}t.mount(n);t.on("change",(function(t){a.stripeLinkEventData=t;void l()}));a.stripeLinkElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return s(i,{key:"a434761e3f237cd44971e458512c7649f214eb4d",class:"zonos--link-authentication zonos--elements"},s("zonos-text",{key:"0c350ff6dabb1c71376e4e6539a68613d7174189",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"e9cc2bd1e68b64e2fed41851a0d2f2be40583337",class:"zonos--link-authentication-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());L.style=E}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,e,s){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,o){function a(t){try{c(s.next(t))}catch(t){o(t)}}function r(t){try{c(s["throw"](t))}catch(t){o(t)}}function c(t){t.done?e(t.value):i(t.value).then(a,r)}c((s=s.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s,i,o,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(t){return function(n){return c([t,n])}}function c(r){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(s=1,i&&(o=r[0]&2?i["return"]:r[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;if(i=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;i=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){e.label=r[1];break}if(r[0]===6&&e.label<o[1]){e.label=o[1];o=r;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(r);break}if(o[2])e.ops.pop();e.trys.pop();continue}r=n.call(t,e)}catch(t){r=[6,t];i=0}finally{s=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-3639f458.system.js","./p-167b3369.system.js","./p-5a464374.system.js","./p-23e7c655.system.js","./p-41c2b1c5.system.js","./p-86034f1e.system.js"],(function(t){"use strict";var n,e,s,i,o,a,r,c,h,l,d,u,f,b,v,m,p;return{setters:[function(t){n=t.r;e=t.c;s=t.h;i=t.H;o=t.d},function(t){a=t.j;r=t.d;c=t.l;h=t.t;l=t.n},function(t){d=t.z;u=t.d},function(t){f=t.s;b=t.i},function(t){v=t.c},function(t){m=t.g},function(t){p=t.i}],execute:function(){var z=function(t){var n=/[ʼˮ՚ߴߵ']{1}/u;var e=/[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;var s=Object.entries(t).reduce((function(t,s){var i;var o=s[0],a=s[1];return e.test(a)&&!n.test(a)?Object.assign(Object.assign({},t),(i={},i[o]=true,i)):t}),{});return s};var k=".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)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";var y=k;var g={city:"City",country:"Country",line1:"Address line 1",line2:"Address line 2",name:"Name",postal_code:"Postal code",state:"State"};var w=t("zonos_address",function(){function t(t){n(this,t);this.invalidCharacters=e(this,"invalidCharacters",7);this.type=undefined;this.titleText=undefined;this.defaultAddress=null;this.stripe=window.Zonos.stripe;this.reportedInvalidCharacters=false;this.invalidCharacterList=null;this.isDirtyAddress=false}t.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:a.stripeBillingAddressElement,stripeAddressEventData:a.stripeBillingAddressEventData,stripeElements:a.stripeElementsForBillingAddress}}return{stripeAddressElement:a.stripeAddressElement,stripeAddressEventData:a.stripeAddressEventData,stripeElements:a.stripeElements}};t.prototype.updateAddressEventData=function(t){var n=t.event,e=t.type;switch(e){case"billing":a.stripeBillingAddressEventData=n;break;default:a.stripeAddressEventData=n;break}var s=this.checkInvalidCharacters(n);this.invalidCharacterList=s;this.invalidCharacters.emit(!!s)};t.prototype.updateAddressElement=function(t){var n=t.stripeAddressElement,e=t.type;if(e==="shipping"){a.stripeAddressElement=n;return}a.stripeBillingAddressElement=n};t.prototype.checkInvalidCharacters=function(t){if(!t.complete||d.checkoutSettings.allowedCharacterSets==="ALL"){return null}var n=t.value,e=n.address,s=n.firstName,i=n.lastName,o=n.name;var a=e.city,r=e.country,c=e.line1,h=e.line2,l=e.postal_code,u=e.state;var b=z({city:a,country:r,line1:c,line2:h||"",name:o||"".concat(s," ").concat(i),postal_code:l,state:u});if(!Object.keys(b).length){return null}if(!this.reportedInvalidCharacters){this.reportedInvalidCharacters=true;void f({endpoint:"NonLatinInput",errors:Object.keys(b).map((function(t){var n;if(t!=="name"){var a=(n=e[t])===null||n===void 0?void 0:n.replace(/[\d\w]+/g,"");return"Invalid character found ".concat(t,': "').concat(a,'"')}var r=o||"".concat(s," ").concat(i);var c=r.replace(/[\d\w]+/g,"");return"Invalid character found ".concat(t,': "').concat(c,'"')})),metadata:{}})}return b};t.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var t,n,e,s,i,o,a,h,l;var d=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;e=this.getStripeAddressInstance(),s=e.stripeAddressEventData,i=e.stripeElements;if(!this.stripe||!i){r("Stripe is not initialized. Couldn't load stripe element.");return[2]}o=(t=this.defaultAddress)===null||t===void 0?void 0:t.phone;if(!o){(n=this.defaultAddress)===null||n===void 0?true:delete n.phone}a=c.shippingZoneCountries;h=a?Object.values(a).map((function(t){return t.code})):[];l=i.create("address",{allowedCountries:this.type==="shipping"?h:[],contacts:this.defaultAddress&&!s?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},s===null||s===void 0?void 0:s.value.address),{country:(s===null||s===void 0?void 0:s.value.address.country)||c.selectedCountryCode||"AL"}),firstName:s===null||s===void 0?void 0:s.value.firstName,lastName:s===null||s===void 0?void 0:s.value.lastName,phone:s===null||s===void 0?void 0:s.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});l.mount(this.el.querySelector(".zonos--address-component"));l.on("change",(function(t){var n=t.value;if(!d.isDirtyAddress&&n.address.line1.length>=3){d.isDirtyAddress=true;setTimeout((function(){if(b()){d.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var t=d.type==="shipping"?100:600;var n=d.el.closest(".zonos--group");var e=d.el.getBoundingClientRect().top+t;n===null||n===void 0?void 0:n.scrollTo({behavior:"smooth",top:e})}}),600)}d.updateAddressEventData({event:Object.assign(Object.assign({},t),{elementMode:d.type,elementType:"address",value:Object.assign(Object.assign({},n),{firstName:n.firstName||n.name.split(" ")[0],lastName:n.lastName||n.name.split(" ")[1]})}),type:d.type})}));this.updateAddressElement({stripeAddressElement:l,type:this.type});return[2]}))}))};t.prototype.disconnectedCallback=function(){var t=this.getStripeAddressInstance().stripeAddressElement;t===null||t===void 0?void 0:t.destroy()};t.prototype.componentDidLoad=function(){var t=this;var n=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!n&&n.value.address.line1.length>0;void this.watchInitStripe();setTimeout((function(){var n=t.getStripeAddressInstance().stripeAddressEventData;if(n){t.checkInvalidCharacters(n)}}),500)};t.prototype.render=function(){return s(i,{key:"b1ad2f6c9c23e6411bf1adccdd34b3aa4f5250b1",class:"zonos--address zonos--elements"},s("zonos-text",{key:"786a733a44925a670393b72bf0ae3db5ba59f9a1",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"b9d58cbc17abf5daf5d13ffdebc7485c3ac6457d",class:"zonos--address-component"}),this.invalidCharacterList&&s("zonos-banner",{bannerTitle:h("Please resolve the following errors:"),intent:"error"},Object.keys(this.invalidCharacterList).map((function(t){return s("zonos-text",null,"- ".concat(h(g[t]),": ").concat(h("only supports Latin characters (A-Z, a-z)")))}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());w.style=y;var x=["blue","cyan","green","orange","purple","red","gray","glass"];var j=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";var I=j;var O=t("zonos_checkbox",function(){function t(t){n(this,t);this.checkboxSelected=e(this,"checkboxSelected",7);this.backgroundColor="blue";this.label=undefined;this.isChecked=false;this.isDisabled=false;this.size=12;this.fontSize="base";this.borderStyle=undefined}t.prototype.render=function(){var t=this;var n=x.includes(this.backgroundColor);var e=n?"var(--amino-".concat(this.backgroundColor,"-600)"):this.backgroundColor;var o=n?"var(--amino-".concat(this.backgroundColor,"-200)"):!p(e)?"var(--amino-gray-800)":"var(--amino-gray-0)";var a=m(this.borderStyle,"4px");return s(i,{key:"2ae2a0d33d34aafe96cc91e1cd7c7ee530dede4b",class:v(["zonos--elements zonos--checkbox"]),style:{"--background-color":e,"--border-radius":a,"--font-family":u(),"--size":"".concat(this.size,"px")}},s("label",{key:"b9630027581a9f20374c2dfe88faa94cb50203c9",class:v([this.isDisabled&&"disabled"])},s("input",{key:"d1b2411d9f906692f18514a15df1bb290f662164",checked:this.isChecked,disabled:this.isDisabled,hidden:true,onChange:function(n){t.checkboxSelected.emit(n.target.checked)},type:"checkbox"}),s("span",{key:"8fc3cda232615f446aff5db71cd992de5327b8e7",class:"checkmark-container"},s("svg",{key:"5b91a7a26abfd80850eb3c2bb2e045ef73abfd7a",class:"checkmark",color:o,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"2046a40a75da63ac288c5def90d82ab0d0e0523c","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&s("zonos-text",{size:this.fontSize},this.label)))};return t}());O.style=I;var _=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var A=_;var S=t("zonos_collapse",function(){function t(t){n(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var n="".concat(this.collapseSize,"px");return this.collapsed?n:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var n,e,s;this.iframe=((n=this.el.shadowRoot)===null||n===void 0?void 0:n.querySelector("iframe"))||null;(s=(e=this.iframe)===null||e===void 0?void 0:e.contentWindow)===null||s===void 0?void 0:s.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return s(i,{key:"032f5818dd8394b5111927907c8fa135a55fef5c",class:"zonos--elements zonos--collapse",style:{"--font-family":u(),height:this.getElementHeight()}},s("div",{key:"5ddbf406c93f37c9e23375f11dd8439934c0d2a5"},s("iframe",{key:"b3efa8bc198918dbb3284e8ce658ffca6249eaa8",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),s("slot",{key:"ffcd123c3a046e62855a650da9972cde94a7774c"})))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());S.style=A;var C=".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 E=C;var L=t("zonos_link_authentication",function(){function t(t){n(this,t);this.titleText=undefined;this.stripe=a.stripe}t.prototype.watchInitStripe=function(){if(!this.stripe||!a.stripeElements){return}var t=a.stripeLinkElement||a.stripeElements.create("linkAuthentication");var n=this.el.querySelector(".zonos--link-authentication-component");if(!n){r("Cannot find container element for linkAuthenticationElement");return}t.mount(n);t.on("change",(function(t){a.stripeLinkEventData=t;void l()}));a.stripeLinkElement=t};t.prototype.componentDidLoad=function(){this.watchInitStripe()};t.prototype.render=function(){return s(i,{key:"a434761e3f237cd44971e458512c7649f214eb4d",class:"zonos--link-authentication zonos--elements"},s("zonos-text",{key:"0c350ff6dabb1c71376e4e6539a68613d7174189",class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{key:"e9cc2bd1e68b64e2fed41851a0d2f2be40583337",class:"zonos--link-authentication-component"}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return t}());L.style=E}}}));
|