@zonos/elements 1.3.222 → 1.3.224
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/VarianceTest-bec00ea8.js +91 -0
- package/dist/cjs/{cart-3a2a062c.js → cart-af017ac3.js} +41 -40
- package/dist/cjs/{debounce-465a4328.js → debounce-2c9f3f1e.js} +1 -1
- package/dist/cjs/{getBorderRadius-1b5e33cf.js → getBorderRadius-c7d9f676.js} +1 -1
- package/dist/cjs/{handleFetch-45f35cac.js → handleFetch-954f30e1.js} +5 -82
- package/dist/cjs/index.cjs.js +40 -37
- package/dist/cjs/{isDarkColor-428965f4.js → isDarkColor-994c38e4.js} +1 -1
- package/dist/cjs/{localization-12e7e934.js → localization-21030292.js} +82 -24
- package/dist/cjs/{paypal-a1377508.js → paypal-2b22f0f5.js} +17 -16
- package/dist/cjs/{placeTestOrder-6fcce33e.js → placeTestOrder-9cde1ca4.js} +3 -3
- package/dist/cjs/{renderFallback-39ba034b.js → renderFallback-9300dbaf.js} +8 -7
- package/dist/cjs/{translationStore-951ed4b4.js → translationStore-ce2c700d.js} +1 -1
- package/dist/cjs/{updateCheckoutSessionAttributes-c0853fdd.js → updateCheckoutSessionAttributes-a4899e90.js} +2 -2
- package/dist/cjs/zonos-address_11.cjs.entry.js +16 -16
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +25 -25
- package/dist/cjs/zonos-checkout.cjs.entry.js +68 -67
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +8 -8
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +19 -19
- package/dist/cjs/zonos-collect.cjs.entry.js +21 -21
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +40 -39
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +6 -6
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +14 -14
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +12 -12
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +5 -5
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-f8ee56aa.js → zonosStore-5d489c65.js} +8 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +3 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +1 -0
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/hello/localization.js +12 -9
- package/dist/collection/components/store/zonosStore.js +8 -1
- package/dist/collection/components/utils/api/getZonosSettings.js +2 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +2 -0
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +5 -0
- package/dist/collection/components/utils/logging/sendLoadCheckoutFacadeLog.js +1 -1
- package/dist/collection/components/utils/logging/sendLoadNativeCheckoutLog.js +1 -1
- package/dist/collection/scripts/_zonosBase.js +3 -0
- package/dist/collection/types/generated/graphql.internal.types.js +3 -0
- package/dist/collection/utils/performBlurCurrency.js +50 -0
- package/dist/esm/VarianceTest-572cecf5.js +86 -0
- package/dist/esm/{cart-7f06662c.js → cart-11b87221.js} +7 -6
- package/dist/esm/{debounce-c34d1270.js → debounce-f081e4d8.js} +1 -1
- package/dist/esm/{getBorderRadius-87593ff4.js → getBorderRadius-6281d902.js} +1 -1
- package/dist/esm/{handleFetch-99218189.js → handleFetch-a844cac1.js} +2 -76
- package/dist/esm/index.js +13 -9
- package/dist/esm/{isDarkColor-1f58b6be.js → isDarkColor-83e0c27e.js} +1 -1
- package/dist/esm/{localization-192886e4.js → localization-9320a65d.js} +71 -13
- package/dist/esm/{paypal-53f1b4a1.js → paypal-338a4350.js} +7 -6
- package/dist/esm/{placeTestOrder-95cbb623.js → placeTestOrder-d28f33c2.js} +3 -3
- package/dist/esm/{renderFallback-6352363c.js → renderFallback-28ef3364.js} +5 -4
- package/dist/esm/{translationStore-fb98a08d.js → translationStore-7eebaa41.js} +1 -1
- package/dist/esm/{updateCheckoutSessionAttributes-92f42882.js → updateCheckoutSessionAttributes-160720f6.js} +2 -2
- package/dist/esm/zonos-address_11.entry.js +9 -9
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner_2.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +12 -12
- package/dist/esm/zonos-checkout.entry.js +15 -14
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +8 -8
- package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
- package/dist/esm/zonos-collect.entry.js +11 -11
- package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +10 -9
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_4.entry.js +6 -6
- package/dist/esm/zonos-empty-state-payment_4.entry.js +9 -9
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +6 -6
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +5 -5
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-c456b933.js → zonosStore-e3d0493a.js} +8 -2
- package/dist/esm-es5/VarianceTest-572cecf5.js +1 -0
- package/dist/esm-es5/cart-11b87221.js +1 -0
- package/dist/esm-es5/{debounce-c34d1270.js → debounce-f081e4d8.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-87593ff4.js → getBorderRadius-6281d902.js} +1 -1
- package/dist/esm-es5/handleFetch-a844cac1.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-1f58b6be.js → isDarkColor-83e0c27e.js} +1 -1
- package/dist/esm-es5/localization-9320a65d.js +1 -0
- package/dist/esm-es5/{paypal-53f1b4a1.js → paypal-338a4350.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-95cbb623.js → placeTestOrder-d28f33c2.js} +1 -1
- package/dist/esm-es5/renderFallback-28ef3364.js +1 -0
- package/dist/esm-es5/{translationStore-fb98a08d.js → translationStore-7eebaa41.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-92f42882.js → updateCheckoutSessionAttributes-160720f6.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-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 +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/zonosStore-e3d0493a.js +1 -0
- package/dist/scripts/blurCurrencyOnInit.js +1 -0
- package/dist/scripts/index.d.ts +38 -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/scripts/_zonosBase.d.ts +8 -3
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +7 -3
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -2
- package/dist/types/types/generated/graphql.internal.types.d.ts +13 -2
- package/dist/types/types/generated/graphql.internal.types.ts +13 -2
- package/dist/types/types/global.d.ts +8 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +8 -2
- package/dist/types/utils/performBlurCurrency.d.ts +2 -0
- package/dist/zonos-elements/base.css +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-01174496.system.js +1 -0
- package/dist/zonos-elements/p-0260fd13.js +1 -0
- package/dist/zonos-elements/{p-e970f2aa.system.entry.js → p-04c1dc63.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0a377722.js +1 -0
- package/dist/zonos-elements/p-0a92e3fd.entry.js +1 -0
- package/dist/zonos-elements/{p-8350937d.system.entry.js → p-0b6a3a09.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0d82e1fd.entry.js +1 -0
- package/dist/zonos-elements/{p-a7485913.system.js → p-0ec82d78.system.js} +2 -2
- package/dist/zonos-elements/{p-2b9c124d.js → p-0ffd710e.js} +1 -1
- package/dist/zonos-elements/p-112c6453.system.js +1 -0
- package/dist/zonos-elements/{p-62fa680d.system.js → p-182da73f.system.js} +1 -1
- package/dist/zonos-elements/p-1868a283.entry.js +1 -0
- package/dist/zonos-elements/{p-ba18c5f5.system.entry.js → p-1a67ae71.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-520bd291.system.entry.js → p-1b9cc0e2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1c5ba523.js +1 -0
- package/dist/zonos-elements/p-1ef793d0.entry.js +1 -0
- package/dist/zonos-elements/{p-0ed63ce0.system.js → p-23c46dfa.system.js} +1 -1
- package/dist/zonos-elements/{p-e7f8595f.system.js → p-24e26a2c.system.js} +1 -1
- package/dist/zonos-elements/p-252fa1da.entry.js +1 -0
- package/dist/zonos-elements/{p-53b46925.entry.js → p-2616ba72.entry.js} +1 -1
- package/dist/zonos-elements/p-2657f099.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7d2d2c94.entry.js → p-2dc38ef3.entry.js} +1 -1
- package/dist/zonos-elements/{p-12ce9746.system.entry.js → p-360d7101.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-19f25feb.system.entry.js → p-375994d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee6f8c02.system.entry.js → p-38f42f10.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4637f365.system.entry.js → p-4004c838.system.entry.js} +1 -1
- package/dist/zonos-elements/p-41dd1cb8.js +1 -0
- package/dist/zonos-elements/{p-e63b8b24.system.js → p-433d76b4.system.js} +1 -1
- package/dist/zonos-elements/{p-a77ed1b9.entry.js → p-4523b982.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc27467b.entry.js → p-4ce3489a.entry.js} +1 -1
- package/dist/zonos-elements/{p-a61a9b65.system.entry.js → p-4da7b6a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7b56e345.js → p-4dfe97ad.js} +2 -2
- package/dist/zonos-elements/{p-cd1ebef9.system.js → p-57413c34.system.js} +1 -1
- package/dist/zonos-elements/{p-4d9ad3b1.system.entry.js → p-576d76fa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5c43ecdf.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9fdd3264.system.entry.js → p-5f7a9b69.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6092af05.entry.js +1 -0
- package/dist/zonos-elements/{p-9b062dfb.entry.js → p-67787bd4.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c4e7651.entry.js → p-6bab9096.entry.js} +1 -1
- package/dist/zonos-elements/p-6d423364.entry.js +1 -0
- package/dist/zonos-elements/p-725605f6.system.js +1 -0
- package/dist/zonos-elements/p-7af39c98.js +1 -0
- package/dist/zonos-elements/{p-7f7abdf2.system.entry.js → p-7cee0e68.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7eb8e2d4.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-820ad058.js +1 -0
- package/dist/zonos-elements/{p-5e3d2bd2.system.entry.js → p-873b6185.system.entry.js} +1 -1
- package/dist/zonos-elements/p-89c5164b.system.js +1 -0
- package/dist/zonos-elements/p-91f32c73.system.js +1 -0
- package/dist/zonos-elements/{p-245f6ad4.system.entry.js → p-9e03a145.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0ae53ff0.js → p-a199bb13.js} +1 -1
- package/dist/zonos-elements/p-ae3e4f2b.entry.js +1 -0
- package/dist/zonos-elements/{p-567f7de7.entry.js → p-b4bf2f03.entry.js} +1 -1
- package/dist/zonos-elements/p-b5b3f908.system.js +1 -0
- package/dist/zonos-elements/{p-a5b0a636.entry.js → p-b658c28a.entry.js} +1 -1
- package/dist/zonos-elements/{p-de626806.system.entry.js → p-b6ef4a5e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4f8563ad.system.entry.js → p-b91df44b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ba334962.system.entry.js +1 -0
- package/dist/zonos-elements/p-bccd49d7.system.entry.js +1 -0
- package/dist/zonos-elements/p-bdeb20cb.js +1 -0
- package/dist/zonos-elements/{p-a95d2034.system.entry.js → p-bfc0fc85.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4b3c878.entry.js → p-c81f6387.entry.js} +1 -1
- package/dist/zonos-elements/{p-efa6203f.entry.js → p-c998e4ed.entry.js} +1 -1
- package/dist/zonos-elements/{p-9396059b.entry.js → p-cb0e6468.entry.js} +1 -1
- package/dist/zonos-elements/{p-421dfb66.system.entry.js → p-cb11d11b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cc599cd9.entry.js +1 -0
- package/dist/zonos-elements/p-ce4c6ae0.entry.js +1 -0
- package/dist/zonos-elements/{p-14f9bc8c.entry.js → p-d2f7ea09.entry.js} +1 -1
- package/dist/zonos-elements/{p-0c0fda23.js → p-d42b5113.js} +1 -1
- package/dist/zonos-elements/{p-00423fa0.system.js → p-d531b524.system.js} +1 -1
- package/dist/zonos-elements/p-d938f42f.system.js +1 -0
- package/dist/zonos-elements/{p-f4fa8720.entry.js → p-d96545ae.entry.js} +1 -1
- package/dist/zonos-elements/{p-eb6a35ce.system.entry.js → p-dc56b469.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-45d288d0.system.entry.js → p-e00e5d64.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8194fcd8.entry.js → p-e60b988c.entry.js} +1 -1
- package/dist/zonos-elements/{p-56e0ed65.js → p-e688e493.js} +1 -1
- package/dist/zonos-elements/{p-295d9c07.system.entry.js → p-f548807d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7b05da2.entry.js → p-f912e9c3.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/VarianceTest-0cb1e118.js +0 -12
- package/dist/esm/VarianceTest-fef2d958.js +0 -10
- package/dist/esm-es5/VarianceTest-fef2d958.js +0 -1
- package/dist/esm-es5/cart-7f06662c.js +0 -1
- package/dist/esm-es5/handleFetch-99218189.js +0 -1
- package/dist/esm-es5/localization-192886e4.js +0 -1
- package/dist/esm-es5/renderFallback-6352363c.js +0 -1
- package/dist/esm-es5/zonosStore-c456b933.js +0 -1
- package/dist/zonos-elements/p-04a01cb1.js +0 -1
- package/dist/zonos-elements/p-062430f9.system.js +0 -1
- package/dist/zonos-elements/p-0e28207a.js +0 -1
- package/dist/zonos-elements/p-1cd1da90.system.js +0 -1
- package/dist/zonos-elements/p-2131fa8b.entry.js +0 -1
- package/dist/zonos-elements/p-30432622.system.entry.js +0 -1
- package/dist/zonos-elements/p-366ea017.entry.js +0 -1
- package/dist/zonos-elements/p-3a15f2fb.system.entry.js +0 -1
- package/dist/zonos-elements/p-3f3c92db.system.entry.js +0 -1
- package/dist/zonos-elements/p-4a3abbf2.js +0 -1
- package/dist/zonos-elements/p-4dcbbd60.js +0 -1
- package/dist/zonos-elements/p-5a2dd041.system.js +0 -1
- package/dist/zonos-elements/p-640a6898.system.js +0 -1
- package/dist/zonos-elements/p-6afbbe66.entry.js +0 -1
- package/dist/zonos-elements/p-6f6573a5.system.js +0 -1
- package/dist/zonos-elements/p-7ce093aa.js +0 -1
- package/dist/zonos-elements/p-81b94b8f.system.js +0 -1
- package/dist/zonos-elements/p-838e448f.entry.js +0 -1
- package/dist/zonos-elements/p-9d863a3b.system.js +0 -1
- package/dist/zonos-elements/p-a435931e.system.entry.js +0 -1
- package/dist/zonos-elements/p-a8a312b2.js +0 -1
- package/dist/zonos-elements/p-a9b3cfe1.entry.js +0 -1
- package/dist/zonos-elements/p-abcefd25.entry.js +0 -1
- package/dist/zonos-elements/p-b76db2ac.js +0 -1
- package/dist/zonos-elements/p-bbf48b31.entry.js +0 -1
- package/dist/zonos-elements/p-bdf183a3.entry.js +0 -1
- package/dist/zonos-elements/p-d1b415cd.entry.js +0 -1
- package/dist/zonos-elements/p-d2098bef.entry.js +0 -1
- package/dist/zonos-elements/p-df0cbde4.js +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const startTime = performance.now();
|
|
2
|
+
const allLogs = [];
|
|
3
|
+
const getElapsedTime = () => {
|
|
4
|
+
const elapsedTime = performance.now() - startTime;
|
|
5
|
+
const elapsedTimePretty =
|
|
6
|
+
// format the time to seconds if over 1 second
|
|
7
|
+
elapsedTime > 1000
|
|
8
|
+
? `${(elapsedTime / 1000).toFixed(2)}s`
|
|
9
|
+
: `${elapsedTime.toFixed(2)}ms`;
|
|
10
|
+
return { elapsedTime, elapsedTimePretty };
|
|
11
|
+
};
|
|
12
|
+
const prepInfo = (info) => {
|
|
13
|
+
if (typeof info === 'string') {
|
|
14
|
+
return info;
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const infoToJson = JSON.stringify(info);
|
|
18
|
+
return infoToJson;
|
|
19
|
+
}
|
|
20
|
+
catch (_a) {
|
|
21
|
+
if (info && typeof info.toString === 'function') {
|
|
22
|
+
const infoToString = info.toString();
|
|
23
|
+
return infoToString;
|
|
24
|
+
}
|
|
25
|
+
return 'Unable to stringify info';
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const log = (message, type, ..._additionalInfo) => {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const { elapsedTimePretty } = getElapsedTime();
|
|
31
|
+
const additionalInfo = [`(${elapsedTimePretty})`, ..._additionalInfo];
|
|
32
|
+
const preppedInfo = additionalInfo.map(prepInfo).join(' ');
|
|
33
|
+
allLogs.push([type, message, preppedInfo].filter(Boolean).join(' '));
|
|
34
|
+
const isDebug = !!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.debug) ||
|
|
35
|
+
!!window.location.search.match(/\?.*(&*)zonosDebug=1/);
|
|
36
|
+
// if debug is false, do not log
|
|
37
|
+
if (!isDebug) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let loggingIframe = document.querySelector('iframe#zonos---debug-logging-iframe');
|
|
41
|
+
if (!loggingIframe) {
|
|
42
|
+
// add a hidden iframe
|
|
43
|
+
loggingIframe = document.createElement('iframe');
|
|
44
|
+
loggingIframe.id = 'zonos---debug-logging-iframe';
|
|
45
|
+
loggingIframe.style.display = 'none';
|
|
46
|
+
loggingIframe.style.opacity = '0';
|
|
47
|
+
loggingIframe.style.position = 'absolute';
|
|
48
|
+
loggingIframe.style.top = '-9999px';
|
|
49
|
+
loggingIframe.style.left = '-9999px';
|
|
50
|
+
loggingIframe.style.width = '1px';
|
|
51
|
+
loggingIframe.style.height = '1px';
|
|
52
|
+
loggingIframe.style.border = 'none';
|
|
53
|
+
loggingIframe.style.overflow = 'hidden';
|
|
54
|
+
loggingIframe.style.visibility = 'hidden';
|
|
55
|
+
document.body.appendChild(loggingIframe);
|
|
56
|
+
}
|
|
57
|
+
// use the logging iframe's console to log just in case the console is disabled (overridden) by the site owner
|
|
58
|
+
const zConsole = ((_b = loggingIframe.contentWindow) === null || _b === void 0 ? void 0 : _b.window.console) || window.console;
|
|
59
|
+
switch (type) {
|
|
60
|
+
case 'warn':
|
|
61
|
+
zConsole.warn(message, ...additionalInfo);
|
|
62
|
+
break;
|
|
63
|
+
case 'info':
|
|
64
|
+
zConsole.info(message, ...additionalInfo);
|
|
65
|
+
break;
|
|
66
|
+
case 'error':
|
|
67
|
+
zConsole.error(message, ...additionalInfo);
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
zConsole.groupCollapsed(message, ...additionalInfo);
|
|
71
|
+
zConsole.trace();
|
|
72
|
+
zConsole.groupEnd();
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const availableTestKeys = {
|
|
78
|
+
hosted_vs_native: {
|
|
79
|
+
availableVariants: ['hosted', 'native'],
|
|
80
|
+
},
|
|
81
|
+
test_A_B: {
|
|
82
|
+
availableVariants: ['A', 'B'],
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export { availableTestKeys as a, allLogs as b, getElapsedTime as g, log as l };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { z as zonosStore, c as createStore } from './zonosStore-
|
|
2
|
-
import { s as storageStore, l as localizationStore, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-
|
|
3
|
-
import { t as translate } from './translationStore-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { z as zonosStore, c as createStore } from './zonosStore-e3d0493a.js';
|
|
2
|
+
import { s as storageStore, l as localizationStore, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-9320a65d.js';
|
|
3
|
+
import { t as translate } from './translationStore-7eebaa41.js';
|
|
4
|
+
import { f as fallbackApiList, h as handleFetch, g as getIsTestMode, a as getIsStagingMode, s as sendErrorLog, l as logError, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
|
+
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
|
+
import { i as isDarkColor } from './isDarkColor-83e0c27e.js';
|
|
7
|
+
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Extract first name and last name from the name string
|
|
@@ -1,78 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const allLogs = [];
|
|
3
|
-
const getElapsedTime = () => {
|
|
4
|
-
const elapsedTime = performance.now() - startTime;
|
|
5
|
-
const elapsedTimePretty =
|
|
6
|
-
// format the time to seconds if over 1 second
|
|
7
|
-
elapsedTime > 1000
|
|
8
|
-
? `${(elapsedTime / 1000).toFixed(2)}s`
|
|
9
|
-
: `${elapsedTime.toFixed(2)}ms`;
|
|
10
|
-
return { elapsedTime, elapsedTimePretty };
|
|
11
|
-
};
|
|
12
|
-
const prepInfo = (info) => {
|
|
13
|
-
if (typeof info === 'string') {
|
|
14
|
-
return info;
|
|
15
|
-
}
|
|
16
|
-
try {
|
|
17
|
-
const infoToJson = JSON.stringify(info);
|
|
18
|
-
return infoToJson;
|
|
19
|
-
}
|
|
20
|
-
catch (_a) {
|
|
21
|
-
if (info && typeof info.toString === 'function') {
|
|
22
|
-
const infoToString = info.toString();
|
|
23
|
-
return infoToString;
|
|
24
|
-
}
|
|
25
|
-
return 'Unable to stringify info';
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const log = (message, type, ..._additionalInfo) => {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
const { elapsedTimePretty } = getElapsedTime();
|
|
31
|
-
const additionalInfo = [`(${elapsedTimePretty})`, ..._additionalInfo];
|
|
32
|
-
const preppedInfo = additionalInfo.map(prepInfo).join(' ');
|
|
33
|
-
allLogs.push([type, message, preppedInfo].filter(Boolean).join(' '));
|
|
34
|
-
const isDebug = !!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.debug) ||
|
|
35
|
-
!!window.location.search.match(/\?.*(&*)zonosDebug=1/);
|
|
36
|
-
// if debug is false, do not log
|
|
37
|
-
if (!isDebug) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
let loggingIframe = document.querySelector('iframe#zonos---debug-logging-iframe');
|
|
41
|
-
if (!loggingIframe) {
|
|
42
|
-
// add a hidden iframe
|
|
43
|
-
loggingIframe = document.createElement('iframe');
|
|
44
|
-
loggingIframe.id = 'zonos---debug-logging-iframe';
|
|
45
|
-
loggingIframe.style.display = 'none';
|
|
46
|
-
loggingIframe.style.opacity = '0';
|
|
47
|
-
loggingIframe.style.position = 'absolute';
|
|
48
|
-
loggingIframe.style.top = '-9999px';
|
|
49
|
-
loggingIframe.style.left = '-9999px';
|
|
50
|
-
loggingIframe.style.width = '1px';
|
|
51
|
-
loggingIframe.style.height = '1px';
|
|
52
|
-
loggingIframe.style.border = 'none';
|
|
53
|
-
loggingIframe.style.overflow = 'hidden';
|
|
54
|
-
loggingIframe.style.visibility = 'hidden';
|
|
55
|
-
document.body.appendChild(loggingIframe);
|
|
56
|
-
}
|
|
57
|
-
// use the logging iframe's console to log just in case the console is disabled (overridden) by the site owner
|
|
58
|
-
const zConsole = ((_b = loggingIframe.contentWindow) === null || _b === void 0 ? void 0 : _b.window.console) || window.console;
|
|
59
|
-
switch (type) {
|
|
60
|
-
case 'warn':
|
|
61
|
-
zConsole.warn(message, ...additionalInfo);
|
|
62
|
-
break;
|
|
63
|
-
case 'info':
|
|
64
|
-
zConsole.info(message, ...additionalInfo);
|
|
65
|
-
break;
|
|
66
|
-
case 'error':
|
|
67
|
-
zConsole.error(message, ...additionalInfo);
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
zConsole.groupCollapsed(message, ...additionalInfo);
|
|
71
|
-
zConsole.trace();
|
|
72
|
-
zConsole.groupEnd();
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
1
|
+
import { l as log } from './VarianceTest-572cecf5.js';
|
|
76
2
|
|
|
77
3
|
const logError = (message, ...rest) => {
|
|
78
4
|
log(message, 'error', ...rest);
|
|
@@ -488,4 +414,4 @@ const handleFetch = async (path, _opts) => {
|
|
|
488
414
|
});
|
|
489
415
|
};
|
|
490
416
|
|
|
491
|
-
export { getIsStagingMode as a,
|
|
417
|
+
export { getIsStagingMode as a, getAdditionalLogMetadata as b, fallbackApiList as f, getIsTestMode as g, handleFetch as h, isCheckoutMobile as i, jsonParse as j, logError as l, sendErrorLog as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
2
2
|
import { g as getGenericSettingsOverride, I as IframeService } from './getGenericSettingsOverride-0bc3e118.js';
|
|
3
|
-
import {
|
|
3
|
+
import { l as log } from './VarianceTest-572cecf5.js';
|
|
4
|
+
export { a as availableTestKeys } from './VarianceTest-572cecf5.js';
|
|
5
|
+
import { g as getIsTestMode, a as getIsStagingMode, h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
4
6
|
import { g as getAbandonedCartRenewTokenValue, _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector } from './CheckoutConfig-724d7bae.js';
|
|
5
7
|
export { c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-724d7bae.js';
|
|
6
|
-
export { a as availableTestKeys } from './VarianceTest-fef2d958.js';
|
|
7
8
|
export { c as countryRequireTaxId, e as euCountryCodes, s as shipToTaxIdLabels } from './TaxId-50d72254.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -129,7 +130,7 @@ const getZonosQaUrl = () => {
|
|
|
129
130
|
return null;
|
|
130
131
|
}
|
|
131
132
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
132
|
-
const cdnUrl = "https://v1.3.
|
|
133
|
+
const cdnUrl = "https://v1.3.224.js.zonos.com";
|
|
133
134
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
134
135
|
if (!qaUrl &&
|
|
135
136
|
(cdnUrl.includes('test.') ||
|
|
@@ -376,10 +377,11 @@ const zonosLoadUrl = (() => {
|
|
|
376
377
|
}
|
|
377
378
|
return null;
|
|
378
379
|
})();
|
|
379
|
-
const
|
|
380
|
-
const
|
|
381
|
-
const
|
|
382
|
-
const
|
|
380
|
+
const startLoadTime = Date.now();
|
|
381
|
+
const ZONOS_URL = "https://v1.3.224.js.zonos.com";
|
|
382
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.224";
|
|
383
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.224";
|
|
384
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.224";
|
|
383
385
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
384
386
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
385
387
|
class Zonos {
|
|
@@ -397,8 +399,9 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
397
399
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
398
400
|
: null;
|
|
399
401
|
Zonos.isBigCommerce = false;
|
|
400
|
-
Zonos.releaseDate = "
|
|
402
|
+
Zonos.releaseDate = "1752786758525";
|
|
401
403
|
Zonos.isLegacyCheckout = false;
|
|
404
|
+
Zonos.startLoadTime = startLoadTime;
|
|
402
405
|
Zonos.domain = typeof window !== 'undefined'
|
|
403
406
|
? // domain that embeds the iframe
|
|
404
407
|
(window.location != window.parent.location && document.referrer) ||
|
|
@@ -416,7 +419,7 @@ Zonos.isNpm = true;
|
|
|
416
419
|
Zonos.zonosQaUrl = null;
|
|
417
420
|
Zonos.zonosQaUrlApi = null;
|
|
418
421
|
Zonos.trackEventLogs = [];
|
|
419
|
-
Zonos.version = `v${"1.3.
|
|
422
|
+
Zonos.version = `v${"1.3.224"}`;
|
|
420
423
|
Zonos.modeAlerted = false;
|
|
421
424
|
Zonos.cartData = null;
|
|
422
425
|
Zonos.paypal = null;
|
|
@@ -450,6 +453,7 @@ Zonos.init = async (params) => {
|
|
|
450
453
|
window.Zonos.isNpm = _a.isNpm;
|
|
451
454
|
window.Zonos.isBigCommerce = _a.isBigCommerce;
|
|
452
455
|
window.Zonos.isLegacyCheckout = _a.isLegacyCheckout;
|
|
456
|
+
window.Zonos.zonosMode = _a.zonosMode;
|
|
453
457
|
// call init again after the script is loaded
|
|
454
458
|
void window.Zonos.init(params);
|
|
455
459
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import {
|
|
3
|
-
import { a as availableTestKeys } from './VarianceTest-
|
|
4
|
-
import { a as translationStoreUpdateLanguage } from './translationStore-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-e3d0493a.js';
|
|
2
|
+
import { j as jsonParse, h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
3
|
+
import { a as availableTestKeys, l as log } from './VarianceTest-572cecf5.js';
|
|
4
|
+
import { a as translationStoreUpdateLanguage } from './translationStore-7eebaa41.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Check if the response contains at least one available test key that we support
|
|
@@ -372,6 +372,57 @@ const getInitialElementAmount = (element) => {
|
|
|
372
372
|
return parseFloat(domesticValue);
|
|
373
373
|
};
|
|
374
374
|
|
|
375
|
+
const BLUR_CURRENCY_DURATION = 7000;
|
|
376
|
+
const BLUR_CURRENCY_CLASSNAME = 'z--blur';
|
|
377
|
+
const removeBlurCurrency = async () => {
|
|
378
|
+
const intervalId = window.zonosBlurCurrencyOnInitIntervalId;
|
|
379
|
+
if (!intervalId) {
|
|
380
|
+
// Do nothing if the interval is not set
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
// Wait a bit to make sure price is fully rendered in DOM
|
|
384
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
385
|
+
clearInterval(intervalId);
|
|
386
|
+
const currencyElements = document.querySelectorAll(`.${BLUR_CURRENCY_CLASSNAME}`);
|
|
387
|
+
currencyElements.forEach(element => {
|
|
388
|
+
element.classList.remove(BLUR_CURRENCY_CLASSNAME);
|
|
389
|
+
});
|
|
390
|
+
window.zonosBlurCurrencyOnInitIntervalId = undefined;
|
|
391
|
+
};
|
|
392
|
+
const blurCurrencyElements = ({ currencySelector, }) => {
|
|
393
|
+
// Do nothing if the currency selector is not provided or blurCurrencyOnInit is false
|
|
394
|
+
if (!currencySelector) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const currencyElements = document.querySelectorAll([currencySelector].filter(Boolean).join(','));
|
|
398
|
+
currencyElements.forEach(element => {
|
|
399
|
+
element.classList.add(BLUR_CURRENCY_CLASSNAME);
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
const performBlurCurrency = () => {
|
|
403
|
+
if (typeof window === 'undefined') {
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
// If the interval is already in progress, do nothing
|
|
407
|
+
if (window.zonosBlurCurrencyOnInitIntervalId) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
blurCurrencyElements({
|
|
411
|
+
currencySelector: window.zonosBlurCurrencyOnInitCurrencySelector,
|
|
412
|
+
});
|
|
413
|
+
// Add blur effect to the currency elements
|
|
414
|
+
const intervalId = setInterval(() => {
|
|
415
|
+
blurCurrencyElements({
|
|
416
|
+
currencySelector: window.zonosBlurCurrencyOnInitCurrencySelector,
|
|
417
|
+
});
|
|
418
|
+
}, 10);
|
|
419
|
+
window.zonosBlurCurrencyOnInitIntervalId = intervalId;
|
|
420
|
+
// The blur will be removed as soon as we got the exchange rate back. But if the exchange rate is not available for some reason, the blur effect will be automatically removed after 10 seconds
|
|
421
|
+
setTimeout(() => {
|
|
422
|
+
void removeBlurCurrency();
|
|
423
|
+
}, BLUR_CURRENCY_DURATION);
|
|
424
|
+
};
|
|
425
|
+
|
|
375
426
|
const convertCurrency = (element) => {
|
|
376
427
|
var _a;
|
|
377
428
|
const amount = getInitialElementAmount(element);
|
|
@@ -395,6 +446,8 @@ const convertCurrency = (element) => {
|
|
|
395
446
|
rate !== currentIntlRateValue ||
|
|
396
447
|
// Update currency when the country code changes
|
|
397
448
|
currentCountryValue !== localizationStore.selectedCountryCode)) {
|
|
449
|
+
// Hide the currency until DOM is ready to display the new value
|
|
450
|
+
performBlurCurrency();
|
|
398
451
|
const customizedCurrencyFormat = typeof zonosStore.currencyConverter === 'function' &&
|
|
399
452
|
zonosStore.currencyConverter({
|
|
400
453
|
convert: currencyConvert,
|
|
@@ -416,6 +469,8 @@ const convertCurrency = (element) => {
|
|
|
416
469
|
element.setAttribute('data-zintl', observedFormattedValue);
|
|
417
470
|
element.setAttribute('data-zcountry-code', localizationStore.selectedCountryCode || '');
|
|
418
471
|
}
|
|
472
|
+
// Remove blur effect after the currency is converted
|
|
473
|
+
void removeBlurCurrency();
|
|
419
474
|
};
|
|
420
475
|
const defaultCurrencyConverter = () => {
|
|
421
476
|
const { currencyElementSelector } = zonosStore.helloSettings;
|
|
@@ -437,6 +492,7 @@ const defaultCurrencyConverter = () => {
|
|
|
437
492
|
const currencyDisplay = () => {
|
|
438
493
|
if (zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
|
|
439
494
|
window.Zonos.isLegacyCheckout) {
|
|
495
|
+
void removeBlurCurrency();
|
|
440
496
|
return;
|
|
441
497
|
}
|
|
442
498
|
defaultCurrencyConverter();
|
|
@@ -528,6 +584,17 @@ const getNewLocalization = async () => {
|
|
|
528
584
|
var _a;
|
|
529
585
|
log('get new localization store');
|
|
530
586
|
const { isDisabledCountry, isShippableCountry, selectedCountryCode } = localizationStore;
|
|
587
|
+
if (zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
|
|
588
|
+
!isShippableCountry ||
|
|
589
|
+
isDisabledCountry ||
|
|
590
|
+
!selectedCountryCode) {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
const isGuaranteed = zonosStore.checkoutSettings.visibilityStatus === 'ENABLED';
|
|
594
|
+
// blur currency out before getting exchange rate
|
|
595
|
+
performBlurCurrency();
|
|
596
|
+
const { maxAge } = await triggerGetExchangeRate(isGuaranteed);
|
|
597
|
+
startExchangeRateTimeout({ isGuaranteed, maxAge });
|
|
531
598
|
if (!window.Zonos.isLegacyCheckout) {
|
|
532
599
|
// These requests are only needed for Hello, so we can skip them for legacy checkout
|
|
533
600
|
localizationStore.countryLandedCost = await getCountryLandedCost(localizationStore.selectedCountryCode);
|
|
@@ -540,15 +607,6 @@ const getNewLocalization = async () => {
|
|
|
540
607
|
else {
|
|
541
608
|
log('Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout');
|
|
542
609
|
}
|
|
543
|
-
if (zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
|
|
544
|
-
!isShippableCountry ||
|
|
545
|
-
isDisabledCountry ||
|
|
546
|
-
!selectedCountryCode) {
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
const isGuaranteed = zonosStore.checkoutSettings.visibilityStatus === 'ENABLED';
|
|
550
|
-
const { maxAge } = await triggerGetExchangeRate(isGuaranteed);
|
|
551
|
-
startExchangeRateTimeout({ isGuaranteed, maxAge });
|
|
552
610
|
};
|
|
553
611
|
const getCustomMessages = async () => {
|
|
554
612
|
log(`Getting custom messages for ${localizationStore.selectedCountryCode}`);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { z as zonosStore, c as createStore } from './zonosStore-
|
|
2
|
-
import { t as trackConversionEvent, z as validateCheckoutSession, c as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
4
|
-
import { t as translate } from './translationStore-
|
|
5
|
-
import { h as handleFetch, l as
|
|
6
|
-
import { t as tinycolor } from './isDarkColor-
|
|
1
|
+
import { z as zonosStore, c as createStore } from './zonosStore-e3d0493a.js';
|
|
2
|
+
import { t as trackConversionEvent, z as validateCheckoutSession, c as stripeStore, e as cartStore, v as stripeStoreHandleInventoryCheck, r as cartStoreNextStep, j as cartStoreClearCheckoutInterval } from './cart-11b87221.js';
|
|
3
|
+
import { s as storageStore } from './localization-9320a65d.js';
|
|
4
|
+
import { t as translate } from './translationStore-7eebaa41.js';
|
|
5
|
+
import { h as handleFetch, l as logError, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
6
|
+
import { t as tinycolor } from './isDarkColor-83e0c27e.js';
|
|
7
|
+
import { l as log } from './VarianceTest-572cecf5.js';
|
|
7
8
|
|
|
8
9
|
/*!
|
|
9
10
|
* paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { e as cartStore } from './cart-
|
|
2
|
-
import { d as currencyFormat, s as storageStore } from './localization-
|
|
3
|
-
import {
|
|
1
|
+
import { e as cartStore } from './cart-11b87221.js';
|
|
2
|
+
import { d as currencyFormat, s as storageStore } from './localization-9320a65d.js';
|
|
3
|
+
import { l as logError, h as handleFetch } from './handleFetch-a844cac1.js';
|
|
4
4
|
|
|
5
5
|
const getDisplayCurrency = () => {
|
|
6
6
|
var _a, _b;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { c as stripeStore, B as stripeStoreBuildAddressForPartyCreate, e as cartStore, C as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
4
|
-
import { h as handleFetch, s as sendErrorLog,
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-e3d0493a.js';
|
|
2
|
+
import { c as stripeStore, B as stripeStoreBuildAddressForPartyCreate, e as cartStore, C as cartStoreUpdateSelectedShippingOption } from './cart-11b87221.js';
|
|
3
|
+
import { s as storageStore } from './localization-9320a65d.js';
|
|
4
|
+
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
|
+
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
5
6
|
import { h } from './index-55a03023.js';
|
|
6
7
|
|
|
7
8
|
const { reset: collectStoreReset, state: collectStore } = createStore(() => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as debounce_1 } from './debounce-
|
|
2
|
-
import { h as handleFetch,
|
|
1
|
+
import { d as debounce_1 } from './debounce-f081e4d8.js';
|
|
2
|
+
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
3
3
|
|
|
4
4
|
const attributesToUpdate = {};
|
|
5
5
|
// Store debounced functions per session to ensure proper debouncing
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { d as debounce_1 } from './debounce-
|
|
3
|
-
import { d as isObject_1, z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-
|
|
4
|
-
import { c as stripeStore, t as trackConversionEvent, J as extractName, A as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-
|
|
5
|
-
import { s as storageStore, n as getFallbackDefaultCountryCode, o as storageStoreOnChange, l as localizationStore } from './localization-
|
|
6
|
-
import { t as translate } from './translationStore-
|
|
7
|
-
import {
|
|
2
|
+
import { d as debounce_1 } from './debounce-f081e4d8.js';
|
|
3
|
+
import { d as isObject_1, z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
4
|
+
import { c as stripeStore, t as trackConversionEvent, J as extractName, A as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, e as cartStore } from './cart-11b87221.js';
|
|
5
|
+
import { s as storageStore, n as getFallbackDefaultCountryCode, o as storageStoreOnChange, l as localizationStore } from './localization-9320a65d.js';
|
|
6
|
+
import { t as translate } from './translationStore-7eebaa41.js';
|
|
7
|
+
import { l as logError, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
8
8
|
import { s as shouldRenderTaxIdInput, i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
9
9
|
import { c as classes } from './classes-0d95c529.js';
|
|
10
|
+
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
11
|
import { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-50d72254.js';
|
|
11
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
12
|
+
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
12
13
|
import { R as RemoveIcon$2 } from './RemoveIcon-9dc5dd1a.js';
|
|
13
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
14
|
+
import { i as isDarkColor } from './isDarkColor-83e0c27e.js';
|
|
14
15
|
import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-2f6955b1.js';
|
|
15
|
-
import './VarianceTest-fef2d958.js';
|
|
16
16
|
|
|
17
17
|
var debounce = debounce_1,
|
|
18
18
|
isObject$1 = isObject_1;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-55a03023.js';
|
|
2
|
-
import { f as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import './VarianceTest-
|
|
4
|
+
import './VarianceTest-572cecf5.js';
|
|
5
5
|
|
|
6
6
|
const RemoveLineIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-55a03023.js';
|
|
2
|
-
import { f as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
5
|
-
import './VarianceTest-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
5
|
+
import './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
7
7
|
const zonosBannerCss = ":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{border-radius:var(--zonos-elements-radius-10);padding:16px;background:var(--zonos-elements-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:\"icon header\" \". content\";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:0px;grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:4px}:host(.info){background-color:var(--zonos-elements-blue-100);border:1px solid var(--zonos-elements-blue-200)}:host(.success){background-color:var(--zonos-elements-green-100);border:1px solid var(--zonos-elements-green-200)}:host(.error){background-color:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host(.warning){background-color:var(--zonos-elements-orange-100);border:1px solid var(--zonos-elements-orange-200)}";
|
|
8
8
|
const ZonosBannerStyle0 = zonosBannerCss;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
3
3
|
import { i as inheritAriaAttributes, a as inheritAttributes } from './helpers-2f6955b1.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
5
|
+
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
6
6
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
7
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
7
|
+
import { i as isDarkColor } from './isDarkColor-83e0c27e.js';
|
|
8
8
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
9
|
-
import './VarianceTest-
|
|
9
|
+
import './VarianceTest-572cecf5.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Get theme for button text based on background color
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { r as registerInstance, d as getAssetPath, h, H as Host, F as Fragment, c as createEvent, a as getElement } from './index-55a03023.js';
|
|
2
|
-
import { e as cartStore, D as cartStoreHasOneEligibleItem, E as stripeStoreApplyPromoCode, F as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, G as stripeStoreResetPromoCode, H as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, I as stripeStoreTranslateAddressToLatin, J as extractName, K as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, C as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate } from './translationStore-
|
|
4
|
-
import { r as renderCheckoutCurrency, p as placeTestOrder } from './placeTestOrder-
|
|
2
|
+
import { e as cartStore, D as cartStoreHasOneEligibleItem, E as stripeStoreApplyPromoCode, F as stripeStoreRemovePromoCode, c as stripeStore, y as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, G as stripeStoreResetPromoCode, H as stripeStoreMessageBasedOnStatus, r as cartStoreNextStep, I as stripeStoreTranslateAddressToLatin, J as extractName, K as cartStoreOnChange, L as stripeStoreAsyncAddressUpdate, C as cartStoreUpdateSelectedShippingOption, M as cartStoreGetShippingTransitInfo, N as cartStoreGetMethod, O as sortServiceLevelOptionsByAmount } from './cart-11b87221.js';
|
|
3
|
+
import { t as translate } from './translationStore-7eebaa41.js';
|
|
4
|
+
import { r as renderCheckoutCurrency, p as placeTestOrder } from './placeTestOrder-d28f33c2.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-b5b18743.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
|
-
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-
|
|
8
|
-
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-
|
|
9
|
-
import { s as storageStore, l as localizationStore, c as localizationStoreOnChange } from './localization-
|
|
10
|
-
import { h as handleFetch,
|
|
7
|
+
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-e3d0493a.js';
|
|
8
|
+
import { s as submitGtag, c as paypalStoreReset, a as paypalStore, i as isContrastColor } from './paypal-338a4350.js';
|
|
9
|
+
import { s as storageStore, l as localizationStore, c as localizationStoreOnChange } from './localization-9320a65d.js';
|
|
10
|
+
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
11
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
12
|
+
import { g as getBorderRadius } from './getBorderRadius-6281d902.js';
|
|
13
|
+
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
13
14
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
14
|
-
import { i as isDarkColor, t as tinycolor } from './isDarkColor-
|
|
15
|
+
import { i as isDarkColor, t as tinycolor } from './isDarkColor-83e0c27e.js';
|
|
15
16
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
16
|
-
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-
|
|
17
|
+
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-160720f6.js';
|
|
17
18
|
import { s as shouldRenderTaxIdInput, c as containsNonLatinChars } from './shouldRenderTaxIdInput-8bc112bb.js';
|
|
18
19
|
import { e as euCountryCodes } from './TaxId-50d72254.js';
|
|
19
|
-
import './
|
|
20
|
-
import './debounce-c34d1270.js';
|
|
20
|
+
import './debounce-f081e4d8.js';
|
|
21
21
|
|
|
22
22
|
const zonosCartItemsCss = ":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}";
|
|
23
23
|
const ZonosCartItemsStyle0 = zonosCartItemsCss;
|