@zonos/elements 1.3.48 → 1.3.50
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-3e8bc2af.js → cart-688d674d.js} +38 -6
- package/dist/cjs/{createCustomEvent-88a5a894.js → createCustomEvent-01bacaea.js} +2 -2
- package/dist/cjs/{getBorderRadius-4413e191.js → getBorderRadius-a6a3b35e.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-4eb96a1e.js → isDarkColor-7a056d05.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-540886f1.js → paypal-ce1516ba.js} +3 -3
- package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +28 -15
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +58 -15
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-56401fdb.js → zonosStore-67139f0e.js} +5 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +53 -103
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +55 -11
- package/dist/collection/components/main/zonos-controller.js +12 -4
- package/dist/collection/components/store/zonosStore.js +5 -0
- package/dist/collection/components/utils/handleFetch.js +2 -2
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +7 -1
- package/dist/collection/components/utils/hello/currencyConversion/numberFormat.js +27 -0
- package/dist/collection/components/utils/hello/initHello.js +14 -9
- package/dist/collection/environment.js +6 -2
- package/dist/collection/types/generated/graphql.customer.types.js +20 -0
- package/dist/esm/{cart-e76844eb.js → cart-4f300fcb.js} +38 -6
- package/dist/esm/{createCustomEvent-c38df09e.js → createCustomEvent-c5ed9070.js} +2 -2
- package/dist/esm/{getBorderRadius-3ba98361.js → getBorderRadius-23398fc6.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-3119e351.js → isDarkColor-c927f77d.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-3565fdd5.js → paypal-70caf283.js} +3 -3
- package/dist/esm/zonos-address_8.entry.js +4 -4
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +2 -2
- package/dist/esm/zonos-cart-items_12.entry.js +6 -6
- package/dist/esm/zonos-checkout.entry.js +6 -6
- package/dist/esm/zonos-controller.entry.js +28 -15
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_4.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +58 -15
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-8fc9ceb2.js → zonosStore-473f4654.js} +5 -0
- package/dist/esm-es5/{cart-e76844eb.js → cart-4f300fcb.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-c38df09e.js → createCustomEvent-c5ed9070.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-3ba98361.js → getBorderRadius-23398fc6.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-3119e351.js → isDarkColor-c927f77d.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-3565fdd5.js → paypal-70caf283.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.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_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.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/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-8fc9ceb2.js → zonosStore-473f4654.js} +1 -1
- package/dist/scripts/index.d.ts +82 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +9 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/numberFormat.d.ts +13 -0
- package/dist/types/components/utils/hello/initHello.d.ts +6 -2
- package/dist/types/components/utils/logging/sendErrorLog.d.ts +1 -1
- package/dist/types/environment.d.ts +3 -1
- package/dist/types/scripts/_zonosBase.d.ts +77 -3
- package/dist/types/types/generated/graphql.customer.types.d.ts +27 -3
- package/dist/types/types/generated/graphql.customer.types.ts +38 -3
- package/dist/types/types/generated/graphql.frontend.types.d.ts +14 -14
- package/dist/types/types/generated/graphql.frontend.types.ts +12 -12
- package/dist/types/types/hello/HelloConfig.d.ts +3 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-debbb058.entry.js → p-00f219bd.entry.js} +1 -1
- package/dist/zonos-elements/p-05dff37f.js +1 -0
- package/dist/zonos-elements/{p-1d1a0e05.js → p-124e3426.js} +1 -1
- package/dist/zonos-elements/p-1719bedd.entry.js +1 -0
- package/dist/zonos-elements/{p-e8f7fb29.system.entry.js → p-1c72e53f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1f2db2ff.entry.js +1 -0
- package/dist/zonos-elements/{p-8befc549.js → p-2018969a.js} +1 -1
- package/dist/zonos-elements/{p-38542341.system.entry.js → p-22e8d4ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6ac72711.js → p-23a84835.js} +1 -1
- package/dist/zonos-elements/p-27f2e8af.system.entry.js +1 -0
- package/dist/zonos-elements/{p-40c21634.system.js → p-29814fd7.system.js} +1 -1
- package/dist/zonos-elements/{p-e28ffd2c.system.js → p-31905b60.system.js} +1 -1
- package/dist/zonos-elements/{p-5d18f3ae.system.entry.js → p-322600aa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-40d52dd6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9ffaf4ae.entry.js → p-4452dddc.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bb0b7d2.system.entry.js → p-47c72c50.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b9ec9675.entry.js → p-480a6094.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7cd5a89.entry.js → p-4849604d.entry.js} +1 -1
- package/dist/zonos-elements/{p-717028a2.system.entry.js → p-4b59ada6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e07bf9ea.entry.js → p-54f66cd1.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b183187.entry.js → p-595d406e.entry.js} +1 -1
- package/dist/zonos-elements/{p-52947dab.system.entry.js → p-5a59ed7f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b3400abd.system.entry.js → p-5beccdce.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9220f63d.entry.js → p-5f7f51bd.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a319774.entry.js → p-6013e370.entry.js} +1 -1
- package/dist/zonos-elements/{p-7889b70d.system.js → p-6ab615e6.system.js} +1 -1
- package/dist/zonos-elements/{p-9420f9db.entry.js → p-6dcef5ce.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7301a88.entry.js → p-70bb4a25.entry.js} +1 -1
- package/dist/zonos-elements/{p-14067782.system.entry.js → p-7ef2737b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6ffaa37.system.js → p-81540fd6.system.js} +1 -1
- package/dist/zonos-elements/{p-61e14008.entry.js → p-89b1f4a5.entry.js} +1 -1
- package/dist/zonos-elements/{p-9eadd9a7.system.entry.js → p-89d8c1ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a691a6ee.system.entry.js → p-8af4a9e7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8e8defdc.system.js +1 -0
- package/dist/zonos-elements/{p-dc368ad5.entry.js → p-8e9dcaa3.entry.js} +1 -1
- package/dist/zonos-elements/{p-04054425.js → p-9dd6b00d.js} +1 -1
- package/dist/zonos-elements/{p-4f454a91.system.entry.js → p-a3547b34.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d1f13c2.entry.js → p-a4309beb.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b55838d.entry.js → p-a67578ae.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-6ced2b64.system.js → p-ceb8b836.system.js} +2 -2
- package/dist/zonos-elements/{p-8b01aafb.entry.js → p-cf9a46e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-6de9dc99.system.entry.js → p-d1cd0a5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7bb4368.system.entry.js → p-d709ad28.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ae12eb52.system.entry.js → p-e7e73693.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e97793ce.system.js +1 -0
- package/dist/zonos-elements/{p-706d2bad.entry.js → p-eb3520e7.entry.js} +1 -1
- package/dist/zonos-elements/{p-40f33928.system.entry.js → p-ec31cd17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0229282c.system.entry.js → p-ecd6a58a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f05f3e27.js +1 -0
- package/dist/zonos-elements/{p-c4bb2949.system.entry.js → p-f3811c4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bc46fdc1.entry.js → p-fe198a6c.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-225231a5.entry.js +0 -1
- package/dist/zonos-elements/p-2fecf308.system.entry.js +0 -1
- package/dist/zonos-elements/p-52fb6876.js +0 -1
- package/dist/zonos-elements/p-539974db.system.js +0 -1
- package/dist/zonos-elements/p-67bc8798.system.entry.js +0 -1
- package/dist/zonos-elements/p-842564b4.js +0 -1
- package/dist/zonos-elements/p-8809964a.system.js +0 -1
- package/dist/zonos-elements/p-f652d433.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-fd061229.system.js","./p-
|
|
1
|
+
System.register(["./p-fd061229.system.js","./p-8e8defdc.system.js","./p-23e7c655.system.js","./p-e97793ce.system.js"],(function(o){"use strict";var t,e,s,n,a,l,i,r;return{setters:[function(o){t=o.r;e=o.c;s=o.h;n=o.H;a=o.d},function(o){l=o.d},function(o){i=o.c},function(o){r=o.g}],execute:function(){var d=':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{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var h=d;var p=o("zonos_input",function(){function o(o){t(this,o);this.inputChange=e(this,"inputChange",7);this.inputValue="";this.inputLabel=undefined;this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return s(n,{key:"66ab3a9ec4ac4f78e448008824471cecd4775e78",class:i(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--border-radius":r(),"--font-family":l()}},s("div",{key:"cef0295dea117c8bf0b8f3dc090f7c34648b9b31",class:i(["zonos--label-wrapper",this.isDisabled&&"disabled"])},s("input",{key:"a5c9e0791292046e9520bf8d186f6dc76a23ba64",class:i(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),s("label",{key:"25f51d372fdb0819fe316bcbfce429d63ded358f",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}());p.style=h}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o,H as t}from"./p-5b7da777.js";import{N as s,t as a,l as n}from"./p-
|
|
1
|
+
import{r as e,h as o,H as t}from"./p-5b7da777.js";import{N as s,t as a,l as n}from"./p-2018969a.js";import{d as l}from"./p-9dd6b00d.js";import{l as i}from"./p-97aceb11.js";import"./p-eaa335e1.js";import"./p-23a84835.js";import"./p-f05f3e27.js";const c=class{constructor(o){e(this,o),this.languageSelected=e=>{s(e),this.handleOnClose()},this.handleOnClose=()=>{}}render(){const{selectedLocale:e}=n;return o(t,{key:"448f89b5870956b6e9455968134b94c9409a983d",class:"zonos--elements",style:{"--font-family":l()}},o("div",{key:"23841aa801d68da4b537cfaab5ea89405ec66a9f",class:"zonos--language-select"},o("zonos-select-dialog-header",{key:"5fc1b45aa0cb27c94163c2dace5ce4ad63215dfc",handleOnClose:()=>this.handleOnClose(),label:a("Select a language")}),o("div",{key:"7030fb276a05eea0e7333add3219b5316495662c",class:"zonos--language-select-content"},i.map((t=>o("button",{class:"zonos--language-select-button",onClick:()=>this.languageSelected(t.code)},o("zonos-text",{textColor:"gray-800"},t.translatedLabel),t.code===e&&o("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:16})))))))}};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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";const d=class{constructor(o){e(this,o),this.handleOnClose=()=>{},this.label=""}render(){return o(t,{key:"8ac4e1bcd64f6a2073e1161fec76c9b117345ada",class:"zonos--elements",style:{"--font-family":l()}},o("zonos-v-stack",{key:"fe4a184a8bed7aceb4c3f8d341fed50380587c77",class:"zonos--select-dialog-header-wrapper",spacing:8},o("div",{key:"2176069a11ba20c7408ef898044f2ba68eea4a80",class:"zonos--select-dialog-header"},o("zonos-text",{key:"45b9d890484881a15c4fa7a7e4028f9887cc942e",type:"boldLabel"},this.label),o("zonos-button",{key:"65f0d9ea7b6dee35d23aa6fca19fd686190b667f",class:"zonos--close-button",icon:o("zonos-icon",{"aria-label":"Close select 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>',size:20}),noBackground:!0,onClick:()=>this.handleOnClose()})),o("slot",{key:"758fce95d668ad755745687d3fcf1a6a307061bc"})))}};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 .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";export{c as zonos_language_select,d as zonos_select_dialog_header}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-5b7da777.js";export{s as setNonce}from"./p-5b7da777.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-
|
|
1
|
+
import{p as e,b as o}from"./p-5b7da777.js";export{s as setNonce}from"./p-5b7da777.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-4452dddc",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-1719bedd",[[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],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-1f2db2ff",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-6de38759",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-25633055",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-70bb4a25",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-5f7f51bd",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-595d406e",[[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-cf9a46e8",[[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-6013e370",[[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-a4309beb",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-8e9dcaa3",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-89b1f4a5",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-6dcef5ce",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-a67578ae",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-eb3520e7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-54f66cd1",[[17,"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"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-fe198a6c",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-4849604d",[[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]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-480a6094",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[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"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-00f219bd",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[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],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[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]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as n,H as e}from"./p-5b7da777.js";import{x as i,z as s,k as r,A as a,e as c,a as l}from"./p-8befc549.js";import{z as d,b as h,d as u}from"./p-04054425.js";import{a as m,l as p}from"./p-eaa335e1.js";import"./p-6ac72711.js";import"./p-52fb6876.js";const f=o=>{const t=document.querySelector(o);if(!document.querySelector("zonos-hello")&&t){const o=document.createElement("zonos-hello");return t.appendChild(o),!0}return!1},w=async o=>{const{anchorElementSelector:t}=o,n=(({position:o="bottom-right"})=>{const t=".zonos--hello-mobile-wrapper";if(document.querySelector(t))return t;const n=document.createElement("div");return n.className="zonos--hello-mobile-wrapper",n.style.position="fixed","top-right"===o&&(n.style.top="72px",n.style.right="24px"),"top-left"===o&&(n.style.top="72px",n.style.left="24px"),"bottom-right"===o&&(n.style.bottom="72px",n.style.right="24px"),"bottom-left"===o&&(n.style.bottom="72px",n.style.left="24px"),n.style.zIndex="2147483007",document.body.appendChild(n),t})({position:"bottom-right"}),e=t||n;if(e&&s(e)){if(p("Hello init complete"),!f(e)){const o=new MutationObserver((()=>{f(e)&&o.disconnect()}));o.observe(document.body,{childList:!0,subtree:!0}),setTimeout((()=>{o.disconnect(),f(n)}),1e3)}}else m(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`)},y=class{constructor(n){o(this,n),this.paypalInitEvent=t(this,"paypalInitEvent",7),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(r.stripe=o,(t=d.checkoutSettings).placeOrderButtonSelector&&(s(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():m(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),p("init checkout element")):p("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||u();if("Inter"===e){if(!o)return;p("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:o})}const s=new URLSearchParams;s.set("family",e);const{errors:r,json:a}=await i(`/api/zonos-elements/get-font-detail?${s.toString()}`);r.length>0||!a?p(`Failed to load font ${e}`,"warn"):(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,a.fontUrl),o&&(p(`[FONT] ${o} font override applied`),d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:o})))}handleLocationChange(){w(d.helloSettings)}initHistoryListener(){const o=history.pushState;history.pushState=function(){return window.dispatchEvent(new window.Event("pushstate")),window.dispatchEvent(new window.Event("locationchange")),o.apply(this,arguments)};const t=history.replaceState;history.replaceState=function(){return window.dispatchEvent(new window.Event("replacestate")),window.dispatchEvent(new window.Event("locationchange")),t.apply(this,arguments)}}async componentWillLoad(){this.initHistoryListener(),d.zonosApiKey=this.zonosApiKey,(async()=>{var o,t;const{errors:n,json:e,zonosMode:s}=await(async()=>{const{errors:o,json:t,zonosMode:n}=await i("/api/zonos-elements/zonos-settings");return o.length?(m("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings"),{errors:o,json:null,zonosMode:n}):{errors:[],json:t,zonosMode:n}})();if("403"===(null===(o=n[0])||void 0===o?void 0:o.type.toString()))return void p("Failed to load zonos settings. This domain may not have access","warn");this.initZonosNotification();const r=Object.assign(Object.assign({},this.config),{checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:void 0}):void 0});h({overrideSettings:r,zonosSettings:e}),d.zonosMode=s,this.setupGoogleFont(),d.helloSettings&&w(d.helloSettings),await a();const c=(null===(t=null==e?void 0:e.checkoutSettings)||void 0===t?void 0:t.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(c&&this.stripeInitEvent)return"INACTIVE"===d.checkoutSettings.subscriptionStatus?(p('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void p("zonos controller loaded")):"DISABLED"===d.checkoutSettings.visibilityStatus?(p("=== Checkout is disabled by store owner ===","warn"),void p("zonos controller loaded")):void this.stripeInitEvent.emit({publishableKey:c.token});p("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):p("Failed to show notification - zonos-notification not found","warn")}async reset(){c.checkoutSessionId=null,r.clientSecret=null}async overrideConfig(o){h({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){p(`Override country code to ${o}`),l(o)}async getAppearanceSetting(){return d.appearance}async updateOrganizationName(o){d.organizationName=o}render(){return n(e,{key:"b8a056dc3bbd14495e048a89a11f27a6fb3fdb10",class:"zonos--elements"})}};y.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";export{y as zonos_controller}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,e,i){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{a(i.next(t))}catch(t){r(t)}}function s(t){try{a(i["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):o(t.value).then(u,s)}a((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;o=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];o=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-f6ffaa37.system.js","./p-539974db.system.js","./p-63db40b9.system.js","./p-40c21634.system.js","./p-8809964a.system.js"],(function(t){"use strict";var n,e,i,o,r,u,s,a,c,f,d,h,l,v,w;return{setters:[function(t){n=t.r;e=t.c;i=t.h;o=t.H},function(t){r=t.x;u=t.z;s=t.k;a=t.A;c=t.e;f=t.a},function(t){d=t.z;h=t.b;l=t.d},function(t){v=t.a;w=t.l},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,e,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,r("/api/zonos-elements/zonos-settings")];case 1:t=o.sent(),n=t.errors,e=t.json,i=t.zonosMode;if(n.length){v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:n,json:null,zonosMode:i}]}return[2,{errors:[],json:e,zonosMode:i}]}}))}))};var p=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var b=function(t){if(!t.placeOrderButtonSelector){return}if(!u(t.placeOrderButtonSelector)){v('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}p()};var g=function(t){var n=document.querySelector(t);var e=document.querySelector("zonos-hello");if(!e&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var y=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var o=document.querySelector(i);if(o){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return i};var z=function(t){return __awaiter(m,void 0,void 0,(function(){var n,e,i,o,r;return __generator(this,(function(s){n=t.anchorElementSelector;e=y({position:"bottom-right"});i=n||e;if(!i||!u(i)){v('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}w("Hello init complete");o=g(i);if(!o){r=new MutationObserver((function(){var t=g(i);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect();g(e)}),1e3)}return[2]}))}))};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{visibility:hidden;opacity:0;height:0}";var k=j;var I=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=e(this,"paypalInitEvent",7);this.stripeInitEvent=e(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){w("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}s.stripe=t;void b(d.checkoutSettings);w("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,u,s,a,c;return __generator(this,(function(f){switch(f.label){case 0:i=t||l();if(i==="Inter"){if(!t){return[2]}w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t})}o=new URLSearchParams;o.set("family",i);return[4,r("/api/zonos-elements/get-font-detail?".concat(o.toString()))];case 1:u=f.sent(),s=u.errors,a=u.json;if(s.length>0||!a){w("Failed to load font ".concat(i),"warn");return[2]}c=a.fontUrl;(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,c);if(!t){return[2]}w("[FONT] ".concat(t," font override applied"));d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void z(d.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();d.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,i,o,r,u,s;return __generator(this,(function(c){switch(c.label){case 0:return[4,_()];case 1:e=c.sent(),i=e.errors,o=e.json,r=e.zonosMode;if(((t=i[0])===null||t===void 0?void 0:t.type.toString())==="403"){w("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();u=Object.assign(Object.assign({},this.config),{checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:undefined}):undefined});h({overrideSettings:u,zonosSettings:o});d.zonosMode=r;void this.setupGoogleFont();if(d.helloSettings){void z(d.helloSettings)}return[4,a()];case 2:c.sent();s=((n=o===null||o===void 0?void 0:o.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!s||!this.stripeInitEvent){w("Checkout failed to load -- missing publishable key","warn");return[2]}if(d.checkoutSettings.subscriptionStatus==="INACTIVE"){w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");w("zonos controller loaded");return[2]}if(d.checkoutSettings.visibilityStatus==="DISABLED"){w("=== Checkout is disabled by store owner ===","warn");w("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:s.token});return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){w("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){c.checkoutSessionId=null;s.clientSecret=null;return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){h({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){w("Override country code to ".concat(t));void f(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,d.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d.organizationName=t;return[2]}))}))};t.prototype.render=function(){return i(o,{key:"b8a056dc3bbd14495e048a89a11f27a6fb3fdb10",class:"zonos--elements"})};return t}());I.style=k}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as o}from"./p-04054425.js";const p=p=>{const n=(null==p?void 0:p.customRoundRadius)||"10px",r=null==p?void 0:p.overrideBorderStyle;return r?"SHARP"===r?"0px":n:"SHARP"===o.appearance.style?"0px":n};export{p as g}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(r,n,e){if(e||arguments.length===2)for(var t=0,a=n.length,i;t<a;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return r.concat(i||Array.prototype.slice.call(n))};System.register(["./p-fd061229.system.js"],(function(r){"use strict";var n,e;return{setters:[function(r){n=r.g;e=r.f}],execute:function(){var t=function(r,n,e){var t=r.get(n);if(!t){r.set(n,[e])}else if(!t.includes(e)){t.push(e)}};var a=function(r,n){var e;return function(){var t=[];for(var a=0;a<arguments.length;a++){t[a]=arguments[a]}if(e){clearTimeout(e)}e=setTimeout((function(){e=0;r.apply(void 0,t)}),n)}};var i=function(r){return!("isConnected"in r)||r.isConnected};var u=a((function(r){for(var n=0,e=r.keys();n<e.length;n++){var t=e[n];r.set(t,r.get(t).filter(i))}}),2e3);var v=function(){if(typeof n!=="function"){return{}}var r=new Map;return{dispose:function(){return r.clear()},get:function(e){var a=n();if(a){t(r,e,a)}},set:function(n){var t=r.get(n);if(t){r.set(n,t.filter(e))}u(r)},reset:function(){r.forEach((function(r){return r.forEach(e)}));u(r)}}};var o=function(r){return typeof r==="function"?r():r};var f=function(r,n){if(n===void 0){n=function(r,n){return r!==n}}var e=o(r);var t=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var a={dispose:[],get:[],set:[],reset:[]};var i=function(){var n;t=new Map(Object.entries((n=o(r))!==null&&n!==void 0?n:{}));a.reset.forEach((function(r){return r()}))};var u=function(){a.dispose.forEach((function(r){return r()}));i()};var v=function(r){a.get.forEach((function(n){return n(r)}));return t.get(r)};var f=function(r,e){var i=t.get(r);if(n(e,i,r)){t.set(r,e);a.set.forEach((function(n){return n(r,e,i)}))}};var l=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(r,n){return v(n)},ownKeys:function(r){return Array.from(t.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(r,n){return t.has(n)},set:function(r,n,e){f(n,e);return true}});var s=function(r,n){a[r].push(n);return function(){c(a[r],n)}};var d=function(n,e){var t=s("set",(function(r,t){if(r===n){e(t)}}));var a=s("reset",(function(){return e(o(r)[n])}));return function(){t();a()}};var h=function(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var e=r.reduce((function(r,n){if(n.set){r.push(s("set",n.set))}if(n.get){r.push(s("get",n.get))}if(n.reset){r.push(s("reset",n.reset))}if(n.dispose){r.push(s("dispose",n.dispose))}return r}),[]);return function(){return e.forEach((function(r){return r()}))}};var b=function(r){var n=t.get(r);a.set.forEach((function(e){return e(r,n,n)}))};return{state:l,get:v,set:f,on:s,onChange:d,use:h,dispose:u,reset:i,forceUpdate:b}};var c=function(r,n){var e=r.indexOf(n);if(e>=0){r[e]=r[r.length-1];r.length--}};var l=r("c",(function(r,n){var e=f(r,n);e.use(v());return e}));var s=r("a",typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{});function d(){this.__data__=[];this.size=0}var h=d;function b(r,n){return r===n||r!==r&&n!==n}var y=b;var p=y;function j(r,n){var e=r.length;while(e--){if(p(r[e][0],n)){return e}}return-1}var A=j;var w=A;var g=Array.prototype;var m=g.splice;function O(r){var n=this.__data__,e=w(n,r);if(e<0){return false}var t=n.length-1;if(e==t){n.pop()}else{m.call(n,e,1)}--this.size;return true}var _=O;var S=A;function E(r){var n=this.__data__,e=S(n,r);return e<0?undefined:n[e][1]}var D=E;var T=A;function I(r){return T(this.__data__,r)>-1}var B=I;var C=A;function L(r,n){var e=this.__data__,t=C(e,r);if(t<0){++this.size;e.push([r,n])}else{e[t][1]=n}return this}var P=L;var U=h,M=_,x=D,F=B,N=P;function R(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}R.prototype.clear=U;R.prototype["delete"]=M;R.prototype.get=x;R.prototype.has=F;R.prototype.set=N;var z=R;var k=z;function $(){this.__data__=new k;this.size=0}var G=$;function H(r){var n=this.__data__,e=n["delete"](r);this.size=n.size;return e}var K=H;function V(r){return this.__data__.get(r)}var Y=V;function W(r){return this.__data__.has(r)}var q=W;var J=typeof s=="object"&&s&&s.Object===Object&&s;var Q=J;var X=Q;var Z=typeof self=="object"&&self&&self.Object===Object&&self;var rr=X||Z||Function("return this")();var nr=r("_",rr);var er=nr;var tr=er.Symbol;var ar=tr;var ir=ar;var ur=Object.prototype;var vr=ur.hasOwnProperty;var or=ur.toString;var fr=ir?ir.toStringTag:undefined;function cr(r){var n=vr.call(r,fr),e=r[fr];try{r[fr]=undefined;var t=true}catch(r){}var a=or.call(r);if(t){if(n){r[fr]=e}else{delete r[fr]}}return a}var lr=cr;var sr=Object.prototype;var dr=sr.toString;function hr(r){return dr.call(r)}var br=hr;var yr=ar,pr=lr,jr=br;var Ar="[object Null]",wr="[object Undefined]";var gr=yr?yr.toStringTag:undefined;function mr(r){if(r==null){return r===undefined?wr:Ar}return gr&&gr in Object(r)?pr(r):jr(r)}var Or=r("e",mr);function _r(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}var Sr=r("f",_r);var Er=Or,Dr=Sr;var Tr="[object AsyncFunction]",Ir="[object Function]",Br="[object GeneratorFunction]",Cr="[object Proxy]";function Lr(r){if(!Dr(r)){return false}var n=Er(r);return n==Ir||n==Br||n==Tr||n==Cr}var Pr=Lr;var Ur=nr;var Mr=Ur["__core-js_shared__"];var xr=Mr;var Fr=xr;var Nr=function(){var r=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Rr(r){return!!Nr&&Nr in r}var zr=Rr;var kr=Function.prototype;var $r=kr.toString;function Gr(r){if(r!=null){try{return $r.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var Hr=Gr;var Kr=Pr,Vr=zr,Yr=Sr,Wr=Hr;var qr=/[\\^$.*+?()[\]{}|]/g;var Jr=/^\[object .+?Constructor\]$/;var Qr=Function.prototype,Xr=Object.prototype;var Zr=Qr.toString;var rn=Xr.hasOwnProperty;var nn=RegExp("^"+Zr.call(rn).replace(qr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function en(r){if(!Yr(r)||Vr(r)){return false}var n=Kr(r)?nn:Jr;return n.test(Wr(r))}var tn=en;function an(r,n){return r==null?undefined:r[n]}var un=an;var vn=tn,on=un;function fn(r,n){var e=on(r,n);return vn(e)?e:undefined}var cn=fn;var ln=cn,sn=nr;var dn=ln(sn,"Map");var hn=dn;var bn=cn;var yn=bn(Object,"create");var pn=yn;var jn=pn;function An(){this.__data__=jn?jn(null):{};this.size=0}var wn=An;function gn(r){var n=this.has(r)&&delete this.__data__[r];this.size-=n?1:0;return n}var mn=gn;var On=pn;var _n="__lodash_hash_undefined__";var Sn=Object.prototype;var En=Sn.hasOwnProperty;function Dn(r){var n=this.__data__;if(On){var e=n[r];return e===_n?undefined:e}return En.call(n,r)?n[r]:undefined}var Tn=Dn;var In=pn;var Bn=Object.prototype;var Cn=Bn.hasOwnProperty;function Ln(r){var n=this.__data__;return In?n[r]!==undefined:Cn.call(n,r)}var Pn=Ln;var Un=pn;var Mn="__lodash_hash_undefined__";function xn(r,n){var e=this.__data__;this.size+=this.has(r)?0:1;e[r]=Un&&n===undefined?Mn:n;return this}var Fn=xn;var Nn=wn,Rn=mn,zn=Tn,kn=Pn,$n=Fn;function Gn(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}Gn.prototype.clear=Nn;Gn.prototype["delete"]=Rn;Gn.prototype.get=zn;Gn.prototype.has=kn;Gn.prototype.set=$n;var Hn=Gn;var Kn=Hn,Vn=z,Yn=hn;function Wn(){this.size=0;this.__data__={hash:new Kn,map:new(Yn||Vn),string:new Kn}}var qn=Wn;function Jn(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}var Qn=Jn;var Xn=Qn;function Zn(r,n){var e=r.__data__;return Xn(n)?e[typeof n=="string"?"string":"hash"]:e.map}var re=Zn;var ne=re;function ee(r){var n=ne(this,r)["delete"](r);this.size-=n?1:0;return n}var te=ee;var ae=re;function ie(r){return ae(this,r).get(r)}var ue=ie;var ve=re;function oe(r){return ve(this,r).has(r)}var fe=oe;var ce=re;function le(r,n){var e=ce(this,r),t=e.size;e.set(r,n);this.size+=e.size==t?0:1;return this}var se=le;var de=qn,he=te,be=ue,ye=fe,pe=se;function je(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}je.prototype.clear=de;je.prototype["delete"]=he;je.prototype.get=be;je.prototype.has=ye;je.prototype.set=pe;var Ae=je;var we=z,ge=hn,me=Ae;var Oe=200;function _e(r,n){var e=this.__data__;if(e instanceof we){var t=e.__data__;if(!ge||t.length<Oe-1){t.push([r,n]);this.size=++e.size;return this}e=this.__data__=new me(t)}e.set(r,n);this.size=e.size;return this}var Se=_e;var Ee=z,De=G,Te=K,Ie=Y,Be=q,Ce=Se;function Le(r){var n=this.__data__=new Ee(r);this.size=n.size}Le.prototype.clear=De;Le.prototype["delete"]=Te;Le.prototype.get=Ie;Le.prototype.has=Be;Le.prototype.set=Ce;var Pe=Le;var Ue=cn;var Me=function(){try{var r=Ue(Object,"defineProperty");r({},"",{});return r}catch(r){}}();var xe=Me;var Fe=xe;function Ne(r,n,e){if(n=="__proto__"&&Fe){Fe(r,n,{configurable:true,enumerable:true,value:e,writable:true})}else{r[n]=e}}var Re=Ne;var ze=Re,ke=y;function $e(r,n,e){if(e!==undefined&&!ke(r[n],e)||e===undefined&&!(n in r)){ze(r,n,e)}}var Ge=$e;function He(r){return function(n,e,t){var a=-1,i=Object(n),u=t(n),v=u.length;while(v--){var o=u[r?v:++a];if(e(i[o],o,i)===false){break}}return n}}var Ke=He;var Ve=Ke;var Ye=Ve();var We=Ye;var qe={exports:{}};(function(r,n){var e=nr;var t=n&&!n.nodeType&&n;var a=t&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===t;var u=i?e.Buffer:undefined,v=u?u.allocUnsafe:undefined;function o(r,n){if(n){return r.slice()}var e=r.length,t=v?v(e):new r.constructor(e);r.copy(t);return t}r.exports=o})(qe,qe.exports);var Je=nr;var Qe=Je.Uint8Array;var Xe=Qe;var Ze=Xe;function rt(r){var n=new r.constructor(r.byteLength);new Ze(n).set(new Ze(r));return n}var nt=rt;var et=nt;function tt(r,n){var e=n?et(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var at=tt;function it(r,n){var e=-1,t=r.length;n||(n=Array(t));while(++e<t){n[e]=r[e]}return n}var ut=it;var vt=Sr;var ot=Object.create;var ft=function(){function r(){}return function(n){if(!vt(n)){return{}}if(ot){return ot(n)}r.prototype=n;var e=new r;r.prototype=undefined;return e}}();var ct=ft;function lt(r,n){return function(e){return r(n(e))}}var st=lt;var dt=st;var ht=dt(Object.getPrototypeOf,Object);var bt=ht;var yt=Object.prototype;function pt(r){var n=r&&r.constructor,e=typeof n=="function"&&n.prototype||yt;return r===e}var jt=pt;var At=ct,wt=bt,gt=jt;function mt(r){return typeof r.constructor=="function"&&!gt(r)?At(wt(r)):{}}var Ot=mt;function _t(r){return r!=null&&typeof r=="object"}var St=r("i",_t);var Et=Or,Dt=St;var Tt="[object Arguments]";function It(r){return Dt(r)&&Et(r)==Tt}var Bt=It;var Ct=Bt,Lt=St;var Pt=Object.prototype;var Ut=Pt.hasOwnProperty;var Mt=Pt.propertyIsEnumerable;var xt=Ct(function(){return arguments}())?Ct:function(r){return Lt(r)&&Ut.call(r,"callee")&&!Mt.call(r,"callee")};var Ft=xt;var Nt=Array.isArray;var Rt=Nt;var zt=9007199254740991;function kt(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=zt}var $t=kt;var Gt=Pr,Ht=$t;function Kt(r){return r!=null&&Ht(r.length)&&!Gt(r)}var Vt=Kt;var Yt=Vt,Wt=St;function qt(r){return Wt(r)&&Yt(r)}var Jt=qt;var Qt={exports:{}};function Xt(){return false}var Zt=Xt;(function(r,n){var e=nr,t=Zt;var a=n&&!n.nodeType&&n;var i=a&&"object"=="object"&&r&&!r.nodeType&&r;var u=i&&i.exports===a;var v=u?e.Buffer:undefined;var o=v?v.isBuffer:undefined;var f=o||t;r.exports=f})(Qt,Qt.exports);var ra=Or,na=bt,ea=St;var ta="[object Object]";var aa=Function.prototype,ia=Object.prototype;var ua=aa.toString;var va=ia.hasOwnProperty;var oa=ua.call(Object);function fa(r){if(!ea(r)||ra(r)!=ta){return false}var n=na(r);if(n===null){return true}var e=va.call(n,"constructor")&&n.constructor;return typeof e=="function"&&e instanceof e&&ua.call(e)==oa}var ca=fa;var la=Or,sa=$t,da=St;var ha="[object Arguments]",ba="[object Array]",ya="[object Boolean]",pa="[object Date]",ja="[object Error]",Aa="[object Function]",wa="[object Map]",ga="[object Number]",ma="[object Object]",Oa="[object RegExp]",_a="[object Set]",Sa="[object String]",Ea="[object WeakMap]";var Da="[object ArrayBuffer]",Ta="[object DataView]",Ia="[object Float32Array]",Ba="[object Float64Array]",Ca="[object Int8Array]",La="[object Int16Array]",Pa="[object Int32Array]",Ua="[object Uint8Array]",Ma="[object Uint8ClampedArray]",xa="[object Uint16Array]",Fa="[object Uint32Array]";var Na={};Na[Ia]=Na[Ba]=Na[Ca]=Na[La]=Na[Pa]=Na[Ua]=Na[Ma]=Na[xa]=Na[Fa]=true;Na[ha]=Na[ba]=Na[Da]=Na[ya]=Na[Ta]=Na[pa]=Na[ja]=Na[Aa]=Na[wa]=Na[ga]=Na[ma]=Na[Oa]=Na[_a]=Na[Sa]=Na[Ea]=false;function Ra(r){return da(r)&&sa(r.length)&&!!Na[la(r)]}var za=Ra;function ka(r){return function(n){return r(n)}}var $a=ka;var Ga={exports:{}};(function(r,n){var e=Q;var t=n&&!n.nodeType&&n;var a=t&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===t;var u=i&&e.process;var v=function(){try{var r=a&&a.require&&a.require("util").types;if(r){return r}return u&&u.binding&&u.binding("util")}catch(r){}}();r.exports=v})(Ga,Ga.exports);var Ha=za,Ka=$a,Va=Ga.exports;var Ya=Va&&Va.isTypedArray;var Wa=Ya?Ka(Ya):Ha;var qa=Wa;function Ja(r,n){if(n==="constructor"&&typeof r[n]==="function"){return}if(n=="__proto__"){return}return r[n]}var Qa=Ja;var Xa=Re,Za=y;var ri=Object.prototype;var ni=ri.hasOwnProperty;function ei(r,n,e){var t=r[n];if(!(ni.call(r,n)&&Za(t,e))||e===undefined&&!(n in r)){Xa(r,n,e)}}var ti=ei;var ai=ti,ii=Re;function ui(r,n,e,t){var a=!e;e||(e={});var i=-1,u=n.length;while(++i<u){var v=n[i];var o=t?t(e[v],r[v],v,e,r):undefined;if(o===undefined){o=r[v]}if(a){ii(e,v,o)}else{ai(e,v,o)}}return e}var vi=ui;function oi(r,n){var e=-1,t=Array(r);while(++e<r){t[e]=n(e)}return t}var fi=oi;var ci=9007199254740991;var li=/^(?:0|[1-9]\d*)$/;function si(r,n){var e=typeof r;n=n==null?ci:n;return!!n&&(e=="number"||e!="symbol"&&li.test(r))&&(r>-1&&r%1==0&&r<n)}var di=si;var hi=fi,bi=Ft,yi=Rt,pi=Qt.exports,ji=di,Ai=qa;var wi=Object.prototype;var gi=wi.hasOwnProperty;function mi(r,n){var e=yi(r),t=!e&&bi(r),a=!e&&!t&&pi(r),i=!e&&!t&&!a&&Ai(r),u=e||t||a||i,v=u?hi(r.length,String):[],o=v.length;for(var f in r){if((n||gi.call(r,f))&&!(u&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ji(f,o)))){v.push(f)}}return v}var Oi=mi;function _i(r){var n=[];if(r!=null){for(var e in Object(r)){n.push(e)}}return n}var Si=_i;var Ei=Sr,Di=jt,Ti=Si;var Ii=Object.prototype;var Bi=Ii.hasOwnProperty;function Ci(r){if(!Ei(r)){return Ti(r)}var n=Di(r),e=[];for(var t in r){if(!(t=="constructor"&&(n||!Bi.call(r,t)))){e.push(t)}}return e}var Li=Ci;var Pi=Oi,Ui=Li,Mi=Vt;function xi(r){return Mi(r)?Pi(r,true):Ui(r)}var Fi=xi;var Ni=vi,Ri=Fi;function zi(r){return Ni(r,Ri(r))}var ki=zi;var $i=Ge,Gi=qe.exports,Hi=at,Ki=ut,Vi=Ot,Yi=Ft,Wi=Rt,qi=Jt,Ji=Qt.exports,Qi=Pr,Xi=Sr,Zi=ca,ru=qa,nu=Qa,eu=ki;function tu(r,n,e,t,a,i,u){var v=nu(r,e),o=nu(n,e),f=u.get(o);if(f){$i(r,e,f);return}var c=i?i(v,o,e+"",r,n,u):undefined;var l=c===undefined;if(l){var s=Wi(o),d=!s&&Ji(o),h=!s&&!d&&ru(o);c=o;if(s||d||h){if(Wi(v)){c=v}else if(qi(v)){c=Ki(v)}else if(d){l=false;c=Gi(o,true)}else if(h){l=false;c=Hi(o,true)}else{c=[]}}else if(Zi(o)||Yi(o)){c=v;if(Yi(v)){c=eu(v)}else if(!Xi(v)||Qi(v)){c=Vi(o)}}else{l=false}}if(l){u.set(o,c);a(c,o,t,i,u);u["delete"](o)}$i(r,e,c)}var au=tu;var iu=Pe,uu=Ge,vu=We,ou=au,fu=Sr,cu=Fi,lu=Qa;function su(r,n,e,t,a){if(r===n){return}vu(n,(function(i,u){a||(a=new iu);if(fu(i)){ou(r,n,u,e,su,t,a)}else{var v=t?t(lu(r,u),i,u+"",r,n,a):undefined;if(v===undefined){v=i}uu(r,u,v)}}),cu)}var du=su;function hu(r){return r}var bu=hu;function yu(r,n,e){switch(e.length){case 0:return r.call(n);case 1:return r.call(n,e[0]);case 2:return r.call(n,e[0],e[1]);case 3:return r.call(n,e[0],e[1],e[2])}return r.apply(n,e)}var pu=yu;var ju=pu;var Au=Math.max;function wu(r,n,e){n=Au(n===undefined?r.length-1:n,0);return function(){var t=arguments,a=-1,i=Au(t.length-n,0),u=Array(i);while(++a<i){u[a]=t[n+a]}a=-1;var v=Array(n+1);while(++a<n){v[a]=t[a]}v[n]=e(u);return ju(r,this,v)}}var gu=wu;function mu(r){return function(){return r}}var Ou=mu;var _u=Ou,Su=xe,Eu=bu;var Du=!Su?Eu:function(r,n){return Su(r,"toString",{configurable:true,enumerable:false,value:_u(n),writable:true})};var Tu=Du;var Iu=800,Bu=16;var Cu=Date.now;function Lu(r){var n=0,e=0;return function(){var t=Cu(),a=Bu-(t-e);e=t;if(a>0){if(++n>=Iu){return arguments[0]}}else{n=0}return r.apply(undefined,arguments)}}var Pu=Lu;var Uu=Tu,Mu=Pu;var xu=Mu(Uu);var Fu=xu;var Nu=bu,Ru=gu,zu=Fu;function ku(r,n){return zu(Ru(r,n,Nu),r+"")}var $u=ku;var Gu=y,Hu=Vt,Ku=di,Vu=Sr;function Yu(r,n,e){if(!Vu(e)){return false}var t=typeof n;if(t=="number"?Hu(e)&&Ku(n,e.length):t=="string"&&n in e){return Gu(e[n],r)}return false}var Wu=Yu;var qu=$u,Ju=Wu;function Qu(r){return qu((function(n,e){var t=-1,a=e.length,i=a>1?e[a-1]:undefined,u=a>2?e[2]:undefined;i=r.length>3&&typeof i=="function"?(a--,i):undefined;if(u&&Ju(e[0],e[1],u)){i=a<3?undefined:i;a=1}n=Object(n);while(++t<a){var v=e[t];if(v){r(n,v,t,i)}}return n}))}var Xu=Qu;var Zu=du,rv=Xu;var nv=rv((function(r,n,e){Zu(r,n,e)}));var ev=nv;var tv=r("m",(function(r,n){var e=[];for(var t=2;t<arguments.length;t++){e[t-2]=arguments[t]}var a=__spreadArray([r,n],e,true).filter(Boolean);return ev.apply(null,a)}));var av=l((function(){return{appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutSettings:{allowedCharacterSets:"ALL",analyticsProviders:[],externalPaymentMethods:[],externalServiceTokens:[],mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",showForCountries:"ONLY_SHIPPABLE"},loadedConfig:false,organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null}})),iv=av.dispose,uv=av.reset,vv=av.state;r("z",vv);var ov=null;var fv=r("g",(function(r){if(r==="SYSTEM"){return window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT"}return r}));var cv=r("b",(function(r){var n=r.overrideSettings,e=r.zonosSettings;var t,a,i,u;uv();if(e){ov=e}var v=tv(vv.appearance,(ov===null||ov===void 0?void 0:ov.appearanceSettings)||(e===null||e===void 0?void 0:e.appearanceSettings)||null,n===null||n===void 0?void 0:n.appearance);if(v.theme==="SYSTEM"){v.theme=fv(v.theme)}vv.appearance=v;vv.checkoutSettings=tv(vv.checkoutSettings,(ov===null||ov===void 0?void 0:ov.checkoutSettings)||(e===null||e===void 0?void 0:e.checkoutSettings)||null,n===null||n===void 0?void 0:n.checkoutSettings);vv.helloSettings=tv(vv.helloSettings,(ov===null||ov===void 0?void 0:ov.helloSettings)||(e===null||e===void 0?void 0:e.helloSettings)||null,n===null||n===void 0?void 0:n.helloSettings);vv.loadedConfig=true;vv.organizationId=((t=e===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.id)||"";vv.organizationName=((a=e===null||e===void 0?void 0:e.organization)===null||a===void 0?void 0:a.name)||"";vv.storeId=((u=(i=e===null||e===void 0?void 0:e.organization)===null||i===void 0?void 0:i.references)===null||u===void 0?void 0:u.storeId)||null;vv.currencyConverter=n===null||n===void 0?void 0:n.currencyConverter;vv.onCountryChange=n===null||n===void 0?void 0:n.onCountryChange;vv.overrideCurrencyFormat=n===null||n===void 0?void 0:n.overrideCurrencyFormat}));var lv=r("d",(function(){var r=vv.appearance.fontFamily||"Inter";return r}))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function a(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?t(e.value):r(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(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,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,r&&(i=a[0]&2?r["return"]:a[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;if(r=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;r=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];r=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-539974db.system.js","./p-f6ffaa37.system.js","./p-23e7c655.system.js","./p-63db40b9.system.js","./p-bc7bf53e.system.js","./p-40c21634.system.js","./p-8809964a.system.js"],(function(e){"use strict";var o,t,n,r,i,s,a,l,h,d,u,f,c,m,v,g,w,p,z,b,x,y,k,_;return{setters:[function(e){o=e.r;t=e.h;n=e.H},function(e){r=e._;i=e.e;s=e.i;a=e.f;l=e.z;h=e.g;d=e.m},function(e){u=e.x;f=e.l;c=e.z;m=e.t;v=e.B;g=e.C;w=e.D;p=e.E;z=e.F;b=e.G},function(e){x=e.c},function(e){y=e.a;k=e.l},function(e){_=e.g},function(){},function(){}],execute:function(){var L=this;var T=r;var E=function(){return T.Date.now()};var O=E;var S=/\s/;function j(e){var o=e.length;while(o--&&S.test(e.charAt(o))){}return o}var C=j;var I=C;var D=/^\s+/;function X(e){return e?e.slice(0,I(e)+1).replace(D,""):e}var A=X;var B=i,R=s;var H="[object Symbol]";function N(e){return typeof e=="symbol"||R(e)&&B(e)==H}var M=N;var P=A,F=a,$=M;var U=0/0;var W=/^[-+]0x[0-9a-f]+$/i;var G=/^0b[01]+$/i;var K=/^0o[0-7]+$/i;var Y=parseInt;function q(e){if(typeof e=="number"){return e}if($(e)){return U}if(F(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=F(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=P(e);var t=G.test(e);return t||K.test(e)?Y(e.slice(2),t?2:8):W.test(e)?U:+e}var J=q;var Q=a,V=O,Z=J;var ee="Expected a function";var oe=Math.max,te=Math.min;function ne(e,o,t){var n,r,i,s,a,l,h=0,d=false,u=false,f=true;if(typeof e!="function"){throw new TypeError(ee)}o=Z(o)||0;if(Q(t)){d=!!t.leading;u="maxWait"in t;i=u?oe(Z(t.maxWait)||0,o):i;f="trailing"in t?!!t.trailing:f}function c(o){var t=n,i=r;n=r=undefined;h=o;s=e.apply(i,t);return s}function m(e){h=e;a=setTimeout(w,o);return d?c(e):s}function v(e){var t=e-l,n=e-h,r=o-t;return u?te(r,i-n):r}function g(e){var t=e-l,n=e-h;return l===undefined||t>=o||t<0||u&&n>=i}function w(){var e=V();if(g(e)){return p(e)}a=setTimeout(w,v(e))}function p(e){a=undefined;if(f&&n){return c(e)}n=r=undefined;return s}function z(){if(a!==undefined){clearTimeout(a)}h=0;n=l=r=a=undefined}function b(){return a===undefined?s:p(V())}function x(){var e=V(),t=g(e);n=arguments;r=this;l=e;if(t){if(a===undefined){return m(l)}if(u){clearTimeout(a);a=setTimeout(w,o);return c(l)}}if(a===undefined){a=setTimeout(w,o)}return s}x.cancel=z;x.flush=b;return x}var re=ne;var ie=function(e){return __awaiter(L,[e],void 0,(function(e){var o,t,n,r,i;var s=e.items,a=e.shipFrom,l=e.shipTo;return __generator(this,(function(e){switch(e.label){case 0:t={items:s,shipFrom:a,shipTo:l};return[4,u("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=e.sent(),r=n.errors,i=n.json;if(r.length||!i){y("Error fetching item restrictions: ".concat((o=r.find(Boolean))===null||o===void 0?void 0:o.message));return[2,[]]}return[2,i.filter(Boolean)]}}))}))};var se=function(e){return __awaiter(L,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:if(!e.length){return[2,[]]}o=f.selectedCountryCode;if(!o){y("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,ie({items:t,shipFrom:"AD",shipTo:o})];case 1:n=i.sent();r=n.map((function(e){var o;var n=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:n})}));return[2,r]}}))}))};var ae=function(e){var o=e===null||e===void 0?void 0:e.replace("www.","").replace("https://","");return o&&new RegExp(o).test(window.location.href)};var le=function(){var e=l.helloSettings,o=e.cartUrlPattern,t=e.homepageUrlPattern,n=e.productDetailUrlPattern,r=e.productListUrlPattern;if(ae(o)){return"cart"}if(ae(n)){return"productDetail"}if(ae(r)){return"productList"}if(ae(t)){return"home"}return""};var he=function(){var e,o;var t=l.helloSettings,n=t.productAddToCartElementSelector,r=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!r){y("Hello Could not check item restrictions - must provide title and description selectors.")}var a=i&&c(i)&&document.querySelectorAll(i)||[];var h=r&&c(r)&&document.querySelectorAll(r)||[];if(a.length!==h.length){y("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var u=d&&n&&c(n)&&document.querySelectorAll(n)||[];if(d&&u.length!==h.length){y('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var f=[];for(var m=0;m<a.length;m++){var v=a[m];var g=h[m];var w=u[m];if(v&&g){var p={cartButtonNode:w||null,description:((e=g.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=v.textContent)===null||o===void 0?void 0:o.trim())||""};f.push(p)}}return f};var de=":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(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-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(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-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% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-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(--zonos-elements-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:16px;border:var(--zonos-elements-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:16px;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% - 16px));transform:translateX(calc(100% - 16px));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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-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(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}: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(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}: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(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-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(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-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:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";var ue=de;var fe=3e3;var ce=500;var me=e("zonos_hello",function(){function e(e){var t=this;o(this,e);this.getHelloPeekMessage=function(e){var o=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(o&&t.allRestrictedItems.length){var n=m("click to learn more");var r=l.currentHelloPage==="productDetail"?m("Restricted item"):m("Restricted items found");return"".concat(r," - ").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 m("Welcome to [storeName]",{storeName:e})}};this.enableShowPeekMessage=function(){if(t.peekMessage){t.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(t,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:o=l.currentHelloPage==="productDetail"||l.currentHelloPage==="productList";if(!o||l.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,se(e)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){t.peekMessage=t.getHelloPeekMessage(l.organizationName);var e=l.helloSettings,o=e.peekMessageBehavior,n=e.peekMessageDelay;var r=n*1e3;if(o==="ENABLED"){setTimeout((function(){t.enableShowPeekMessage();var e=t.allRestrictedItems.some((function(e){return t.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){t.showPeekMessage=false}),fe)}}),r)}};this.disableAddToCartButtons=function(){if(t.productsOnPage.length){t.productsOnPage.forEach((function(e){var o,n;var r=t.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(r){(o=e.cartButtonNode)===null||o===void 0?void 0:o.setAttribute("disabled","disabled")}else{(n=e.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(t,void 0,void 0,(function(){var e,o;var t,n;var r=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=he();e=this.productsOnPage.filter((function(e){return!r.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=i.sent();(t=this.allRestrictedItems).push.apply(t,o);(n=this.allFoundProducts).push.apply(n,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=re((function(){var e=l.helloSettings.productTitleElementSelector;if(e){var o=he();if(t.allFoundProducts.length!==o.length&&window.location.href===t.initialUrl){if(!t.allFoundProducts.length){return}void t.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(t.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.watchPriceChange=function(){var e=new MutationObserver((function(){return void t.displayCurrency()}));e.observe(document.body,{attributes:true,childList:true,subtree:true})};this.updateHelloOnPageChange=function(){t.watchProductCountChange();setInterval((function(){if(window.location.href!==t.initialUrl){var e=t.initialUrl&&new URL(t.initialUrl);var o=e&&v(e.searchParams);if(o!==f.selectedCountryCode){t.allFoundProducts=[];t.allRestrictedItems=[];t.productsOnPage=[]}t.initialUrl=window.location.href;l.currentHelloPage=le();var n=new URL(window.location.href);var r=v(n.searchParams);if(!r){g(f.selectedCountryCode);return}void t.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){t.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=t.helloRef&&getComputedStyle(t.helloRef).position;if(t.helloRef&&e==="relative"){var o=_(t.helloRef);return o}};this.shouldRenderHello=function(e){if(e===void 0){e=true}if(!f.localizationLoaded){return false}var o=l.helloSettings.showForCountries;if(e){if(!f.isShippableCountry){k("Hello: not shippable country - Show for countries: ".concat(o))}}if(o==="ONLY_SHIPPABLE"){return f.isShippableCountry}if(o==="ALL"){return true}return o===null||o===void 0?void 0:o.includes(f.selectedCountryCode||"")};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=[];this.isHelloWidgetRendered=false}e.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,f.helloCountryList]}))}))};e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(l.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(l.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!f.exchangeRate){k("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}w();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,p(e)]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,z(e)]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,b({amount:e})]}))}))};e.prototype.openHelloDialog=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.changeShowDialog(e);return[2]}))}))};e.prototype.handleResize=function(){re(this.render.bind(this),ce)};e.prototype.handleHelloWidgetInitializedState=function(e){var o=e.countryCode,t=e.currencyCode;var n,r;if(this.isHelloWidgetRendered){return}if(f.selectedCountryCode&&typeof l.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((r=(n=l.helloSettings).onInitSuccess)===null||r===void 0?void 0:r.call(n,{countryCode:o,currencyCode:t}))}};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme)}};e.prototype.render=function(){var e=this;var o,r;var i=(o=l.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return new RegExp(e).test(window.location.href)}));if(i){k("Hello is excluded on this url","warn");return null}var s=f.selectedCountryCode,a=f.targetCurrency;var h=this.mobileLocationOverride||l.helloSettings.mobileLocation;var u=window.innerWidth<768;var c=this.animateFromLeftOverride||u&&h.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var m=h.includes("TOP");var v=d(l.appearance,this.appearanceSettingsOverride);var g=v.theme;var w=(r=this.allRestrictedItems)===null||r===void 0?void 0:r.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(l.organizationName);var p=this.shouldRenderHello()&&!!s;if(p&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:s,currencyCode:a})}return t(n,{class:"zonos--hello zonos--elements","data-theme":g},p&&t("div",{class:"zonos--hello-wrapper"},t("button",{class:x(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",c&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){void e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},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:x(["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:v,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:w,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return e}());me.style=ue}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as o,e as n,l as t}from"./p-8befc549.js";import{z as e}from"./p-04054425.js";const i=async(i,s)=>{var a,d;if((window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||(null===(a=window.Zonos)||void 0===a?void 0:a.zonosQaUrl)||(null===(d=window.Zonos)||void 0===d?void 0:d.debug))&&!window.Zonos.zonosConversionTest)return;const r=n.checkoutSessionId;if(!r)return;const c={checkoutSessionId:r,countryCode:t.selectedCountryCode,eventName:i,metadata:s,organizationId:e.organizationId};await o("/api/zonos-elements/track-conversion-event",{body:c,method:"POST"})},s=()=>{var o;return null===(o=window.Zonos.zonosApiKey)||void 0===o?void 0:o.includes("test")},a=(o,n)=>new CustomEvent(o,{detail:n});export{a as c,s as g,i as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-539974db.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.z}],execute:function(){var r=t("g",(function(t){var r=(t===null||t===void 0?void 0:t.customRoundRadius)||"10px";var e=t===null||t===void 0?void 0:t.overrideBorderStyle;if(e){return e==="SHARP"?"0px":r}return n.appearance.style==="SHARP"?"0px":r}))}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,H as t}from"./p-5b7da777.js";import{_ as s,e as i,i as n,f as r,z as l,g as a,m as h}from"./p-04054425.js";import{x as d,l as c,z as m,t as p,B as u,C as f,D as g,E as z,F as w,G as b}from"./p-8befc549.js";import{c as v}from"./p-b4b7f705.js";import{a as x,l as y}from"./p-eaa335e1.js";import{g as k}from"./p-5883217a.js";import"./p-6ac72711.js";import"./p-52fb6876.js";var C=s,L=/\s/,T=/^\s+/,E=i,S=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&L.test(o.charAt(e)););return e}(o)+1).replace(T,""):o},I=r,O=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,B=parseInt,X=r,N=function(){return C.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||S(o)&&"[object Symbol]"==E(o)}(o))return NaN;if(I(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=I(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=j.test(o);return t||A.test(o)?B(o.slice(2),t?2:8):O.test(o)?NaN:+o},P=Math.max,R=Math.min,F=function(o,e,t){var s,i,n,r,l,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function u(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function f(){var o=N();if(u(o))return g(o);l=setTimeout(f,function(o){var t=e-(o-a);return c?R(t,n-(o-h)):t}(o))}function g(o){return l=void 0,m&&s?p(o):(s=i=void 0,r)}function z(){var o=N(),t=u(o);if(s=arguments,i=this,a=o,t){if(void 0===l)return function(o){return h=o,l=setTimeout(f,e),d?p(o):r}(a);if(c)return clearTimeout(l),l=setTimeout(f,e),p(a)}return void 0===l&&(l=setTimeout(f,e)),r}return e=H(e)||0,X(t)&&(d=!!t.leading,n=(c="maxWait"in t)?P(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=a=i=l=void 0},z.flush=function(){return void 0===l?r:g(N())},z};const M=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},$=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=l.helloSettings;i&&s||x("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&m(i)&&document.querySelectorAll(i)||[],a=s&&m(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return x("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&m(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(n)}}return c},U=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===l.currentHelloPage||"productList"===l.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===l.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(l.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return p("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==l.currentHelloPage&&"productList"!==l.currentHelloPage||"DISABLED"===l.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=c;if(!e)return x("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(l.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=l.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=$();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=F((()=>{const{productTitleElementSelector:o}=l.helloSettings;if(o){const o=$();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&u(o.searchParams))!==c.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,l.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=l.helloSettings;return M(o)?"cart":M(t)?"productDetail":M(s)?"productList":M(e)?"home":""})();const e=new URL(window.location.href);if(!u(e.searchParams))return void f(c.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!c.localizationLoaded)return!1;const{showForCountries:e}=l.helloSettings;return o&&(c.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?c.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(c.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=l.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1}async getCountryList(){return c.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&l.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==l.helloSettings.currencyBehavior&&(c.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return z(o)}async convert(o){return w(o)}async format(o){return b({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){F(this.render.bind(this),500)}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||c.selectedCountryCode&&"function"==typeof l.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=l.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=l.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=c,r=this.mobileLocationOverride||l.helloSettings.mobileLocation,a=window.innerWidth<768,d=this.animateFromLeftOverride||a&&r.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,m=r.includes("TOP"),p=h(l.appearance,this.appearanceSettingsOverride),{theme:u}=p,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(l.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":u},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:v(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",d&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",m&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:v(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:p,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};U.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-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(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-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% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-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(--zonos-elements-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:16px;border:var(--zonos-elements-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:16px;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% - 16px));transform:translateX(calc(100% - 16px));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(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-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(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}: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(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}: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(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-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(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-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:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";export{U as zonos_hello}
|