@zonos/elements 1.3.290 → 1.3.292
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-7DceSLKl.js → cart-B6Aty-21.js} +1 -1
- package/dist/cjs/{collect-C08DUE1L.js → collect-Oeo5tjN5.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-Duz8xpmf.js → getMissingRequiredShippingFields-D03ICqss.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-C-iyXqJ0.js → hasInclusivePrice-CPCoVeU3.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-DSuHUQpi.js → invoice-Cj8W7NW0.js} +2 -2
- package/dist/cjs/{localization-BJqYz_PB.js → localization-BzNeXeDe.js} +24 -15
- package/dist/cjs/{paypal-CZoctP9S.js → paypal-CuKshRmZ.js} +2 -2
- package/dist/cjs/{placeTestOrder-D7baFuaV.js → placeTestOrder-7czjwkjm.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-Ca2HH1Gc.js → renderCheckoutCurrency-BH8t2b2x.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-FyTdz7U_.js → shouldShowLanguageSelect-yAbtCmd8.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -7
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/collection/components/store/hello/localization.js +4 -1
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +20 -14
- package/dist/esm/{cart-Cleo1j5P.js → cart-BoQp8Ema.js} +1 -1
- package/dist/esm/{collect-CspdWIRo.js → collect-CdrR5OBy.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-B1IL1-gn.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +1 -1
- package/dist/esm/{hasInclusivePrice-DKRplpLX.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-D49igPQ9.js → invoice-S1KahJ_Z.js} +2 -2
- package/dist/esm/{localization-BiL8bPsY.js → localization-BIh-4pc_.js} +24 -15
- package/dist/esm/{paypal-D4vWRxHJ.js → paypal-DNfvnuUU.js} +2 -2
- package/dist/esm/{placeTestOrder-BNmc5RCo.js → placeTestOrder-CQaMKFOg.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-BNbwijGo.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-B82gTfHz.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +3 -3
- package/dist/esm/zonos-address-display_2.entry.js +1 -1
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm-es5/{cart-Cleo1j5P.js → cart-BoQp8Ema.js} +8 -8
- package/dist/esm-es5/{collect-CspdWIRo.js → collect-CdrR5OBy.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-B1IL1-gn.js → getMissingRequiredShippingFields-Ks6_tpjn.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-DKRplpLX.js → hasInclusivePrice-CbEfIhI5.js} +1 -1
- package/dist/esm-es5/index.js +4 -4
- package/dist/esm-es5/{invoice-D49igPQ9.js → invoice-S1KahJ_Z.js} +1 -1
- package/dist/esm-es5/{localization-BiL8bPsY.js → localization-BIh-4pc_.js} +13 -3
- package/dist/esm-es5/{paypal-D4vWRxHJ.js → paypal-DNfvnuUU.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-BNmc5RCo.js → placeTestOrder-CQaMKFOg.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-BNbwijGo.js → renderCheckoutCurrency-C2Tw73uR.js} +2 -2
- package/dist/esm-es5/{shouldShowLanguageSelect-B82gTfHz.js → shouldShowLanguageSelect-CCD7gpSY.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +3 -3
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.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 +2 -2
- 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-invoice-cart-items_2.entry.js +2 -2
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +2 -0
- 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/store/checkout/cart.d.ts +2 -0
- package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-0ee74bf3.system.entry.js → p-04bded81.system.entry.js} +22 -22
- package/dist/zonos-elements/{p-c3b02dbf.entry.js → p-06fe2939.entry.js} +1 -1
- package/dist/zonos-elements/{p-13d3a372.system.entry.js → p-0b81f8b9.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-d6b72f6d.entry.js → p-0fca452b.entry.js} +1 -1
- package/dist/zonos-elements/{p-a571beaa.system.entry.js → p-11defdca.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-fb869759.system.entry.js → p-17c7ea4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ef0f69e.system.entry.js → p-23352709.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-a5c25829.system.entry.js → p-249c1ee1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-52d9fd3a.entry.js → p-34656e6c.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4ad6d4b.entry.js → p-39ee1558.entry.js} +1 -1
- package/dist/zonos-elements/p-4679f0ec.entry.js +1 -0
- package/dist/zonos-elements/{p-23f6346b.system.entry.js → p-4806b264.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3c800376.system.entry.js → p-5016d71b.system.entry.js} +59 -59
- package/dist/zonos-elements/{p-5f347f91.system.entry.js → p-51400242.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-35509b10.system.entry.js → p-5236c676.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-ddca5ee1.entry.js → p-550d4eea.entry.js} +1 -1
- package/dist/zonos-elements/{p-481ecc23.system.entry.js → p-552fbde1.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-1b77464d.system.entry.js → p-5b80aff2.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-079af8c0.system.entry.js → p-69c3e367.system.entry.js} +9 -9
- package/dist/zonos-elements/{p-7d284341.system.entry.js → p-6abec43f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-5df25a1a.entry.js → p-6c41b00c.entry.js} +1 -1
- package/dist/zonos-elements/{p-f37b8aaf.system.entry.js → p-6db7c0b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-990b49f2.entry.js → p-6e296228.entry.js} +1 -1
- package/dist/zonos-elements/{p-BDrM4x5N.js → p-7abqRc9V.js} +2 -2
- package/dist/zonos-elements/{p-ba510730.entry.js → p-82595838.entry.js} +1 -1
- package/dist/zonos-elements/{p-84c9ce16.entry.js → p-938fc1e4.entry.js} +1 -1
- package/dist/zonos-elements/{p-7ee2af6e.system.entry.js → p-9c33f7ed.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-DVITR-Eu.system.js → p-Be3Hpms1.system.js} +1 -1
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-BT9_ehlh.system.js → p-CEK_Wk6v.system.js} +1 -1
- package/dist/zonos-elements/p-CFbfEmjN.js +1 -0
- package/dist/zonos-elements/p-D-bZg-Pc.js +1 -0
- package/dist/zonos-elements/{p-CASTsiDR.system.js → p-D4MevhAL.system.js} +3 -3
- package/dist/zonos-elements/{p-tGJYTlGL.system.js → p-DI2vXnXc.system.js} +3 -3
- package/dist/zonos-elements/{p-Cpe_ISNt.system.js → p-DNc279vN.system.js} +27 -27
- package/dist/zonos-elements/{p-CEmXVahp.system.js → p-DOD2I44l.system.js} +92 -82
- package/dist/zonos-elements/{p-uuZUZPIm.system.js → p-DS-qw_qc.system.js} +10 -10
- package/dist/zonos-elements/p-DZ2mevDK.js +1 -0
- package/dist/zonos-elements/{p-CewmhMGk.js → p-DzLNk-Pf.js} +1 -1
- package/dist/zonos-elements/{p-DwkyNtpD.js → p-FRWZayxL.js} +1 -1
- package/dist/zonos-elements/p-Mrz_lnC1.js +1 -0
- package/dist/zonos-elements/{p-B_5RofQ9.system.js → p-XDxdMlQl.system.js} +23 -23
- package/dist/zonos-elements/{p-DYIisqF7.system.js → p-XqkqjeNV.system.js} +1 -1
- package/dist/zonos-elements/{p-4fd78ecf.system.entry.js → p-a40fd99b.system.entry.js} +9 -9
- package/dist/zonos-elements/{p-79ddb12a.system.entry.js → p-b2dd7f02.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-11bab88b.entry.js → p-b79036fc.entry.js} +1 -1
- package/dist/zonos-elements/{p-26295311.entry.js → p-bb3546c0.entry.js} +1 -1
- package/dist/zonos-elements/p-c1cbfdba.entry.js +1 -0
- package/dist/zonos-elements/{p-7e1050dd.system.entry.js → p-c3646ae6.system.entry.js} +15 -15
- package/dist/zonos-elements/{p-028e0500.entry.js → p-c47ce656.entry.js} +1 -1
- package/dist/zonos-elements/{p-34c5e145.entry.js → p-c5bab786.entry.js} +1 -1
- package/dist/zonos-elements/{p-234c202c.entry.js → p-c961caaf.entry.js} +1 -1
- package/dist/zonos-elements/{p-NJVOYjda.js → p-c9QtIdJX.js} +1 -1
- package/dist/zonos-elements/{p-Cuk0LLGQ.js → p-clDfq9AL.js} +1 -1
- package/dist/zonos-elements/{p-db75322d.entry.js → p-d168023b.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b06f069.entry.js → p-db87b0dd.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd8ca91e.entry.js → p-defc2d18.entry.js} +1 -1
- package/dist/zonos-elements/{p-0dca8a26.system.entry.js → p-e0e9cff5.system.entry.js} +26 -26
- package/dist/zonos-elements/p-f8b50aa0.entry.js +1 -0
- package/dist/zonos-elements/{p-tkSf-lrO.system.js → p-kaOxUR9u.system.js} +5 -5
- package/dist/zonos-elements/p-rVp8hgWw.js +1 -0
- package/dist/zonos-elements/{p-B5NDhB1w.system.js → p-y7PFdTUN.system.js} +4 -4
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-35539d3d.entry.js +0 -1
- package/dist/zonos-elements/p-BJzAgoqz.js +0 -1
- package/dist/zonos-elements/p-BKoLoalh.js +0 -1
- package/dist/zonos-elements/p-BaF00SfB.js +0 -1
- package/dist/zonos-elements/p-BtWDzGMx.js +0 -1
- package/dist/zonos-elements/p-CX_vfdWt.js +0 -1
- package/dist/zonos-elements/p-ab54d0a1.entry.js +0 -1
- package/dist/zonos-elements/p-ca3175d9.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{c as createStore,z as zonosStore}from"./zonosStore-msUlqmSD.js";import{s as storageStore,t as translate,m as getOverridenZCountry,l as localizationStore,f as filterValidTests,e as storageStoreSetEnabledVariantTestKeys}from"./localization-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{c as createStore,z as zonosStore}from"./zonosStore-msUlqmSD.js";import{s as storageStore,t as translate,m as getOverridenZCountry,l as localizationStore,f as filterValidTests,e as storageStoreSetEnabledVariantTestKeys}from"./localization-BIh-4pc_.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{h as handleFetch,l as logError,f as fallbackApiList,g as getIsTestMode,a as getIsStagingMode,s as sendErrorLog,j as jsonParse}from"./handleFetch-D5GYDF-O.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{e as euCountryCodes}from"./TaxId-Cye-evFK.js";var getCheckoutSession=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:if(!storageStore.checkoutSessionId){return[2/*return*/,{errors:[{message:"No checkout session id found"}],json:null}]}e=new URLSearchParams;e.set("checkoutSessionId",storageStore.checkoutSessionId);return[4/*yield*/,handleFetch("/api/zonos-elements/get-checkout-session?".concat(e.toString()))];case 1:t=n.sent(),r=t.errors,o=t.json;return[2/*return*/,{errors:r,json:o}]}}))}))};var _o=createStore((function(){return{amountToApply:null,appliedAmount:null,availableBalance:null,error:null,isApplying:false,isEnabled:false,orderIdCreated:null,remainingBalance:null,useFullBalance:true}})),reset$2=_o.reset,storeCreditStore=_o.state;
|
|
2
2
|
/**
|
|
3
3
|
* Reset store credit store to initial state
|
|
4
4
|
*/var storeCreditStoreReset=function(){reset$2()};
|
|
@@ -79,7 +79,7 @@ var POLICY_NAME_KEY={privacyPolicy:"Privacy policy",refundPolicy:"Refund policy"
|
|
|
79
79
|
var i=(o===null||o===void 0?void 0:o.split(/\s+/))||[];var a=(t===null||t===void 0?void 0:t.trim())||((n=i[0])===null||n===void 0?void 0:n.trim())||"";var s=(r===null||r===void 0?void 0:r.trim())||i.slice(1).join(" ").trim()||"";return{firstName:a,lastName:s}};
|
|
80
80
|
/**
|
|
81
81
|
* Extract value from translated object
|
|
82
|
-
*/var getTranslatedAddress=function(e){var t=e.currentAddress,r=e.translatedAddress;var o,n,i,a,s,d;var c=t.value.address,l=c.city,u=c.country,S=c.line1,v=c.line2,p=c.postal_code,f=c.state;var
|
|
82
|
+
*/var getTranslatedAddress=function(e){var t=e.currentAddress,r=e.translatedAddress;var o,n,i,a,s,d;var c=t.value.address,l=c.city,u=c.country,S=c.line1,v=c.line2,p=c.postal_code,f=c.state;var h=t.value.name||[t.value.firstName,t.value.lastName].join(" ");return{city:((o=r.city)===null||o===void 0?void 0:o[l])||l,country:u,line1:((n=r.line1)===null||n===void 0?void 0:n[S])||S,line2:((i=r.line2)===null||i===void 0?void 0:i[v||""])||v||"",name:((a=r.name)===null||a===void 0?void 0:a[h])||h,phone:t.value.phone||"",postal_code:((s=r.postal_code)===null||s===void 0?void 0:s[p])||p,state:((d=r.state)===null||d===void 0?void 0:d[f])||f}};
|
|
83
83
|
/**
|
|
84
84
|
* Similar to prepCalculateLandedCost except it only uses cart ID
|
|
85
85
|
*/var prepCartCalculateLandedCost=function(e){var t;var r=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";
|
|
@@ -151,9 +151,9 @@ if(!a||!s){return null}
|
|
|
151
151
|
// only translate if there are invalid characters
|
|
152
152
|
if(!t&&!r){return null}var d=o.value;var c=(n===null||n===void 0?void 0:n.value)||null;
|
|
153
153
|
// Returns undefined if the name is Latin so it won't be included in the request body
|
|
154
|
-
var l=extractName({firstName:d.firstName,lastName:d.lastName,name:d.name}),u=l.firstName,S=l.lastName;var v="".concat(u," ").concat(S);var p=extractName({firstName:c===null||c===void 0?void 0:c.firstName,lastName:c===null||c===void 0?void 0:c.lastName,name:(c===null||c===void 0?void 0:c.name)||""}),f=p.firstName,
|
|
154
|
+
var l=extractName({firstName:d.firstName,lastName:d.lastName,name:d.name}),u=l.firstName,S=l.lastName;var v="".concat(u," ").concat(S);var p=extractName({firstName:c===null||c===void 0?void 0:c.firstName,lastName:c===null||c===void 0?void 0:c.lastName,name:(c===null||c===void 0?void 0:c.name)||""}),f=p.firstName,h=p.lastName;var m=f&&h?"".concat(f," ").concat(h):"";var g=d.address;var C=c===null||c===void 0?void 0:c.address;return{address:getExcludeAddressFieldsObject({address:Object.assign(Object.assign({},g),{name:v}),invalidAdddressList:t}),
|
|
155
155
|
// only include billing address if it's different from the shipping address
|
|
156
|
-
billingAddress:!i?getExcludeAddressFieldsObject({address:C?Object.assign(Object.assign({},C),{name:
|
|
156
|
+
billingAddress:!i?getExcludeAddressFieldsObject({address:C?Object.assign(Object.assign({},C),{name:m}):null,invalidAdddressList:r}):undefined,destinationCountry:g.country}};
|
|
157
157
|
/**
|
|
158
158
|
* Sorts service levels with lower cost first
|
|
159
159
|
*/var sortServiceLevelOptionsByAmount=function(e){var t=e.sort((function(e,t){return e.amount-t.amount}));return t};
|
|
@@ -474,13 +474,13 @@ cartStoreApplySubtotals({method:((t=i.checkoutSessionUpdate.landedCost)===null||
|
|
|
474
474
|
if(e.method==="DAP"&&((o=(r=zonosStore.genericSettings)===null||r===void 0?void 0:r.domesticCountries)===null||o===void 0?void 0:o.includes(((n=stripeStore.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country)||"US"))){return"DDP"}
|
|
475
475
|
// EU 3-EUR cutover (05CHECK-893): keep EU POSTAL remittance quotes as DAP so
|
|
476
476
|
// the shopper is told duties are paid upon delivery, even though we remit.
|
|
477
|
-
if(isEuDapRemittance({deliveryType:t,landedCost:e,shipToCountry:(i=stripeStore.stripeAddressEventData)===null||i===void 0?void 0:i.value.address.country})){return"DAP"}if(e.method==="DAP"&&e.remittance.length&&e.landedCostGuaranteeCode==="ZONOS"){return"DDP"}return e.method};var cartStoreUpdateSelectedShippingOption=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c,l,u,S,v,p,f,m,
|
|
477
|
+
if(isEuDapRemittance({deliveryType:t,landedCost:e,shipToCountry:(i=stripeStore.stripeAddressEventData)===null||i===void 0?void 0:i.value.address.country})){return"DAP"}if(e.method==="DAP"&&e.remittance.length&&e.landedCostGuaranteeCode==="ZONOS"){return"DDP"}return e.method};var cartStoreUpdateSelectedShippingOption=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c,l,u,S,v,p,f,h,m,g,C,y,w,b,A,O,_,k;var E=e.applySubtotalsOnly,I=e.landedCostId,P=e.selectedShippingOption;return __generator(this,(function(e){switch(e.label){case 0:log("Updating selected shipping option","info",{landedCostId:I,selectedShippingOption:P});cartStore.selectedShippingOption=P;v=cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);if(v){p=v.maxTransit,f=v.minTransit,h=v.unit;cartStore.selectedShippingOptionTransitTime="".concat(f,"-").concat(p," ").concat(h)}else{cartStore.selectedShippingOptionTransitTime=""}m=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find((function(e){return e.landedCostId===I}));
|
|
478
478
|
// save selected landed cost for later use
|
|
479
|
-
cartStore.selectedLandedCost=
|
|
479
|
+
cartStore.selectedLandedCost=m||null;if(!m){
|
|
480
480
|
// do nothing if we can't find landed cost for selected shipping option
|
|
481
|
-
return[2/*return*/,false]}g=((r=
|
|
481
|
+
return[2/*return*/,false]}g=((r=m.landedCost.amountSubtotals)===null||r===void 0?void 0:r.landedCostTotal)||0;C=m.subtotals.exchangeRate.rate;y=g*C;if(y){log("DAP quote, using estimate: ".concat(y),"info")}cartStore.landedCostMethod=cartStoreGetMethod(m.landedCost,(o=P.shippingProfile)===null||o===void 0?void 0:o.serviceLevel.deliveryType);
|
|
482
482
|
// update shipping value and dutiesTaxFees on selectedShippingOption change
|
|
483
|
-
cartStore.shipping=
|
|
483
|
+
cartStore.shipping=m.subtotals.shipping;w=((n=m===null||m===void 0?void 0:m.landedCost)===null||n===void 0?void 0:n.landedCostGuaranteeCode)==="ZONOS";b=!!((a=(i=m===null||m===void 0?void 0:m.landedCost)===null||i===void 0?void 0:i.deMinimis)===null||a===void 0?void 0:a.find((function(e){return["DUTY","TAX"].includes(e.type)&&e.threshold==="ABOVE"})));cartStore.isSelectedShippingAboveDeminimis=b;cartStore.isSelectedShippingGuarantee=w;A=false;if(!E)return[3/*break*/,1];O=m.subtotals;cartStoreApplySubtotals({dutiesTaxesFeesEstimate:y,method:cartStore.landedCostMethod,subtotals:O});log("Exchange rate updated for cart items (landed cost subtotal)","info",cartStore.exchangeRate);A=true;return[3/*break*/,3];case 1:return[4/*yield*/,cartStoreReCalculateTotal({adjustmentsAmount:cartStore.adjustmentTotal,cartId:window.Zonos.cartId,dutiesTaxesFeesEstimate:y,landedCostId:(s=m.landedCost)===null||s===void 0?void 0:s.id})];case 2:
|
|
484
484
|
// update session with selected landed cost
|
|
485
485
|
A=e.sent();e.label=3;case 3:_=(d=cartStore.items.find(Boolean))===null||d===void 0?void 0:d.currencyCode;k=((c=stripeStore.stripeAddressEventData)===null||c===void 0?void 0:c.value.address.country)||"US";
|
|
486
486
|
// Only show pay in USD button if item's currency is in USD, the setting is enabled and the order presentment currency is not USD, also only in USD settlement ship to country list
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,r,t,n){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?t(e.value):i(e.value).then(a,s)}u((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return u([e,r])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-msUlqmSD.js";import{t as translate,l as localizationStore,s as storageStore}from"./localization-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,r,t,n){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?t(e.value):i(e.value).then(a,s)}u((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return u([e,r])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-msUlqmSD.js";import{t as translate,l as localizationStore,s as storageStore}from"./localization-BIh-4pc_.js";import{l as logError$1,h as handleFetch,s as sendErrorLog}from"./handleFetch-D5GYDF-O.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{d as cartStore,Y as cartStoreUpdateSelectedShippingOption,b as stripeStore,a0 as stripeStoreBuildAddressForPartyCreate}from"./cart-BoQp8Ema.js";
|
|
2
2
|
// src/constant/common.ts
|
|
3
3
|
function _array_like_to_array(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,r,t,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){t(e);return}if(s.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _async_to_generator(e){return function(){var r=this,t=arguments;return new Promise((function(n,i){var o=e.apply(r,t);function a(e){asyncGeneratorStep(o,n,i,a,s,"next",e)}function s(e){asyncGeneratorStep(o,n,i,a,s,"throw",e)}a(undefined)}))}}function _class_call_check(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function _create_class(e,r,t){if(r)_defineProperties(e.prototype,r);return e}function _define_property(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _instanceof(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function _iterable_to_array(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _iterable_to_array_limit(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var i=true;var o=false;var a,s;try{for(t=t.call(e);!(i=(a=t.next()).done);i=true){n.push(a.value);if(n.length===r)break}}catch(e){o=true;s=e}finally{try{if(!i&&t["return"]!=null)t["return"]()}finally{if(o)throw s}}return n}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))}n.forEach((function(r){_define_property(e,r,t[r])}))}return e}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}function _object_spread_props(e,r){r=r!=null?r:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _sliced_to_array(e,r){return _array_with_holes(e)||_iterable_to_array_limit(e,r)||_unsupported_iterable_to_array(e,r)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,r){if(!e)return;if(typeof e==="string")return _array_like_to_array(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor)t=e.constructor.name;if(t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _array_like_to_array(e,r)}function _ts_generator(e,r){var t,n,i,o,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(r){return u([e,r])}}function u(o){if(t)throw new TypeError("Generator is already executing.");while(a)try{if(t=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(o[0]===6&&a.label<i[1]){a.label=i[1];i=o;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(o);break}if(i[2])a.ops.pop();a.trys.pop();continue}o=r.call(e,a)}catch(e){o=[6,e];n=0}finally{t=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}}var Environment=function(e){e["production"]="prod";e["demo"]="demo";e["staging"]="staging";return e}(Environment||{});
|
|
4
4
|
// src/constant/config.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{U as extractName}from"./cart-
|
|
1
|
+
import{U as extractName}from"./cart-BoQp8Ema.js";
|
|
2
2
|
/**
|
|
3
3
|
* Minimum number of characters we treat as a valid postal code. Mirrors the
|
|
4
4
|
* landed-cost readiness check in `stripe.ts` (`isAddressReadyToRequestLandedCost`).
|
|
@@ -14,7 +14,7 @@ import{U as extractName}from"./cart-Cleo1j5P.js";
|
|
|
14
14
|
*
|
|
15
15
|
* Pure: the caller resolves `countryField` (via `getCountryField`) and passes it in, so
|
|
16
16
|
* this can be unit-tested without the stores.
|
|
17
|
-
*/var getMissingRequiredShippingFields=function(i){var
|
|
17
|
+
*/var getMissingRequiredShippingFields=function(i){var a=i.countryField,e=i.event;var r,t,o;if(!e){return[]}var v=e.value;var l=[];
|
|
18
18
|
// Last name is always required for international shipping. Link's single name input
|
|
19
19
|
// often provides only a first name, leaving the extracted last name empty.
|
|
20
|
-
var s=extractName({firstName:
|
|
20
|
+
var s=extractName({firstName:v.firstName,lastName:v.lastName,name:v.name}).lastName;if(!s.trim()){l.push({key:"lastName"})}if((a===null||a===void 0?void 0:a.stateRequired)&&!((r=v.address.state)===null||r===void 0?void 0:r.trim())){l.push({key:"state"})}if((a===null||a===void 0?void 0:a.zipRequired)&&((o=(t=v.address.postal_code)===null||t===void 0?void 0:t.trim().length)!==null&&o!==void 0?o:0)<MIN_POSTAL_CODE_LENGTH){l.push({key:"postal_code"})}return l};export{MIN_POSTAL_CODE_LENGTH as M,getMissingRequiredShippingFields as g};
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -54,7 +54,7 @@ var n=new URL(e).searchParams;var o=n.get("zonosQaUrl");if(!o){return null}var t
|
|
|
54
54
|
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
55
55
|
* it would load script from that same domain instead of loading from cdn
|
|
56
56
|
*/
|
|
57
|
-
var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=extractZonosQaUrl(window.location.href);var o="https://v1.3.
|
|
57
|
+
var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=extractZonosQaUrl(window.location.href);var o="https://v1.3.292.js.zonos.com";
|
|
58
58
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
59
59
|
if(!n&&(o.includes("test.")||
|
|
60
60
|
// Vercel git domain
|
|
@@ -97,15 +97,15 @@ return[4/*yield*/,new Promise((function(e){return setTimeout(e,500)}))];case 2:
|
|
|
97
97
|
e.sent();return[2/*return*/,getCartInfoById({cartId:d,retries:l-1})];case 3:if(c){return[2/*return*/,null]}return[2/*return*/,Object.assign(Object.assign({},s),{zonosMode:u})]}}))}))};var setupCartDataWithSettings=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r;return __generator(this,(function(i){switch(i.label){case 0:n=_getIsValidCartId(e),o=n.isDgsCartId,t=n.isLegacyCartId;if(!t&&!o){logError("[ZONOS - loadZonos] invalid cart id");return[2/*return*/,null]}return[4/*yield*/,getCartInfoById({cartId:e,retries:5})];case 1:r=i.sent();log("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2/*return*/,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;window.Zonos.zonosMode=r.zonosMode;return[2/*return*/,{cartData:r.cartData,settings:r.settings,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var _a;
|
|
98
98
|
/**
|
|
99
99
|
* Get the load version and url based on the loadScriptSrc, if the domain that used to load `zonos.js` is in white listed domains, use currentLoadScriptUrl as the load url instead, if zonosQaUrl exists, it would also fall under the white listed domain
|
|
100
|
-
*/var zonosLoadUrl=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=checkIfLoadVersionDomain({loadScriptSrc:e===null||e===void 0?void 0:e.src}),o=n.currentLoadScriptUrl,t=n.isWhiteListed;if(t){return o}return null}();var startLoadTime=Date.now();var ZONOS_URL="https://v1.3.
|
|
100
|
+
*/var zonosLoadUrl=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=checkIfLoadVersionDomain({loadScriptSrc:e===null||e===void 0?void 0:e.src}),o=n.currentLoadScriptUrl,t=n.isWhiteListed;if(t){return o}return null}();var startLoadTime=Date.now();var ZONOS_URL="https://v1.3.292.js.zonos.com";var JS_DELIVR_ZONOS_URL=zonosLoadUrl||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.292";var UNPKG_ZONOS_URL="https://unpkg.com/@zonos/elements@1.3.292";var CDNJS_ZONOS_URL="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.292";var GOOGLE_FONT_URL="https://fonts.googleapis.com";var GOOGLE_FONT_REGEX=/^https:\/\/fonts\.googleapis\.com/;var Zonos=/** @class */function(){function e(){}return e}();_a=Zonos;Zonos.doneInit=false;Zonos.cartSettings=null;
|
|
101
101
|
// if query 'zonosDebug=1' param from url, debug mode is on
|
|
102
|
-
Zonos.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);Zonos.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);Zonos._paypalMockResponse=null;Zonos.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;Zonos.isBigCommerce=false;Zonos.releaseDate="
|
|
102
|
+
Zonos.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);Zonos.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);Zonos._paypalMockResponse=null;Zonos.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;Zonos.isBigCommerce=false;Zonos.releaseDate="1791222618677";Zonos.isLegacyCheckout=false;Zonos.googleAnalyticId=null;Zonos.googleAnalyticReady=false;Zonos.facebookPixelId=null;Zonos.facebookPixelReady=false;Zonos.startLoadTime=startLoadTime;Zonos.domain=typeof window!=="undefined"?// domain that embeds the iframe
|
|
103
103
|
window.location!=window.parent.location&&document.referrer||
|
|
104
104
|
// current domain
|
|
105
105
|
document.location.hostname:"";Zonos.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");Zonos.overrideUseCustomAddressForm=false;Zonos.isCollect=false;Zonos.isInvoice=false;
|
|
106
106
|
/**
|
|
107
107
|
* By default, the package will load from npm
|
|
108
|
-
*/Zonos.isNpm=true;Zonos.zonosQaUrl=null;Zonos.zonosQaUrlApi=null;Zonos.trackEventLogs=[];Zonos.version="v".concat("1.3.
|
|
108
|
+
*/Zonos.isNpm=true;Zonos.zonosQaUrl=null;Zonos.zonosQaUrlApi=null;Zonos.trackEventLogs=[];Zonos.version="v".concat("1.3.292");Zonos.modeAlerted=false;Zonos.cartData=null;Zonos.paypal=null;Zonos.zonosMode=null;Zonos.IframeService=IframeService;Zonos.getCurrentTimestamp=function(){return(new Date).getTime()};Zonos.zonosController=null;Zonos.loadTimeApiInfoList=[];Zonos.logIntervalId=null;Zonos.init=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r,i,a,s,u,c,d,l,f,v,m,_;return __generator(this,(function(p){switch(p.label){case 0:n=e.appearance,o=e.checkoutSettings,t=e.currencyConverter,r=e.helloSettings,i=e.onCountryChange,a=e.overrideCurrencyFormat,s=e.storeId,u=e.zonosApiKey;_a.cartId=getCartIdFromQueryParam();
|
|
109
109
|
// Expose the checkout cart callbacks on the global so Stripe loading can be
|
|
110
110
|
// gated on whether at least one of them is configured.
|
|
111
111
|
_a.createCartId=o===null||o===void 0?void 0:o.createCartId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-msUlqmSD.js";import{d as cartStore,Y as cartStoreUpdateSelectedShippingOption,b as stripeStore,a0 as stripeStoreBuildAddressForPartyCreate}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-msUlqmSD.js";import{d as cartStore,Y as cartStoreUpdateSelectedShippingOption,b as stripeStore,a0 as stripeStoreBuildAddressForPartyCreate}from"./cart-BoQp8Ema.js";import{s as storageStore}from"./localization-BIh-4pc_.js";import{h as handleFetch,s as sendErrorLog,l as logError}from"./handleFetch-D5GYDF-O.js";import{b as allLogs}from"./VarianceTest-BJmZPrZl.js";var invoiceStore=createStore((function(){return{amountTotalDue:null,isFetchingPayorInfo:true,landedCostShortId:null,partyBillingId:null,payorAddress:null}})).state;var invoiceStoreInitShippingInfo=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i;var a=e.landedCostId,s=e.retries,d=s===void 0?5:s;return __generator(this,(function(e){switch(e.label){case 0:invoiceStore.isFetchingPayorInfo=true;return[4/*yield*/,handleFetch("/api/zonos-elements/invoice/get-payor-info-by-lc-id",{body:{landedCostId:a},method:"POST"})];case 1:n=e.sent();if(!n.errors.length)return[3/*break*/,4];if(!(d>0))return[3/*break*/,3];
|
|
2
2
|
// Wait for 1 second before retrying
|
|
3
3
|
return[4/*yield*/,new Promise((function(e){return setTimeout(e,1e3)}))];case 2:
|
|
4
4
|
// Wait for 1 second before retrying
|
|
@@ -31,7 +31,13 @@ var i=((o=translationStore.translatedChunks[t])===null||o===void 0?void 0:o.valu
|
|
|
31
31
|
if(p===m&&!v){return[2/*return*/,defaultUsExchangeRate]}t=new URLSearchParams;t.set("sourceCurrency",p);t.set("targetCurrency",m);t.set("isGuaranteed",String(v));t.set("country",c||"");return[4/*yield*/,handleFetch("/api/zonos-elements/exchange-rates?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching country landed cost: ".concat((a=o.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,defaultUsExchangeRate]}i=n.exchangeRateCreate,l=i.rate,s=i.targetFormat;u=n.maxAge;if(l){sessionStorage.setItem(c+"_rate",JSON.stringify(l));d={rate:l,targetFormat:s};return[2/*return*/,{exchangeRate:d,maxAge:u}]}return[2/*return*/,defaultUsExchangeRate]}}))}))};var getInclusivePriceConfigurations=function(e){return __awaiter(void 0,void 0,void 0,(function(){var a,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:if(!e){return[2/*return*/,null]}return[4/*yield*/,handleFetch("/api/zonos-elements/inclusive-prices/".concat(e))];case 1:t=n.sent(),r=t.errors,o=t.json;if(r.length||!o){logError("Error fetching country inclusive price setting: ".concat((a=r.find(Boolean))===null||a===void 0?void 0:a.message));return[2/*return*/,null]}return[2/*return*/,o||null]}}))}))};var getLocaleMessages=function(e){return __awaiter(void 0,[e],void 0,(function(e){var a,t,r,o,n;var i=e.countryCode,l=e.localeTo,s=e.storeId;return __generator(this,(function(e){switch(e.label){case 0:t=new URLSearchParams;t.set("countryCode",i);t.set("storeId",s.toString());if(l){t.set("localeTo",l)}return[4/*yield*/,handleFetch("/api/zonos-elements/locale-messages?".concat(t.toString()))];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error fetching exchange rate",(a=o.find(Boolean))===null||a===void 0?void 0:a.message);return[2/*return*/,[]]}return[2/*return*/,n.locale_countryCodesPage]}}))}))};var isCountryCode=function(e){return/^[A-Z]{2}$/.test(e)};var COUNTRY_OVERRIDE_KEY="zonos--country";var withBlockedStorage=function(e){try{e()}catch(e){
|
|
32
32
|
// localStorage/sessionStorage can throw in blocked-storage contexts
|
|
33
33
|
// (Safari private mode, cross-origin iframes).
|
|
34
|
-
}};var
|
|
34
|
+
}};var readStoredCountry=function(e){try{var a=e.getItem(COUNTRY_OVERRIDE_KEY);if(!a||!isCountryCode(a)){return null}return a}catch(e){return null}};var writeOverride=function(e,a){e.setItem(COUNTRY_OVERRIDE_KEY,a)};var withEachStorage=function(e){withBlockedStorage((function(){return e(window.localStorage)}));withBlockedStorage((function(){return e(window.sessionStorage)}))};var getCountryOverrideStorage=function(){var e;return(e=readStoredCountry(window.localStorage))!==null&&e!==void 0?e:readStoredCountry(window.sessionStorage)};var migrateCountryOverrideStorage=function(e){if(!e){return}withBlockedStorage((function(){var a=readStoredCountry(window.localStorage);
|
|
35
|
+
// Only mirror the country Hello actually kept. A failed localStorage
|
|
36
|
+
// clear can leave a discarded country in local; never copy that to
|
|
37
|
+
// session for older Elements. Never copy session → local.
|
|
38
|
+
if(a===e){writeOverride(window.sessionStorage,a)}}))};var setCountryOverrideStorage=function(e){
|
|
39
|
+
// Dual-write so older Elements that only read sessionStorage see the pick.
|
|
40
|
+
withEachStorage((function(a){return writeOverride(a,e)}))};var clearCountryOverrideStorage=function(){withEachStorage((function(e){return e.removeItem(COUNTRY_OVERRIDE_KEY)}))};var getZCountryUrlParam=function(e){var a=new URLSearchParams(e||window.location.search);var t=function(e){var t=a.get(e);if(t&&isCountryCode(t)){return t}return null};var r=t("zCountry");
|
|
35
41
|
// Fallback to legacy 'country'
|
|
36
42
|
var o=t("country");
|
|
37
43
|
// Fallback to customerCountry
|
|
@@ -327,7 +333,7 @@ if((n=c===null||c===void 0?void 0:c.includedCountries)===null||n===void 0?void 0
|
|
|
327
333
|
// Apply excludedCountries — remove countries from the list
|
|
328
334
|
if((i=c===null||c===void 0?void 0:c.excludedCountries)===null||i===void 0?void 0:i.length){for(var y=0,f=c.excludedCountries;y<f.length;y++){var g=f[y];delete p[g]}}localizationStore.helloCountryList=p};var updateCheckoutSessionLanguage=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t;return __generator(this,(function(r){switch(r.label){case 0:if(!storageStore.checkoutSessionId){return[2/*return*/,null]}return[4/*yield*/,handleFetch("/api/zonos-elements/update-checkout-session-metadata",{body:{id:storageStore.checkoutSessionId,metadata:[
|
|
329
335
|
// This is being used from the backend to determine the language of the checkout session
|
|
330
|
-
{key:"language",value:localizationStore.selectedLocale}]},method:"POST"})];case 1:e=r.sent(),a=e.errors,t=e.json;if(a.length||!t){logError("Error occurs when updating checkout session",JSON.stringify(a,null,2));return[2/*return*/,{errors:a,json:t}]}return[2/*return*/,{errors:[],json:t}]}}))}))};var localizationStoreUpdateSelectedLocale=function(e){var a=getValidLocale(e);localizationStore.selectedLocale=a;translationStoreUpdateLanguage(a);void updateCheckoutSessionLanguage();if(localizationStore.localizationLoaded){void getCustomMessages()}};var initLocalizationStore=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,i,l,s,u,d,c,v,p,m,h;return __generator(this,(function(g){switch(g.label){case 0:
|
|
336
|
+
{key:"language",value:localizationStore.selectedLocale}]},method:"POST"})];case 1:e=r.sent(),a=e.errors,t=e.json;if(a.length||!t){logError("Error occurs when updating checkout session",JSON.stringify(a,null,2));return[2/*return*/,{errors:a,json:t}]}return[2/*return*/,{errors:[],json:t}]}}))}))};var localizationStoreUpdateSelectedLocale=function(e){var a=getValidLocale(e);localizationStore.selectedLocale=a;translationStoreUpdateLanguage(a);void updateCheckoutSessionLanguage();if(localizationStore.localizationLoaded){void getCustomMessages()}};var initLocalizationStore=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,a,t,r,o,n,i,l,s,u,d,c,v,p,m,h;return __generator(this,(function(g){switch(g.label){case 0:a=getZCountryUrlParam();t=getCountryOverrideStorage();r=!!t&&!a;return[4/*yield*/,Promise.all([getCountries(),getShippingZones(),getLocalization(),r?getLocalization({ignoreCountryOverride:true}):Promise.resolve(undefined)])];case 1:o=g.sent(),n=o[0],i=o[1],l=o[2],s=o[3];u=i===null||i===void 0?void 0:i.reduce((function(e,a){var t;var r=n===null||n===void 0?void 0:n[a];return r?Object.assign(Object.assign({},e),(t={},t[a]=r,t)):e}),{});localizationStore.allCountries=n;localizationStore.shippingZoneCountries=u||null;localizationStore.inclusivePricingConfigurations=((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.inclusivePriceConfigurations)||[];
|
|
331
337
|
// Initialize the country list for the hello widget
|
|
332
338
|
initHelloCountryList(n||{});d=l.country,c=l.locale;log("Country code from localization: ".concat(d));log("Locale from localization: ".concat(c));
|
|
333
339
|
// update selected country code in store
|
|
@@ -335,4 +341,8 @@ localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCount
|
|
|
335
341
|
// If the country code is not set, set it to the US for development (vercel can't get geo country in dev)
|
|
336
342
|
if(!localizationStore.selectedCountryCode&&(p.some((function(e){return window.location.origin.includes(e)}))||m.get("zonosQaUrl")==="dev-elements")){
|
|
337
343
|
// update selected country code in store
|
|
338
|
-
localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:"CA"})}return[4/*yield*/,reconcileRememberedCountryOverride({geoCountry:s===null||s===void 0?void 0:s.country,urlCountryAtLoad:a})];case 2:h=g.sent();if(h){localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:h})}
|
|
344
|
+
localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:"CA"})}return[4/*yield*/,reconcileRememberedCountryOverride({geoCountry:s===null||s===void 0?void 0:s.country,urlCountryAtLoad:a})];case 2:h=g.sent();if(h){localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCountryCode:h})}
|
|
345
|
+
// After reconcile + fallback: only then is selectedCountryCode the
|
|
346
|
+
// country Hello kept. Mirroring earlier (or without this match) can
|
|
347
|
+
// publish a discarded localStorage leftover into sessionStorage.
|
|
348
|
+
migrateCountryOverrideStorage(localizationStore.selectedCountryCode);if(localizationStore.selectedCountryCode){syncSelectedCountryToPage(localizationStore.selectedCountryCode)}void getCustomMessages();void getNewLocalization({isInitializing:true});if(!localizationStore.localizationLoaded){localizationStore.localizationLoaded=true;void removeBigcommerceCartShipping();void toggleBigcommerceNativeCurrencySelector()}return[2/*return*/]}}))}))};export{getSupportedLanguages as A,applyInclusiveEffectiveRate as B,getFallbackDefaultCountryCode as C,localizationStoreUpdateSelectedLocale as D,VARIANT_TEST_KEY_EXPIRATION as V,fetchCheckoutId as a,fetchBigCommerceCheckout as b,isCountryInShippingZone as c,localizationStoreUpdateSelectedCountryCode as d,storageStoreSetEnabledVariantTestKeys as e,filterValidTests as f,getZCountryUrlParam as g,localizationStoreOnChange as h,isBigCommerceCustomerLoggedIn as i,currencyFormat as j,languages as k,localizationStore as l,getOverridenZCountry as m,isValidSelector as n,initLocalizationStore as o,setZCountryUrlParam as p,currencyDisplay as q,currencyConvertAndFormat as r,storageStore as s,translate as t,currencyConvert as u,shouldShowHelloWidget as v,getExchangeRate as w,numberFormat as x,translationStoreOnChange as y,storageStoreOnChange as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-msUlqmSD.js";import{x as cartStoreNextStep,j as cartStoreClearCheckoutInterval,t as trackConversionEvent,y as isPolicyConsentRequired,G as policyConsentStore,C as validateCheckoutSession,b as stripeStore,d as cartStore,n as stripeStoreHandleInventoryCheck,A as storeCreditStoreApplyCredit,T as stripeStoreRecordPolicyConsent,B as storeCreditStoreCoversFullAmount,D as storeCreditStoreCreateOrder,K as storeCreditStoreGetEffectiveAmount}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i["throw"]=u(1),i["return"]=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-msUlqmSD.js";import{x as cartStoreNextStep,j as cartStoreClearCheckoutInterval,t as trackConversionEvent,y as isPolicyConsentRequired,G as policyConsentStore,C as validateCheckoutSession,b as stripeStore,d as cartStore,n as stripeStoreHandleInventoryCheck,A as storeCreditStoreApplyCredit,T as stripeStoreRecordPolicyConsent,B as storeCreditStoreCoversFullAmount,D as storeCreditStoreCreateOrder,K as storeCreditStoreGetEffectiveAmount}from"./cart-BoQp8Ema.js";import{s as storageStore,t as translate}from"./localization-BIh-4pc_.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-D5GYDF-O.js";import{i as isContrastColor}from"./isContrastColor-CWLU13s9.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{i as isAnalyticsRelayInIframe,a as enqueueRelayEvent,s as submitGtag}from"./submitGtag-df9AQ2zL.js";
|
|
2
2
|
/*!
|
|
3
3
|
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
4
4
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=c(0),a["throw"]=c(1),a["return"]=c(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-BoQp8Ema.js";import{s as storageStore}from"./localization-BIh-4pc_.js";import{l as logError,h as handleFetch}from"./handleFetch-D5GYDF-O.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2/*return*/,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4/*yield*/,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2/*return*/,{errors:c.map((function(r){return r.message})),json:null}]}return[2/*return*/,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
|
package/dist/esm-es5/{renderCheckoutCurrency-BNbwijGo.js → renderCheckoutCurrency-C2Tw73uR.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as cartStore}from"./cart-
|
|
1
|
+
import{d as cartStore}from"./cart-BoQp8Ema.js";import{B as applyInclusiveEffectiveRate,j as currencyFormat}from"./localization-BIh-4pc_.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};
|
|
2
2
|
/**
|
|
3
3
|
* Unified currency rendering for checkout amounts.
|
|
4
4
|
* @note This is only to display, not for calculations.
|
|
@@ -10,4 +10,4 @@ if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBa
|
|
|
10
10
|
// Amount is in foreign currency, divide by the rate to convert it to the base currency if displaying in base currency
|
|
11
11
|
var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}
|
|
12
12
|
// Amount is already in base currency, need to multiply rate to convert to foreign currency if display in foreign currency
|
|
13
|
-
var
|
|
13
|
+
var m=i?n:n*o;return currencyFormat({amount:m,currency:l})};export{renderCheckoutCurrency as r};
|
package/dist/esm-es5/{shouldShowLanguageSelect-B82gTfHz.js → shouldShowLanguageSelect-CCD7gpSY.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as getSupportedLanguages}from"./localization-
|
|
1
|
+
import{A as getSupportedLanguages}from"./localization-BIh-4pc_.js";
|
|
2
2
|
/**
|
|
3
3
|
* Whether to offer the language selector. Hidden when the merchant has narrowed
|
|
4
4
|
* `appearanceSettings.supportedLocales` to a single language — there is nothing to pick, so the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function d(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?r(e.value):o(e.value).then(d,s)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=s(0),d["throw"]=s(1),d["return"]=s(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return a([e,t])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(r=0)),r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as translate,s as storageStore,z as storageStoreOnChange,l as localizationStore}from"./localization-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function d(e){try{a(n.next(e))}catch(e){i(e)}}function s(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?r(e.value):o(e.value).then(d,s)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,d=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return d.next=s(0),d["throw"]=s(1),d["return"]=s(2),typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return a([e,t])}}function a(s){if(n)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(r=0)),r)try{if(n=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as translate,s as storageStore,z as storageStoreOnChange,l as localizationStore}from"./localization-BIh-4pc_.js";import{z as zonosStore,a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{M as MIN_POSTAL_CODE_LENGTH}from"./getMissingRequiredShippingFields-Ks6_tpjn.js";import{c as classes}from"./classes-BJHSB96f.js";import{U as extractName,b as stripeStore,w as stripeStorePrefetchLandedCost,t as trackConversionEvent}from"./cart-BoQp8Ema.js";import{R as RemoveIcon$1}from"./RemoveIcon-C2QMVeWW.js";import{i as isTextContainsNonLatinChars,c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{t as throttle}from"./throttle-Cvlvb-dm.js";import{i as isCheckoutMobile}from"./handleFetch-D5GYDF-O.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-Cye-evFK.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./helpers-DJIdCwJ5.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import"./debounce-BR3PaG8X.js";import"./ShortAddressCode-nJ6oI8-n.js";var zonosAddressCompletionDialogCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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--body{padding:0 24px;position:relative}:host .zonos--dialog-header{margin-bottom:24px;position:-webkit-sticky;position:sticky;padding-top:24px;top:0;z-index:11;background:var(--zonos-elements-gray-0)}:host .zonos--dialog-title{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-bottom:12px}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-bottom:5px;gap:20px;-ms-scroll-chaining:chained;overscroll-behavior:auto}:host .zonos--selected-address{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--completion-fields{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--completion-name-row{display:-ms-flexbox;display:flex;gap:8px}:host .zonos--completion-name-row zonos-input{-ms-flex:1;flex:1}:host .zonos--group-btn{position:-webkit-sticky;position:sticky;padding:24px 0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;background:var(--zonos-elements-gray-0);z-index:11}:host .zonos--group-btn .zonos--button-wrapper{display:-ms-flexbox;display:flex;gap:8px}:host(.mobile) .zonos--completion-name-row{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--button-wrapper{-ms-flex-direction:column;flex-direction:column;width:100%}:host(.mobile) .zonos--button-wrapper zonos-button{width:100%}:host(.mobile) .zonos--button-wrapper .zonos--cancel-btn{-ms-flex-order:2;order:2}:host(.mobile) .zonos--button-wrapper .zonos--submit-btn{-ms-flex-order:1;order:1}"};var ZonosAddressCompletionDialog=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.closeCompletionDialog=createEvent(this,"closeCompletionDialog",7);this.completionSubmit=createEvent(this,"completionSubmit",7);
|
|
2
2
|
/**
|
|
3
3
|
* Whether or not the continue button is loading
|
|
4
4
|
*/this.continueLoading=false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as registerInstance,h,a as Host,d as createEvent}from"./index-_lt63o7c.js";import{t as translate,l as localizationStore}from"./localization-
|
|
1
|
+
import{r as registerInstance,h,a as Host,d as createEvent}from"./index-_lt63o7c.js";import{t as translate,l as localizationStore}from"./localization-BIh-4pc_.js";import{i as isTextContainsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import"./handleFetch-D5GYDF-O.js";import"./VarianceTest-BJmZPrZl.js";var zonosAddressDisplayCss=function(){return':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}'};var ZonosAddressDisplay=/** @class */function(){function o(o){registerInstance(this,o)}o.prototype.render=function(){var o,s;var e=this.currentAddress,t=e.city,n=e.country,i=e.email,a=e.line1,l=e.line2,r=e.name,d=e.phone,c=e.postal_code,f=e.state;
|
|
2
2
|
/**
|
|
3
3
|
* Look the country up in the full country list first, since a billing
|
|
4
4
|
* address can be in a country the merchant does not ship to and would
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,o,n){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?o(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;s=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,o){if(o||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return t.concat(i||Array.prototype.slice.call(e))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as throttle}from"./throttle-Cvlvb-dm.js";import{U as extractName,w as stripeStorePrefetchLandedCost,b as stripeStore,t as trackConversionEvent,J as stripeStoreOnChange,d as cartStore}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,o,n){function s(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,i){function r(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n["throw"](t))}catch(t){i(t)}}function l(t){t.done?o(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=a(0),r["throw"]=a(1),r["return"]=a(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;s=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,o){if(o||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++){if(i||!(n in e)){if(!i)i=Array.prototype.slice.call(e,0,n);i[n]=e[n]}}return t.concat(i||Array.prototype.slice.call(e))};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{t as throttle}from"./throttle-Cvlvb-dm.js";import{U as extractName,w as stripeStorePrefetchLandedCost,b as stripeStore,t as trackConversionEvent,J as stripeStoreOnChange,d as cartStore}from"./cart-BoQp8Ema.js";import{s as storageStore,l as localizationStore,C as getFallbackDefaultCountryCode,t as translate,z as storageStoreOnChange}from"./localization-BIh-4pc_.js";import{z as zonosStore,g as getZonosStoreTheme,a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{l as logError,i as isCheckoutMobile,s as sendErrorLog}from"./handleFetch-D5GYDF-O.js";import{a as shouldRenderTaxIdInput,s as shouldRenderShortAddressCodeInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{c as classes}from"./classes-BJHSB96f.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./TaxId-Cye-evFK.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import"./debounce-BR3PaG8X.js";import"./isDarkColor-YdrG78th.js";import"./ShortAddressCode-nJ6oI8-n.js";
|
|
2
2
|
/**
|
|
3
3
|
* Map a Stripe address change event value into a Stripe `ContactOption`, used to
|
|
4
4
|
* pre-seed the address element's saved-address (contacts) list on remount.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,a,n){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n["throw"](e))}catch(e){o(e)}}function s(e){e.done?a(e.value):r(e.value).then(i,l)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return s([e,t])}}function s(l){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(a=0)),a)try{if(n=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;r=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(l[0]===6&&a.label<o[1]){a.label=o[1];o=l;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(l);break}if(o[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e];r=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{b as airwallexStore,c as collectStore,f as airwallexStoreInitSdk,l as createElement,m as airwallexStoreGetLocale,n as airwallexStoreOnChange}from"./collect-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,a,n){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function l(e){try{s(n["throw"](e))}catch(e){o(e)}}function s(e){e.done?a(e.value):r(e.value).then(i,l)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=l(0),i["throw"]=l(1),i["return"]=l(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return s([e,t])}}function s(l){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(a=0)),a)try{if(n=1,r&&(o=l[0]&2?r["return"]:l[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;if(r=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:a.label++;return{value:l[1],done:false};case 5:a.label++;r=l[1];l=[0];continue;case 7:l=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){a.label=l[1];break}if(l[0]===6&&a.label<o[1]){a.label=o[1];o=l;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(l);break}if(o[2])a.ops.pop();a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e];r=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{b as airwallexStore,c as collectStore,f as airwallexStoreInitSdk,l as createElement,m as airwallexStoreGetLocale,n as airwallexStoreOnChange}from"./collect-CdrR5OBy.js";import{d as cartStore}from"./cart-BoQp8Ema.js";import{h as localizationStoreOnChange,t as translate,l as localizationStore}from"./localization-BIh-4pc_.js";import{z as zonosStore}from"./zonosStore-msUlqmSD.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import{l as logError}from"./handleFetch-D5GYDF-O.js";import"./isDarkColor-YdrG78th.js";import"./getBorderRadius-DYfkeXdx.js";import"./TaxId-Cye-evFK.js";var zonosAirwallexPaymentCss=function(){return".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}"};var ZonosAirwallexPayment=/** @class */function(){function e(e){var t=this;registerInstance(this,e);this.airwallexPaymentSuccess=createEvent(this,"airwallexPaymentSuccess",7);this.airwallexPaymentError=createEvent(this,"airwallexPaymentError",7);this.element=null;this.storeUnsubscribeList=[];
|
|
2
2
|
/** Client secret currently being mounted, to avoid overlapping mounts. */this.mountingClientSecret=null;
|
|
3
3
|
/**
|
|
4
4
|
* Whether the SDK failed to load or the element failed to mount.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,o,e,n){function s(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function r(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?e(t.value):s(t.value).then(i,r)}c((n=n.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=r(0),i["throw"]=r(1),i["return"]=r(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(o){return c([t,o])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(n=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){e.label=r[1];break}if(r[0]===6&&e.label<a[1]){e.label=a[1];a=r;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(r);break}if(a[2])e.ops.pop();e.trys.pop();continue}r=o.call(t,e)}catch(t){r=[6,t];s=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,o,e){if(e||arguments.length===2)for(var n=0,s=o.length,a;n<s;n++){if(a||!(n in o)){if(!a)a=Array.prototype.slice.call(o,0,n);a[n]=o[n]}}return t.concat(a||Array.prototype.slice.call(o))};import{r as registerInstance,h,a as Host,g as getElement,d as createEvent}from"./index-_lt63o7c.js";import{a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{b as stripeStore,t as trackConversionEvent}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,o,e,n){function s(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,a){function i(t){try{c(n.next(t))}catch(t){a(t)}}function r(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?e(t.value):s(t.value).then(i,r)}c((n=n.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,s,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=r(0),i["throw"]=r(1),i["return"]=r(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(t){return function(o){return c([t,o])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(n=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){e.label=r[1];break}if(r[0]===6&&e.label<a[1]){e.label=a[1];a=r;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(r);break}if(a[2])e.ops.pop();e.trys.pop();continue}r=o.call(t,e)}catch(t){r=[6,t];s=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,o,e){if(e||arguments.length===2)for(var n=0,s=o.length,a;n<s;n++){if(a||!(n in o)){if(!a)a=Array.prototype.slice.call(o,0,n);a[n]=o[n]}}return t.concat(a||Array.prototype.slice.call(o))};import{r as registerInstance,h,a as Host,g as getElement,d as createEvent}from"./index-_lt63o7c.js";import{a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{b as stripeStore,t as trackConversionEvent}from"./cart-BoQp8Ema.js";import{s as storageStore}from"./localization-BIh-4pc_.js";import{l as logError}from"./handleFetch-D5GYDF-O.js";import{d as paypalStoreInitButtons,e as paypalStoreOnChange}from"./paypal-DNfvnuUU.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import"./isDarkColor-YdrG78th.js";import"./TaxId-Cye-evFK.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-df9AQ2zL.js";var zonosCardCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}"};var ZonosCard=/** @class */function(){function t(t){registerInstance(this,t);
|
|
2
2
|
/**
|
|
3
3
|
* The border radius of the card
|
|
4
4
|
* @default 6
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,t,e,s){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,r){function i(o){try{l(s.next(o))}catch(o){r(o)}}function a(o){try{l(s["throw"](o))}catch(o){r(o)}}function l(o){o.done?e(o.value):n(o.value).then(i,a)}l((s=s.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(o){return function(t){return l([o,t])}}function l(a){if(s)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(e=0)),e)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;n=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){e.label=a[1];break}if(a[0]===6&&e.label<r[1]){e.label=r[1];r=a;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(a);break}if(r[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return o.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,e as getAssetPath,h,a as Host,F as Fragment,d as createEvent,g as getElement}from"./index-_lt63o7c.js";import{d as cartStore,L as cartStoreHasOneEligibleItem,M as isEuDapRemittance,m as cartStoreIsOrderModificationPaymentOnlySession,N as stripeStoreApplyPromoCode,O as stripeStoreRemovePromoCode,b as stripeStore,H as stripeStoreReset,c as stripeStoreRetrievePayment,t as trackConversionEvent,P as stripeStoreResetPromoCode,Q as stripeStoreMessageBasedOnStatus,R as storeCreditStore,S as storeCreditStoreReset,B as storeCreditStoreCoversFullAmount,y as isPolicyConsentRequired,G as policyConsentStore,T as stripeStoreRecordPolicyConsent,x as cartStoreNextStep,U as extractName,V as stripeStoreTranslateAddressToLatin,I as cartStoreOnChange,W as getCountryField,X as stripeStoreAsyncAddressUpdate,Y as cartStoreUpdateSelectedShippingOption,Z as cartStoreGetShippingTransitInfo,_ as cartStoreGetMethod,$ as sortServiceLevelOptionsByAmount}from"./cart-Cleo1j5P.js";import{t as translate,l as localizationStore,s as storageStore,k as languages,w as getExchangeRate,x as numberFormat,h as localizationStoreOnChange}from"./localization-BiL8bPsY.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-BNbwijGo.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-ByGDytaN.js";import{c as classes}from"./classes-BJHSB96f.js";import{z as zonosStore,c as createStore,d as zonosStoreOnChange,g as getZonosStoreTheme,a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{D as DUTY_KEY,T as TAXES_KEY,h as hasInclusivePrice}from"./hasInclusivePrice-DKRplpLX.js";import{i as isSameHostCheckoutLink}from"./isSameHostCheckoutLink-BxAHnL5J.js";import{s as submitAnalytics,c as paypalStoreReset,a as paypalStore}from"./paypal-D4vWRxHJ.js";import{h as handleFetch,s as sendErrorLog,j as jsonParse,g as getIsTestMode,i as isCheckoutMobile,a as getIsStagingMode,l as logError}from"./handleFetch-D5GYDF-O.js";import{c as createCustomEvent}from"./createCustomEvent-XQfWgQLB.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{s as shouldShowLanguageSelect}from"./shouldShowLanguageSelect-B82gTfHz.js";import{p as placeTestOrder}from"./placeTestOrder-BNmc5RCo.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{g as getContrastColor}from"./getContrastColor-CfCPlW9U.js";import{i as isColorVariable}from"./isColorVariable-DXXUq2Lv.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-4Jq6V4pO.js";import{g as getMissingRequiredShippingFields}from"./getMissingRequiredShippingFields-B1IL1-gn.js";import{c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{s as shouldRenderShortAddressCodeInput,a as shouldRenderTaxIdInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{e as euCountryCodes}from"./TaxId-Cye-evFK.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-df9AQ2zL.js";import"./debounce-CrmpwbEE.js";import"./debounce-BR3PaG8X.js";import"./ShortAddressCode-nJ6oI8-n.js";var zonosCartItemsCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}"};var ZonosCartItems=/** @class */function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=getAssetPath("./assets/empty-item.jpeg");var e=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"2f81af1b6315853352a29bacaa230d782e76115a",class:"zonos--cart-items zonos--elements"},h("table",{key:"7fe64f09729e0791605cdd8e66d7230ab162c7cf",class:"zonos--cart-table"},h("tbody",{key:"49c17b5c7c68bfd41b2d8fabbbf4c3c764faba33"},e.map((function(e){var s=e.imageUrl;var n=cleanHtmlMarkdown(e.name);var r=e.amount*e.quantity;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},s&&!o.errorImages.includes(s)?h("img",{alt:e.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[s],false)},src:e.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:e.name,src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("div",null,n.map((function(o){return h("zonos-text",{type:"label"},o)}))),h("zonos-text",{textColor:"gray-600",type:"caption"},translate("Quantity"),": ",e.quantity)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel",weight:600},renderCheckoutCurrency({amount:r,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartItems.style=zonosCartItemsCss();var ChevronUpIcon$2='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var zonosCartRestrictedItemsCss=function(){return':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}'};var ZonosCartRestrictedItems=/** @class */function(){function o(o){registerInstance(this,o);
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,t,e,s){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,r){function i(o){try{l(s.next(o))}catch(o){r(o)}}function a(o){try{l(s["throw"](o))}catch(o){r(o)}}function l(o){o.done?e(o.value):n(o.value).then(i,a)}l((s=s.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(o){return function(t){return l([o,t])}}function l(a){if(s)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(e=0)),e)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;n=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){e.label=a[1];break}if(a[0]===6&&e.label<r[1]){e.label=r[1];r=a;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(a);break}if(r[2])e.ops.pop();e.trys.pop();continue}a=t.call(o,e)}catch(o){a=[6,o];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,t,e){if(e||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return o.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,e as getAssetPath,h,a as Host,F as Fragment,d as createEvent,g as getElement}from"./index-_lt63o7c.js";import{d as cartStore,L as cartStoreHasOneEligibleItem,M as isEuDapRemittance,m as cartStoreIsOrderModificationPaymentOnlySession,N as stripeStoreApplyPromoCode,O as stripeStoreRemovePromoCode,b as stripeStore,H as stripeStoreReset,c as stripeStoreRetrievePayment,t as trackConversionEvent,P as stripeStoreResetPromoCode,Q as stripeStoreMessageBasedOnStatus,R as storeCreditStore,S as storeCreditStoreReset,B as storeCreditStoreCoversFullAmount,y as isPolicyConsentRequired,G as policyConsentStore,T as stripeStoreRecordPolicyConsent,x as cartStoreNextStep,U as extractName,V as stripeStoreTranslateAddressToLatin,I as cartStoreOnChange,W as getCountryField,X as stripeStoreAsyncAddressUpdate,Y as cartStoreUpdateSelectedShippingOption,Z as cartStoreGetShippingTransitInfo,_ as cartStoreGetMethod,$ as sortServiceLevelOptionsByAmount}from"./cart-BoQp8Ema.js";import{t as translate,l as localizationStore,s as storageStore,k as languages,w as getExchangeRate,x as numberFormat,h as localizationStoreOnChange}from"./localization-BIh-4pc_.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-C2Tw73uR.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-ByGDytaN.js";import{c as classes}from"./classes-BJHSB96f.js";import{z as zonosStore,c as createStore,d as zonosStoreOnChange,g as getZonosStoreTheme,a as zonosStoreFontFamily}from"./zonosStore-msUlqmSD.js";import{D as DUTY_KEY,T as TAXES_KEY,h as hasInclusivePrice}from"./hasInclusivePrice-CbEfIhI5.js";import{i as isSameHostCheckoutLink}from"./isSameHostCheckoutLink-BxAHnL5J.js";import{s as submitAnalytics,c as paypalStoreReset,a as paypalStore}from"./paypal-DNfvnuUU.js";import{h as handleFetch,s as sendErrorLog,j as jsonParse,g as getIsTestMode,i as isCheckoutMobile,a as getIsStagingMode,l as logError}from"./handleFetch-D5GYDF-O.js";import{c as createCustomEvent}from"./createCustomEvent-XQfWgQLB.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{s as shouldShowLanguageSelect}from"./shouldShowLanguageSelect-CCD7gpSY.js";import{p as placeTestOrder}from"./placeTestOrder-CQaMKFOg.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{g as getContrastColor}from"./getContrastColor-CfCPlW9U.js";import{i as isColorVariable}from"./isColorVariable-DXXUq2Lv.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-4Jq6V4pO.js";import{g as getMissingRequiredShippingFields}from"./getMissingRequiredShippingFields-Ks6_tpjn.js";import{c as containsNonLatinChars}from"./containsNonLatinChars-C04AWRC2.js";import{s as shouldRenderShortAddressCodeInput,a as shouldRenderTaxIdInput}from"./shouldRenderTaxIdInput-CKyZ6Zni.js";import{e as euCountryCodes}from"./TaxId-Cye-evFK.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-df9AQ2zL.js";import"./debounce-CrmpwbEE.js";import"./debounce-BR3PaG8X.js";import"./ShortAddressCode-nJ6oI8-n.js";var zonosCartItemsCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}"};var ZonosCartItems=/** @class */function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=getAssetPath("./assets/empty-item.jpeg");var e=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"2f81af1b6315853352a29bacaa230d782e76115a",class:"zonos--cart-items zonos--elements"},h("table",{key:"7fe64f09729e0791605cdd8e66d7230ab162c7cf",class:"zonos--cart-table"},h("tbody",{key:"49c17b5c7c68bfd41b2d8fabbbf4c3c764faba33"},e.map((function(e){var s=e.imageUrl;var n=cleanHtmlMarkdown(e.name);var r=e.amount*e.quantity;return h("tr",{class:"zonos--cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},s&&!o.errorImages.includes(s)?h("img",{alt:e.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[s],false)},src:e.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:e.name,src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("div",null,n.map((function(o){return h("zonos-text",{type:"label"},o)}))),h("zonos-text",{textColor:"gray-600",type:"caption"},translate("Quantity"),": ",e.quantity)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"semiBoldLabel",weight:600},renderCheckoutCurrency({amount:r,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCartItems.style=zonosCartItemsCss();var ChevronUpIcon$2='<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n';var zonosCartRestrictedItemsCss=function(){return':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}'};var ZonosCartRestrictedItems=/** @class */function(){function o(o){registerInstance(this,o);
|
|
2
2
|
/**
|
|
3
3
|
* This is to hide the section when the parent collapse on mobile
|
|
4
4
|
*/this.hide=false;this.errorImages=[];this.internalCollapsed=true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r["throw"](e))}catch(e){i(e)}}function c(e){e.done?o(e.value):n(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(o=0)),o)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,i;r<n;r++){if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,h,F as Fragment,a as Host}from"./index-_lt63o7c.js";import{s as stripeStoreGetDomesticShippingSession,a as stripeStoreSaveDomesticShippingSession,b as stripeStore,i as initStripeElements,c as stripeStoreRetrievePayment,g as getCheckoutSession,d as cartStore,e as cartStoreUpdateItems,f as cartStoreReset,p as policyConsentStoreReset,h as cartStoreResetTabItems,j as cartStoreClearCheckoutInterval,k as stripeStoreInitCheckoutSession,l as stripeStoreGetPaymentIntent,m as cartStoreIsOrderModificationPaymentOnlySession,n as stripeStoreHandleInventoryCheck,o as cartStoreStartCheckoutInterval,t as trackConversionEvent,q as getCheckoutSessionBody,r as cartStoreUpdateToErrorState,u as stripeStoreCleanupDomesticShippingSession,v as cartStoreSetCheckoutSession,w as stripeStorePrefetchLandedCost,x as cartStoreNextStep,y as isPolicyConsentRequired,z as stripeStoreUpdateCheckoutSessionBaseCurrency,A as storeCreditStoreApplyCredit,B as storeCreditStoreCoversFullAmount,C as validateCheckoutSession,D as storeCreditStoreCreateOrder,E as stripeStoreConfirmPayment,F as stripeStoreHandleInventoryRefund,G as policyConsentStore,H as stripeStoreReset,I as cartStoreOnChange,J as stripeStoreOnChange,K as storeCreditStoreGetEffectiveAmount}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,r){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r["throw"](e))}catch(e){i(e)}}function c(e){e.done?o(e.value):n(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(o=0)),o)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(i=o.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(a[0]===6&&o.label<i[1]){o.label=i[1];i=a;break}if(i&&o.label<i[2]){o.label=i[2];o.ops.push(a);break}if(i[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];n=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,i;r<n;r++){if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,h,F as Fragment,a as Host}from"./index-_lt63o7c.js";import{s as stripeStoreGetDomesticShippingSession,a as stripeStoreSaveDomesticShippingSession,b as stripeStore,i as initStripeElements,c as stripeStoreRetrievePayment,g as getCheckoutSession,d as cartStore,e as cartStoreUpdateItems,f as cartStoreReset,p as policyConsentStoreReset,h as cartStoreResetTabItems,j as cartStoreClearCheckoutInterval,k as stripeStoreInitCheckoutSession,l as stripeStoreGetPaymentIntent,m as cartStoreIsOrderModificationPaymentOnlySession,n as stripeStoreHandleInventoryCheck,o as cartStoreStartCheckoutInterval,t as trackConversionEvent,q as getCheckoutSessionBody,r as cartStoreUpdateToErrorState,u as stripeStoreCleanupDomesticShippingSession,v as cartStoreSetCheckoutSession,w as stripeStorePrefetchLandedCost,x as cartStoreNextStep,y as isPolicyConsentRequired,z as stripeStoreUpdateCheckoutSessionBaseCurrency,A as storeCreditStoreApplyCredit,B as storeCreditStoreCoversFullAmount,C as validateCheckoutSession,D as storeCreditStoreCreateOrder,E as stripeStoreConfirmPayment,F as stripeStoreHandleInventoryRefund,G as policyConsentStore,H as stripeStoreReset,I as cartStoreOnChange,J as stripeStoreOnChange,K as storeCreditStoreGetEffectiveAmount}from"./cart-BoQp8Ema.js";import{p as paypalStoreHasPaypalEnabled,s as submitAnalytics,a as paypalStore,b as paypalInitScript}from"./paypal-DNfvnuUU.js";import{f as filterValidTests,a as fetchCheckoutId,b as fetchBigCommerceCheckout,i as isBigCommerceCustomerLoggedIn,l as localizationStore,c as isCountryInShippingZone,d as localizationStoreUpdateSelectedCountryCode,g as getZCountryUrlParam,s as storageStore,V as VARIANT_TEST_KEY_EXPIRATION,e as storageStoreSetEnabledVariantTestKeys,t as translate,h as localizationStoreOnChange,j as currencyFormat}from"./localization-BIh-4pc_.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-msUlqmSD.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-BycjkdlE.js";import{h as handleFetch,g as getIsTestMode,j as jsonParse,l as logError,b as getAdditionalLogMetadata,s as sendErrorLog,a as getIsStagingMode,i as isCheckoutMobile}from"./handleFetch-D5GYDF-O.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-4Jq6V4pO.js";import{l as log,g as getElapsedTime,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector,a as checkoutHiddenInternationalBtnSelector,g as getAbandonedCartRenewTokenValue}from"./CheckoutConfig-D5SpFsQJ.js";import{c as classes}from"./classes-BJHSB96f.js";import{c as createCustomEvent}from"./createCustomEvent-XQfWgQLB.js";import{g as getBorderRadius}from"./getBorderRadius-DYfkeXdx.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{s as styles}from"./styles-BTIeCf3T.js";import{R as RemoveIcon}from"./RemoveIcon-C2QMVeWW.js";import"./TaxId-Cye-evFK.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-df9AQ2zL.js";import"./debounce-CrmpwbEE.js";import"./debounce-BR3PaG8X.js";
|
|
2
2
|
/**
|
|
3
3
|
* Check if store discount is enabled
|
|
4
4
|
*/var isStoreDiscountEnabled=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,o;return __generator(this,(function(r){switch(r.label){case 0:return[4/*yield*/,handleFetch("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=r.sent(),t=e.errors,o=e.json;if(t.length||!(o===null||o===void 0?void 0:o.enabled)){return[2/*return*/,{enabled:false}]}return[2/*return*/,{enabled:true}]}}))}))};var selectVarianceTest=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,o,r,n;var i=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:
|
|
@@ -1004,9 +1004,9 @@ var p=!this.isMobile?u:undefined;var S=localizationStore.customMessages;var C=(t
|
|
|
1004
1004
|
|
|
1005
1005
|
var w=this.getBaseCurrencySettlementInfo();var y=function(){
|
|
1006
1006
|
// add timestamp to logo url if it's preview mode so browser won't cache it on the dashboard setting
|
|
1007
|
-
var t=e.preview?"".concat(l,"?timestamp=").concat(Date.now()):l;return h("div",{class:"zonos--logo"},t&&h("img",{alt:"".concat(zonosStore.organizationName," logo"),src:t}))};var
|
|
1007
|
+
var t=e.preview?"".concat(l,"?timestamp=").concat(Date.now()):l;return h("div",{class:"zonos--logo"},t&&h("img",{alt:"".concat(zonosStore.organizationName," logo"),src:t}))};var _=getIsTestMode();var b=function(){var t=new URLSearchParams(window.location.search);var o=t.get("zonosQaUrl");var r=t.get("zonosDebug");var n=t.get("zonosE2ETest");var i=e.overrideStagingMode||getIsStagingMode();return h("zonos-v-stack",null,h("div",{class:"zonos--logo-wrapper"},y(),_&&h("zonos-badge",{badgeColor:"orange",size:"small"},translate("Test mode")),i&&h("zonos-badge",{badgeColor:"red",size:"small"},translate("Staging mode")),r==="1"&&h("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),o&&h("zonos-badge",{badgeColor:"purple",size:"small"},o),n&&h("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),!s&&h("zonos-checkout-progress-tabs",{backgroundColor:
|
|
1008
1008
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
1009
|
-
e.isMobile?"--zonos-elements-gray-0":null}),z.map((function(e){return h("zonos-custom-message",{icon:MessageIcon,message:e.message})})))};var T=function(){if(cartStore.checkoutSessionTimeoutShow){return h("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:translate("Your checkout session has expired. Please reload the page to continue."),restStateTitle:translate("Session timed out"),restStateType:"Warning"},h("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},translate("Reload")))}return h("div",{class:"zonos--content",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:d})}},cartStore.step!=="finish"&&cartStore.step!=="error"&&h(Fragment,null,h("div",{class:"zonos--left","data-theme":g,style:styles({"--zonos--primary-color":!e.isMobile?c:undefined})},!e.isMobile&&
|
|
1009
|
+
e.isMobile?"--zonos-elements-gray-0":null}),z.map((function(e){return h("zonos-custom-message",{icon:MessageIcon,message:e.message})})))};var T=function(){if(cartStore.checkoutSessionTimeoutShow){return h("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:translate("Your checkout session has expired. Please reload the page to continue."),restStateTitle:translate("Session timed out"),restStateType:"Warning"},h("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},translate("Reload")))}return h("div",{class:"zonos--content",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:d})}},cartStore.step!=="finish"&&cartStore.step!=="error"&&h(Fragment,null,h("div",{class:"zonos--left","data-theme":g,style:styles({"--zonos--primary-color":!e.isMobile?c:undefined})},!e.isMobile&&b(),cartStore.step==="customer-info"&&h("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:p}),cartStore.step==="shipping"&&h("zonos-shipping",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:p}),cartStore.step==="payment"&&h("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,this.handleStripePaymentContinue()];case 1:e.sent();return[2/*return*/]}}))}))},submitBtnColor:p})),h("div",{class:"zonos--right","data-theme":v},e.isMobile&&b(),h("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&h("zonos-currency-toggle",null),!e.isLegacyCheckout&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),h("div",{class:"flex--wrapper"},h("div",{class:"zonos--wrapper"},h("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){
|
|
1010
1010
|
// do nothing if it's not mobile
|
|
1011
1011
|
if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),h("zonos-collapse",{
|
|
1012
1012
|
// only collapsible on mobile
|