@zonos/elements 1.3.288 → 1.3.290
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-CV4buPlT.js → cart-7DceSLKl.js} +3 -3
- package/dist/cjs/{collect-jzWKzrV7.js → collect-C08DUE1L.js} +3 -3
- package/dist/cjs/{debounce-5sZmmlCI.js → debounce-Cd2emZPn.js} +2 -2
- package/dist/cjs/{debounce-Nu2lJW4A.js → debounce-vY0QYT6o.js} +1 -1
- package/dist/cjs/{getBorderRadius-DGZiQu09.js → getBorderRadius-CyYZw4qq.js} +1 -1
- package/dist/cjs/{getMissingRequiredShippingFields-r5vYIqoX.js → getMissingRequiredShippingFields-Duz8xpmf.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-BZMQohG9.js → hasInclusivePrice-C-iyXqJ0.js} +1 -1
- package/dist/cjs/index.cjs.js +8 -9
- package/dist/cjs/{invoice-CHw-mJdS.js → invoice-DSuHUQpi.js} +3 -3
- package/dist/cjs/{localization-CxXsmxs5.js → localization-BJqYz_PB.js} +192 -69
- package/dist/cjs/{paypal-BLuHeOJH.js → paypal-CZoctP9S.js} +4 -4
- package/dist/cjs/{placeTestOrder-VK_CMeq0.js → placeTestOrder-D7baFuaV.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-CC4CAy-a.js → renderCheckoutCurrency-Ca2HH1Gc.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-Bj_jKWPK.js → shouldShowLanguageSelect-FyTdz7U_.js} +1 -1
- package/dist/cjs/{submitGtag-CcEL-w5D.js → submitGtag-D79e8u6s.js} +1 -1
- package/dist/cjs/{throttle-BcxGntLr.js → throttle-zSVRQLC0.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-Dltl5RBx.js → updateCheckoutSessionAttributes-jMtfOL2m.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +11 -11
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +7 -7
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +15 -15
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +12 -12
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
- package/dist/cjs/zonos-collect.cjs.entry.js +7 -7
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +129 -51
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
- package/dist/cjs/zonos-invoice.cjs.entry.js +7 -7
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-BCNYr6Tk.js → zonosStore-Bx9jK82G.js} +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +17 -15
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +29 -52
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -2
- package/dist/collection/components/store/hello/localization.js +69 -34
- package/dist/collection/components/store/zonosStore.js +2 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +0 -1
- package/dist/collection/components/utils/api/getLocalization.js +2 -2
- package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -4
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +1 -0
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +2 -0
- package/dist/collection/components/utils/formatDate.js +1 -3
- package/dist/collection/components/utils/getOverridenZCountry.js +3 -5
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +49 -0
- package/dist/collection/components/utils/hello/getZCountryUrlParam.js +5 -9
- package/dist/collection/components/utils/hello/isCountryCode.js +1 -0
- package/dist/collection/components/utils/hello/isCountryInShippingZone.js +8 -0
- package/dist/collection/components/utils/hello/reconcileRememberedCountryOverride.js +37 -0
- package/dist/collection/components/utils/hello/resolveHelloFloatPlacement.js +98 -0
- package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +27 -20
- package/dist/collection/environment.js +0 -1
- package/dist/collection/scripts/_stripe.js +0 -2
- package/dist/collection/scripts/_zonosBase.js +1 -1
- package/dist/collection/types/generated/graphql.frontend.types.js +218 -63
- package/dist/collection/types/generated/graphql.internal.types.js +815 -152
- package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -0
- package/dist/collection/utils/generateCloudflareDeployUrl.js +5 -2
- package/dist/esm/{cart-ekBk_gxV.js → cart-Cleo1j5P.js} +3 -3
- package/dist/esm/{collect-33rMINDo.js → collect-CspdWIRo.js} +3 -3
- package/dist/esm/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +1 -1
- package/dist/esm/{debounce-DWPsxJsW.js → debounce-CrmpwbEE.js} +2 -2
- package/dist/esm/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
- package/dist/esm/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-B1IL1-gn.js} +1 -1
- package/dist/esm/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-DKRplpLX.js} +1 -1
- package/dist/esm/index.js +8 -9
- package/dist/esm/{invoice-BNDWuVsD.js → invoice-D49igPQ9.js} +3 -3
- package/dist/esm/{localization-AOqYXGdP.js → localization-BiL8bPsY.js} +192 -70
- package/dist/esm/{paypal-CW1D2XqZ.js → paypal-D4vWRxHJ.js} +4 -4
- package/dist/esm/{placeTestOrder-nhmsLLOA.js → placeTestOrder-BNmc5RCo.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-BNbwijGo.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-B82gTfHz.js} +1 -1
- package/dist/esm/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
- package/dist/esm/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +11 -11
- package/dist/esm/zonos-address-display_2.entry.js +3 -3
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-airwallex-payment.entry.js +5 -5
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +7 -7
- package/dist/esm/zonos-cart-items_12.entry.js +15 -15
- package/dist/esm/zonos-checkbox_2.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +12 -12
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-collect-cart-items_3.entry.js +4 -4
- package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
- package/dist/esm/zonos-collect.entry.js +7 -7
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +129 -51
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +6 -6
- package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
- package/dist/esm/zonos-invoice.entry.js +7 -7
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +2 -0
- package/dist/esm-es5/{cart-ekBk_gxV.js → cart-Cleo1j5P.js} +8 -8
- package/dist/esm-es5/{collect-33rMINDo.js → collect-CspdWIRo.js} +1 -1
- package/dist/esm-es5/{debounce-D4ko2kvZ.js → debounce-BR3PaG8X.js} +7 -7
- package/dist/esm-es5/debounce-CrmpwbEE.js +1 -0
- package/dist/esm-es5/{getBorderRadius-HwG64EKM.js → getBorderRadius-DYfkeXdx.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-B1IL1-gn.js} +3 -3
- package/dist/esm-es5/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-DKRplpLX.js} +1 -1
- package/dist/esm-es5/index.js +6 -8
- package/dist/esm-es5/{invoice-BNDWuVsD.js → invoice-D49igPQ9.js} +1 -1
- package/dist/esm-es5/{localization-AOqYXGdP.js → localization-BiL8bPsY.js} +74 -68
- package/dist/esm-es5/{paypal-CW1D2XqZ.js → paypal-D4vWRxHJ.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-nhmsLLOA.js → placeTestOrder-BNmc5RCo.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-BNbwijGo.js} +1 -1
- package/dist/esm-es5/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-B82gTfHz.js} +1 -1
- package/dist/esm-es5/{submitGtag-CCGQS060.js → submitGtag-df9AQ2zL.js} +1 -1
- package/dist/esm-es5/{throttle-D5GyA3yr.js → throttle-Cvlvb-dm.js} +2 -2
- package/dist/esm-es5/{updateCheckoutSessionAttributes-eRSqdC74.js → updateCheckoutSessionAttributes-4Jq6V4pO.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +3 -3
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +2 -2
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +2 -2
- package/dist/esm-es5/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +6 -6
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +2 -2
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +3 -3
- 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 +21 -24
- package/dist/esm-es5/zonos-input.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 +2 -2
- package/dist/esm-es5/zonos-invoice.entry.js +3 -3
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +2 -2
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-DrIOAz4M.js → zonosStore-msUlqmSD.js} +1 -1
- package/dist/scripts/index.d.ts +36 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +5 -3
- package/dist/types/components/store/hello/localization.d.ts +2 -1
- package/dist/types/components/utils/api/getLocalization.d.ts +3 -1
- package/dist/types/components/utils/getOverridenZCountry.d.ts +2 -3
- package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +5 -0
- package/dist/types/components/utils/hello/isCountryCode.d.ts +2 -0
- package/dist/types/components/utils/hello/isCountryInShippingZone.d.ts +2 -0
- package/dist/types/components/utils/hello/reconcileRememberedCountryOverride.d.ts +18 -0
- package/dist/types/components/utils/hello/resolveHelloFloatPlacement.d.ts +39 -0
- package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +8 -4
- package/dist/types/components.d.ts +4 -6
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +10 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +41 -52
- package/dist/types/types/generated/graphql.frontend.types.ts +226 -114
- package/dist/types/types/generated/graphql.internal.types.d.ts +465 -100
- package/dist/types/types/generated/graphql.internal.types.ts +1007 -253
- package/dist/types/types/hello/HelloConfig.d.ts +12 -0
- package/dist/types/utils/formattedCloudflareApiUrl.d.ts +1 -0
- package/dist/types/utils/generateCloudflareDeployUrl.d.ts +5 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-39c8a898.entry.js → p-028e0500.entry.js} +1 -1
- package/dist/zonos-elements/p-079af8c0.system.entry.js +118 -0
- package/dist/zonos-elements/{p-058f07aa.system.entry.js → p-0a4a7742.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-04cc0dac.system.entry.js → p-0dca8a26.system.entry.js} +47 -47
- package/dist/zonos-elements/{p-d33dfc78.system.entry.js → p-0ee74bf3.system.entry.js} +30 -30
- package/dist/zonos-elements/{p-e284d329.entry.js → p-11bab88b.entry.js} +1 -1
- package/dist/zonos-elements/{p-7a5d2211.system.entry.js → p-13d3a372.system.entry.js} +18 -18
- package/dist/zonos-elements/{p-1568ab06.system.entry.js → p-1409de3b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8328f44d.entry.js → p-193d9722.entry.js} +1 -1
- package/dist/zonos-elements/{p-dcdbc610.system.entry.js → p-195f6e38.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-daf9fa07.system.entry.js → p-1b77464d.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-cc5306fe.system.entry.js → p-1bac5ac1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-128485dc.entry.js → p-1c150f26.entry.js} +1 -1
- package/dist/zonos-elements/{p-cf5688f7.entry.js → p-234c202c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a631080.system.entry.js → p-23f6346b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cc949df1.system.entry.js → p-244e0302.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7681798d.entry.js → p-24f3c547.entry.js} +1 -1
- package/dist/zonos-elements/{p-5c08d36b.entry.js → p-2603dce0.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b0afaa7.entry.js → p-26295311.entry.js} +1 -1
- package/dist/zonos-elements/{p-d4c4a00e.entry.js → p-34c5e145.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6e0aeba.system.entry.js → p-35509b10.system.entry.js} +185 -185
- package/dist/zonos-elements/{p-4a54f664.entry.js → p-35539d3d.entry.js} +1 -1
- package/dist/zonos-elements/{p-5024df2d.system.entry.js → p-3c800376.system.entry.js} +61 -61
- package/dist/zonos-elements/{p-f8fd756a.system.entry.js → p-474e8a92.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d55b9664.system.entry.js → p-481ecc23.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-4973f8d8.system.entry.js → p-4fd78ecf.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-8cd3f1e2.entry.js → p-52d9fd3a.entry.js} +1 -1
- package/dist/zonos-elements/{p-a6faab6a.entry.js → p-55916c90.entry.js} +1 -1
- package/dist/zonos-elements/p-5b06f069.entry.js +1 -0
- package/dist/zonos-elements/{p-5d3079e8.entry.js → p-5df25a1a.entry.js} +1 -1
- package/dist/zonos-elements/{p-450ed170.system.entry.js → p-5f347f91.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-beeb9d36.system.entry.js → p-756d303f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5836d426.system.entry.js → p-79ddb12a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f27317d3.system.entry.js → p-7d284341.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-f6ba59f6.system.entry.js → p-7e1050dd.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-02ef0f99.system.entry.js → p-7ee2af6e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-34d1545a.entry.js → p-83aa1c8c.entry.js} +1 -1
- package/dist/zonos-elements/{p-9818f823.entry.js → p-84c9ce16.entry.js} +1 -1
- package/dist/zonos-elements/{p-CaUXHglQ.system.js → p-8PPEbm_0.system.js} +9 -9
- package/dist/zonos-elements/{p-b6deae2b.system.entry.js → p-92fe9a1f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-f57495dc.entry.js → p-990b49f2.entry.js} +1 -1
- package/dist/zonos-elements/{p-cadf6b63.system.entry.js → p-9ef0f69e.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-CZl1nwqv.system.js → p-B4Ufchqh.system.js} +3 -3
- package/dist/zonos-elements/{p-BtMauqj_.system.js → p-B5NDhB1w.system.js} +6 -8
- package/dist/zonos-elements/{p-CJCoACvU.js → p-BDrM4x5N.js} +2 -2
- package/dist/zonos-elements/p-BGktDPwA.system.js +1 -0
- package/dist/zonos-elements/{p-C19J2XSh.js → p-BJzAgoqz.js} +1 -1
- package/dist/zonos-elements/p-BKoLoalh.js +1 -0
- package/dist/zonos-elements/{p-Dj-O6VfM.system.js → p-BT9_ehlh.system.js} +2 -2
- package/dist/zonos-elements/{p-B2EZRfoq.system.js → p-B_5RofQ9.system.js} +15 -15
- package/dist/zonos-elements/p-BaF00SfB.js +1 -0
- package/dist/zonos-elements/{p-D0erXw7p.js → p-BpDCLBwW.js} +1 -1
- package/dist/zonos-elements/{p-DkpYo2Fs.js → p-BtWDzGMx.js} +1 -1
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-CPnR_T0a.system.js → p-BuU_p5DP.system.js} +58 -58
- package/dist/zonos-elements/{p-D5AtAlJx.system.js → p-CASTsiDR.system.js} +3 -3
- package/dist/zonos-elements/{p-CaAod213.system.js → p-CBx5nYet.system.js} +1 -1
- package/dist/zonos-elements/{p-DIJaXkiE.system.js → p-CEmXVahp.system.js} +111 -105
- package/dist/zonos-elements/{p-nU86HJ5w.js → p-CUaf1cEg.js} +1 -1
- package/dist/zonos-elements/p-CX_vfdWt.js +1 -0
- package/dist/zonos-elements/p-C_z9WL8a.js +1 -0
- package/dist/zonos-elements/p-CcJF6xhQ.js +1 -0
- package/dist/zonos-elements/{p-DjuFsKLG.js → p-CewmhMGk.js} +1 -1
- package/dist/zonos-elements/{p-CYdt69j5.system.js → p-Cpe_ISNt.system.js} +18 -18
- package/dist/zonos-elements/{p-DTgv0QpG.js → p-Cuk0LLGQ.js} +1 -1
- package/dist/zonos-elements/p-Cxuiqv1I.js +1 -0
- package/dist/zonos-elements/p-DQZncB2d.system.js +9 -0
- package/dist/zonos-elements/{p-D-DawUYF.system.js → p-DVITR-Eu.system.js} +1 -1
- package/dist/zonos-elements/{p-DGsEWFDU.system.js → p-DYIisqF7.system.js} +1 -1
- package/dist/zonos-elements/{p-uV7m6KrY.system.js → p-DoEHepOc.system.js} +1 -1
- package/dist/zonos-elements/{p-DHwpNxG9.js → p-DwkyNtpD.js} +1 -1
- package/dist/zonos-elements/{p-CKTIJ2Gr.js → p-NJVOYjda.js} +1 -1
- package/dist/zonos-elements/{p-CtEsvWI6.js → p-W82paT5F.js} +1 -1
- package/dist/zonos-elements/{p-04bfcd72.system.entry.js → p-a571beaa.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-5562a955.system.entry.js → p-a5c25829.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-b68ca96f.entry.js → p-a938c174.entry.js} +1 -1
- package/dist/zonos-elements/{p-844a743a.entry.js → p-ab54d0a1.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ebe9a36.entry.js → p-acd50b0b.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f603278.system.entry.js → p-b5882fbb.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-891b47d7.entry.js → p-ba510730.entry.js} +1 -1
- package/dist/zonos-elements/{p-e9320825.entry.js → p-c3b02dbf.entry.js} +1 -1
- package/dist/zonos-elements/{p-be64d823.system.entry.js → p-c403f004.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-64e7bc5b.entry.js → p-c4ad6d4b.entry.js} +1 -1
- package/dist/zonos-elements/p-ca3175d9.entry.js +1 -0
- package/dist/zonos-elements/{p-a38e62cc.entry.js → p-d3d0656a.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b6482ef.entry.js → p-d4d2b39e.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea8790aa.entry.js → p-d6b72f6d.entry.js} +1 -1
- package/dist/zonos-elements/p-d74bc3e8.entry.js +1 -0
- package/dist/zonos-elements/p-db75322d.entry.js +1 -0
- package/dist/zonos-elements/p-dd8ca91e.entry.js +1 -0
- package/dist/zonos-elements/{p-7ae48e31.entry.js → p-ddca5ee1.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdba7d9e.system.entry.js → p-dfc87b10.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e101d722.system.entry.js → p-f37b8aaf.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-b14819ab.system.entry.js → p-fb869759.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-i1iCWKdv.js → p-sz4L-ZnB.js} +1 -1
- package/dist/zonos-elements/{p-D31lQiWo.system.js → p-tGJYTlGL.system.js} +4 -4
- package/dist/zonos-elements/p-tkSf-lrO.system.js +13 -0
- package/dist/zonos-elements/{p-DPW1yXt9.system.js → p-uuZUZPIm.system.js} +61 -61
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +12 -11
- package/dist/esm-es5/debounce-DWPsxJsW.js +0 -1
- package/dist/zonos-elements/p-0466650f.entry.js +0 -1
- package/dist/zonos-elements/p-2ba738ec.entry.js +0 -1
- package/dist/zonos-elements/p-3ERbuo5a.js +0 -1
- package/dist/zonos-elements/p-6f742021.entry.js +0 -1
- package/dist/zonos-elements/p-89ddab88.entry.js +0 -1
- package/dist/zonos-elements/p-BANhKkF2.system.js +0 -1
- package/dist/zonos-elements/p-BJufDgh3.js +0 -1
- package/dist/zonos-elements/p-BSgVcCxT.system.js +0 -9
- package/dist/zonos-elements/p-CQqNJo0D.system.js +0 -13
- package/dist/zonos-elements/p-LypTHRUC.js +0 -1
- package/dist/zonos-elements/p-adfee3a3.entry.js +0 -1
- package/dist/zonos-elements/p-f2cedbcd.system.entry.js +0 -121
- package/dist/zonos-elements/p-lGLcGvEA.js +0 -1
- package/dist/zonos-elements/p-pfIceXbY.js +0 -1
- package/dist/zonos-elements/p-t_ClFAJR.js +0 -1
|
@@ -11,6 +11,7 @@ import { generateCloudflareDeployUrl } from "./generateCloudflareDeployUrl";
|
|
|
11
11
|
* "url" is the API url in Cloudflare
|
|
12
12
|
* @returns
|
|
13
13
|
* - `https://<branch_name>.<project_name>.pages.dev` if is Preview
|
|
14
|
+
* (Pages branch aliases; Workers previews use versioned `*.workers.dev` URLs)
|
|
14
15
|
* - `https://route.elements.zonos.com` if is Production
|
|
15
16
|
*/
|
|
16
17
|
export const formattedCloudflareApiUrl = ({ branchName, inCI: _inCI, inGithubAction, inVercel: _inVercel, isVercelPreview: _isVercelPreview, url, }) => {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generate a Cloudflare deploy URL based on the branch name and project name
|
|
2
|
+
* Generate a Cloudflare Pages-style deploy URL based on the branch name and project name.
|
|
3
|
+
* Workers preview URLs are version-prefixed (`<version>-<worker>.<account>.workers.dev`)
|
|
4
|
+
* and cannot be derived from a branch name, so Pages aliases remain the preview mapping
|
|
5
|
+
* until a matching Workers alias exists.
|
|
3
6
|
* @note not including https://
|
|
4
7
|
* @return {url} string
|
|
5
|
-
* @urlExample build-cloudflare-2.zonos-elements.
|
|
8
|
+
* @urlExample build-cloudflare-2.zonos-elements.pages.dev
|
|
6
9
|
*/
|
|
7
10
|
export const generateCloudflareDeployUrl = ({ branchName, projectName, }) => {
|
|
8
11
|
const normalizedProjectName = projectName.toLowerCase().replace(/\s+/g, '-');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { s as storageStore, t as translate,
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-msUlqmSD.js';
|
|
2
|
+
import { s as storageStore, t as translate, m as getOverridenZCountry, l as localizationStore, f as filterValidTests, e as storageStoreSetEnabledVariantTestKeys } from './localization-BiL8bPsY.js';
|
|
3
3
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
4
4
|
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';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
6
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
6
|
+
import { g as getBorderRadius } from './getBorderRadius-DYfkeXdx.js';
|
|
7
7
|
import { e as euCountryCodes } from './TaxId-Cye-evFK.js';
|
|
8
8
|
|
|
9
9
|
const getCheckoutSession = async () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { t as translate, l as localizationStore, s as storageStore } from './localization-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-msUlqmSD.js';
|
|
2
|
+
import { t as translate, l as localizationStore, s as storageStore } from './localization-BiL8bPsY.js';
|
|
3
3
|
import { l as logError$1, h as handleFetch, s as sendErrorLog } from './handleFetch-D5GYDF-O.js';
|
|
4
4
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
5
|
-
import { d as cartStore, Y as cartStoreUpdateSelectedShippingOption, b as stripeStore, a0 as stripeStoreBuildAddressForPartyCreate } from './cart-
|
|
5
|
+
import { d as cartStore, Y as cartStoreUpdateSelectedShippingOption, b as stripeStore, a0 as stripeStoreBuildAddressForPartyCreate } from './cart-Cleo1j5P.js';
|
|
6
6
|
|
|
7
7
|
// src/constant/common.ts
|
|
8
8
|
function _array_like_to_array(arr, len) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as require_root, h as require_baseGetTag, i as requireIsObjectLike, r as requireIsObject } from './zonosStore-
|
|
1
|
+
import { f as require_root, h as require_baseGetTag, i as requireIsObjectLike, r as requireIsObject } from './zonosStore-msUlqmSD.js';
|
|
2
2
|
|
|
3
3
|
var now_1;
|
|
4
4
|
var hasRequiredNow;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as getDefaultExportFromCjs } from './zonosStore-
|
|
2
|
-
import { r as requireDebounce } from './debounce-
|
|
1
|
+
import { e as getDefaultExportFromCjs } from './zonosStore-msUlqmSD.js';
|
|
2
|
+
import { r as requireDebounce } from './debounce-BR3PaG8X.js';
|
|
3
3
|
|
|
4
4
|
var debounceExports = requireDebounce();
|
|
5
5
|
var debounce = /*@__PURE__*/getDefaultExportFromCjs(debounceExports);
|
package/dist/esm/index.js
CHANGED
|
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
|
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
134
|
-
const cdnUrl = "https://v1.3.
|
|
134
|
+
const cdnUrl = "https://v1.3.290.js.zonos.com";
|
|
135
135
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
136
136
|
if (!qaUrl &&
|
|
137
137
|
(cdnUrl.includes('test.') ||
|
|
@@ -258,7 +258,6 @@ const zonosStripeLoadScript = (params) => {
|
|
|
258
258
|
});
|
|
259
259
|
return stripePromise$1;
|
|
260
260
|
};
|
|
261
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
262
261
|
const registerWrapper = (stripe, startTime) => {
|
|
263
262
|
if (!stripe || !stripe._registerWrapper) {
|
|
264
263
|
return;
|
|
@@ -395,10 +394,10 @@ const zonosLoadUrl = (() => {
|
|
|
395
394
|
return null;
|
|
396
395
|
})();
|
|
397
396
|
const startLoadTime = Date.now();
|
|
398
|
-
const ZONOS_URL = "https://v1.3.
|
|
399
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
400
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
401
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
397
|
+
const ZONOS_URL = "https://v1.3.290.js.zonos.com";
|
|
398
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.290";
|
|
399
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.290";
|
|
400
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.290";
|
|
402
401
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
403
402
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
404
403
|
class Zonos {
|
|
@@ -416,7 +415,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
416
415
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
417
416
|
: null;
|
|
418
417
|
Zonos.isBigCommerce = false;
|
|
419
|
-
Zonos.releaseDate = "
|
|
418
|
+
Zonos.releaseDate = "1790609993128";
|
|
420
419
|
Zonos.isLegacyCheckout = false;
|
|
421
420
|
Zonos.googleAnalyticId = null;
|
|
422
421
|
Zonos.googleAnalyticReady = false;
|
|
@@ -441,7 +440,7 @@ Zonos.isNpm = true;
|
|
|
441
440
|
Zonos.zonosQaUrl = null;
|
|
442
441
|
Zonos.zonosQaUrlApi = null;
|
|
443
442
|
Zonos.trackEventLogs = [];
|
|
444
|
-
Zonos.version = `v${"1.3.
|
|
443
|
+
Zonos.version = `v${"1.3.290"}`;
|
|
445
444
|
Zonos.modeAlerted = false;
|
|
446
445
|
Zonos.cartData = null;
|
|
447
446
|
Zonos.paypal = null;
|
|
@@ -457,7 +456,7 @@ Zonos.init = async (params) => {
|
|
|
457
456
|
// Expose the checkout cart callbacks on the global so Stripe loading can be
|
|
458
457
|
// gated on whether at least one of them is configured.
|
|
459
458
|
_a.createCartId = checkoutSettings === null || checkoutSettings === void 0 ? void 0 : checkoutSettings.createCartId;
|
|
460
|
-
// eslint-disable-next-line
|
|
459
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- intentionally mirror the (deprecated) callback so Stripe loading can be gated on it
|
|
461
460
|
_a.buildCartDetail = checkoutSettings === null || checkoutSettings === void 0 ? void 0 : checkoutSettings.buildCartDetail;
|
|
462
461
|
if (_a.doneInit) {
|
|
463
462
|
// do nothing if zonos is already initialized
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { d as cartStore, Y as cartStoreUpdateSelectedShippingOption, b as stripeStore, a0 as stripeStoreBuildAddressForPartyCreate } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-msUlqmSD.js';
|
|
2
|
+
import { d as cartStore, Y as cartStoreUpdateSelectedShippingOption, b as stripeStore, a0 as stripeStoreBuildAddressForPartyCreate } from './cart-Cleo1j5P.js';
|
|
3
|
+
import { s as storageStore } from './localization-BiL8bPsY.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-D5GYDF-O.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-msUlqmSD.js';
|
|
2
2
|
import { j as jsonParse, h as handleFetch, l as logError } from './handleFetch-D5GYDF-O.js';
|
|
3
3
|
import { a as availableTestKeys, l as log } from './VarianceTest-BJmZPrZl.js';
|
|
4
4
|
|
|
@@ -17652,19 +17652,65 @@ const getLocaleMessages = async ({ countryCode, localeTo, storeId, }) => {
|
|
|
17652
17652
|
return json.locale_countryCodesPage;
|
|
17653
17653
|
};
|
|
17654
17654
|
|
|
17655
|
-
const
|
|
17656
|
-
|
|
17657
|
-
|
|
17658
|
-
|
|
17655
|
+
const isCountryCode = (value) => /^[A-Z]{2}$/.test(value);
|
|
17656
|
+
|
|
17657
|
+
const COUNTRY_OVERRIDE_KEY = 'zonos--country';
|
|
17658
|
+
const withBlockedStorage = (run) => {
|
|
17659
|
+
try {
|
|
17660
|
+
run();
|
|
17659
17661
|
}
|
|
17660
|
-
|
|
17662
|
+
catch (_a) {
|
|
17663
|
+
// localStorage/sessionStorage can throw in blocked-storage contexts
|
|
17664
|
+
// (Safari private mode, cross-origin iframes).
|
|
17665
|
+
}
|
|
17666
|
+
};
|
|
17667
|
+
const clearSessionOverride = () => {
|
|
17668
|
+
window.sessionStorage.removeItem(COUNTRY_OVERRIDE_KEY);
|
|
17661
17669
|
};
|
|
17670
|
+
const readStoredCountry = (storage) => {
|
|
17671
|
+
try {
|
|
17672
|
+
const value = storage.getItem(COUNTRY_OVERRIDE_KEY);
|
|
17673
|
+
if (!value || !isCountryCode(value)) {
|
|
17674
|
+
return null;
|
|
17675
|
+
}
|
|
17676
|
+
return value;
|
|
17677
|
+
}
|
|
17678
|
+
catch (_a) {
|
|
17679
|
+
return null;
|
|
17680
|
+
}
|
|
17681
|
+
};
|
|
17682
|
+
const getCountryOverrideStorage = () => {
|
|
17683
|
+
var _a;
|
|
17684
|
+
return (_a = readStoredCountry(window.localStorage)) !== null && _a !== void 0 ? _a : readStoredCountry(window.sessionStorage);
|
|
17685
|
+
};
|
|
17686
|
+
const migrateCountryOverrideStorage = () => {
|
|
17687
|
+
withBlockedStorage(() => {
|
|
17688
|
+
if (readStoredCountry(window.localStorage)) {
|
|
17689
|
+
clearSessionOverride();
|
|
17690
|
+
}
|
|
17691
|
+
});
|
|
17692
|
+
};
|
|
17693
|
+
const setCountryOverrideStorage = (countryCode) => {
|
|
17694
|
+
withBlockedStorage(() => {
|
|
17695
|
+
window.localStorage.setItem(COUNTRY_OVERRIDE_KEY, countryCode);
|
|
17696
|
+
clearSessionOverride();
|
|
17697
|
+
});
|
|
17698
|
+
};
|
|
17699
|
+
const clearCountryOverrideStorage = () => {
|
|
17700
|
+
withBlockedStorage(() => {
|
|
17701
|
+
window.localStorage.removeItem(COUNTRY_OVERRIDE_KEY);
|
|
17702
|
+
clearSessionOverride();
|
|
17703
|
+
});
|
|
17704
|
+
};
|
|
17705
|
+
|
|
17662
17706
|
const getZCountryUrlParam = (urlParams) => {
|
|
17663
17707
|
const urlSearchParams = new URLSearchParams(urlParams || window.location.search);
|
|
17664
17708
|
const getCountryParam = (param) => {
|
|
17665
17709
|
const country = urlSearchParams.get(param);
|
|
17666
|
-
|
|
17667
|
-
|
|
17710
|
+
if (country && isCountryCode(country)) {
|
|
17711
|
+
return country;
|
|
17712
|
+
}
|
|
17713
|
+
return null;
|
|
17668
17714
|
};
|
|
17669
17715
|
const zCountry = getCountryParam('zCountry');
|
|
17670
17716
|
// Fallback to legacy 'country'
|
|
@@ -17675,19 +17721,16 @@ const getZCountryUrlParam = (urlParams) => {
|
|
|
17675
17721
|
};
|
|
17676
17722
|
|
|
17677
17723
|
/**
|
|
17678
|
-
* Retrieve the
|
|
17724
|
+
* Retrieve the shopper country override from the URL or remembered storage.
|
|
17679
17725
|
*/
|
|
17680
17726
|
const getOverridenZCountry = () => {
|
|
17681
17727
|
const currentUrl = new URL(window.location.href);
|
|
17682
|
-
|
|
17683
|
-
const countryLoadedSession = window.sessionStorage.getItem('zonos--country');
|
|
17684
|
-
const zCountry = getZCountryUrlParam(currentUrl.searchParams) || countryLoadedSession;
|
|
17685
|
-
return zCountry;
|
|
17728
|
+
return (getZCountryUrlParam(currentUrl.searchParams) || getCountryOverrideStorage());
|
|
17686
17729
|
};
|
|
17687
17730
|
|
|
17688
|
-
const getLocalization = async () => {
|
|
17731
|
+
const getLocalization = async ({ ignoreCountryOverride = false, } = {}) => {
|
|
17689
17732
|
try {
|
|
17690
|
-
const zCountry = getOverridenZCountry();
|
|
17733
|
+
const zCountry = ignoreCountryOverride ? null : getOverridenZCountry();
|
|
17691
17734
|
const searchParams = new URLSearchParams();
|
|
17692
17735
|
if (zCountry) {
|
|
17693
17736
|
searchParams.set('zCountry', zCountry);
|
|
@@ -17807,35 +17850,31 @@ const deleteBigCommerceConsignment = async (checkoutId, consignmentId) => {
|
|
|
17807
17850
|
*/
|
|
17808
17851
|
const isBigCommerceCustomerLoggedIn = (checkout) => { var _a; return !!((_a = checkout === null || checkout === void 0 ? void 0 : checkout.customer) === null || _a === void 0 ? void 0 : _a.id); };
|
|
17809
17852
|
|
|
17853
|
+
const isCountryInShippingZone = (countryCode) => {
|
|
17854
|
+
var _a;
|
|
17855
|
+
return !!countryCode &&
|
|
17856
|
+
!!((_a = localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[countryCode]) &&
|
|
17857
|
+
!zonosStore.disabledCountries.includes(countryCode);
|
|
17858
|
+
};
|
|
17859
|
+
|
|
17810
17860
|
/**
|
|
17811
|
-
*
|
|
17812
|
-
*
|
|
17813
|
-
*
|
|
17814
|
-
*
|
|
17815
|
-
* actually sees.
|
|
17816
|
-
*
|
|
17817
|
-
* Resolves the configured `widgetVisibility` behavior (with the deprecated
|
|
17818
|
-
* `showForCountries` override) against the selected country and shipping-zone
|
|
17819
|
-
* state, then applies the include/exclude country overrides.
|
|
17820
|
-
*
|
|
17821
|
-
* @param showLog - emit a debug log when the shopper is not in a shipping zone.
|
|
17822
|
-
* Defaults to `true`; pass `false` from non-rendering callers to avoid log
|
|
17823
|
-
* noise.
|
|
17861
|
+
* Visibility rules for Hello, ignoring whether localization has finished
|
|
17862
|
+
* loading. Used during init reconcile before `localizationLoaded` is set.
|
|
17863
|
+
* Pass `countryCode` to evaluate a remembered country instead of the
|
|
17864
|
+
* currently selected one.
|
|
17824
17865
|
*/
|
|
17825
|
-
const
|
|
17866
|
+
const getHelloWidgetVisibility = (showLog = true, countryCode = localizationStore.selectedCountryCode) => {
|
|
17826
17867
|
var _a, _b;
|
|
17827
|
-
if (!localizationStore.localizationLoaded) {
|
|
17828
|
-
return false;
|
|
17829
|
-
}
|
|
17830
17868
|
const { countryDisplayRules, showForCountries } = zonosStore.helloSettings;
|
|
17831
17869
|
const visibilityRules = countryDisplayRules === null || countryDisplayRules === void 0 ? void 0 : countryDisplayRules.widgetVisibility;
|
|
17832
|
-
const selectedCountry =
|
|
17870
|
+
const selectedCountry = countryCode;
|
|
17871
|
+
const isShippableCountry = isCountryInShippingZone(countryCode);
|
|
17833
17872
|
// Resolve behavior: deprecated showForCountries overrides widgetVisibility.behavior
|
|
17834
17873
|
// If showForCountries is an array of country codes, treat as legacy explicit list
|
|
17835
17874
|
const behavior = Array.isArray(showForCountries)
|
|
17836
17875
|
? showForCountries
|
|
17837
17876
|
: (showForCountries !== null && showForCountries !== void 0 ? showForCountries : visibilityRules === null || visibilityRules === void 0 ? void 0 : visibilityRules.behavior);
|
|
17838
|
-
if (showLog && !
|
|
17877
|
+
if (showLog && !isShippableCountry) {
|
|
17839
17878
|
log(`Hello: not shippable country - Show for countries: ${behavior}`);
|
|
17840
17879
|
}
|
|
17841
17880
|
// Legacy: explicit list of country codes from deprecated showForCountries
|
|
@@ -17849,7 +17888,7 @@ const shouldShowHelloWidget = (showLog = true) => {
|
|
|
17849
17888
|
}
|
|
17850
17889
|
else {
|
|
17851
17890
|
// Default: ONLY_SHIPPABLE
|
|
17852
|
-
isVisible =
|
|
17891
|
+
isVisible = isShippableCountry;
|
|
17853
17892
|
}
|
|
17854
17893
|
// Apply includedCountries — force show the widget for these countries
|
|
17855
17894
|
if (!isVisible &&
|
|
@@ -17865,6 +17904,23 @@ const shouldShowHelloWidget = (showLog = true) => {
|
|
|
17865
17904
|
}
|
|
17866
17905
|
return isVisible;
|
|
17867
17906
|
};
|
|
17907
|
+
/**
|
|
17908
|
+
* Whether the Hello widget should be shown for the current shopper. This is the
|
|
17909
|
+
* single source of truth for Hello's visibility decision — the `zonos-hello`
|
|
17910
|
+
* component renders by it, and other features (e.g. BigCommerce cart shipping
|
|
17911
|
+
* cleanup) gate on it so their behavior stays in lockstep with what the shopper
|
|
17912
|
+
* actually sees.
|
|
17913
|
+
*
|
|
17914
|
+
* @param showLog - emit a debug log when the shopper is not in a shipping zone.
|
|
17915
|
+
* Defaults to `true`; pass `false` from non-rendering callers to avoid log
|
|
17916
|
+
* noise.
|
|
17917
|
+
*/
|
|
17918
|
+
const shouldShowHelloWidget = (showLog = true) => {
|
|
17919
|
+
if (!localizationStore.localizationLoaded) {
|
|
17920
|
+
return false;
|
|
17921
|
+
}
|
|
17922
|
+
return getHelloWidgetVisibility(showLog);
|
|
17923
|
+
};
|
|
17868
17924
|
|
|
17869
17925
|
/**
|
|
17870
17926
|
* Guard against overlapping passes. `removeBigcommerceCartShipping` is fired on
|
|
@@ -18331,6 +18387,41 @@ const getCurrencyCode = (code) => {
|
|
|
18331
18387
|
return null;
|
|
18332
18388
|
};
|
|
18333
18389
|
|
|
18390
|
+
/**
|
|
18391
|
+
* Drop a remembered Hello country when widgetVisibility would hide the
|
|
18392
|
+
* widget for it, then fall back to geo.
|
|
18393
|
+
*
|
|
18394
|
+
* Does not mutate the localization store — the caller applies the returned
|
|
18395
|
+
* country. Pass `geoCountry` when init already fetched IP localization so
|
|
18396
|
+
* discard does not wait on a second round trip. Pass `urlCountryAtLoad`
|
|
18397
|
+
* from the URL as it was at page load (before init writes `zCountry` for
|
|
18398
|
+
* URL_PARAM merchants). Do not omit it after a live URL write — the
|
|
18399
|
+
* default is `null`, not the current URL. Storage is cleared when geo
|
|
18400
|
+
* succeeds, or when a load-time URL country won and the stored country
|
|
18401
|
+
* would be hidden.
|
|
18402
|
+
*/
|
|
18403
|
+
const reconcileRememberedCountryOverride = async ({ geoCountry, urlCountryAtLoad = null, } = {}) => {
|
|
18404
|
+
const storedCountry = getCountryOverrideStorage();
|
|
18405
|
+
if (!storedCountry) {
|
|
18406
|
+
return null;
|
|
18407
|
+
}
|
|
18408
|
+
if (getHelloWidgetVisibility(false, storedCountry)) {
|
|
18409
|
+
return null;
|
|
18410
|
+
}
|
|
18411
|
+
if (urlCountryAtLoad) {
|
|
18412
|
+
clearCountryOverrideStorage();
|
|
18413
|
+
return null;
|
|
18414
|
+
}
|
|
18415
|
+
const country = geoCountry !== undefined
|
|
18416
|
+
? geoCountry
|
|
18417
|
+
: (await getLocalization({ ignoreCountryOverride: true })).country;
|
|
18418
|
+
if (!country) {
|
|
18419
|
+
return null;
|
|
18420
|
+
}
|
|
18421
|
+
clearCountryOverrideStorage();
|
|
18422
|
+
return country;
|
|
18423
|
+
};
|
|
18424
|
+
|
|
18334
18425
|
const setZCountryUrlParam = (selectedCountryCode) => {
|
|
18335
18426
|
if (!selectedCountryCode) {
|
|
18336
18427
|
return;
|
|
@@ -18502,19 +18593,23 @@ const getNewLocalization = async ({ isInitializing, }) => {
|
|
|
18502
18593
|
}
|
|
18503
18594
|
};
|
|
18504
18595
|
const getCustomMessages = async () => {
|
|
18505
|
-
|
|
18506
|
-
|
|
18596
|
+
const countryCode = localizationStore.selectedCountryCode;
|
|
18597
|
+
log(`Getting custom messages for ${countryCode}`);
|
|
18598
|
+
if (!countryCode || !zonosStore.storeId) {
|
|
18507
18599
|
return;
|
|
18508
18600
|
}
|
|
18509
18601
|
const localeMessages = await getLocaleMessages({
|
|
18510
|
-
countryCode
|
|
18602
|
+
countryCode,
|
|
18511
18603
|
localeTo: localizationStore.selectedLocale,
|
|
18512
18604
|
storeId: zonosStore.storeId,
|
|
18513
18605
|
});
|
|
18606
|
+
if (localizationStore.selectedCountryCode !== countryCode) {
|
|
18607
|
+
return;
|
|
18608
|
+
}
|
|
18514
18609
|
const allMessages = localeMessages.flatMap(x => {
|
|
18515
18610
|
var _a;
|
|
18516
18611
|
return {
|
|
18517
|
-
countryCode
|
|
18612
|
+
countryCode,
|
|
18518
18613
|
message: (_a = x.countryCodesPageMessageLinks.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message.textTo,
|
|
18519
18614
|
pageName: x.pageName,
|
|
18520
18615
|
};
|
|
@@ -18557,17 +18652,19 @@ const getValidLocale = (locale) => {
|
|
|
18557
18652
|
log(`Locale ${locale} is not offered, falling back to ${fallback === null || fallback === void 0 ? void 0 : fallback.code}`);
|
|
18558
18653
|
return (fallback === null || fallback === void 0 ? void 0 : fallback.code) || 'en';
|
|
18559
18654
|
};
|
|
18560
|
-
const
|
|
18561
|
-
var _a
|
|
18655
|
+
const syncSelectedCountryToPage = (selectedCountryCode) => {
|
|
18656
|
+
var _a;
|
|
18657
|
+
setZCountryUrlParam(selectedCountryCode);
|
|
18658
|
+
(_a = document
|
|
18659
|
+
.querySelector('zonos-hello')) === null || _a === void 0 ? void 0 : _a.setAttribute('z-country', selectedCountryCode);
|
|
18660
|
+
};
|
|
18661
|
+
const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelectedCountryCode, persistOverride, }) => {
|
|
18662
|
+
var _a;
|
|
18562
18663
|
log(`Updating selected country code to ${newSelectedCountryCode}`);
|
|
18563
18664
|
const isFirstTime = !localizationStore.selectedCountryCode;
|
|
18564
18665
|
localizationStore.selectedCountryCode = getValidCountryCode(newSelectedCountryCode);
|
|
18565
|
-
const { selectedCountryCode
|
|
18566
|
-
const isShippableCountry =
|
|
18567
|
-
!!selectedCountryCode &&
|
|
18568
|
-
!!shippingZoneCountries[selectedCountryCode] &&
|
|
18569
|
-
// Make sure the country is not in the disabled countries list
|
|
18570
|
-
!zonosStore.disabledCountries.includes(selectedCountryCode);
|
|
18666
|
+
const { selectedCountryCode } = localizationStore;
|
|
18667
|
+
const isShippableCountry = isCountryInShippingZone(selectedCountryCode);
|
|
18571
18668
|
// update shippable country
|
|
18572
18669
|
localizationStore.isShippableCountry = isShippableCountry;
|
|
18573
18670
|
log(`${localizationStore.selectedCountryCode} is a shippable country: ${localizationStore.isShippableCountry}`);
|
|
@@ -18590,9 +18687,10 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
|
|
|
18590
18687
|
return;
|
|
18591
18688
|
}
|
|
18592
18689
|
const currencyCode = getCurrencyCode(selectedCountryCode);
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18690
|
+
const shouldPersistOverride = persistOverride !== null && persistOverride !== void 0 ? persistOverride : !isInitializing;
|
|
18691
|
+
// Only trigger onCountryChange after init — the first apply, and any
|
|
18692
|
+
// reconcile fallback during init, are not shopper-selected changes.
|
|
18693
|
+
if (!isFirstTime && !isInitializing) {
|
|
18596
18694
|
(_a = zonosStore.onCountryChange) === null || _a === void 0 ? void 0 : _a.call(zonosStore, {
|
|
18597
18695
|
countryCode: selectedCountryCode,
|
|
18598
18696
|
currencyCode,
|
|
@@ -18622,27 +18720,24 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
|
|
|
18622
18720
|
localizationStore.countryLandedCost = null;
|
|
18623
18721
|
localizationStore.inclusivePricingConfigurations = [];
|
|
18624
18722
|
currencyDisplay();
|
|
18723
|
+
}
|
|
18724
|
+
else {
|
|
18725
|
+
localizationStore.targetCurrency = currencyCode;
|
|
18726
|
+
// Init may apply a remembered country that reconcile then discards. Fetch
|
|
18727
|
+
// exchange rates once after reconcile for the final country instead.
|
|
18625
18728
|
if (!isInitializing) {
|
|
18626
|
-
void
|
|
18729
|
+
void getNewLocalization({ isInitializing: false });
|
|
18627
18730
|
}
|
|
18628
|
-
// Clear session so the next visit falls back to geolocation, but keep
|
|
18629
|
-
// the current shopper's explicit selection visible in the URL (so a
|
|
18630
|
-
// same-tab reload still honors it) and on the hello element.
|
|
18631
|
-
window.sessionStorage.removeItem('zonos--country');
|
|
18632
|
-
setZCountryUrlParam(selectedCountryCode);
|
|
18633
|
-
(_b = document
|
|
18634
|
-
.querySelector('zonos-hello')) === null || _b === void 0 ? void 0 : _b.setAttribute('z-country', selectedCountryCode);
|
|
18635
|
-
return;
|
|
18636
18731
|
}
|
|
18637
|
-
localizationStore.targetCurrency = currencyCode;
|
|
18638
|
-
void getNewLocalization({ isInitializing: isInitializing });
|
|
18639
18732
|
if (!isInitializing) {
|
|
18640
18733
|
void getCustomMessages();
|
|
18641
18734
|
}
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
|
|
18735
|
+
if (shouldPersistOverride) {
|
|
18736
|
+
setCountryOverrideStorage(selectedCountryCode);
|
|
18737
|
+
}
|
|
18738
|
+
if (!isInitializing) {
|
|
18739
|
+
syncSelectedCountryToPage(selectedCountryCode);
|
|
18740
|
+
}
|
|
18646
18741
|
};
|
|
18647
18742
|
const initHelloCountryList = (allCountries) => {
|
|
18648
18743
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -18721,12 +18816,25 @@ const localizationStoreUpdateSelectedLocale = (requestedLocale) => {
|
|
|
18721
18816
|
localizationStore.selectedLocale = newSelectedLocale;
|
|
18722
18817
|
translationStoreUpdateLanguage(newSelectedLocale);
|
|
18723
18818
|
void updateCheckoutSessionLanguage();
|
|
18724
|
-
|
|
18819
|
+
if (localizationStore.localizationLoaded) {
|
|
18820
|
+
void getCustomMessages();
|
|
18821
|
+
}
|
|
18725
18822
|
};
|
|
18726
18823
|
const initLocalizationStore = async () => {
|
|
18727
18824
|
var _a;
|
|
18825
|
+
migrateCountryOverrideStorage();
|
|
18826
|
+
const urlCountryAtLoad = getZCountryUrlParam();
|
|
18827
|
+
const storedCountryAtLoad = getCountryOverrideStorage();
|
|
18828
|
+
const shouldPrefetchGeo = !!storedCountryAtLoad && !urlCountryAtLoad;
|
|
18728
18829
|
// all countries from countries.json, shipping zone and localization
|
|
18729
|
-
const [allCountries, shippingZoneCountries, localization] = await Promise.all([
|
|
18830
|
+
const [allCountries, shippingZoneCountries, localization, geoLocalization] = await Promise.all([
|
|
18831
|
+
getCountries(),
|
|
18832
|
+
getShippingZones(),
|
|
18833
|
+
getLocalization(),
|
|
18834
|
+
shouldPrefetchGeo
|
|
18835
|
+
? getLocalization({ ignoreCountryOverride: true })
|
|
18836
|
+
: Promise.resolve(undefined),
|
|
18837
|
+
]);
|
|
18730
18838
|
// Filter countries to only include countries in the shipping zone
|
|
18731
18839
|
const filteredCountries = shippingZoneCountries === null || shippingZoneCountries === void 0 ? void 0 : shippingZoneCountries.reduce((acc, countryCode) => {
|
|
18732
18840
|
const countryInfo = allCountries === null || allCountries === void 0 ? void 0 : allCountries[countryCode];
|
|
@@ -18745,7 +18853,7 @@ const initLocalizationStore = async () => {
|
|
|
18745
18853
|
// update selected country code in store
|
|
18746
18854
|
localizationStoreUpdateSelectedCountryCode({
|
|
18747
18855
|
isInitializing: true,
|
|
18748
|
-
newSelectedCountryCode: country ||
|
|
18856
|
+
newSelectedCountryCode: country || storedCountryAtLoad,
|
|
18749
18857
|
});
|
|
18750
18858
|
// use locale from params if it exists, otherwise use locale from localization
|
|
18751
18859
|
const overrideLocale = getOverrideLocale();
|
|
@@ -18767,12 +18875,26 @@ const initLocalizationStore = async () => {
|
|
|
18767
18875
|
newSelectedCountryCode: 'CA',
|
|
18768
18876
|
});
|
|
18769
18877
|
}
|
|
18878
|
+
const fallbackCountry = await reconcileRememberedCountryOverride({
|
|
18879
|
+
geoCountry: geoLocalization === null || geoLocalization === void 0 ? void 0 : geoLocalization.country,
|
|
18880
|
+
urlCountryAtLoad,
|
|
18881
|
+
});
|
|
18882
|
+
if (fallbackCountry) {
|
|
18883
|
+
localizationStoreUpdateSelectedCountryCode({
|
|
18884
|
+
isInitializing: true,
|
|
18885
|
+
newSelectedCountryCode: fallbackCountry,
|
|
18886
|
+
});
|
|
18887
|
+
}
|
|
18888
|
+
if (localizationStore.selectedCountryCode) {
|
|
18889
|
+
syncSelectedCountryToPage(localizationStore.selectedCountryCode);
|
|
18890
|
+
}
|
|
18891
|
+
void getCustomMessages();
|
|
18892
|
+
void getNewLocalization({ isInitializing: true });
|
|
18770
18893
|
if (!localizationStore.localizationLoaded) {
|
|
18771
18894
|
localizationStore.localizationLoaded = true;
|
|
18772
18895
|
void removeBigcommerceCartShipping();
|
|
18773
|
-
// shouldShowHelloWidget is false because localization is not loaded yet
|
|
18774
18896
|
void toggleBigcommerceNativeCurrencySelector();
|
|
18775
18897
|
}
|
|
18776
18898
|
};
|
|
18777
18899
|
|
|
18778
|
-
export {
|
|
18900
|
+
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,10 +1,10 @@
|
|
|
1
|
-
import { z as zonosStore, c as createStore } from './zonosStore-
|
|
2
|
-
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-
|
|
3
|
-
import { s as storageStore, t as translate } from './localization-
|
|
1
|
+
import { z as zonosStore, c as createStore } from './zonosStore-msUlqmSD.js';
|
|
2
|
+
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-Cleo1j5P.js';
|
|
3
|
+
import { s as storageStore, t as translate } from './localization-BiL8bPsY.js';
|
|
4
4
|
import { h as handleFetch, g as getIsTestMode, l as logError, j as jsonParse } from './handleFetch-D5GYDF-O.js';
|
|
5
5
|
import { i as isContrastColor } from './isContrastColor-CWLU13s9.js';
|
|
6
6
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
7
|
-
import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-
|
|
7
|
+
import { i as isAnalyticsRelayInIframe, a as enqueueRelayEvent, s as submitGtag } from './submitGtag-df9AQ2zL.js';
|
|
8
8
|
|
|
9
9
|
/*!
|
|
10
10
|
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import { s as storageStore } from './localization-
|
|
1
|
+
import { d as cartStore } from './cart-Cleo1j5P.js';
|
|
2
|
+
import { s as storageStore } from './localization-BiL8bPsY.js';
|
|
3
3
|
import { l as logError, h as handleFetch } from './handleFetch-D5GYDF-O.js';
|
|
4
4
|
|
|
5
5
|
const placeTestOrder = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as cartStore } from './cart-
|
|
2
|
-
import {
|
|
1
|
+
import { d as cartStore } from './cart-Cleo1j5P.js';
|
|
2
|
+
import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-BiL8bPsY.js';
|
|
3
3
|
|
|
4
4
|
const getDisplayCurrency = () => {
|
|
5
5
|
var _a, _b;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as requireIsObject, e as getDefaultExportFromCjs } from './zonosStore-
|
|
2
|
-
import { r as requireDebounce } from './debounce-
|
|
1
|
+
import { r as requireIsObject, e as getDefaultExportFromCjs } from './zonosStore-msUlqmSD.js';
|
|
2
|
+
import { r as requireDebounce } from './debounce-BR3PaG8X.js';
|
|
3
3
|
|
|
4
4
|
var throttle_1;
|
|
5
5
|
var hasRequiredThrottle;
|