@zonos/elements 1.3.10-alpha.2 → 1.3.10
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-cdce5003.js → cart-34d4bf2e.js} +3 -3
- package/dist/cjs/{getBorderRadius-d9a954a3.js → getBorderRadius-d795f526.js} +1 -1
- package/dist/cjs/{index-72767498.js → index-564fe383.js} +12 -3
- package/dist/cjs/{isDarkColor-c01f24df.js → isDarkColor-33fb96a7.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-a0b376ab.js → submitGtag-1f92afd1.js} +8 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-badge_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_9.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification.cjs.entry.js +2 -2
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-2a8612a4.js → zonosStore-d3f0173b.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +6 -2
- package/dist/collection/environment.js +3 -3
- package/dist/collection/scripts/zonosBase.js +4 -4
- package/dist/components/zonos-checkout-finish2.js +6 -2
- package/dist/esm/{cart-6be7e36f.js → cart-8526eb36.js} +3 -3
- package/dist/esm/{getBorderRadius-0d133844.js → getBorderRadius-5d750ab8.js} +1 -1
- package/dist/esm/{index-b5be4dc3.js → index-dd40cc85.js} +12 -3
- package/dist/esm/{isDarkColor-8eeda28e.js → isDarkColor-c34dfed9.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{submitGtag-b1c9af26.js → submitGtag-b1e6731d.js} +8 -4
- package/dist/esm/zonos-address_4.entry.js +5 -5
- package/dist/esm/zonos-badge_2.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card_2.entry.js +5 -5
- package/dist/esm/zonos-cart-items_9.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +6 -6
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_3.entry.js +5 -5
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification.entry.js +2 -2
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-select-dialog-header_2.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/{zonosStore-807f931f.js → zonosStore-aac7c6ac.js} +1 -1
- package/dist/esm-es5/{cart-6be7e36f.js → cart-8526eb36.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-0d133844.js → getBorderRadius-5d750ab8.js} +1 -1
- package/dist/esm-es5/{index-b5be4dc3.js → index-dd40cc85.js} +1 -1
- package/dist/esm-es5/{isDarkColor-8eeda28e.js → isDarkColor-c34dfed9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-b1c9af26.js → submitGtag-b1e6731d.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-807f931f.js → zonosStore-aac7c6ac.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/environment.d.ts +4 -4
- package/dist/zonos-elements/p-07bb1bed.js +2 -0
- package/dist/zonos-elements/{p-58e2f6a1.system.entry.js → p-0b4910fe.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7cb2dfd5.entry.js → p-0e63111b.entry.js} +1 -1
- package/dist/zonos-elements/{p-d427adf2.entry.js → p-144f4d31.entry.js} +1 -1
- package/dist/zonos-elements/{p-6d2ba24a.entry.js → p-188ddbe2.entry.js} +1 -1
- package/dist/zonos-elements/{p-db49edae.system.entry.js → p-1fc444b0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-09c9bf58.system.entry.js → p-22802400.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-314be538.system.entry.js → p-27d57265.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-865900d4.system.entry.js → p-2984aa3d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff64ddc5.entry.js → p-315c1fc2.entry.js} +1 -1
- package/dist/zonos-elements/{p-701d0fef.entry.js → p-333da541.entry.js} +1 -1
- package/dist/zonos-elements/{p-2f84b148.entry.js → p-473943ae.entry.js} +1 -1
- package/dist/zonos-elements/{p-35e878eb.system.entry.js → p-482371fb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cdc6b5f.js → p-49a5be72.js} +1 -1
- package/dist/zonos-elements/{p-166ec0c2.system.entry.js → p-4ad5f307.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f5b75c6b.entry.js → p-4eb24c96.entry.js} +1 -1
- package/dist/zonos-elements/{p-d1ab0823.system.js → p-52de4d70.system.js} +2 -2
- package/dist/zonos-elements/{p-3a406969.system.entry.js → p-5c991faa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f423d46.entry.js → p-5d2dd287.entry.js} +1 -1
- package/dist/zonos-elements/{p-127b480c.entry.js → p-6181f2d5.entry.js} +1 -1
- package/dist/zonos-elements/{p-72390726.entry.js → p-6255bfe6.entry.js} +1 -1
- package/dist/zonos-elements/{p-066c5893.system.js → p-6e81adba.system.js} +1 -1
- package/dist/zonos-elements/{p-50460bf4.system.entry.js → p-770384fa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c476a347.system.js → p-77727098.system.js} +1 -1
- package/dist/zonos-elements/{p-e71fbec9.js → p-77c54b83.js} +1 -1
- package/dist/zonos-elements/{p-121c551d.system.entry.js → p-7e355496.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c284e71c.system.entry.js → p-8d608535.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb5dc3ef.system.js → p-92e88f3d.system.js} +1 -1
- package/dist/zonos-elements/{p-dce14b91.entry.js → p-95cc6b89.entry.js} +1 -1
- package/dist/zonos-elements/{p-af3ff326.system.entry.js → p-9b95b387.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1691b167.entry.js → p-9db3028d.entry.js} +1 -1
- package/dist/zonos-elements/{p-39d75a07.system.js → p-a554d58d.system.js} +1 -1
- package/dist/zonos-elements/{p-96e2cde7.entry.js → p-a578facf.entry.js} +1 -1
- package/dist/zonos-elements/{p-e76069cc.system.entry.js → p-a87803b7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a38876df.system.entry.js → p-aaf75ede.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e67ed67d.entry.js → p-ab7657fa.entry.js} +1 -1
- package/dist/zonos-elements/{p-b05d21ac.entry.js → p-ada42479.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ff1bed8.system.entry.js → p-adc2e8c3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-12e97569.entry.js → p-b0c84054.entry.js} +1 -1
- package/dist/zonos-elements/{p-04fa4dd3.system.entry.js → p-b1a44483.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-95dee6f4.system.js → p-c1e54094.system.js} +1 -1
- package/dist/zonos-elements/{p-e28d648c.system.entry.js → p-c6de2e40.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-321e8b0e.system.entry.js → p-cf03cb54.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-25de098d.entry.js → p-d0d12a64.entry.js} +1 -1
- package/dist/zonos-elements/{p-75490d7c.system.js → p-d9c65636.system.js} +1 -1
- package/dist/zonos-elements/{p-58a25a6a.entry.js → p-dd153a4e.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd25205e.entry.js → p-e12a18d3.entry.js} +1 -1
- package/dist/zonos-elements/p-e4749f19.js +1 -0
- package/dist/zonos-elements/{p-af946fb3.system.entry.js → p-e87e8c9c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-776f07e7.js → p-ed7d1948.js} +1 -1
- package/dist/zonos-elements/{p-55cbb4cd.entry.js → p-f1170e7b.entry.js} +1 -1
- package/dist/zonos-elements/p-f3e497d0.js +1 -0
- package/dist/zonos-elements/{p-c6f186fe.system.entry.js → p-f8e7aea7.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +4 -5
- package/dist/zonos-elements/p-3d4fc5aa.js +0 -1
- package/dist/zonos-elements/p-58127116.js +0 -2
- package/dist/zonos-elements/p-e843a74b.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as i,h as s,H as t}from"./p-
|
|
1
|
+
import{r as o,c as i,h as s,H as t}from"./p-07bb1bed.js";import{d as r,z as e}from"./p-49a5be72.js";import{c as a}from"./p-b4b7f705.js";import{g as n}from"./p-e4749f19.js";import{i as l}from"./p-4c414a92.js";const d=class{constructor(s){o(this,s),this.radioSelected=i(this,"radioSelected",7),this.handleRichRadioSelect=o=>{var i;this.selectedItem=o,null===(i=this.radioSelected)||void 0===i||i.emit(o)},this.getRadioItemStyleVariables=()=>{const o=this.borderColor||e.appearance.colorSecondary,i=l(o)?`var(--amino-${o})`:o;return{"--border-radius":n(this.borderStyle),"--selected-border-color":i||"unset"}},this.items=void 0,this.borderColor=void 0,this.borderStyle=void 0,this.theme=void 0,this.selectedItem=null}render(){var o;return s(t,{key:"0dc36a16b2f51816755010c46b416b8b1f4b4744",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--font-family":r()})},null===(o=this.items)||void 0===o?void 0:o.map((o=>{var i;const t=(null===(i=this.selectedItem)||void 0===i?void 0:i.value)===o.value;return s("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",t&&"selected"]),onClick:()=>this.handleRichRadioSelect(o)},s("input",{checked:t,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:o.value}),s("div",{class:"zonos--shipping-info"},s("div",{class:"zonos--shipping-detail"},s("zonos-text",{class:"zonos--shipping-label",type:"label"},o.label),(o.sublabel||o.caption)&&s("div",{class:"zonos--sub-detail"},o.sublabel&&s("zonos-text",{textColor:"gray-800"},o.sublabel),o.caption&&s("zonos-text",{textColor:"gray-600"},o.caption))),s("zonos-text",{type:"semiBoldLabel"},o.price)))})))}};d.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10));border-bottom-left-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";export{d as zonos_shipping_rich_radio}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as o,l as n,a as t}from"./p-ed7d1948.js";import{z as e}from"./p-49a5be72.js";const s=async(t,s)=>{var a,i;if(window.location.href.includes("zonos.com")||(null===(a=window.Zonos)||void 0===a?void 0:a.zonosQaUrl)||(null===(i=window.Zonos)||void 0===i?void 0:i.debug))return;const d={countryCode:n.selectedCountryCode,eventName:t,metadata:s,organizationId:e.organizationId};await o("https://v1.route.js.zonos.com/api/zonos-elements/track-conversion-event",{body:d,method:"POST"})},a=async({endpoint:n,errors:t,metadata:e})=>{const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,a={endpoint:n,errors:t,metadata:Object.assign({href:window.location.href,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},e)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:a,method:"POST"})},i=o=>{const n=e.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));n&&"DISABLED"!==(null==n?void 0:n.status)&&"function"==typeof window.gtag&&(t("Zonos submits gtag event","log",o),window.gtag("event",o,{}))};export{i as a,a as s,s as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{l(n.next(o))}catch(o){r(o)}}function a(o){try{l(n["throw"](o))}catch(o){r(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-75490d7c.system.js","./p-eb5dc3ef.system.js","./p-23e7c655.system.js","./p-bc7bf53e.system.js","./p-95dee6f4.system.js","./p-c476a347.system.js"],(function(o){"use strict";var e,t,n,i,r,s,a,l,h,d,u,f,c,m,v,g,w,p,z,b,x,y,k;return{setters:[function(o){e=o.r;t=o.h;n=o.H},function(o){i=o._;r=o.e;s=o.i;a=o.f;l=o.z;h=o.m},function(o){d=o.u;u=o.d;f=o.l;c=o.v;m=o.t;v=o.x;g=o.y;w=o.a;p=o.z;z=o.A;b=o.B;x=o.C},function(o){y=o.c},function(o){k=o.g},function(){},function(){}],execute:function(){var _=this;var T=i;var E=function(){return T.Date.now()};var L=E;var j=/\s/;function I(o){var e=o.length;while(e--&&j.test(o.charAt(e))){}return e}var X=I;var O=X;var R=/^\s+/;function D(o){return o?o.slice(0,O(o)+1).replace(R,""):o}var S=D;var C=r,B=s;var H="[object Symbol]";function M(o){return typeof o=="symbol"||B(o)&&C(o)==H}var A=M;var F=S,N=a,P=A;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var W=/^0b[01]+$/i;var G=/^0o[0-7]+$/i;var K=parseInt;function q(o){if(typeof o=="number"){return o}if(P(o)){return $}if(N(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=N(e)?e+"":e}if(typeof o!="string"){return o===0?o:+o}o=F(o);var t=W.test(o);return t||G.test(o)?K(o.slice(2),t?2:8):U.test(o)?$:+o}var J=q;var Q=a,V=L,Y=J;var Z="Expected a function";var oo=Math.max,eo=Math.min;function to(o,e,t){var n,i,r,s,a,l,h=0,d=false,u=false,f=true;if(typeof o!="function"){throw new TypeError(Z)}e=Y(e)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oo(Y(t.maxWait)||0,e):r;f="trailing"in t?!!t.trailing:f}function c(e){var t=n,r=i;n=i=undefined;h=e;s=o.apply(r,t);return s}function m(o){h=o;a=setTimeout(w,e);return d?c(o):s}function v(o){var t=o-l,n=o-h,i=e-t;return u?eo(i,r-n):i}function g(o){var t=o-l,n=o-h;return l===undefined||t>=e||t<0||u&&n>=r}function w(){var o=V();if(g(o)){return p(o)}a=setTimeout(w,v(o))}function p(o){a=undefined;if(f&&n){return c(o)}n=i=undefined;return s}function z(){if(a!==undefined){clearTimeout(a)}h=0;n=l=i=a=undefined}function b(){return a===undefined?s:p(V())}function x(){var o=V(),t=g(o);n=arguments;i=this;l=o;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(w,e);return c(l)}}if(a===undefined){a=setTimeout(w,e)}return s}x.cancel=z;x.flush=b;return x}var no=to;var io=function(o){var e=o.items,t=o.shipFrom,n=o.shipTo;return __awaiter(_,void 0,void 0,(function(){var o,i,r,s,a,l;return __generator(this,(function(h){switch(h.label){case 0:i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");r={items:e,shipFrom:t,shipTo:n};return[4,d(i,{body:r,method:"POST"})];case 1:s=h.sent(),a=s.errors,l=s.json;if(a.length||!l){u("Error fetching item restrictions: ".concat((o=a.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,l.filter(Boolean)]}}))}))};var ro=function(o){return __awaiter(_,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=f.selectedCountryCode;if(!e){u("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,io({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var so=function(){var o=window.location.href;var e=l.helloSettings,t=e.cartUrlPattern,n=e.homepageUrlPattern,i=e.productDetailUrlPattern,r=e.productListUrlPattern;if(t&&new RegExp(t).test(o)){return"cart"}if(i&&new RegExp(i).test(o)){return"productDetail"}if(r&&new RegExp(r).test(o)){return"productList"}if(n&&new RegExp(n).test(o)){return"home"}return""};var ao=function(){var o,e;var t=l.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){u("Hello Could not check item restrictions - must provide title and description selectors.")}var a=r&&c(r)&&document.querySelectorAll(r)||[];var h=i&&c(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){u("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var f=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&f.length!==h.length){u('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var m=[];for(var v=0;v<a.length;v++){var g=a[v];var w=h[v];var p=f[v];if(g&&w){var z={cartButtonNode:p||null,description:((o=w.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=g.textContent)===null||e===void 0?void 0:e.trim())||""};m.push(z)}}return m};var lo=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";var ho=lo;var uo=3e3;var fo=500;var co=o("zonos_hello",function(){function o(o){var t=this;e(this,o);this.getHelloPeekMessage=function(o){var e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(e&&t.allRestrictedItems.length){var n=m("click to learn more");var i=l.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(i," - ").concat(n)}switch(l.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return"".concat(m("Welcome to")," ").concat(o)}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(!e||l.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,ro(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(l.organizationName);var o=l.helloSettings,e=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(e==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var o=t.allRestrictedItems.some((function(o){return t.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){t.showPeekMessage=false}),uo)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(o){var e,n;var i=t.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(e=o.cartButtonNode)===null||e===void 0?void 0:e.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=ao();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=no((function(){var o=l.helloSettings.productTitleElementSelector;if(o){var e=ao();if(t.allFoundProducts.length!==e.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o=new MutationObserver(t.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var o=new MutationObserver((function(){return void t.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var o=t.initialUrl&&new URL(t.initialUrl);var e=o&&v(o.searchParams);if(e!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;l.currentHelloPage=so();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){g(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){t.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&o==="relative"){var e=k(t.helloRef);return e}};this.isShippableCountry=function(o){if(o===void 0){o=true}if(!f.localizationLoaded){return false}if(!f.isShippableCountry){if(o){w("Hello: not shippable country")}return false}return true};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=l.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[]}o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(l.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(!f.exchangeRate){u("Could not display currency. Exchange rate and format data is not available.");return[2]}p();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,z(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,b(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,x(o)]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){no(this.render.bind(this),fo)};o.prototype.render=function(){var o=this;var e,i;var r=(e=l.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return new RegExp(o).test(window.location.href)}));if(r){w("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode;var a=this.mobileLocationOverride||l.helloSettings.mobileLocation;var d=window.innerWidth<768;var u=this.animateFromLeftOverride||d&&a.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var c=a.includes("TOP");var m=h(l.appearance,this.appearanceSettingsOverride);var v=m.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(l.organizationName);var p=this.isShippableCountry()&&!!s;return t(n,{class:"zonos--hello zonos--elements","data-theme":v},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:y(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:y(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};return o}());co.style=ho}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{l(n.next(o))}catch(o){r(o)}}function a(o){try{l(n["throw"](o))}catch(o){r(o)}}function l(o){o.done?t(o.value):i(o.value).then(s,a)}l((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(o){return function(e){return l([o,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;i=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(o){a=[6,o];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-52de4d70.system.js","./p-d9c65636.system.js","./p-92e88f3d.system.js","./p-23e7c655.system.js","./p-bc7bf53e.system.js","./p-c1e54094.system.js","./p-77727098.system.js"],(function(o){"use strict";var e,t,n,i,r,s,a,l,h,d,u,f,c,m,v,g,w,p,z,b,x,y,k;return{setters:[function(o){e=o.r;t=o.h;n=o.H},function(o){i=o._;r=o.e;s=o.i;a=o.f;l=o.z;h=o.m},function(o){d=o.u;u=o.d;f=o.l;c=o.v;m=o.t;v=o.x;g=o.y;w=o.a;p=o.z;z=o.A;b=o.B;x=o.C},function(o){y=o.c},function(o){k=o.g},function(){},function(){}],execute:function(){var _=this;var T=i;var E=function(){return T.Date.now()};var L=E;var j=/\s/;function I(o){var e=o.length;while(e--&&j.test(o.charAt(e))){}return e}var X=I;var O=X;var R=/^\s+/;function D(o){return o?o.slice(0,O(o)+1).replace(R,""):o}var S=D;var C=r,B=s;var H="[object Symbol]";function M(o){return typeof o=="symbol"||B(o)&&C(o)==H}var A=M;var F=S,N=a,P=A;var $=0/0;var U=/^[-+]0x[0-9a-f]+$/i;var W=/^0b[01]+$/i;var G=/^0o[0-7]+$/i;var K=parseInt;function q(o){if(typeof o=="number"){return o}if(P(o)){return $}if(N(o)){var e=typeof o.valueOf=="function"?o.valueOf():o;o=N(e)?e+"":e}if(typeof o!="string"){return o===0?o:+o}o=F(o);var t=W.test(o);return t||G.test(o)?K(o.slice(2),t?2:8):U.test(o)?$:+o}var J=q;var Q=a,V=L,Y=J;var Z="Expected a function";var oo=Math.max,eo=Math.min;function to(o,e,t){var n,i,r,s,a,l,h=0,d=false,u=false,f=true;if(typeof o!="function"){throw new TypeError(Z)}e=Y(e)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;r=u?oo(Y(t.maxWait)||0,e):r;f="trailing"in t?!!t.trailing:f}function c(e){var t=n,r=i;n=i=undefined;h=e;s=o.apply(r,t);return s}function m(o){h=o;a=setTimeout(w,e);return d?c(o):s}function v(o){var t=o-l,n=o-h,i=e-t;return u?eo(i,r-n):i}function g(o){var t=o-l,n=o-h;return l===undefined||t>=e||t<0||u&&n>=r}function w(){var o=V();if(g(o)){return p(o)}a=setTimeout(w,v(o))}function p(o){a=undefined;if(f&&n){return c(o)}n=i=undefined;return s}function z(){if(a!==undefined){clearTimeout(a)}h=0;n=l=i=a=undefined}function b(){return a===undefined?s:p(V())}function x(){var o=V(),t=g(o);n=arguments;i=this;l=o;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(w,e);return c(l)}}if(a===undefined){a=setTimeout(w,e)}return s}x.cancel=z;x.flush=b;return x}var no=to;var io=function(o){var e=o.items,t=o.shipFrom,n=o.shipTo;return __awaiter(_,void 0,void 0,(function(){var o,i,r,s,a,l;return __generator(this,(function(h){switch(h.label){case 0:i="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/check-item-restrictions");r={items:e,shipFrom:t,shipTo:n};return[4,d(i,{body:r,method:"POST"})];case 1:s=h.sent(),a=s.errors,l=s.json;if(a.length||!l){u("Error fetching item restrictions: ".concat((o=a.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,l.filter(Boolean)]}}))}))};var ro=function(o){return __awaiter(_,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=f.selectedCountryCode;if(!e){u("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,io({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var so=function(){var o=window.location.href;var e=l.helloSettings,t=e.cartUrlPattern,n=e.homepageUrlPattern,i=e.productDetailUrlPattern,r=e.productListUrlPattern;if(t&&new RegExp(t).test(o)){return"cart"}if(i&&new RegExp(i).test(o)){return"productDetail"}if(r&&new RegExp(r).test(o)){return"productList"}if(n&&new RegExp(n).test(o)){return"home"}return""};var ao=function(){var o,e;var t=l.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){u("Hello Could not check item restrictions - must provide title and description selectors.")}var a=r&&c(r)&&document.querySelectorAll(r)||[];var h=i&&c(i)&&document.querySelectorAll(i)||[];if(a.length!==h.length){u("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var f=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&f.length!==h.length){u('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var m=[];for(var v=0;v<a.length;v++){var g=a[v];var w=h[v];var p=f[v];if(g&&w){var z={cartButtonNode:p||null,description:((o=w.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=g.textContent)===null||e===void 0?void 0:e.trim())||""};m.push(z)}}return m};var lo=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";var ho=lo;var uo=3e3;var fo=500;var co=o("zonos_hello",function(){function o(o){var t=this;e(this,o);this.getHelloPeekMessage=function(o){var e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(e&&t.allRestrictedItems.length){var n=m("click to learn more");var i=l.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(i," - ").concat(n)}switch(l.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return"".concat(m("Welcome to")," ").concat(o)}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(t,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(!e||l.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,ro(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(l.organizationName);var o=l.helloSettings,e=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(e==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var o=t.allRestrictedItems.some((function(o){return t.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){t.showPeekMessage=false}),uo)}}),i)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(o){var e,n;var i=t.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(e=o.cartButtonNode)===null||e===void 0?void 0:e.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=ao();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=no((function(){var o=l.helloSettings.productTitleElementSelector;if(o){var e=ao();if(t.allFoundProducts.length!==e.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o=new MutationObserver(t.handleProductCountChange);o.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var o=new MutationObserver((function(){return void t.displayCurrency()}));o.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var o=t.initialUrl&&new URL(t.initialUrl);var e=o&&v(o.searchParams);if(e!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;l.currentHelloPage=so();var n=new URL(window.location.href);var i=v(n.searchParams);if(!i){g(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){t.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&o==="relative"){var e=k(t.helloRef);return e}};this.isShippableCountry=function(o){if(o===void 0){o=true}if(!f.localizationLoaded){return false}if(!f.isShippableCountry){if(o){w("Hello: not shippable country")}return false}return true};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=l.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[]}o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(l.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(!f.exchangeRate){u("Could not display currency. Exchange rate and format data is not available.");return[2]}p();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,z(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,b(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,x(o)]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){no(this.render.bind(this),fo)};o.prototype.render=function(){var o=this;var e,i;var r=(e=l.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return new RegExp(o).test(window.location.href)}));if(r){w("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode;var a=this.mobileLocationOverride||l.helloSettings.mobileLocation;var d=window.innerWidth<768;var u=this.animateFromLeftOverride||d&&a.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var c=a.includes("TOP");var m=h(l.appearance,this.appearanceSettingsOverride);var v=m.theme;var g=(i=this.allRestrictedItems)===null||i===void 0?void 0:i.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(l.organizationName);var p=this.isShippableCountry()&&!!s;return t(n,{class:"zonos--hello zonos--elements","data-theme":v},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:y(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",u&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",c&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)}},t("zonos-text",{class:"zonos--hello-message"},this.peekMessage),s&&t("div",{class:"zonos--hello-country-flag-wrapper"},t("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:s}))),t("div",{class:y(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},t("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:g,setIsOpen:this.changeShowDialog}))))};return o}());co.style=ho}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-07bb1bed.js";export{s as setNonce}from"./p-07bb1bed.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-95cc6b89",[[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],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["p-5d2dd287",[[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"]]]]],["p-e12a18d3",[[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-315c1fc2",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-6181f2d5",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-188ddbe2",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-dd153a4e",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-473943ae",[[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-333da541",[[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-ab7657fa",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-f1170e7b",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["p-d0d12a64",[[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-6255bfe6",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-9db3028d",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-144f4d31",[[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-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}]]],["p-a578facf",[[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}],[1,"zonos-v-stack",{spacing:[2]}]]],["p-4eb24c96",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-card",{actions:[16],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-0e63111b",[[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-b0c84054",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],hasInvalidCharacters:[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-ada42479",[[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",{showDialog:[32]},[[4,"click","handleGlobalClick"]]],[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],disabled:[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"],footerRightAction:[16],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-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}]]]],e))));
|
|
@@ -115,7 +115,7 @@ DOMTokenList
|
|
|
115
115
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
116
116
|
var start = function() {
|
|
117
117
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
118
|
-
var url = new URL('./p-
|
|
118
|
+
var url = new URL('./p-6e81adba.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
119
119
|
System.import(url.href);
|
|
120
120
|
};
|
|
121
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zonos/elements",
|
|
3
|
-
"version": "1.3.10
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"description": "Zonos component UI for Stripe elements",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"version:save": "pnpm ts-node build-utils/saveVersions.ts"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@stencil/core": "^4.12.
|
|
66
|
+
"@stencil/core": "^4.12.6",
|
|
67
67
|
"@types/styled-components": "^5.1.34",
|
|
68
68
|
"fuse.js": "^6.6.2",
|
|
69
69
|
"lodash": "^4.17.21",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
88
88
|
"@stencil-community/eslint-plugin": "^0.7.1",
|
|
89
89
|
"@stencil/sass": "^3.0.9",
|
|
90
|
-
"@stencil/store": "^2.0.
|
|
90
|
+
"@stencil/store": "^2.0.14",
|
|
91
91
|
"@storybook/addon-essentials": "^7.6.13",
|
|
92
92
|
"@storybook/addon-interactions": "^7.6.13",
|
|
93
93
|
"@storybook/addon-links": "^7.6.13",
|
|
@@ -152,8 +152,7 @@
|
|
|
152
152
|
},
|
|
153
153
|
"pnpm": {
|
|
154
154
|
"patchedDependencies": {
|
|
155
|
-
"graphql@16.8.1": "patches/graphql@16.8.1.patch"
|
|
156
|
-
"@stencil/store@2.0.13": "patches/@stencil__store@2.0.13.patch"
|
|
155
|
+
"graphql@16.8.1": "patches/graphql@16.8.1.patch"
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as p}from"./p-9cdc6b5f.js";const o=(o,s="10px")=>o?"SHARP"===o?"0px":s:"SHARP"===p.appearance.style?"0px":s;export{o as g}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e,n,t=!1,l=!1,o=null,s=!1;const i=e=>{const n=new URL(e,ve.t);return n.origin!==fe.location.origin?n.href:n.pathname},r="slot-fb{display:contents}slot-fb[hidden]{display:none}",c={},u=e=>"object"==(e=typeof e)||"function"===e;function a(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const f=(e,n,...t)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!u(l))&&(l+=""),s&&i?r[r.length-1].l+=l:r.push(s?d(null,l):l),i=s)};if(c(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,r,p);const a=d(e,null);return a.o=n,r.length>0&&(a.i=r),a.u=o,a},d=(e,n)=>({v:0,p:e,l:n,h:null,i:null,o:null,u:null}),v={},p={forEach:(e,n)=>e.map(y).forEach(n),map:(e,n)=>e.map(y).map(n).map(h)},y=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.m,vtag:e.p,vtext:e.l}),h=e=>{if("function"==typeof e.vtag){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),f(e.vtag,n,...e.vchildren||[])}const n=d(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.m=e.vname,n},m=e=>le(e).$hostElement$,b=(e,n,t)=>{const l=m(e);return{emit:e=>$(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},$=(e,n,t)=>{const l=ve.ce(n,t);return e.dispatchEvent(l),l},w=new WeakMap,g=e=>"sc-"+e.$,j=(e,n,t,l,o,s)=>{if(t!==l){let i=ie(e,n),r=n.toLowerCase();if("class"===n){const n=e.classList,o=O(t),s=O(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(i||"o"!==n[0]||"n"!==n[1]){const r=u(l);if((i||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?i=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!i||4&s||o)&&!r&&e.setAttribute(n,l=!0===l?"":l)}else if(n="-"===n[2]?n.slice(3):ie(fe,r)?r.slice(2):r[2]+n.slice(3),t||l){const o=n.endsWith(k);n=n.replace(C,""),t&&ve.rel(e,n,t,o),l&&ve.ael(e,n,l,o)}}},S=/\s/,O=e=>e?e.split(S):[],k="Capture",C=RegExp(k+"$"),M=(e,n,t,l)=>{const o=11===n.h.nodeType&&n.h.host?n.h.host:n.h,s=e&&e.o||c,i=n.o||c;for(l in s)l in i||j(o,l,s[l],void 0,t,n.v);for(l in i)j(o,l,s[l],i[l],t,n.v)},x=(t,o,s)=>{const i=o.i[s];let r,c,u=0;if(null!==i.l)r=i.h=de.createTextNode(i.l);else{if(l||(l="svg"===i.p),r=i.h=de.createElementNS(l?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.p),l&&"foreignObject"===i.p&&(l=!1),M(null,i,l),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),i.i)for(u=0;u<i.i.length;++u)c=x(t,i,u),c&&r.appendChild(c);"svg"===i.p?l=!1:"foreignObject"===r.tagName&&(l=!0)}return r["s-hn"]=n,r},P=(e,t,l,o,s,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=x(null,l,s),r&&(o[s].h=r,c.insertBefore(r,t)))},E=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.h;A(n),e&&e.remove()}}},L=(e,n,t=!1)=>e.p===n.p&&(!!t||e.u===n.u),R=(e,n,o=!1)=>{const s=n.h=e.h,i=e.i,r=n.i,c=n.p,u=n.l;null===u?(l="svg"===c||"foreignObject"!==c&&l,("slot"!==c||t)&&M(e,n,l),null!==i&&null!==r?((e,n,t,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=n.length-1,d=n[0],v=n[f],p=l.length-1,y=l[0],h=l[p];for(;r<=f&&c<=p;)if(null==d)d=n[++r];else if(null==v)v=n[--f];else if(null==y)y=l[++c];else if(null==h)h=l[--p];else if(L(d,y,o))R(d,y,o),d=n[++r],y=l[++c];else if(L(v,h,o))R(v,h,o),v=n[--f],h=l[--p];else if(L(d,h,o))R(d,h,o),e.insertBefore(d.h,v.h.nextSibling),d=n[++r],h=l[--p];else if(L(v,y,o))R(v,y,o),e.insertBefore(v.h,d.h),v=n[--f],y=l[++c];else{for(u=-1,a=r;a<=f;++a)if(n[a]&&null!==n[a].u&&n[a].u===y.u){u=a;break}u>=0?(i=n[u],i.p!==y.p?s=x(n&&n[c],t,u):(R(i,y,o),n[u]=void 0,s=i.h),y=l[++c]):(s=x(n&&n[c],t,c),y=l[++c]),s&&d.h.parentNode.insertBefore(s,d.h)}r>f?P(e,null==l[p+1]?null:l[p+1].h,t,l,c,p):c>p&&E(n,r,f)})(s,i,n,r,o):null!==r?(null!==e.l&&(s.textContent=""),P(s,null,n,r,0,r.length-1)):null!==i&&E(i,0,i.length-1),l&&"svg"===c&&(l=!1)):e.l!==u&&(s.data=u)},A=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(A)},F=(e,n)=>{n&&!e.j&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.j=n)))},N=(e,n)=>{if(e.v|=16,!(4&e.v))return F(e,e.S),je((()=>T(e,n)));e.v|=512},T=(e,n)=>{const t=e.O;let l;return n&&(e.v|=256,e.k&&(e.k.map((([e,n])=>B(t,e,n))),e.k=void 0),l=B(t,"componentWillLoad")),U(l,(()=>D(e,t,n)))},U=(e,n)=>W(e)?e.then(n):n(),W=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,D=async(e,n,t)=>{var l;const o=e.$hostElement$,s=o["s-rc"];t&&(e=>{const n=e.C,t=e.$hostElement$,l=n.v,o=((e,n)=>{var t;const l=g(n),o=ae.get(l);if(e=11===e.nodeType?e:de,o)if("string"==typeof o){let s,i=w.get(e=e.head||e);if(i||w.set(e,i=new Set),!i.has(l)){{s=de.createElement("style"),s.innerHTML=o;const n=null!==(t=ve.M)&&void 0!==t?t:a(de);null!=n&&s.setAttribute("nonce",n),e.insertBefore(s,e.querySelector("link"))}4&n.v&&(s.innerHTML+=r),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"),2&l&&t.classList.add(o+"-s"))})(e);H(e,n,o,t),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const n=null!==(l=o["s-p"])&&void 0!==l?l:[],t=()=>z(e);0===n.length?t():(Promise.all(n).then(t),e.v|=4,n.length=0)}},H=(l,s,i,r)=>{try{o=s,s=s.render(),l.v&=-17,l.v|=2,((l,o,s=!1)=>{const i=l.$hostElement$,r=l.C,c=l.P||d(null,null),u=(e=>e&&e.p===v)(o)?o:f(null,null,o);if(n=i.tagName,s&&u.o)for(const e of Object.keys(u.o))i.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(u.o[e]=i[e]);u.p=null,u.v|=4,l.P=u,u.h=c.h=i.shadowRoot||i,e=i["s-sc"],t=0!=(1&r.v),R(c,u,s)})(l,s,r)}catch(e){re(e,l.$hostElement$)}return o=null,null},q=()=>o,z=e=>{const n=e.$hostElement$,t=e.O,l=e.S;B(t,"componentDidRender"),64&e.v||(e.v|=64,G(n),B(t,"componentDidLoad"),e.L(n),l||_()),e.R(n),e.j&&(e.j(),e.j=void 0),512&e.v&&ge((()=>N(e,!1))),e.v&=-517},V=e=>{{const n=le(e),t=n.$hostElement$.isConnected;return t&&2==(18&n.v)&&N(n,!1),t}},_=()=>{G(de.documentElement),ge((()=>$(fe,"appload",{detail:{namespace:"zonos-elements"}})))},B=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){re(e)}},G=e=>e.classList.add("hydrated"),I=(e,n,t)=>{var l;const o=e.prototype;if(n.A){e.watchers&&(n.F=e.watchers);const s=Object.entries(n.A);if(s.map((([e,[l]])=>{31&l||2&t&&32&l?Object.defineProperty(o,e,{get(){return((e,n)=>le(this).N.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=le(e),s=o.$hostElement$,i=o.N.get(n),r=o.v,c=o.O;if(t=((e,n)=>null==e||u(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.A[n][0]),(!(8&r)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(o.N.set(n,t),c)){if(l.F&&128&r){const e=l.F[n];e&&e.map((e=>{try{c[e](t,i,n)}catch(e){re(e,s)}}))}2==(18&r)&&N(o,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&l&&Object.defineProperty(o,e,{value(...n){var t;const l=le(this);return null===(t=null==l?void 0:l.T)||void 0===t?void 0:t.then((()=>{var t;return null===(t=l.O)||void 0===t?void 0:t[e](...n)}))}})})),1&t){const t=new Map;o.attributeChangedCallback=function(e,l,s){ve.jmp((()=>{var i;const r=t.get(e);if(this.hasOwnProperty(r))s=this[r],delete this[r];else{if(o.hasOwnProperty(r)&&"number"==typeof this[r]&&this[r]==s)return;if(null==r){const t=le(this),o=null==t?void 0:t.v;if(o&&!(8&o)&&128&o&&s!==l){const o=t.O,r=null===(i=n.F)||void 0===i?void 0:i[e];null==r||r.forEach((n=>{null!=o[n]&&o[n].call(o,s,l,e)}))}return}}this[r]=(null!==s||"boolean"!=typeof this[r])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=n.F)&&void 0!==l?l:{}),...s.filter((([e,n])=>15&n[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},J=e=>{B(e,"disconnectedCallback")},K=(e,n={})=>{var t;const l=[],o=n.exclude||[],s=fe.customElements,i=de.head,c=i.querySelector("meta[charset]"),u=de.createElement("style"),f=[];let d,v=!0;Object.assign(ve,n),ve.t=new URL(n.resourcesUrl||"./",de.baseURI).href;let p=!1;if(e.map((e=>{e[1].map((n=>{var t;const i={v:n[0],$:n[1],A:n[2],U:n[3]};4&i.v&&(p=!0),i.A=n[2],i.U=n[3],i.F=null!==(t=n[4])&&void 0!==t?t:{};const r=i.$,c=class extends HTMLElement{constructor(e){super(e),se(e=this,i),1&i.v&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),v?f.push(this):ve.jmp((()=>(e=>{if(0==(1&ve.v)){const n=le(e),t=n.C,l=()=>{};if(1&n.v)X(e,n,t.U),(null==n?void 0:n.O)||(null==n?void 0:n.W)&&n.W.then((()=>{}));else{n.v|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){F(n,n.S=t);break}}t.A&&Object.entries(t.A).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t)=>{let l;if(0==(32&n.v)){n.v|=32;{if(l=ue(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(t.F=l.watchers,I(l,t,2),l.isProxied=!0);const e=()=>{};n.v|=8;try{new l(n)}catch(e){re(e)}n.v&=-9,n.v|=128,e()}if(l.style){let e=l.style;const n=g(t);if(!ae.has(n)){const l=()=>{};((e,n,t)=>{let l=ae.get(e);ye&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,ae.set(e,l)})(n,e,!!(1&t.v)),l()}}}const o=n.S,s=()=>N(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(0,n,t)}l()}})(this)))}disconnectedCallback(){ve.jmp((()=>(async()=>{if(0==(1&ve.v)){const e=le(this);e.D&&(e.D.map((e=>e())),e.D=void 0),(null==e?void 0:e.O)?J(e.O):(null==e?void 0:e.W)&&e.W.then((()=>J(e.O)))}})()))}componentOnReady(){return le(this).W}};i.H=e[0],o.includes(r)||s.get(r)||(l.push(r),s.define(r,I(c,i,1)))}))})),l.length>0&&(p&&(u.innerHTML+=r),u.innerHTML+=l+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const e=null!==(t=ve.M)&&void 0!==t?t:a(de);null!=e&&u.setAttribute("nonce",e),i.insertBefore(u,c?c.nextSibling:i.firstChild)}v=!1,f.length?f.map((e=>e.connectedCallback())):ve.jmp((()=>d=setTimeout(_,30)))},Q=(e,n)=>n,X=(e,n,t)=>{t&&t.map((([t,l,o])=>{const s=Z(e,t),i=Y(n,o),r=ee(t);ve.ael(s,l,i,r),(n.D=n.D||[]).push((()=>ve.rel(s,l,i,r)))}))},Y=(e,n)=>t=>{try{256&e.v?e.O[n](t):(e.k=e.k||[]).push([n,t])}catch(e){re(e)}},Z=(e,n)=>4&n?de:8&n?fe:16&n?de.body:e,ee=e=>({passive:0!=(1&e),capture:0!=(2&e)}),ne=e=>ve.M=e,te=new WeakMap,le=e=>te.get(e),oe=(e,n)=>te.set(n.O=e,n),se=(e,n)=>{const t={v:0,$hostElement$:e,C:n,N:new Map};return t.T=new Promise((e=>t.R=e)),t.W=new Promise((e=>t.L=e)),e["s-p"]=[],e["s-rc"]=[],X(e,t,n.U),te.set(e,t)},ie=(e,n)=>n in e,re=(e,n)=>(0,console.error)(e,n),ce=new Map,ue=e=>{const n=e.$.replace(/-/g,"_"),t=e.H,l=ce.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(ce.set(t,e),e[n])),re)
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ae=new Map,fe="undefined"!=typeof window?window:{},de=fe.document||{head:{}},ve={v:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},pe=e=>Promise.resolve(e),ye=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),he=[],me=[],be=(e,n)=>t=>{e.push(t),s||(s=!0,n&&4&ve.v?ge(we):ve.raf(we))},$e=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){re(e)}e.length=0},we=()=>{$e(he),$e(me),(s=he.length>0)&&ve.raf(we)},ge=e=>pe().then(e),je=be(me,!0);export{Q as F,v as H,i as a,K as b,b as c,m as d,V as f,q as g,f as h,pe as p,oe as r,ne as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as o,l as n,a as t}from"./p-776f07e7.js";import{z as e}from"./p-9cdc6b5f.js";const s=async(t,s)=>{var a,i;if(window.location.href.includes("zonos.com")||(null===(a=window.Zonos)||void 0===a?void 0:a.zonosQaUrl)||(null===(i=window.Zonos)||void 0===i?void 0:i.debug))return;const d={countryCode:n.selectedCountryCode,eventName:t,metadata:s,organizationId:e.organizationId};await o("https://v1.route.js.zonos.com/api/zonos-elements/track-conversion-event",{body:d,method:"POST"})},a=async({endpoint:n,errors:t,metadata:e})=>{const s={endpoint:n,errors:t,metadata:Object.assign({href:window.location.href,userAgent:"userAgentData"in window.navigator?window.navigator.userAgentData:window.navigator.userAgent},e)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:s,method:"POST"})},i=o=>{const n=e.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));n&&"DISABLED"!==(null==n?void 0:n.status)&&"function"==typeof window.gtag&&(t("Zonos submits gtag event","log",o),window.gtag("event",o,{}))};export{i as a,a as s,s as t}
|