@zonos/elements 1.3.55 → 1.3.57

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.
Files changed (103) hide show
  1. package/dist/cjs/{CheckoutConfig-c75fe0fe.js → CheckoutConfig-4d03e084.js} +1 -1
  2. package/dist/cjs/{cart-6095475b.js → cart-6c7bf457.js} +4 -4
  3. package/dist/cjs/{createCustomEvent-0cef191b.js → createCustomEvent-a10ed604.js} +2 -2
  4. package/dist/cjs/{handleFetch-57c46afa.js → handleFetch-c0e07666.js} +2 -2
  5. package/dist/cjs/index.cjs.js +9 -9
  6. package/dist/cjs/{paypal-ac2f82ef.js → paypal-ec9ebaf5.js} +4 -4
  7. package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-badge_13.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
  10. package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
  11. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
  17. package/dist/collection/__mocks__/vercel-app/localization.js +1 -1
  18. package/dist/collection/__mocks__/zonos-url/localization.js +2899 -1
  19. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  20. package/dist/collection/components/main/zonos-controller.js +2 -2
  21. package/dist/collection/components/store/checkout/paypal.js +2 -2
  22. package/dist/collection/components/store/checkout/stripe.js +3 -3
  23. package/dist/collection/components/utils/handleFetch.js +2 -2
  24. package/dist/collection/components/utils/hello/detectItemRestrictions.js +1 -1
  25. package/dist/collection/components/utils/hello/getProductsOnPage.js +2 -2
  26. package/dist/collection/types/generated/graphql.customer.types.js +9 -0
  27. package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -1
  28. package/dist/collection/utils/formattedUrl.js +1 -1
  29. package/dist/esm/{CheckoutConfig-49ba0fef.js → CheckoutConfig-7fe6442e.js} +1 -1
  30. package/dist/esm/{cart-0467d5ac.js → cart-a845a902.js} +4 -4
  31. package/dist/esm/{createCustomEvent-ccb2f324.js → createCustomEvent-0797e187.js} +2 -2
  32. package/dist/esm/{handleFetch-de935ec3.js → handleFetch-613fbc00.js} +2 -2
  33. package/dist/esm/index.js +10 -10
  34. package/dist/esm/{paypal-e68cf8df.js → paypal-6d80dfd9.js} +4 -4
  35. package/dist/esm/zonos-address_8.entry.js +2 -2
  36. package/dist/esm/zonos-badge_13.entry.js +4 -4
  37. package/dist/esm/zonos-checkout.entry.js +6 -6
  38. package/dist/esm/zonos-controller.entry.js +4 -4
  39. package/dist/esm/zonos-country-flag.entry.js +2 -2
  40. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  41. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  42. package/dist/esm/zonos-hello.entry.js +5 -5
  43. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  44. package/dist/esm/zonos-notification_3.entry.js +3 -3
  45. package/dist/esm-es5/{CheckoutConfig-49ba0fef.js → CheckoutConfig-7fe6442e.js} +1 -1
  46. package/dist/esm-es5/{cart-0467d5ac.js → cart-a845a902.js} +1 -1
  47. package/dist/esm-es5/{createCustomEvent-ccb2f324.js → createCustomEvent-0797e187.js} +1 -1
  48. package/dist/esm-es5/{handleFetch-de935ec3.js → handleFetch-613fbc00.js} +1 -1
  49. package/dist/esm-es5/index.js +1 -1
  50. package/dist/esm-es5/{paypal-e68cf8df.js → paypal-6d80dfd9.js} +2 -2
  51. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  52. package/dist/esm-es5/zonos-badge_13.entry.js +1 -1
  53. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  54. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  55. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  56. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  57. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  58. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  59. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  60. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  61. package/dist/scripts/index.js +1 -1
  62. package/dist/scripts/loadZonos.js +1 -1
  63. package/dist/scripts/zonos.js +1 -1
  64. package/dist/types/types/generated/graphql.customer.types.d.ts +11 -0
  65. package/dist/types/types/generated/graphql.customer.types.ts +15 -0
  66. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  67. package/dist/zonos-elements/index.esm.js +1 -1
  68. package/dist/zonos-elements/{p-aff41c41.system.js → p-08e19004.system.js} +1 -1
  69. package/dist/zonos-elements/{p-59c51734.system.entry.js → p-0954e8fe.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-29ad5aa6.entry.js → p-173f8e5b.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-f0ebd55a.system.entry.js → p-17ea3429.system.entry.js} +1 -1
  72. package/dist/zonos-elements/p-1df63802.system.js +1 -0
  73. package/dist/zonos-elements/{p-c7a8a6bb.system.js → p-206cf031.system.js} +1 -1
  74. package/dist/zonos-elements/{p-7e431f33.system.entry.js → p-298df70c.system.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-ce149fc7.system.entry.js → p-324a8c0d.system.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-fb3c4b52.system.entry.js → p-3492c75f.system.entry.js} +1 -1
  77. package/dist/zonos-elements/{p-726cef64.system.entry.js → p-35122d9c.system.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-1b071708.entry.js → p-35ca4dcc.entry.js} +1 -1
  79. package/dist/zonos-elements/{p-b2e18e34.system.entry.js → p-40001536.system.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-b80ef150.system.entry.js → p-40f73fb4.system.entry.js} +1 -1
  81. package/dist/zonos-elements/{p-4c30186a.js → p-472a6c19.js} +1 -1
  82. package/dist/zonos-elements/{p-ffa7d4c2.entry.js → p-4b205b2f.entry.js} +1 -1
  83. package/dist/zonos-elements/{p-7b18892a.system.entry.js → p-4dd2f617.system.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-478b5c7d.entry.js → p-51d82a07.entry.js} +1 -1
  85. package/dist/zonos-elements/{p-a164f76d.entry.js → p-556d4ddb.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-386bef53.entry.js → p-6f87b869.entry.js} +1 -1
  87. package/dist/zonos-elements/{p-60129618.system.js → p-8260b820.system.js} +1 -1
  88. package/dist/zonos-elements/{p-e65dd068.entry.js → p-921d3603.entry.js} +1 -1
  89. package/dist/zonos-elements/{p-9a1a2aa2.entry.js → p-95a18511.entry.js} +1 -1
  90. package/dist/zonos-elements/{p-8d9112e9.js → p-9fd3995f.js} +1 -1
  91. package/dist/zonos-elements/p-a99620c8.entry.js +1 -0
  92. package/dist/zonos-elements/{p-974ce80b.system.entry.js → p-b65b3e7b.system.entry.js} +1 -1
  93. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  94. package/dist/zonos-elements/{p-de2bd8da.system.js → p-d067bb64.system.js} +2 -2
  95. package/dist/zonos-elements/{p-41871fbd.js → p-d20f6cf1.js} +2 -2
  96. package/dist/zonos-elements/{p-f32d7972.entry.js → p-d42018fc.entry.js} +1 -1
  97. package/dist/zonos-elements/{p-ac162a0f.system.js → p-e89c2805.system.js} +1 -1
  98. package/dist/zonos-elements/{p-068c9ba4.js → p-f9c2288f.js} +1 -1
  99. package/dist/zonos-elements/{p-6be07fde.js → p-fb59c3c3.js} +1 -1
  100. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  101. package/package.json +1 -1
  102. package/dist/zonos-elements/p-0f198151.entry.js +0 -1
  103. package/dist/zonos-elements/p-93f12fa9.system.js +0 -1
@@ -137,7 +137,7 @@ export class ZonosCheckout {
137
137
  const cartResult = await setupCartData(cartId);
138
138
  const cartData = cartResult === null || cartResult === void 0 ? void 0 : cartResult.cartData;
139
139
  if (!cartData) {
140
- logError('Fail to build cart, please try again.');
140
+ logError('Failed to build cart, please try again.');
141
141
  return;
142
142
  }
143
143
  const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
@@ -106,7 +106,7 @@ export class ZonosController {
106
106
  // override subscription status
107
107
  const config = Object.assign(Object.assign({}, this.config), { checkoutSettings: this.config.checkoutSettings
108
108
  ? Object.assign(Object.assign({}, this.config.checkoutSettings), { subscriptionStatus: undefined }) : undefined });
109
- // load default setting if fail to load user setting
109
+ // load default setting if failed to load user settings
110
110
  zonosStoreInitSetting({
111
111
  overrideSettings: config,
112
112
  zonosSettings: json,
@@ -195,7 +195,7 @@ export class ZonosController {
195
195
  zonosStore.organizationName = organizationName;
196
196
  }
197
197
  render() {
198
- return h(Host, { key: '4d7d784a50ebcb61ee4658198f3dcf756daf8d70', class: "zonos--elements" });
198
+ return h(Host, { key: '7ec14cc108aea8ac9c552c76410c00b698fae8f8', class: "zonos--elements" });
199
199
  }
200
200
  static get is() { return "zonos-controller"; }
201
201
  static get encapsulation() { return "shadow"; }
@@ -159,7 +159,7 @@ const paypalInitScript = async ({ currency }) => {
159
159
  }
160
160
  const paypalClientId = zonosStore.checkoutSettings.externalServiceTokens.find(item => item.type === 'PAYPAL_CLIENT_ID');
161
161
  if (!paypalClientId) {
162
- log('Fail to load paypal -- missing paypal publishable key', 'warn');
162
+ log('Failed to load paypal -- missing paypal publishable key', 'warn');
163
163
  return;
164
164
  }
165
165
  /**
@@ -202,7 +202,7 @@ const paypalStoreInitButtons = (props) => {
202
202
  fundingSource }, props))), { fundingSource }))) || null;
203
203
  }
204
204
  catch (err) {
205
- log(`===== Fail to load paypal's "${fundingSource}" button`, 'warn', err);
205
+ log(`===== Failed to load paypal's "${fundingSource}" button`, 'warn', err);
206
206
  }
207
207
  if (button === null || button === void 0 ? void 0 : button.isEligible()) {
208
208
  log(`==== Paypal button ${fundingSource} loaded`);
@@ -231,7 +231,7 @@ const stripeStorePrefetchLandedCost = async () => {
231
231
  }
232
232
  }
233
233
  catch (err) {
234
- // default to empty array if we fail to fetch landed cost, so we can show the error message
234
+ // default to empty array if we failed to fetch landed cost, so we can show the error message
235
235
  cartStore.landedCostData = [];
236
236
  cartStore.shippingData = [];
237
237
  logError(err);
@@ -355,7 +355,7 @@ const stripeStoreInitCheckoutSession = async () => {
355
355
  var _a;
356
356
  const total = cartStore.items.reduce((amount, item) => amount + item.amount * item.quantity, 0);
357
357
  if (!total || !localizationStore.targetCurrency) {
358
- logError('Fail to create checkout session - invalid total or currency');
358
+ logError('Failed to create checkout session - invalid total or currency');
359
359
  return false;
360
360
  }
361
361
  stripeStore.isFetchingSession = true;
@@ -497,7 +497,7 @@ const stripeStoreTranslateAddressToLatin = async ({ addressInvalidCharactersList
497
497
  });
498
498
  if (errors.length || !json) {
499
499
  logError('Error occurs when translating address to latin', JSON.stringify(errors, null, 2));
500
- // reset translated address if we fail to translate and let user manually fix it
500
+ // reset translated address if we Failed to translate and let user manually fix it
501
501
  stripeStore.translatedAddress = {
502
502
  address: {},
503
503
  billingAddress: {},
@@ -66,7 +66,7 @@ const handleRequest = async ({ basePathType, options, path, }) => {
66
66
  zonosMode: null,
67
67
  };
68
68
  }
69
- const message = 'Fail to fetch';
69
+ const message = 'Failed to fetch';
70
70
  return {
71
71
  baseUrl,
72
72
  errors: [{ message, type: 'unknown' }],
@@ -133,7 +133,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
133
133
  const unknownError = errors.find(({ type }) => type === 'unknown');
134
134
  const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404;
135
135
  const shouldCallFallback =
136
- // If next fallback is available, and the error is unknown (fail to fetch) or 404
136
+ // If next fallback is available, and the error is unknown (Failed to fetch) or 404
137
137
  nextFallbackApiType && isUnknownError;
138
138
  // Should log the error if it's unknown error
139
139
  if (isUnknownError) {
@@ -7,7 +7,7 @@ export const detectItemRestrictions = async (newProducts) => {
7
7
  }
8
8
  const { selectedCountryCode } = localizationStore;
9
9
  if (!selectedCountryCode) {
10
- logError('Hello Could not check item restrictions - No country code selected');
10
+ logError('Hello could not check item restrictions - No country code selected');
11
11
  return [];
12
12
  }
13
13
  const items = newProducts.map(product => ({
@@ -5,7 +5,7 @@ export const getProductsOnPage = () => {
5
5
  var _a, _b;
6
6
  const { productAddToCartElementSelector, productDescriptionElementSelector, productTitleElementSelector, restrictionBehavior, } = zonosStore.helloSettings;
7
7
  if (!productTitleElementSelector || !productDescriptionElementSelector) {
8
- logError(`Hello Could not check item restrictions - must provide title and description selectors.`);
8
+ logError(`Hello could not check item restrictions - must provide title and description selectors.`);
9
9
  }
10
10
  const titleNodes = (productTitleElementSelector &&
11
11
  isValidSelector(productTitleElementSelector) &&
@@ -17,7 +17,7 @@ export const getProductsOnPage = () => {
17
17
  [];
18
18
  if (titleNodes.length !== descriptionNodes.length) {
19
19
  // If the title and description selectors don't match, kill item restrictions altogether
20
- logError('Hello Could not check item restrictions - Title and description selectors do not match');
20
+ logError('Hello could not check item restrictions - Title and description selectors do not match');
21
21
  return [];
22
22
  }
23
23
  const shouldDisableCart = restrictionBehavior === 'RESTRICT_AND_BLOCK';
@@ -293,6 +293,10 @@ export const classificationCalculateSource = {
293
293
  Legacy: 'LEGACY',
294
294
  Single: 'SINGLE',
295
295
  };
296
+ export const classificationMethod = {
297
+ Augmented: 'AUGMENTED',
298
+ Calculated: 'CALCULATED',
299
+ };
296
300
  export const classificationRequestField = {
297
301
  Category: 'CATEGORY',
298
302
  Description: 'DESCRIPTION',
@@ -1217,6 +1221,11 @@ export const externalServiceTokenType = {
1217
1221
  export const fedExCategoryCode = {
1218
1222
  Shipping: 'SHIPPING',
1219
1223
  };
1224
+ export const fieldStatus = {
1225
+ Hidden: 'HIDDEN',
1226
+ Required: 'REQUIRED',
1227
+ Visible: 'VISIBLE',
1228
+ };
1220
1229
  export const fulfillmentCenterType = {
1221
1230
  ConsolidationCenter: 'CONSOLIDATION_CENTER',
1222
1231
  Primary: 'PRIMARY',
@@ -35,7 +35,7 @@ export const formattedCloudflareApiUrl = ({ branchName, inCI: _inCI, inGithubAct
35
35
  if (!isProdBranch) {
36
36
  // use Cloudflare branch_url instead of the production url
37
37
  if (!branchName) {
38
- throw new Error('Fail to get Cloudflare commit ref or branch name');
38
+ throw new Error('Failed to get Cloudflare commit ref or branch name');
39
39
  }
40
40
  // generate generated deploy url based on the branch name
41
41
  const cloudflareUrl = generateCloudflareDeployUrl({
@@ -34,7 +34,7 @@ export const formattedUrl = ({ branchName, inCI: _inCI, inVercel: _inVercel, isV
34
34
  (_inVercel && type === 'vercel-git')) {
35
35
  // use vercel branch_url instead of the production url
36
36
  if (!branchName) {
37
- throw new Error('Fail to get vercel commit ref or branch name');
37
+ throw new Error('Failed to get vercel commit ref or branch name');
38
38
  }
39
39
  // get project name based on the `${url}`
40
40
  const isStorybook =
@@ -1,4 +1,4 @@
1
- import { h as handleFetch, l as log, a as logError } from './handleFetch-de935ec3.js';
1
+ import { h as handleFetch, l as log, a as logError } from './handleFetch-613fbc00.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-de935ec3.js';
2
+ import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-613fbc00.js';
3
3
  import { i as isDarkColor } from './isDarkColor-c927f77d.js';
4
4
  import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
5
5
 
@@ -8379,7 +8379,7 @@ const stripeStorePrefetchLandedCost = async () => {
8379
8379
  }
8380
8380
  }
8381
8381
  catch (err) {
8382
- // default to empty array if we fail to fetch landed cost, so we can show the error message
8382
+ // default to empty array if we failed to fetch landed cost, so we can show the error message
8383
8383
  cartStore.landedCostData = [];
8384
8384
  cartStore.shippingData = [];
8385
8385
  logError(err);
@@ -8503,7 +8503,7 @@ const stripeStoreInitCheckoutSession = async () => {
8503
8503
  var _a;
8504
8504
  const total = cartStore.items.reduce((amount, item) => amount + item.amount * item.quantity, 0);
8505
8505
  if (!total || !localizationStore.targetCurrency) {
8506
- logError('Fail to create checkout session - invalid total or currency');
8506
+ logError('Failed to create checkout session - invalid total or currency');
8507
8507
  return false;
8508
8508
  }
8509
8509
  stripeStore.isFetchingSession = true;
@@ -8645,7 +8645,7 @@ const stripeStoreTranslateAddressToLatin = async ({ addressInvalidCharactersList
8645
8645
  });
8646
8646
  if (errors.length || !json) {
8647
8647
  logError('Error occurs when translating address to latin', JSON.stringify(errors, null, 2));
8648
- // reset translated address if we fail to translate and let user manually fix it
8648
+ // reset translated address if we Failed to translate and let user manually fix it
8649
8649
  stripeStore.translatedAddress = {
8650
8650
  address: {},
8651
8651
  billingAddress: {},
@@ -1,6 +1,6 @@
1
- import { d as cartStore, l as localizationStore } from './cart-0467d5ac.js';
1
+ import { d as cartStore, l as localizationStore } from './cart-a845a902.js';
2
2
  import { z as zonosStore } from './zonosStore-473f4654.js';
3
- import { h as handleFetch } from './handleFetch-de935ec3.js';
3
+ import { h as handleFetch } from './handleFetch-613fbc00.js';
4
4
 
5
5
  const trackConversionEvent = async (eventName, metadata) => {
6
6
  var _a, _b;
@@ -196,7 +196,7 @@ const handleRequest = async ({ basePathType, options, path, }) => {
196
196
  zonosMode: null,
197
197
  };
198
198
  }
199
- const message = 'Fail to fetch';
199
+ const message = 'Failed to fetch';
200
200
  return {
201
201
  baseUrl,
202
202
  errors: [{ message, type: 'unknown' }],
@@ -263,7 +263,7 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
263
263
  const unknownError = errors.find(({ type }) => type === 'unknown');
264
264
  const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404;
265
265
  const shouldCallFallback =
266
- // If next fallback is available, and the error is unknown (fail to fetch) or 404
266
+ // If next fallback is available, and the error is unknown (Failed to fetch) or 404
267
267
  nextFallbackApiType && isUnknownError;
268
268
  // Should log the error if it's unknown error
269
269
  if (isUnknownError) {
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { l as log, a as logError } from './handleFetch-de935ec3.js';
2
- import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-49ba0fef.js';
3
- export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-49ba0fef.js';
1
+ import { l as log, a as logError } from './handleFetch-613fbc00.js';
2
+ import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-7fe6442e.js';
3
+ export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-7fe6442e.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.55.js.zonos.com";
96
+ const cdnUrl = "https://v1.3.57.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.55.js.zonos.com";
281
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.55";
282
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.55";
283
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.55";
280
+ const ZONOS_URL = "https://v1.3.57.js.zonos.com";
281
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.57";
282
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.57";
283
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.57";
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 = "1726679495773";
298
+ Zonos.releaseDate = "1727385526847";
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.55"}`;
305
+ Zonos.version = `v${"1.3.57"}`;
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-0467d5ac.js';
3
- import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-de935ec3.js';
2
+ import { d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-a845a902.js';
3
+ import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-613fbc00.js';
4
4
  import { t as tinycolor } from './isDarkColor-c927f77d.js';
5
5
 
6
6
  /*!
@@ -392,7 +392,7 @@ const paypalInitScript = async ({ currency }) => {
392
392
  }
393
393
  const paypalClientId = zonosStore.checkoutSettings.externalServiceTokens.find(item => item.type === 'PAYPAL_CLIENT_ID');
394
394
  if (!paypalClientId) {
395
- log('Fail to load paypal -- missing paypal publishable key', 'warn');
395
+ log('Failed to load paypal -- missing paypal publishable key', 'warn');
396
396
  return;
397
397
  }
398
398
  /**
@@ -435,7 +435,7 @@ const paypalStoreInitButtons = (props) => {
435
435
  fundingSource }, props))), { fundingSource }))) || null;
436
436
  }
437
437
  catch (err) {
438
- log(`===== Fail to load paypal's "${fundingSource}" button`, 'warn', err);
438
+ log(`===== Failed to load paypal's "${fundingSource}" button`, 'warn', err);
439
439
  }
440
440
  if (button === null || button === void 0 ? void 0 : button.isEligible()) {
441
441
  log(`==== Paypal button ${fundingSource} loaded`);
@@ -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-0467d5ac.js';
2
+ import { j as stripeStore, l as localizationStore, t as translate } from './cart-a845a902.js';
3
3
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
4
- import { a as logError } from './handleFetch-de935ec3.js';
4
+ import { a as logError } from './handleFetch-613fbc00.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-0467d5ac.js';
5
- import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-e68cf8df.js';
6
- import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-ccb2f324.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-a845a902.js';
5
+ import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-6d80dfd9.js';
6
+ import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-0797e187.js';
7
7
  import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
8
- import { h as handleFetch, s as sendErrorLog } from './handleFetch-de935ec3.js';
8
+ import { h as handleFetch, s as sendErrorLog } from './handleFetch-613fbc00.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-0467d5ac.js';
3
- import { s as submitGtag, p as paypalInitScript } from './paypal-e68cf8df.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-a845a902.js';
3
+ import { s as submitGtag, p as paypalInitScript } from './paypal-6d80dfd9.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-ccb2f324.js';
5
+ import { c as createCustomEvent, t as trackConversionEvent, g as getIsTestMode } from './createCustomEvent-0797e187.js';
6
6
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
7
- import { l as log, a as logError, s as sendErrorLog } from './handleFetch-de935ec3.js';
7
+ import { l as log, a as logError, s as sendErrorLog } from './handleFetch-613fbc00.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-49ba0fef.js';
11
+ import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-7fe6442e.js';
12
12
  import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
13
13
 
14
14
  /**
@@ -277,7 +277,7 @@ const ZonosCheckout = class {
277
277
  const cartResult = await setupCartData(cartId);
278
278
  const cartData = cartResult === null || cartResult === void 0 ? void 0 : cartResult.cartData;
279
279
  if (!cartData) {
280
- logError('Fail to build cart, please try again.');
280
+ logError('Failed to build cart, please try again.');
281
281
  return;
282
282
  }
283
283
  const { adjustments, cartItems } = buildCartItemsByTempCart(cartData);
@@ -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-0467d5ac.js';
2
+ import { w as isValidSelector, j as stripeStore, x as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-a845a902.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-de935ec3.js';
4
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-613fbc00.js';
5
5
  import './isDarkColor-c927f77d.js';
6
6
  import './getBorderRadius-23398fc6.js';
7
7
 
@@ -226,7 +226,7 @@ const ZonosController = class {
226
226
  // override subscription status
227
227
  const config = Object.assign(Object.assign({}, this.config), { checkoutSettings: this.config.checkoutSettings
228
228
  ? Object.assign(Object.assign({}, this.config.checkoutSettings), { subscriptionStatus: undefined }) : undefined });
229
- // load default setting if fail to load user setting
229
+ // load default setting if failed to load user settings
230
230
  zonosStoreInitSetting({
231
231
  overrideSettings: config,
232
232
  zonosSettings: json,
@@ -315,7 +315,7 @@ const ZonosController = class {
315
315
  zonosStore.organizationName = organizationName;
316
316
  }
317
317
  render() {
318
- return h(Host, { key: '4d7d784a50ebcb61ee4658198f3dcf756daf8d70', class: "zonos--elements" });
318
+ return h(Host, { key: '7ec14cc108aea8ac9c552c76410c00b698fae8f8', class: "zonos--elements" });
319
319
  }
320
320
  };
321
321
  ZonosController.style = ZonosControllerStyle0;
@@ -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-0467d5ac.js';
2
+ import { l as localizationStore } from './cart-a845a902.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import './handleFetch-de935ec3.js';
5
+ import './handleFetch-613fbc00.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-0467d5ac.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-a845a902.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-de935ec3.js';
7
+ import './handleFetch-613fbc00.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-0467d5ac.js';
2
+ import { t as translate, l as localizationStore, D as currencyFormat } from './cart-a845a902.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-de935ec3.js';
7
+ import './handleFetch-613fbc00.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-0467d5ac.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-a845a902.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import { h as handleFetch, a as logError, l as log } from './handleFetch-de935ec3.js';
5
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-613fbc00.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
7
  import './isDarkColor-c927f77d.js';
8
8
  import './getBorderRadius-23398fc6.js';
@@ -380,7 +380,7 @@ const detectItemRestrictions = async (newProducts) => {
380
380
  }
381
381
  const { selectedCountryCode } = localizationStore;
382
382
  if (!selectedCountryCode) {
383
- logError('Hello Could not check item restrictions - No country code selected');
383
+ logError('Hello could not check item restrictions - No country code selected');
384
384
  return [];
385
385
  }
386
386
  const items = newProducts.map(product => ({
@@ -426,7 +426,7 @@ const getProductsOnPage = () => {
426
426
  var _a, _b;
427
427
  const { productAddToCartElementSelector, productDescriptionElementSelector, productTitleElementSelector, restrictionBehavior, } = zonosStore.helloSettings;
428
428
  if (!productTitleElementSelector || !productDescriptionElementSelector) {
429
- logError(`Hello Could not check item restrictions - must provide title and description selectors.`);
429
+ logError(`Hello could not check item restrictions - must provide title and description selectors.`);
430
430
  }
431
431
  const titleNodes = (productTitleElementSelector &&
432
432
  isValidSelector(productTitleElementSelector) &&
@@ -438,7 +438,7 @@ const getProductsOnPage = () => {
438
438
  [];
439
439
  if (titleNodes.length !== descriptionNodes.length) {
440
440
  // If the title and description selectors don't match, kill item restrictions altogether
441
- logError('Hello Could not check item restrictions - Title and description selectors do not match');
441
+ logError('Hello could not check item restrictions - Title and description selectors do not match');
442
442
  return [];
443
443
  }
444
444
  const shouldDisableCart = restrictionBehavior === 'RESTRICT_AND_BLOCK';
@@ -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-0467d5ac.js';
2
+ import { K as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-a845a902.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
4
4
  import { l as languages } from './ILanguage-cd6acb72.js';
5
- import './handleFetch-de935ec3.js';
5
+ import './handleFetch-613fbc00.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-0467d5ac.js';
5
- import { a as logError, l as log } from './handleFetch-de935ec3.js';
6
- import { d as paypalStoreInitButtons } from './paypal-e68cf8df.js';
4
+ import { j as stripeStore } from './cart-a845a902.js';
5
+ import { a as logError, l as log } from './handleFetch-613fbc00.js';
6
+ import { d as paypalStoreInitButtons } from './paypal-6d80dfd9.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-de935ec3.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};
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-613fbc00.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};