@zonos/elements 1.5.2 → 1.5.3
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/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
- package/dist/cjs/{cart-BJpqPdFU.js → cart-C39TMSgB.js} +14 -0
- package/dist/cjs/{collect-CyUttsvB.js → collect-lF9DenLk.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-DEbNbRAZ.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
- package/dist/cjs/index.cjs.js +61 -42
- package/dist/cjs/{invoice-DzRkkpLu.js → invoice-BD3pCr8P.js} +1 -1
- package/dist/cjs/{paypal-DCSqbdjW.js → paypal-Bd1qmwiv.js} +1 -1
- package/dist/cjs/{placeTestOrder-Bkip4PUT.js → placeTestOrder-BMQRvX2q.js} +1 -1
- package/dist/cjs/{renderCheckoutCurrency-BDvEZ3Hv.js → renderCheckoutCurrency-DE2p8CT8.js} +1 -1
- package/dist/cjs/{taxIdFields-e4OCgr8K.js → taxIdFields-BKbk2bhi.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +4 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +5 -5
- package/dist/cjs/zonos-checkout.cjs.entry.js +41 -15
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +5 -5
- package/dist/cjs/zonos-collect.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +63 -38
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice.cjs.entry.js +3 -3
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +10 -1
- package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
- package/dist/collection/components/main/zonos-controller.js +24 -9
- package/dist/collection/components/store/checkout/stripe.js +13 -1
- package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
- package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
- package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
- package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
- package/dist/collection/scripts/_loadStripe.js +15 -4
- package/dist/collection/scripts/_zonosBase.js +40 -31
- package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
- package/dist/esm/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +14 -2
- package/dist/esm/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +3 -3
- package/dist/esm/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
- package/dist/esm/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm/index.js +61 -42
- package/dist/esm/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +2 -2
- package/dist/esm/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
- package/dist/esm/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +2 -2
- package/dist/esm/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +5 -5
- package/dist/esm/zonos-address-display_2.entry.js +1 -1
- package/dist/esm/zonos-address_4.entry.js +3 -3
- 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 +42 -16
- 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 +63 -38
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- 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/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
- package/dist/esm-es5/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +9 -9
- package/dist/esm-es5/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +2 -2
- package/dist/esm-es5/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm-es5/index.js +76 -65
- package/dist/esm-es5/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +1 -1
- package/dist/esm-es5/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
- package/dist/esm-es5/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +4 -4
- package/dist/esm-es5/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm-es5/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
- 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 +20 -9
- 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 +6 -6
- package/dist/esm-es5/zonos-controller.entry.js +22 -13
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-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 +1 -1
- 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 +16 -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/main/mountCheckoutWithoutStripe.d.ts +8 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -1
- package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
- package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
- package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
- package/dist/types/scripts/_zonosBase.d.ts +16 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-08b01c96.entry.js → p-02faff47.entry.js} +1 -1
- package/dist/zonos-elements/{p-573a4e7c.system.entry.js → p-0c68cbbb.system.entry.js} +6 -6
- package/dist/zonos-elements/{p-68325c5a.system.entry.js → p-1cd2d097.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-af741506.entry.js → p-255e411a.entry.js} +1 -1
- package/dist/zonos-elements/{p-dJcbnNlE.system.js → p-2c_UqKJL.system.js} +2 -2
- package/dist/zonos-elements/{p-BUfCTQXY.system.js → p-3AUMK-5E.system.js} +113 -113
- package/dist/zonos-elements/{p-dd003161.entry.js → p-3ee87d8b.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f9f859f.system.entry.js → p-42fa5694.system.entry.js} +5 -5
- package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
- package/dist/zonos-elements/{p-ebc7ea54.system.entry.js → p-4ce4c49f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b3668a4.system.entry.js → p-5622fc50.system.entry.js} +263 -252
- package/dist/zonos-elements/{p-3a506614.system.entry.js → p-59457fd9.system.entry.js} +71 -62
- package/dist/zonos-elements/{p-7fe83919.entry.js → p-66398133.entry.js} +1 -1
- package/dist/zonos-elements/{p-9df31243.system.entry.js → p-674323ac.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-97729873.entry.js → p-71d9a5b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-30bf4700.system.entry.js → p-81780f8f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-1986cc37.entry.js → p-821b83a2.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a296dbc.system.entry.js → p-877a82d2.system.entry.js} +61 -61
- package/dist/zonos-elements/p-8daec112.entry.js +1 -0
- package/dist/zonos-elements/{p-150047b3.system.entry.js → p-93bc75fd.system.entry.js} +19 -19
- package/dist/zonos-elements/{p-b540c636.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4b65f192.entry.js → p-9a4947a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
- package/dist/zonos-elements/{p-D4xpkSsK.js → p-BIJM2Kj-.js} +1 -1
- package/dist/zonos-elements/{p-D-Lnf8mS.system.js → p-BOh4ifdL.system.js} +2 -2
- package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
- package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-DC1OPJDq.system.js → p-BvoPE_nb.system.js} +1 -1
- package/dist/zonos-elements/{p-C5fs3rIR.js → p-C3E55OqH.js} +1 -1
- package/dist/zonos-elements/{p-BnQyot7Y.system.js → p-C3gF3UV5.system.js} +29 -29
- package/dist/zonos-elements/{p-BKUlQxBd.system.js → p-CD2ahEZn.system.js} +1 -1
- package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
- package/dist/zonos-elements/{p-Cp1IAJvW.system.js → p-CEV0O_IQ.system.js} +4 -4
- package/dist/zonos-elements/{p-yv7ekcdG.system.js → p-CZ-uYiCo.system.js} +2 -2
- package/dist/zonos-elements/{p-CP7KnfR3.system.js → p-Cn2xE-9t.system.js} +79 -68
- package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
- package/dist/zonos-elements/{p-Dv5a-V6w.system.js → p-Cw_Qnyow.system.js} +1 -1
- package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
- package/dist/zonos-elements/{p-CVRbGFV3.js → p-D9OPKqLg.js} +1 -1
- package/dist/zonos-elements/{p-DrbN3rPL.js → p-Df62LRNs.js} +2 -2
- package/dist/zonos-elements/{p-DKnphvmJ.js → p-Lsqrpzc5.js} +1 -1
- package/dist/zonos-elements/{p-DrS-0mk7.system.js → p-YQFbWtjn.system.js} +1 -1
- package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
- package/dist/zonos-elements/{p-bb1b414a.system.entry.js → p-a6bb296c.system.entry.js} +6 -6
- package/dist/zonos-elements/{p-13015d34.system.entry.js → p-abb85879.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-383343c7.entry.js → p-b8653024.entry.js} +1 -1
- package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
- package/dist/zonos-elements/{p-96b250d8.system.entry.js → p-be067e12.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-Cl5yV0ak.js → p-bmrOH9oh.js} +1 -1
- package/dist/zonos-elements/{p-71d29603.entry.js → p-c185bc23.entry.js} +1 -1
- package/dist/zonos-elements/{p-13d5b2f9.entry.js → p-c6e78de2.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3c147d2.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-0909ef77.entry.js → p-cbb96382.entry.js} +1 -1
- package/dist/zonos-elements/{p-6db7317a.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-e43470f7.system.entry.js → p-df240119.system.entry.js} +17 -17
- package/dist/zonos-elements/{p-f2ed52bc.system.entry.js → p-e16e4db6.system.entry.js} +15 -15
- package/dist/zonos-elements/{p-7214c953.system.entry.js → p-eb016dd8.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-709d1561.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e374aaa4.entry.js → p-ed8a7a7f.entry.js} +1 -1
- package/dist/zonos-elements/{p-3466bcba.entry.js → p-ef932fda.entry.js} +1 -1
- package/dist/zonos-elements/{p-bfa9e32a.entry.js → p-f792ba5f.entry.js} +1 -1
- package/dist/zonos-elements/{p-aK18R41t.js → p-fZcKMzE-.js} +1 -1
- package/dist/zonos-elements/{p-C-zdj7MK.js → p-fdritVtG.js} +1 -1
- package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
- package/dist/zonos-elements/{p-CMneHjck.system.js → p-v8IEjQ2z.system.js} +10 -10
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +10 -10
- package/dist/zonos-elements/p-43c0ebe9.entry.js +0 -1
- package/dist/zonos-elements/p-8ac26831.entry.js +0 -1
- package/dist/zonos-elements/p-BI6VAB5B.js +0 -1
- package/dist/zonos-elements/p-BJ_kE5rM.js +0 -1
- package/dist/zonos-elements/p-DATNIakn.js +0 -1
- package/dist/zonos-elements/p-af4ad54b.entry.js +0 -1
- package/dist/zonos-elements/p-bac94956.entry.js +0 -1
- package/dist/zonos-elements/p-cf6bf7a4.entry.js +0 -1
- package/dist/zonos-elements/p-db40b9c3.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}}};import{c as createStore,z as zonosStore}from"./zonosStore-BXP9FvIt.js";import{
|
|
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-BXP9FvIt.js";import{h as cartStore,$ as cartStoreUpdateSelectedShippingOption,e as stripeStore,a3 as stripeStoreBuildAddressForPartyCreate}from"./cart-b84n0nhi.js";import{s as storageStore}from"./localization-B5CRzthT.js";import{h as handleFetch,s as sendErrorLog,l as logError}from"./handleFetch-BFVO7oAR.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
|
|
@@ -342,4 +342,4 @@ localizationStoreUpdateSelectedCountryCode({isInitializing:true,newSelectedCount
|
|
|
342
342
|
// After reconcile + fallback: only then is selectedCountryCode the
|
|
343
343
|
// country Hello kept. Mirroring earlier (or without this match) can
|
|
344
344
|
// publish a discarded localStorage leftover into sessionStorage.
|
|
345
|
-
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,
|
|
345
|
+
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,isValidSelector as m,getOverridenZCountry 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-BXP9FvIt.js";import{
|
|
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-BXP9FvIt.js";import{z as cartStoreNextStep,m as cartStoreClearCheckoutInterval,u as trackConversionEvent,A as isPolicyConsentRequired,I as policyConsentStore,E as validateCheckoutSession,e as stripeStore,h as cartStore,r as stripeStoreHandleInventoryCheck,C as storeCreditStoreApplyCredit,V as stripeStoreRecordPolicyConsent,D as storeCreditStoreCoversFullAmount,F as storeCreditStoreCreateOrder,M as storeCreditStoreGetEffectiveAmount}from"./cart-b84n0nhi.js";import{s as storageStore,t as translate}from"./localization-B5CRzthT.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-BFVO7oAR.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-C5xzFHjG.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{
|
|
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{h as cartStore}from"./cart-b84n0nhi.js";import{s as storageStore}from"./localization-B5CRzthT.js";import{l as logError,h as handleFetch}from"./handleFetch-BFVO7oAR.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-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{h as cartStore}from"./cart-b84n0nhi.js";import{B as applyInclusiveEffectiveRate,j as currencyFormat}from"./localization-B5CRzthT.js";var getDisplayCurrency=function(){var r,t;var a=cartStore.displayBaseCurrency;var e=a&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(t=cartStore.exchangeRate)===null||t===void 0?void 0:t.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.
|
|
5
|
-
*/var renderCheckoutCurrency=function(r){var
|
|
5
|
+
*/var renderCheckoutCurrency=function(r){var t=r.amount,a=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;
|
|
6
6
|
// If the amount already in foreign currency, no need to apply the inclusive effective rate since it's already has the inclusive effective rate applied
|
|
7
|
-
var n=t
|
|
7
|
+
var n=a?t:applyInclusiveEffectiveRate(t);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;
|
|
8
8
|
// If the item currency is the same as the presentment currency, we can just return the amount in the presentment currency in the same format
|
|
9
|
-
if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(
|
|
9
|
+
if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(a){
|
|
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
|
package/dist/esm-es5/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as getSupportedLanguages}from"./localization-
|
|
1
|
+
import{A as getSupportedLanguages}from"./localization-B5CRzthT.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
|
-
import{r as requireIsObject,f as getDefaultExportFromCjs}from"./zonosStore-BXP9FvIt.js";import{r as requireDebounce}from"./debounce-DHj2iHA1.js";import{h}from"./index-_lt63o7c.js";import{
|
|
1
|
+
import{r as requireIsObject,f as getDefaultExportFromCjs}from"./zonosStore-BXP9FvIt.js";import{r as requireDebounce}from"./debounce-DHj2iHA1.js";import{h}from"./index-_lt63o7c.js";import{X as resolveTaxIdSelection,e as stripeStore}from"./cart-b84n0nhi.js";import{t as translate}from"./localization-B5CRzthT.js";import{t as taxIdLabelForCheckout,d as isCheckoutTaxIdTypeValue}from"./taxIdRules-xYlx7ZXW.js";var throttle_1;var hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),r=requireIsObject();
|
|
2
2
|
/** Error message constants. */var t="Expected a function";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a throttled function that only invokes `func` at most once per
|
|
@@ -43,4 +43,4 @@ import{r as requireIsObject,f as getDefaultExportFromCjs}from"./zonosStore-BXP9F
|
|
|
43
43
|
*
|
|
44
44
|
* // Cancel the trailing throttled invocation.
|
|
45
45
|
* jQuery(window).on('popstate', throttled.cancel);
|
|
46
|
-
*/function o(o,a,i){var l=true,n=true;if(typeof o!="function"){throw new TypeError(t)}if(r(i)){l="leading"in i?!!i.leading:l;n="trailing"in i?!!i.trailing:n}return e(o,a,{leading:l,maxWait:a,trailing:n})}throttle_1=o;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);var getTaxIdFieldState=function(e){var r=e.companyName,t=e.countryCode,o=e.errorField,a=e.errorMessage,i=e.shouldRequirePeruTaxId,l=e.taxIdType;var n,u;var s=resolveTaxIdSelection({companyName:r,countryCode:t,shouldRequirePeruTaxId:i,taxIdType:l}),d=s.rendered,p=s.selectedType,
|
|
46
|
+
*/function o(o,a,i){var l=true,n=true;if(typeof o!="function"){throw new TypeError(t)}if(r(i)){l="leading"in i?!!i.leading:l;n="trailing"in i?!!i.trailing:n}return e(o,a,{leading:l,maxWait:a,trailing:n})}throttle_1=o;return throttle_1}var throttleExports=requireThrottle();var throttle=getDefaultExportFromCjs(throttleExports);var getTaxIdFieldState=function(e){var r=e.companyName,t=e.countryCode,o=e.errorField,a=e.errorMessage,i=e.shouldRequirePeruTaxId,l=e.taxIdType;var n,u;var s=resolveTaxIdSelection({companyName:r,countryCode:t,shouldRequirePeruTaxId:i,taxIdType:l}),d=s.rendered,p=s.selectedType,v=s.send,c=s.typeOptions;if(!d){return null}var h=c?null:taxIdLabelForCheckout(t);return{inputLabel:(n=p===null||p===void 0?void 0:p.label)!==null&&n!==void 0?n:h===null||h===void 0?void 0:h.friendlyName,inputPlaceholder:(u=p===null||p===void 0?void 0:p.placeholder)!==null&&u!==void 0?u:h===null||h===void 0?void 0:h.placeholder,selectedValue:(p===null||p===void 0?void 0:p.value)||"",showValueInput:v,typeError:o==="type"?a:"",typeOptions:c,valueError:o==="value"?a:""}};var renderTaxIdFields=function(e){var r=e.companyName,t=e.countryCode,o=e.errorField,a=e.errorMessage,i=e.onTaxIdChange,l=e.shouldRequirePeruTaxId,n=e.taxId,u=e.taxIdType;var s=getTaxIdFieldState({companyName:r,countryCode:t,errorField:o,errorMessage:a,shouldRequirePeruTaxId:l,taxIdType:u});if(!s){return null}return h("div",{class:"zonos--tax-id-input"},s.typeOptions&&h("zonos-stripe-select",{error:s.typeError,isError:!!s.typeError,onSelectChange:function(e){if(isCheckoutTaxIdTypeValue(e.detail)){stripeStore.taxIdType=e.detail}},options:s.typeOptions.map((function(e){return{label:translate(e.label),value:e.value}})),selectLabel:translate("Tax id type"),selectedValue:s.selectedValue,value:s.selectedValue}),s.showValueInput&&h("zonos-stripe-input",{error:s.valueError,inputLabel:s.inputLabel?translate(s.inputLabel):"",inputPlaceholder:s.inputPlaceholder||"",inputValue:n,isError:!!s.valueError,onInputChange:function(e){stripeStore.taxId=e.detail;i===null||i===void 0?void 0:i(e.detail)}}))};export{renderTaxIdFields as r,throttle as t};
|