@zonos/elements 1.3.53 → 1.3.54
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/{CheckoutConfig-65376e00.js → CheckoutConfig-ca67953a.js} +1 -1
- package/dist/cjs/{cart-61a8983d.js → cart-03b08131.js} +1 -1
- package/dist/cjs/{createCustomEvent-228027b5.js → createCustomEvent-532569f1.js} +2 -2
- package/dist/cjs/{handleFetch-842c95b0.js → handleFetch-4b296adc.js} +1 -1
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/{paypal-f1eb6621.js → paypal-bdc19559.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
- package/dist/collection/components/utils/handleFetch.js +1 -1
- package/dist/collection/types/generated/graphql.customer.types.js +4 -0
- package/dist/esm/{CheckoutConfig-57350b28.js → CheckoutConfig-bf2a28bd.js} +1 -1
- package/dist/esm/{cart-45d2861f.js → cart-008dea87.js} +1 -1
- package/dist/esm/{createCustomEvent-3fcc948a.js → createCustomEvent-a10320c1.js} +2 -2
- package/dist/esm/{handleFetch-37cea185.js → handleFetch-99b944a2.js} +1 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/{paypal-ee310945.js → paypal-b90fc7ff.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +2 -2
- package/dist/esm/zonos-badge_13.entry.js +4 -4
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +3 -3
- package/dist/esm-es5/{CheckoutConfig-57350b28.js → CheckoutConfig-bf2a28bd.js} +1 -1
- package/dist/esm-es5/{cart-45d2861f.js → cart-008dea87.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-3fcc948a.js → createCustomEvent-a10320c1.js} +1 -1
- package/dist/esm-es5/{handleFetch-37cea185.js → handleFetch-99b944a2.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-ee310945.js → paypal-b90fc7ff.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +4 -0
- package/dist/types/types/generated/graphql.customer.types.ts +4 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-259ccf8d.entry.js → p-18802362.entry.js} +1 -1
- package/dist/zonos-elements/{p-895fdefb.js → p-1c29081a.js} +1 -1
- package/dist/zonos-elements/{p-dc12f30a.system.entry.js → p-2673dd6d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b842b96a.system.entry.js → p-2bc6342f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-827868e6.entry.js → p-3149985c.entry.js} +1 -1
- package/dist/zonos-elements/{p-36360905.entry.js → p-3566044a.entry.js} +1 -1
- package/dist/zonos-elements/{p-8228e87c.system.entry.js → p-3cfbbf17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3703b814.system.entry.js → p-4b7c05a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-217e1aa1.system.entry.js → p-546aabc0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f124e459.system.js → p-66cc2bbd.system.js} +1 -1
- package/dist/zonos-elements/{p-eb2aedd0.js → p-710b8292.js} +1 -1
- package/dist/zonos-elements/{p-d62e6bb0.system.entry.js → p-72cfc372.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4146feec.js → p-7400bcd3.js} +1 -1
- package/dist/zonos-elements/{p-6eedc3f8.entry.js → p-7a3118e7.entry.js} +1 -1
- package/dist/zonos-elements/{p-a74a7afa.system.js → p-7eac524d.system.js} +1 -1
- package/dist/zonos-elements/{p-8f7773b0.system.js → p-7f93c97a.system.js} +1 -1
- package/dist/zonos-elements/{p-31eb835c.entry.js → p-88c2057e.entry.js} +1 -1
- package/dist/zonos-elements/p-92faa378.system.js +1 -0
- package/dist/zonos-elements/{p-8fa49d94.entry.js → p-997cc826.entry.js} +1 -1
- package/dist/zonos-elements/{p-042c466d.system.entry.js → p-ada937d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-588396df.js → p-b914e98e.js} +1 -1
- package/dist/zonos-elements/{p-01f0b13d.entry.js → p-baff865d.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-c008648a.system.entry.js → p-ca4efb81.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dfbc9605.js +17 -0
- package/dist/zonos-elements/{p-88005b94.entry.js → p-e672e4de.entry.js} +1 -1
- package/dist/zonos-elements/{p-5590f90c.system.js → p-e6b9cf45.system.js} +1 -1
- package/dist/zonos-elements/p-e7e22128.entry.js +1 -0
- package/dist/zonos-elements/{p-446c8f02.system.entry.js → p-f5bac726.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cd4ad1be.system.entry.js → p-f6e385f8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c22bac78.system.js → p-f9bfbf42.system.js} +1 -1
- package/dist/zonos-elements/{p-bb186075.entry.js → p-fb28f27f.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-10cb0064.entry.js +0 -1
- package/dist/zonos-elements/p-6e59c6e4.js +0 -17
- package/dist/zonos-elements/p-f87a635b.system.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const handleFetch = require('./handleFetch-
|
|
3
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
4
4
|
|
|
5
5
|
const getTempCartById = async (cartId) => {
|
|
6
6
|
const { errors, json } = await handleFetch.handleFetch('/api/zonos-elements/get-temp-cart', {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
4
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
5
5
|
const isDarkColor = require('./isDarkColor-7a056d05.js');
|
|
6
6
|
const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const cart = require('./cart-
|
|
3
|
+
const cart = require('./cart-03b08131.js');
|
|
4
4
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
5
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
6
6
|
|
|
7
7
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
8
8
|
var _a, _b;
|
|
@@ -268,7 +268,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
|
|
|
268
268
|
if (isUnknownError) {
|
|
269
269
|
void sendErrorLog({
|
|
270
270
|
endpoint: fallbackApiList[basePathType] + path,
|
|
271
|
-
errors: errors.map(({ message }) => message),
|
|
271
|
+
errors: errors.map(({ message }) => `API: ${message}`),
|
|
272
272
|
metadata: {
|
|
273
273
|
currentBasePath: basePathType,
|
|
274
274
|
nextFallbackApiType,
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
6
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
5
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
6
|
+
const CheckoutConfig = require('./CheckoutConfig-ca67953a.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -96,7 +96,7 @@ const getZonosQaUrl = () => {
|
|
|
96
96
|
return null;
|
|
97
97
|
}
|
|
98
98
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
99
|
-
const cdnUrl = "https://v1.3.
|
|
99
|
+
const cdnUrl = "https://v1.3.54.js.zonos.com";
|
|
100
100
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
101
101
|
if (!qaUrl &&
|
|
102
102
|
(cdnUrl.includes('test.') ||
|
|
@@ -280,10 +280,10 @@ const zonosLoadUrl = (() => {
|
|
|
280
280
|
}
|
|
281
281
|
return null;
|
|
282
282
|
})();
|
|
283
|
-
const ZONOS_URL = "https://v1.3.
|
|
284
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
285
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
286
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
283
|
+
const ZONOS_URL = "https://v1.3.54.js.zonos.com";
|
|
284
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.54";
|
|
285
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.54";
|
|
286
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.54";
|
|
287
287
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
288
288
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
289
289
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -298,14 +298,14 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
298
298
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
299
299
|
Zonos._paypalMockResponse = null;
|
|
300
300
|
Zonos.isBigCommerce = false;
|
|
301
|
-
Zonos.releaseDate = "
|
|
301
|
+
Zonos.releaseDate = "1726615112859";
|
|
302
302
|
Zonos.isLegacyCheckout = false;
|
|
303
303
|
/**
|
|
304
304
|
* By default, the package will load from npm
|
|
305
305
|
*/
|
|
306
306
|
Zonos.isNpm = true;
|
|
307
307
|
Zonos.zonosQaUrl = null;
|
|
308
|
-
Zonos.version = `v${"1.3.
|
|
308
|
+
Zonos.version = `v${"1.3.54"}`;
|
|
309
309
|
Zonos.modeAlerted = false;
|
|
310
310
|
Zonos.cartData = null;
|
|
311
311
|
Zonos.paypal = null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const cart = require('./cart-03b08131.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-7a056d05.js');
|
|
7
7
|
|
|
8
8
|
/*!
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
10
10
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const paypal = require('./paypal-
|
|
10
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
8
|
+
const cart = require('./cart-03b08131.js');
|
|
9
|
+
const paypal = require('./paypal-bdc19559.js');
|
|
10
|
+
const createCustomEvent = require('./createCustomEvent-532569f1.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
|
|
12
|
-
const handleFetch = require('./handleFetch-
|
|
12
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
13
13
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
14
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
15
|
const isDarkColor = require('./isDarkColor-7a056d05.js');
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
|
+
const paypal = require('./paypal-bdc19559.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
9
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
9
|
+
const createCustomEvent = require('./createCustomEvent-532569f1.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
|
-
const handleFetch = require('./handleFetch-
|
|
11
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
12
12
|
const classes = require('./classes-b7918f56.js');
|
|
13
13
|
const getBorderRadius = require('./getBorderRadius-a6a3b35e.js');
|
|
14
14
|
const isDarkColor = require('./isDarkColor-7a056d05.js');
|
|
15
|
-
const CheckoutConfig = require('./CheckoutConfig-
|
|
15
|
+
const CheckoutConfig = require('./CheckoutConfig-ca67953a.js');
|
|
16
16
|
const RemoveIcon = require('./RemoveIcon-081ac073.js');
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
9
9
|
require('./isDarkColor-7a056d05.js');
|
|
10
10
|
require('./getBorderRadius-a6a3b35e.js');
|
|
11
11
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-4b296adc.js');
|
|
10
10
|
require('./isDarkColor-7a056d05.js');
|
|
11
11
|
require('./getBorderRadius-a6a3b35e.js');
|
|
12
12
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-7a056d05.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-4b296adc.js');
|
|
12
12
|
require('./getBorderRadius-a6a3b35e.js');
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-4b296adc.js');
|
|
12
12
|
require('./isDarkColor-7a056d05.js');
|
|
13
13
|
require('./getBorderRadius-a6a3b35e.js');
|
|
14
14
|
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-03b08131.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
11
|
require('./isDarkColor-7a056d05.js');
|
|
12
12
|
require('./getBorderRadius-a6a3b35e.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-03b08131.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-4b296adc.js');
|
|
10
10
|
require('./isDarkColor-7a056d05.js');
|
|
11
11
|
require('./getBorderRadius-a6a3b35e.js');
|
|
12
12
|
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-67139f0e.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
-
const paypal = require('./paypal-
|
|
8
|
+
const cart = require('./cart-03b08131.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-4b296adc.js');
|
|
10
|
+
const paypal = require('./paypal-bdc19559.js');
|
|
11
11
|
require('./isDarkColor-7a056d05.js');
|
|
12
12
|
require('./getBorderRadius-a6a3b35e.js');
|
|
13
13
|
|
|
@@ -139,7 +139,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
|
|
|
139
139
|
if (isUnknownError) {
|
|
140
140
|
void sendErrorLog({
|
|
141
141
|
endpoint: fallbackApiList[basePathType] + path,
|
|
142
|
-
errors: errors.map(({ message }) => message),
|
|
142
|
+
errors: errors.map(({ message }) => `API: ${message}`),
|
|
143
143
|
metadata: {
|
|
144
144
|
currentBasePath: basePathType,
|
|
145
145
|
nextFallbackApiType,
|
|
@@ -5,6 +5,10 @@ export const accountHolderType = {
|
|
|
5
5
|
export const accountingFeeType = {
|
|
6
6
|
BugFix: 'BUG_FIX',
|
|
7
7
|
DutyTaxFee: 'DUTY_TAX_FEE',
|
|
8
|
+
ExistingConnectAdjustmentCredits: 'EXISTING_CONNECT_ADJUSTMENT_CREDITS',
|
|
9
|
+
ExistingCreditNotes: 'EXISTING_CREDIT_NOTES',
|
|
10
|
+
ExistingInvoiceLineRecordCredits: 'EXISTING_INVOICE_LINE_RECORD_CREDITS',
|
|
11
|
+
ExistingInvoiceVoided: 'EXISTING_INVOICE_VOIDED',
|
|
8
12
|
General: 'GENERAL',
|
|
9
13
|
Item: 'ITEM',
|
|
10
14
|
LandedCostGuarantee: 'LANDED_COST_GUARANTEE',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handleFetch, l as log, a as logError } from './handleFetch-
|
|
1
|
+
import { h as handleFetch, l as log, a as logError } from './handleFetch-99b944a2.js';
|
|
2
2
|
|
|
3
3
|
const getTempCartById = async (cartId) => {
|
|
4
4
|
const { errors, json } = await handleFetch('/api/zonos-elements/get-temp-cart', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-473f4654.js';
|
|
2
|
-
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-99b944a2.js';
|
|
3
3
|
import { i as isDarkColor } from './isDarkColor-c927f77d.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as cartStore, l as localizationStore } from './cart-
|
|
1
|
+
import { d as cartStore, l as localizationStore } from './cart-008dea87.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-473f4654.js';
|
|
3
|
-
import { h as handleFetch } from './handleFetch-
|
|
3
|
+
import { h as handleFetch } from './handleFetch-99b944a2.js';
|
|
4
4
|
|
|
5
5
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
6
6
|
var _a, _b;
|
|
@@ -266,7 +266,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
|
|
|
266
266
|
if (isUnknownError) {
|
|
267
267
|
void sendErrorLog({
|
|
268
268
|
endpoint: fallbackApiList[basePathType] + path,
|
|
269
|
-
errors: errors.map(({ message }) => message),
|
|
269
|
+
errors: errors.map(({ message }) => `API: ${message}`),
|
|
270
270
|
metadata: {
|
|
271
271
|
currentBasePath: basePathType,
|
|
272
272
|
nextFallbackApiType,
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as log, a as logError } from './handleFetch-
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { l as log, a as logError } from './handleFetch-99b944a2.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-bf2a28bd.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-bf2a28bd.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -93,7 +93,7 @@ const getZonosQaUrl = () => {
|
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
95
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
96
|
-
const cdnUrl = "https://v1.3.
|
|
96
|
+
const cdnUrl = "https://v1.3.54.js.zonos.com";
|
|
97
97
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
98
98
|
if (!qaUrl &&
|
|
99
99
|
(cdnUrl.includes('test.') ||
|
|
@@ -277,10 +277,10 @@ const zonosLoadUrl = (() => {
|
|
|
277
277
|
}
|
|
278
278
|
return null;
|
|
279
279
|
})();
|
|
280
|
-
const ZONOS_URL = "https://v1.3.
|
|
281
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
282
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
283
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
280
|
+
const ZONOS_URL = "https://v1.3.54.js.zonos.com";
|
|
281
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.54";
|
|
282
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.54";
|
|
283
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.54";
|
|
284
284
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
285
285
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
286
286
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -295,14 +295,14 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
295
295
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
296
296
|
Zonos._paypalMockResponse = null;
|
|
297
297
|
Zonos.isBigCommerce = false;
|
|
298
|
-
Zonos.releaseDate = "
|
|
298
|
+
Zonos.releaseDate = "1726615112859";
|
|
299
299
|
Zonos.isLegacyCheckout = false;
|
|
300
300
|
/**
|
|
301
301
|
* By default, the package will load from npm
|
|
302
302
|
*/
|
|
303
303
|
Zonos.isNpm = true;
|
|
304
304
|
Zonos.zonosQaUrl = null;
|
|
305
|
-
Zonos.version = `v${"1.3.
|
|
305
|
+
Zonos.version = `v${"1.3.54"}`;
|
|
306
306
|
Zonos.modeAlerted = false;
|
|
307
307
|
Zonos.cartData = null;
|
|
308
308
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-473f4654.js';
|
|
2
|
-
import { d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-008dea87.js';
|
|
3
|
+
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-99b944a2.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-c927f77d.js';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { j as stripeStore, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, l as localizationStore, t as translate } from './cart-008dea87.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
|
-
import { a as logError } from './handleFetch-
|
|
4
|
+
import { a as logError } from './handleFetch-99b944a2.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
6
6
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getAssetPath, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
|
|
2
2
|
import { d as zonosStoreFontFamily, z as zonosStore, g as getZonosStoreTheme } from './zonosStore-473f4654.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { d as cartStore, D as currencyFormat, E as cartStoreHasOneEligibleItem, t as translate, u as stripeStoreReset, j as stripeStore, F as stripeStoreRetrievePayment, G as stripeStoreMessageBasedOnStatus, l as localizationStore, H as stripeStoreTranslateAddressToLatin, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo } from './cart-
|
|
5
|
-
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-
|
|
6
|
-
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-
|
|
4
|
+
import { d as cartStore, D as currencyFormat, E as cartStoreHasOneEligibleItem, t as translate, u as stripeStoreReset, j as stripeStore, F as stripeStoreRetrievePayment, G as stripeStoreMessageBasedOnStatus, l as localizationStore, H as stripeStoreTranslateAddressToLatin, I as cartStoreUpdateSelectedShippingOption, J as cartStoreGetShippingTransitInfo } from './cart-008dea87.js';
|
|
5
|
+
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-b90fc7ff.js';
|
|
6
|
+
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-a10320c1.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
|
|
8
|
-
import { h as handleFetch, s as sendErrorLog } from './handleFetch-
|
|
8
|
+
import { h as handleFetch, s as sendErrorLog } from './handleFetch-99b944a2.js';
|
|
9
9
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
10
10
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
11
|
import { i as isDarkColor, t as tinycolor } from './isDarkColor-c927f77d.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { s as submitGtag, p as paypalInitScript } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v as localizationStoreOnUpdate } from './cart-008dea87.js';
|
|
3
|
+
import { s as submitGtag, p as paypalInitScript } from './paypal-b90fc7ff.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-473f4654.js';
|
|
5
|
-
import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-
|
|
5
|
+
import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-a10320c1.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
|
-
import { l as log, a as logError, s as sendErrorLog } from './handleFetch-
|
|
7
|
+
import { l as log, a as logError, s as sendErrorLog } from './handleFetch-99b944a2.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
|
|
10
10
|
import { i as isDarkColor } from './isDarkColor-c927f77d.js';
|
|
11
|
-
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
11
|
+
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-bf2a28bd.js';
|
|
12
12
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { w as isValidSelector, j as stripeStore, x as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { w as isValidSelector, j as stripeStore, x as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-008dea87.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
4
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
4
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-99b944a2.js';
|
|
5
5
|
import './isDarkColor-c927f77d.js';
|
|
6
6
|
import './getBorderRadius-23398fc6.js';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-008dea87.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-99b944a2.js';
|
|
6
6
|
import './isDarkColor-c927f77d.js';
|
|
7
7
|
import './getBorderRadius-23398fc6.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-008dea87.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-c927f77d.js';
|
|
6
6
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-99b944a2.js';
|
|
8
8
|
import './getBorderRadius-23398fc6.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { t as translate, l as localizationStore, D as currencyFormat } from './cart-
|
|
2
|
+
import { t as translate, l as localizationStore, D as currencyFormat } from './cart-008dea87.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-473f4654.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-99b944a2.js';
|
|
8
8
|
import './isDarkColor-c927f77d.js';
|
|
9
9
|
import './getBorderRadius-23398fc6.js';
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-473f4654.js';
|
|
3
|
-
import { l as localizationStore, w as isValidSelector, t as translate, y as getZCountryUrlParam, z as setZCountryUrlParam, A as currencyDisplay, B as currencyConvertAndFormat, C as currencyConvert, D as currencyFormat } from './cart-
|
|
3
|
+
import { l as localizationStore, w as isValidSelector, t as translate, y as getZCountryUrlParam, z as setZCountryUrlParam, A as currencyDisplay, B as currencyConvertAndFormat, C as currencyConvert, D as currencyFormat } from './cart-008dea87.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
5
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-99b944a2.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
7
|
import './isDarkColor-c927f77d.js';
|
|
8
8
|
import './getBorderRadius-23398fc6.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { K as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { K as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-008dea87.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
4
4
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-99b944a2.js';
|
|
6
6
|
import './isDarkColor-c927f77d.js';
|
|
7
7
|
import './getBorderRadius-23398fc6.js';
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement, c as createEvent } from './index-86b8247e.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { j as stripeStore } from './cart-
|
|
5
|
-
import { a as logError, l as log } from './handleFetch-
|
|
6
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
4
|
+
import { j as stripeStore } from './cart-008dea87.js';
|
|
5
|
+
import { a as logError, l as log } from './handleFetch-99b944a2.js';
|
|
6
|
+
import { d as paypalStoreInitButtons } from './paypal-b90fc7ff.js';
|
|
7
7
|
import './isDarkColor-c927f77d.js';
|
|
8
8
|
import './getBorderRadius-23398fc6.js';
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):o(t.value).then(i,c)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):o(t.value).then(i,c)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-99b944a2.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,r,n;return __generator(this,(function(o){switch(o.label){case 0:return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:e=o.sent(),r=e.errors,n=e.json;if(!n||r.length){return[2,null]}return[2,n]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,getTempCartById(t)];case 1:e=r.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};
|