@zonos/elements 1.3.257 → 1.3.259

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 (180) hide show
  1. package/dist/cjs/{cart-cd0a054b.js → cart-c618fd5b.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-3650109c.js → hasInclusivePrice-58a9f15d.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-1cea739b.js → invoice-c9cb6683.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-65c71740.js → isCollectMobileTablet-93a5194a.js} +2 -2
  6. package/dist/cjs/{localization-adaab93f.js → localization-5994d4de.js} +25 -3
  7. package/dist/cjs/{paypal-326d7bc5.js → paypal-091e089e.js} +2 -2
  8. package/dist/cjs/{placeTestOrder-53f2fe97.js → placeTestOrder-b07f8edb.js} +2 -2
  9. package/dist/cjs/{renderCheckoutCurrency-cf2e3b93.js → renderCheckoutCurrency-7876a1d4.js} +2 -2
  10. package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +442 -17
  15. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  17. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  20. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +45 -12
  22. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  24. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
  25. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  26. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  27. package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
  28. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +72 -0
  29. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +43 -10
  30. package/dist/collection/components/store/hello/localization.js +25 -3
  31. package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +6 -0
  32. package/dist/collection/components/utils/checkout/buildBigcommerceLoginUrl.js +65 -0
  33. package/dist/collection/components/utils/checkout/checkBigCommerceBypassCustomerGroup.js +12 -7
  34. package/dist/collection/components/utils/checkout/checkBigCommerceForceLogin.js +116 -0
  35. package/dist/collection/components/utils/checkout/fetchBigCommerceCheckoutSettings.js +92 -0
  36. package/dist/collection/components/utils/checkout/fixBigCommerceLoginCreateAccountLink.js +53 -0
  37. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +40 -7
  38. package/dist/collection/types/checkout/api/BigCommerceCheckoutSettings.js +1 -0
  39. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  40. package/dist/collection/types/generated/graphql.internal.types.js +39 -0
  41. package/dist/collection/types/index.js +1 -0
  42. package/dist/esm/{cart-4cd47a1b.js → cart-76fb528f.js} +1 -1
  43. package/dist/esm/{hasInclusivePrice-7a3dc4c3.js → hasInclusivePrice-275b1048.js} +1 -1
  44. package/dist/esm/index.js +7 -7
  45. package/dist/esm/{invoice-03ff7bbb.js → invoice-9efcb941.js} +2 -2
  46. package/dist/esm/{isCollectMobileTablet-9eb77c9a.js → isCollectMobileTablet-a7e5b909.js} +2 -2
  47. package/dist/esm/{localization-79e08480.js → localization-76ce3e29.js} +25 -3
  48. package/dist/esm/{paypal-67c86683.js → paypal-75c5c66d.js} +2 -2
  49. package/dist/esm/{placeTestOrder-e81fff15.js → placeTestOrder-22633bf2.js} +2 -2
  50. package/dist/esm/{renderCheckoutCurrency-1fc00db4.js → renderCheckoutCurrency-d27b0082.js} +2 -2
  51. package/dist/esm/zonos-address-display_8.entry.js +2 -2
  52. package/dist/esm/zonos-address_4.entry.js +2 -2
  53. package/dist/esm/zonos-card_5.entry.js +3 -3
  54. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  55. package/dist/esm/zonos-checkout.entry.js +443 -18
  56. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  57. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  58. package/dist/esm/zonos-collect.entry.js +4 -4
  59. package/dist/esm/zonos-controller.entry.js +2 -2
  60. package/dist/esm/zonos-country-flag.entry.js +1 -1
  61. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  62. package/dist/esm/zonos-hello-dialog.entry.js +45 -12
  63. package/dist/esm/zonos-hello.entry.js +1 -1
  64. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  65. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  66. package/dist/esm/zonos-invoice.entry.js +4 -4
  67. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  68. package/dist/esm/zonos-store-credit.entry.js +3 -3
  69. package/dist/esm-es5/{cart-4cd47a1b.js → cart-76fb528f.js} +1 -1
  70. package/dist/esm-es5/{hasInclusivePrice-7a3dc4c3.js → hasInclusivePrice-275b1048.js} +1 -1
  71. package/dist/esm-es5/index.js +1 -1
  72. package/dist/esm-es5/{invoice-03ff7bbb.js → invoice-9efcb941.js} +1 -1
  73. package/dist/esm-es5/{isCollectMobileTablet-9eb77c9a.js → isCollectMobileTablet-a7e5b909.js} +1 -1
  74. package/dist/esm-es5/{localization-79e08480.js → localization-76ce3e29.js} +1 -1
  75. package/dist/esm-es5/{paypal-67c86683.js → paypal-75c5c66d.js} +2 -2
  76. package/dist/esm-es5/{placeTestOrder-e81fff15.js → placeTestOrder-22633bf2.js} +1 -1
  77. package/dist/esm-es5/{renderCheckoutCurrency-1fc00db4.js → renderCheckoutCurrency-d27b0082.js} +1 -1
  78. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  79. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  80. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  81. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  82. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  83. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  84. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  85. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  86. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  87. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  88. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  89. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  90. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  91. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  92. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  93. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  94. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  95. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  96. package/dist/scripts/index.d.ts +21 -5
  97. package/dist/scripts/index.js +1 -1
  98. package/dist/scripts/loadZonos.js +1 -1
  99. package/dist/scripts/zonos.js +1 -1
  100. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +16 -0
  101. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +6 -0
  102. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  103. package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +6 -0
  104. package/dist/types/components/utils/checkout/buildBigcommerceLoginUrl.d.ts +27 -0
  105. package/dist/types/components/utils/checkout/checkBigCommerceBypassCustomerGroup.d.ts +12 -0
  106. package/dist/types/components/utils/checkout/checkBigCommerceForceLogin.d.ts +50 -0
  107. package/dist/types/components/utils/checkout/fetchBigCommerceCheckoutSettings.d.ts +18 -0
  108. package/dist/types/components/utils/checkout/fixBigCommerceLoginCreateAccountLink.d.ts +17 -0
  109. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +6 -5
  110. package/dist/types/types/checkout/CheckoutConfig.d.ts +9 -0
  111. package/dist/types/types/checkout/api/BigCommerceCheckoutSettings.d.ts +12 -0
  112. package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
  113. package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
  114. package/dist/types/types/generated/graphql.internal.types.d.ts +58 -9
  115. package/dist/types/types/generated/graphql.internal.types.ts +69 -9
  116. package/dist/types/types/index.d.ts +1 -0
  117. package/dist/zonos-elements/index.esm.js +1 -1
  118. package/dist/zonos-elements/{p-aa3e3438.system.entry.js → p-055c8d6c.system.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-ce2fd652.entry.js → p-0a9741f7.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-3fc43187.system.entry.js → p-10da499b.system.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-2c1c6d60.system.entry.js → p-14d35979.system.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-271eebd3.system.js → p-1523f6a8.system.js} +1 -1
  123. package/dist/zonos-elements/{p-c585d169.entry.js → p-1661f938.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-3092ec40.system.entry.js → p-1e9e284e.system.entry.js} +1 -1
  125. package/dist/zonos-elements/{p-7559c494.js → p-1ebb59a3.js} +1 -1
  126. package/dist/zonos-elements/{p-4e2262e8.js → p-24f41959.js} +1 -1
  127. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  128. package/dist/zonos-elements/{p-0ca6ee9b.entry.js → p-29d16ad0.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-0f4822cc.system.entry.js → p-2b2b1c8c.system.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-91eeccaa.entry.js → p-2d854a75.entry.js} +1 -1
  131. package/dist/zonos-elements/{p-a90c977a.system.js → p-2ec799e4.system.js} +1 -1
  132. package/dist/zonos-elements/{p-d0690cdc.system.js → p-3600280d.system.js} +1 -1
  133. package/dist/zonos-elements/p-3ee8496e.js +1 -0
  134. package/dist/zonos-elements/{p-21519ebe.entry.js → p-425f747b.entry.js} +1 -1
  135. package/dist/zonos-elements/p-439dc620.system.entry.js +1 -0
  136. package/dist/zonos-elements/{p-9f3aab4e.system.entry.js → p-4b138a6e.system.entry.js} +1 -1
  137. package/dist/zonos-elements/{p-7aeb496e.entry.js → p-5262f6e8.entry.js} +1 -1
  138. package/dist/zonos-elements/{p-b53856bf.system.js → p-567abb43.system.js} +1 -1
  139. package/dist/zonos-elements/{p-9d435f12.system.entry.js → p-5fa3d1c8.system.entry.js} +1 -1
  140. package/dist/zonos-elements/{p-e9f36d6b.system.entry.js → p-6cf8fe49.system.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-8adc0a13.system.js → p-6d36b307.system.js} +1 -1
  142. package/dist/zonos-elements/{p-380143db.entry.js → p-6e50f6f5.entry.js} +1 -1
  143. package/dist/zonos-elements/{p-80ba5f70.entry.js → p-7157a5a3.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-3675766a.entry.js → p-788c6839.entry.js} +1 -1
  145. package/dist/zonos-elements/{p-a7b0345b.entry.js → p-791e13e7.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-e173fbd1.system.entry.js → p-8585c761.system.entry.js} +1 -1
  147. package/dist/zonos-elements/p-868a8667.js +1 -0
  148. package/dist/zonos-elements/{p-c2139758.entry.js → p-9460919d.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-6b83ac7f.entry.js → p-99d92a84.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-0740f8a4.system.entry.js → p-9a9c9441.system.entry.js} +1 -1
  151. package/dist/zonos-elements/p-9cbac993.entry.js +1 -0
  152. package/dist/zonos-elements/{p-a60544cc.entry.js → p-9cff66a7.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-b3824361.entry.js → p-a0f6910c.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-7caa75bb.js → p-a18adf27.js} +1 -1
  155. package/dist/zonos-elements/{p-8b35e475.system.entry.js → p-a4b6865d.system.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-c23e2501.system.entry.js → p-a89096d6.system.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-e3f9779a.system.entry.js → p-afca19b0.system.entry.js} +1 -1
  158. package/dist/zonos-elements/{p-429c1d0c.entry.js → p-afdb4445.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-4a84387a.system.entry.js → p-b34f1336.system.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-5818f4a7.entry.js → p-bba9af4c.entry.js} +1 -1
  161. package/dist/zonos-elements/{p-e62342c3.js → p-bd938f80.js} +1 -1
  162. package/dist/zonos-elements/{p-8ed0fad5.js → p-bdb3f7a2.js} +2 -2
  163. package/dist/zonos-elements/p-c85e988d.system.js +1 -0
  164. package/dist/zonos-elements/{p-e5f5b086.system.js → p-cc645667.system.js} +1 -1
  165. package/dist/zonos-elements/p-d13120f6.entry.js +1 -0
  166. package/dist/zonos-elements/{p-e80832cb.system.entry.js → p-e5f48239.system.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-22bb7836.system.js → p-e6168c82.system.js} +1 -1
  168. package/dist/zonos-elements/{p-e56f5954.system.js → p-e8a68ce7.system.js} +1 -1
  169. package/dist/zonos-elements/p-ed03b7fd.js +1 -0
  170. package/dist/zonos-elements/{p-b414b484.system.entry.js → p-edb0306c.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-e6feafc1.system.entry.js → p-f4e54f09.system.entry.js} +1 -1
  172. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  173. package/package.json +1 -1
  174. package/dist/zonos-elements/p-0e83d193.js +0 -1
  175. package/dist/zonos-elements/p-6bcbe651.js +0 -1
  176. package/dist/zonos-elements/p-7cbbf483.system.js +0 -1
  177. package/dist/zonos-elements/p-ac7b93c9.js +0 -1
  178. package/dist/zonos-elements/p-da7e1143.system.entry.js +0 -1
  179. package/dist/zonos-elements/p-ddb27b4a.entry.js +0 -1
  180. package/dist/zonos-elements/p-fed19033.entry.js +0 -1
@@ -0,0 +1,116 @@
1
+ import { fetchBigCommerceCheckout, fetchCheckoutId, isBigCommerceCustomerLoggedIn, } from "./bigcommerceStorefrontApi";
2
+ import { buildBigcommerceLoginUrl } from "./buildBigcommerceLoginUrl";
3
+ import { fetchBigCommerceCheckoutSettings } from "./fetchBigCommerceCheckoutSettings";
4
+ import { log } from "../logging/log";
5
+ const SKIP = {
6
+ redirectUrl: null,
7
+ shouldForceLogin: false,
8
+ };
9
+ /**
10
+ * Session cache for the merchant-level "does BC require login?" answer.
11
+ * Hitting `/checkouts/settings` on every checkout open would add a visible
12
+ * round trip to the hot path, so we resolve it once and reuse — the setting
13
+ * is configured at the store level and very rarely changes.
14
+ *
15
+ * `null` means we haven't kicked off the fetch yet; the promise holds the
16
+ * eventual boolean so multiple concurrent callers deduplicate.
17
+ */
18
+ let storeRequiresLoginPromise = null;
19
+ const resolveStoreRequiresLogin = () => {
20
+ if (!storeRequiresLoginPromise) {
21
+ const pending = fetchBigCommerceCheckoutSettings()
22
+ .then(({ guestCheckoutType }) => {
23
+ if (!guestCheckoutType) {
24
+ // `null` here means either the proxy call failed (transient) or the
25
+ // storeHash wasn't known yet. Fail open for this call, but clear
26
+ // the cached promise so the next caller retries instead of
27
+ // permanently disabling force-login for the rest of the session.
28
+ if (storeRequiresLoginPromise === pending) {
29
+ storeRequiresLoginPromise = null;
30
+ }
31
+ return false;
32
+ }
33
+ return guestCheckoutType === 'no_guest_checkout';
34
+ })
35
+ .catch(() => {
36
+ // Defense-in-depth: `fetchBigCommerceCheckoutSettings` is expected to
37
+ // swallow its own errors, but if anything above does reject we fail
38
+ // open and clear the cached promise so the next caller can retry.
39
+ if (storeRequiresLoginPromise === pending) {
40
+ storeRequiresLoginPromise = null;
41
+ }
42
+ return false;
43
+ });
44
+ storeRequiresLoginPromise = pending;
45
+ }
46
+ return storeRequiresLoginPromise;
47
+ };
48
+ /**
49
+ * Kick off the `/checkouts/settings` fetch in the background on page load
50
+ * so the result is warm by the time the shopper opens checkout. Safe to
51
+ * call more than once — re-invocations reuse the in-flight/resolved
52
+ * promise.
53
+ */
54
+ export const initBigCommerceForceLoginCheck = () => {
55
+ if (!window.Zonos.isBigCommerce) {
56
+ return;
57
+ }
58
+ void resolveStoreRequiresLogin();
59
+ };
60
+ /**
61
+ * Decide whether the current BigCommerce shopper must sign in before the
62
+ * Zonos international checkout is allowed to open.
63
+ *
64
+ * Required conditions (all must hold):
65
+ * 1. Running on a BigCommerce storefront.
66
+ * 2. BC merchant has `guest_checkout_type === 'no_guest_checkout'` in their
67
+ * live `/v3/checkouts/settings` response.
68
+ * 3. Shopper has an active cart.
69
+ * 4. Shopper is not already logged in to BigCommerce.
70
+ *
71
+ * Returning a `redirectUrl` is an instruction, not an action: callers drive
72
+ * the navigation themselves so they can short-circuit any UI state (loading
73
+ * overlays, dialog open flags) before `window.location.href` flips.
74
+ */
75
+ export const checkBigCommerceForceLogin = async ({ preFetched, } = {}) => {
76
+ if (!window.Zonos.isBigCommerce) {
77
+ return SKIP;
78
+ }
79
+ const requiresLogin = await resolveStoreRequiresLogin();
80
+ if (!requiresLogin) {
81
+ return SKIP;
82
+ }
83
+ const checkoutId = preFetched
84
+ ? preFetched.checkoutId
85
+ : await fetchCheckoutId();
86
+ if (!checkoutId) {
87
+ // No active cart — nothing to protect. Force-login only matters once
88
+ // the shopper has a cart we're about to carry into Zonos checkout.
89
+ return SKIP;
90
+ }
91
+ const checkout = preFetched
92
+ ? preFetched.checkout
93
+ : await fetchBigCommerceCheckout(checkoutId);
94
+ if (!checkout) {
95
+ // Storefront API failure — fail open so a transient outage doesn't
96
+ // block the shopper. The merchant's BC checkout will still enforce
97
+ // login server-side as a last line of defense.
98
+ log('BigCommerce force-login check: failed to fetch checkout data, allowing flow to continue', 'info');
99
+ return SKIP;
100
+ }
101
+ if (isBigCommerceCustomerLoggedIn(checkout)) {
102
+ return SKIP;
103
+ }
104
+ log('BigCommerce force-login check: guest shopper on no-guest-checkout store, redirecting to /login.php', 'info');
105
+ return {
106
+ redirectUrl: buildBigcommerceLoginUrl(),
107
+ shouldForceLogin: true,
108
+ };
109
+ };
110
+ /**
111
+ * Test-only — resets the module-level cache so each test case starts
112
+ * against a clean state.
113
+ */
114
+ export const _resetBigCommerceForceLoginCacheForTesting = () => {
115
+ storeRequiresLoginPromise = null;
116
+ };
@@ -0,0 +1,92 @@
1
+ import { zonosStore } from "../../store/zonosStore";
2
+ import { handleFetch } from "../handleFetch";
3
+ import { jsonParse } from "../jsonParse";
4
+ import { log } from "../logging/log";
5
+ const EMPTY = { guestCheckoutType: null };
6
+ /**
7
+ * BigCommerce's `/checkouts/settings` values almost never change after a
8
+ * merchant's initial setup, so we persist the result in `localStorage` and
9
+ * reuse it across page loads up to this TTL. Short enough that if the
10
+ * merchant flips `guest_checkout_type` the change still propagates within
11
+ * an hour.
12
+ */
13
+ const CACHE_TTL_MS = 60 * 60 * 1000;
14
+ const CACHE_KEY = 'zonos--bc-checkout-settings';
15
+ const readFromCache = (storeHash) => {
16
+ try {
17
+ const raw = window.localStorage.getItem(CACHE_KEY);
18
+ if (!raw) {
19
+ return null;
20
+ }
21
+ const parsed = jsonParse(raw);
22
+ if (!parsed) {
23
+ return null;
24
+ }
25
+ // Different store on the same origin (e.g. zonosQaUrl preview) — ignore.
26
+ if (parsed.storeHash !== storeHash) {
27
+ return null;
28
+ }
29
+ if (parsed.expiresAt < Date.now()) {
30
+ return null;
31
+ }
32
+ return { guestCheckoutType: parsed.guestCheckoutType };
33
+ }
34
+ catch (_a) {
35
+ // localStorage access can throw in blocked-storage contexts (Safari
36
+ // private mode, cross-origin iframes) — treat as a cache miss so the
37
+ // network fallback runs.
38
+ return null;
39
+ }
40
+ };
41
+ const writeToCache = (storeHash, result) => {
42
+ try {
43
+ const payload = {
44
+ expiresAt: Date.now() + CACHE_TTL_MS,
45
+ guestCheckoutType: result.guestCheckoutType,
46
+ storeHash,
47
+ };
48
+ window.localStorage.setItem(CACHE_KEY, JSON.stringify(payload));
49
+ }
50
+ catch (_a) {
51
+ // localStorage can be disabled / quota-exceeded in some browser contexts
52
+ // (private mode, cross-origin iframes) — drop silently since caching
53
+ // is only an optimization.
54
+ }
55
+ };
56
+ /**
57
+ * Fetch the merchant's BigCommerce `/checkouts/settings` (via the demo-app
58
+ * proxy) so we can inspect `guest_checkout_type` from the storefront. The
59
+ * Store API is auth-gated, which is why we don't call it directly.
60
+ *
61
+ * Results are cached in `localStorage` for `CACHE_TTL_MS` so navigations
62
+ * inside the same store don't all pay the proxy round trip — the setting
63
+ * is merchant-level and rarely changes.
64
+ */
65
+ export const fetchBigCommerceCheckoutSettings = async () => {
66
+ var _a;
67
+ if (!window.Zonos.isBigCommerce) {
68
+ return EMPTY;
69
+ }
70
+ const storeHash = (_a = zonosStore.checkoutSettings.bigCommerceConfig) === null || _a === void 0 ? void 0 : _a.storeHash;
71
+ if (!storeHash) {
72
+ log('BigCommerce checkout settings: no storeHash provided — skipping fetch', 'info');
73
+ return EMPTY;
74
+ }
75
+ const cached = readFromCache(storeHash);
76
+ if (cached) {
77
+ return cached;
78
+ }
79
+ const { errors, json } = await handleFetch('/api/bigcommerce/checkout-settings', {
80
+ body: { storeHash },
81
+ method: 'POST',
82
+ });
83
+ if (errors.length || !json) {
84
+ log('BigCommerce checkout settings: proxy call failed, falling back to guest-allowed behavior', 'info');
85
+ return EMPTY;
86
+ }
87
+ const result = {
88
+ guestCheckoutType: json.guestCheckoutType,
89
+ };
90
+ writeToCache(storeHash, result);
91
+ return result;
92
+ };
@@ -0,0 +1,53 @@
1
+ import { buildBigcommerceLoginUrl } from "./buildBigcommerceLoginUrl";
2
+ /**
3
+ * Mark we've already rewritten a given anchor so the MutationObserver
4
+ * doesn't loop on its own mutation.
5
+ */
6
+ const REWRITTEN_ATTR = 'data-zonos-login-from-rewritten';
7
+ const CREATE_ACCOUNT_SELECTOR = 'a[href*="login.php?action=create_account"]:not([' + REWRITTEN_ATTR + '])';
8
+ const rewriteCreateAccountLinks = () => {
9
+ const anchors = document.querySelectorAll(CREATE_ACCOUNT_SELECTOR);
10
+ if (!anchors.length) {
11
+ return;
12
+ }
13
+ const target = buildBigcommerceLoginUrl({ action: 'create_account' });
14
+ anchors.forEach(anchor => {
15
+ anchor.setAttribute('href', target);
16
+ anchor.setAttribute(REWRITTEN_ATTR, 'true');
17
+ });
18
+ };
19
+ /**
20
+ * On BigCommerce's `/login.php`, the default **Create account** button links
21
+ * to `login.php?action=create_account` without the `from=cart.php...`
22
+ * parameter that the shopper had when they arrived. Without this, completing
23
+ * signup would drop them on the account home page instead of resuming Zonos
24
+ * international checkout.
25
+ *
26
+ * This watcher finds any create-account anchor on the page (including ones
27
+ * that the BC theme renders later via Stencil bundle load) and rewrites the
28
+ * `href` so the account-creation round trip preserves the
29
+ * `isInternationalCheckout=true` flag as well as `zonosTestMode` /
30
+ * `zonosQaUrl`.
31
+ *
32
+ * Safe to call more than once — idempotent thanks to the `data-zonos-…`
33
+ * attribute on rewritten anchors.
34
+ */
35
+ export const fixBigCommerceLoginCreateAccountLink = () => {
36
+ if (!window.Zonos.isBigCommerce) {
37
+ return;
38
+ }
39
+ if (!window.location.pathname.includes('/login.php')) {
40
+ return;
41
+ }
42
+ rewriteCreateAccountLinks();
43
+ // BC's login page often renders the auth form asynchronously, so the
44
+ // anchor may not exist yet when this runs. Observe for a short window,
45
+ // then stop so we don't leak a listener for the rest of the session.
46
+ const observer = new MutationObserver(() => {
47
+ rewriteCreateAccountLinks();
48
+ });
49
+ observer.observe(document.body, { childList: true, subtree: true });
50
+ // 10 seconds is plenty for the login form to mount; stopping the observer
51
+ // avoids churn from the rest of the page's normal DOM activity.
52
+ setTimeout(() => observer.disconnect(), 10000);
53
+ };
@@ -4,6 +4,7 @@ import { zonosStore } from "../../store/zonosStore";
4
4
  import { fetchBigCommerceCheckout, fetchCheckoutId, } from "./bigcommerceStorefrontApi";
5
5
  import { buildBigcommerceRedirectUrl } from "./buildBigcommerceRedirectUrl";
6
6
  import { checkBigCommerceBypassCustomerGroup } from "./checkBigCommerceBypassCustomerGroup";
7
+ import { checkBigCommerceForceLogin } from "./checkBigCommerceForceLogin";
7
8
  import { isShippableCountry } from "./isShippableCountry";
8
9
  import { log } from "../logging/log";
9
10
  import { logError } from "../logging/logError";
@@ -16,19 +17,27 @@ const FALLBACK_SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryC
16
17
  */
17
18
  const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelected, onLoggedInInternationalAddressDetected, }) => {
18
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
20
+ // Fetch the Storefront API data once up front and thread it through every
21
+ // decision below (bypass, shipping-address inspection, force-login). The
22
+ // function always needs the checkout for the address check, so reusing one
23
+ // fetch avoids the earlier 4x round-trip fan-out where bypass, address
24
+ // lookup, and force-login each fetched independently.
25
+ const checkoutId = await fetchCheckoutId();
26
+ if (!checkoutId) {
27
+ return 'noAction';
28
+ }
29
+ const checkout = await fetchBigCommerceCheckout(checkoutId);
30
+ const preFetched = { checkout, checkoutId };
19
31
  // Check if the customer belongs to a bypass group (e.g. resellers) before
20
32
  // redirecting them away from BigCommerce native checkout. This delegates to
21
33
  // the shared helper so the bypass decision has a single source of truth and
22
34
  // reuses the cached promise warmed by `initBigCommerceBypassCheck`.
23
- const { shouldBypass } = await checkBigCommerceBypassCustomerGroup();
35
+ const { shouldBypass } = await checkBigCommerceBypassCustomerGroup({
36
+ preFetched,
37
+ });
24
38
  if (shouldBypass) {
25
39
  return 'noAction';
26
40
  }
27
- const checkoutId = await fetchCheckoutId();
28
- if (!checkoutId) {
29
- return 'noAction';
30
- }
31
- const checkout = await fetchBigCommerceCheckout(checkoutId);
32
41
  const shippingAddress = (_b = (_a = checkout === null || checkout === void 0 ? void 0 : checkout.consignments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.shippingAddress;
33
42
  if (!(shippingAddress === null || shippingAddress === void 0 ? void 0 : shippingAddress.countryCode)) {
34
43
  return 'noAction';
@@ -51,6 +60,14 @@ const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelecte
51
60
  return 'optedOut';
52
61
  }
53
62
  }
63
+ // Force-login merchants must sign the guest shopper in before we leave
64
+ // BC's native checkout. Reuse the checkout we already fetched above so we
65
+ // don't double up on Storefront API round trips.
66
+ const forceLogin = await checkBigCommerceForceLogin({ preFetched });
67
+ if (forceLogin.shouldForceLogin && forceLogin.redirectUrl) {
68
+ window.location.href = forceLogin.redirectUrl;
69
+ return 'redirected';
70
+ }
54
71
  if (onInternationalCheckoutSelected) {
55
72
  await onInternationalCheckoutSelected();
56
73
  }
@@ -108,9 +125,17 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
108
125
  // Only check bypass after confirming the country is shippable (i.e. user is
109
126
  // about to be redirected to Zonos international checkout). Force-refresh so
110
127
  // we re-fetch BigCommerce checkout data every time the ship-to country
111
- // changes — prevents stale customer-group data from a cached fetch.
128
+ // changes — prevents stale customer-group data from a cached fetch. Share
129
+ // one fetch between the bypass and force-login decisions so this poll
130
+ // tick does 2 Storefront API round trips instead of 4.
131
+ const checkoutId = await fetchCheckoutId();
132
+ const checkout = checkoutId
133
+ ? await fetchBigCommerceCheckout(checkoutId)
134
+ : null;
135
+ const preFetched = { checkout, checkoutId };
112
136
  const { shouldBypass } = await checkBigCommerceBypassCustomerGroup({
113
137
  forceRefresh: true,
138
+ preFetched,
114
139
  });
115
140
  if (shouldBypass) {
116
141
  // Logged-in customer is in a bypass group — keep them on BC native
@@ -118,6 +143,14 @@ export const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedi
118
143
  log('Bypass customer group detected on BC checkout, stopping interval', 'info');
119
144
  return true;
120
145
  }
146
+ // Same force-login gate as the logged-in-default-address path — we run
147
+ // it *after* the bypass check so reseller groups never see the login
148
+ // bounce, and *before* any UI/session state flips to the redirect.
149
+ const forceLogin = await checkBigCommerceForceLogin({ preFetched });
150
+ if (forceLogin.shouldForceLogin && forceLogin.redirectUrl) {
151
+ window.location.href = forceLogin.redirectUrl;
152
+ return true;
153
+ }
121
154
  if (onInternationalCheckoutSelected) {
122
155
  await onInternationalCheckoutSelected();
123
156
  }
@@ -35,6 +35,7 @@ export const featureAspectKeyEnum = {
35
35
  NewCheckoutBeta: 'new_checkout_beta',
36
36
  NewPayoutReport: 'new_payout_report',
37
37
  NewRefundsUx: 'new_refunds_ux',
38
+ OnboardingBeta: 'onboarding_beta',
38
39
  PageAuditor: 'page_auditor',
39
40
  PromptExplorer: 'prompt_explorer',
40
41
  RulesUiCreate: 'rules_ui_create',
@@ -67,6 +68,7 @@ export const featureAudienceNameEnum = {
67
68
  NewPayoutReportMerchant: 'new_payout_report_merchant',
68
69
  NewRefundsUxMerchant: 'new_refunds_ux_merchant',
69
70
  Onboarding: 'onboarding',
71
+ OnboardingBetaMerchant: 'onboarding_beta_merchant',
70
72
  PrincipalEngineer: 'principal_engineer',
71
73
  ProServeHead: 'pro_serve_head',
72
74
  ProductManager: 'product_manager',
@@ -1701,6 +1701,19 @@ export const customsDocumentType = {
1701
1701
  ShippersLetterOfInstruction: 'SHIPPERS_LETTER_OF_INSTRUCTION',
1702
1702
  UsmcaCertificate: 'USMCA_CERTIFICATE',
1703
1703
  };
1704
+ export const customsHoldReason = {
1705
+ Abandonment: 'ABANDONMENT',
1706
+ Confiscated: 'CONFISCATED',
1707
+ DutyNonpayment: 'DUTY_NONPAYMENT',
1708
+ Examination: 'EXAMINATION',
1709
+ GoodsNotCompliant: 'GOODS_NOT_COMPLIANT',
1710
+ GovernmentHold: 'GOVERNMENT_HOLD',
1711
+ MissingData: 'MISSING_DATA',
1712
+ MissingDocs: 'MISSING_DOCS',
1713
+ RefusedEntry: 'REFUSED_ENTRY',
1714
+ SecurityFail: 'SECURITY_FAIL',
1715
+ Unknown: 'UNKNOWN',
1716
+ };
1704
1717
  export const customsIntelBucketGranularity = {
1705
1718
  Day: 'DAY',
1706
1719
  Hour: 'HOUR',
@@ -1767,6 +1780,13 @@ export const customsSpecSourceType = {
1767
1780
  Classify: 'CLASSIFY',
1768
1781
  OrganizationSetting: 'ORGANIZATION_SETTING',
1769
1782
  };
1783
+ export const customsStage = {
1784
+ CustomsCleared: 'CUSTOMS_CLEARED',
1785
+ CustomsFailed: 'CUSTOMS_FAILED',
1786
+ CustomsHold: 'CUSTOMS_HOLD',
1787
+ InCustoms: 'IN_CUSTOMS',
1788
+ PreCustoms: 'PRE_CUSTOMS',
1789
+ };
1770
1790
  export const dashboardUnit = {
1771
1791
  Imperial: 'IMPERIAL',
1772
1792
  Metric: 'METRIC',
@@ -2031,6 +2051,7 @@ export const entryStatus = {
2031
2051
  Archived: 'ARCHIVED',
2032
2052
  Draft: 'DRAFT',
2033
2053
  Error: 'ERROR',
2054
+ Filed: 'FILED',
2034
2055
  Rejected: 'REJECTED',
2035
2056
  Submitted: 'SUBMITTED',
2036
2057
  };
@@ -2045,6 +2066,7 @@ export const errorDetail = {
2045
2066
  TcpFailure: 'TCP_FAILURE',
2046
2067
  ThrottledConcurrency: 'THROTTLED_CONCURRENCY',
2047
2068
  ThrottledCpu: 'THROTTLED_CPU',
2069
+ TooManyRequests: 'TOO_MANY_REQUESTS',
2048
2070
  Unimplemented: 'UNIMPLEMENTED',
2049
2071
  Unknown: 'UNKNOWN',
2050
2072
  };
@@ -2131,6 +2153,10 @@ export const helloCountryDisplayBehavior = {
2131
2153
  All: 'ALL',
2132
2154
  OnlyShippable: 'ONLY_SHIPPABLE',
2133
2155
  };
2156
+ export const helloCountryOverrideBehavior = {
2157
+ Session: 'SESSION',
2158
+ UrlParam: 'URL_PARAM',
2159
+ };
2134
2160
  export const helloCurrencyBehavior = {
2135
2161
  Disabled: 'DISABLED',
2136
2162
  Enabled: 'ENABLED',
@@ -4487,6 +4513,11 @@ export const reverseAmountType = {
4487
4513
  Tax: 'TAX',
4488
4514
  TaxFee: 'TAX_FEE',
4489
4515
  };
4516
+ export const riskLevel = {
4517
+ High: 'HIGH',
4518
+ Low: 'LOW',
4519
+ Medium: 'MEDIUM',
4520
+ };
4490
4521
  export const roundingMethod = {
4491
4522
  Custom: 'CUSTOM',
4492
4523
  Hundredth: 'HUNDREDTH',
@@ -4685,6 +4716,9 @@ export const shipmentPackagingTypeCode = {
4685
4716
  Ups_25KgBox: 'UPS_25KG_BOX',
4686
4717
  YourPackaging: 'YOUR_PACKAGING',
4687
4718
  };
4719
+ export const shipmentRatingAdjustmentType = {
4720
+ CartTotal: 'CART_TOTAL',
4721
+ };
4688
4722
  export const shipmentRatingAmountTargetType = {
4689
4723
  BillingCompany: 'BILLING_COMPANY',
4690
4724
  MerchantBase: 'MERCHANT_BASE',
@@ -5188,6 +5222,11 @@ export const volumeUnitCode = {
5188
5222
  QuartUk: 'QUART_UK',
5189
5223
  QuartUsDry: 'QUART_US_DRY',
5190
5224
  };
5225
+ export const watchStatus = {
5226
+ Active: 'ACTIVE',
5227
+ Completed: 'COMPLETED',
5228
+ Expired: 'EXPIRED',
5229
+ };
5191
5230
  export const wcoVersion = {
5192
5231
  Wco_1997: 'WCO_1997',
5193
5232
  Wco_2002: 'WCO_2002',
@@ -1,6 +1,7 @@
1
1
  // eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
2
2
  import "./global.d";
3
3
  export * from '../components.d';
4
+ export * from './checkout/api/BigCommerceCheckoutSettings';
4
5
  export * from './checkout/api/CalculateLandedCost';
5
6
  export * from './checkout/api/CheckoutSession';
6
7
  export * from './checkout/api/CreateParty';
@@ -1,5 +1,5 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
2
- import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-79e08480.js';
2
+ import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-76ce3e29.js';
3
3
  import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
4
4
  import { h as handleFetch, l as logError, f as fallbackApiList, g as getIsTestMode, a as getIsStagingMode, s as sendErrorLog, j as jsonParse } from './handleFetch-a844cac1.js';
5
5
  import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
@@ -1,4 +1,4 @@
1
- import { l as localizationStore } from './localization-79e08480.js';
1
+ import { l as localizationStore } from './localization-76ce3e29.js';
2
2
 
3
3
  /**
4
4
  * Since the backend and the frontend are using the same keys,
package/dist/esm/index.js CHANGED
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
131
131
  return null;
132
132
  }
133
133
  const qaUrl = extractZonosQaUrl(window.location.href);
134
- const cdnUrl = "https://v1.3.257.js.zonos.com";
134
+ const cdnUrl = "https://v1.3.259.js.zonos.com";
135
135
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
136
136
  if (!qaUrl &&
137
137
  (cdnUrl.includes('test.') ||
@@ -379,10 +379,10 @@ const zonosLoadUrl = (() => {
379
379
  return null;
380
380
  })();
381
381
  const startLoadTime = Date.now();
382
- const ZONOS_URL = "https://v1.3.257.js.zonos.com";
383
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.257";
384
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.257";
385
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.257";
382
+ const ZONOS_URL = "https://v1.3.259.js.zonos.com";
383
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.259";
384
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.259";
385
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.259";
386
386
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
387
387
  const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
388
388
  class Zonos {
@@ -400,7 +400,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
400
400
  ? new URLSearchParams(window.location.search).get('iframeLogType')
401
401
  : null;
402
402
  Zonos.isBigCommerce = false;
403
- Zonos.releaseDate = "1776719353822";
403
+ Zonos.releaseDate = "1776888320252";
404
404
  Zonos.isLegacyCheckout = false;
405
405
  Zonos.googleAnalyticId = null;
406
406
  Zonos.googleAnalyticReady = false;
@@ -423,7 +423,7 @@ Zonos.isNpm = true;
423
423
  Zonos.zonosQaUrl = null;
424
424
  Zonos.zonosQaUrlApi = null;
425
425
  Zonos.trackEventLogs = [];
426
- Zonos.version = `v${"1.3.257"}`;
426
+ Zonos.version = `v${"1.3.259"}`;
427
427
  Zonos.modeAlerted = false;
428
428
  Zonos.cartData = null;
429
429
  Zonos.paypal = null;
@@ -1,6 +1,6 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
2
- import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-4cd47a1b.js';
3
- import { s as storageStore } from './localization-79e08480.js';
2
+ import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-76fb528f.js';
3
+ import { s as storageStore } from './localization-76ce3e29.js';
4
4
  import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
5
5
  import { b as allLogs } from './VarianceTest-572cecf5.js';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
2
- import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-4cd47a1b.js';
3
- import { s as storageStore } from './localization-79e08480.js';
2
+ import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-76fb528f.js';
3
+ import { s as storageStore } from './localization-76ce3e29.js';
4
4
  import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
5
5
  import { b as allLogs } from './VarianceTest-572cecf5.js';
6
6
 
@@ -17286,9 +17286,31 @@ const localizationStoreUpdateSelectedCountryCode = ({ isInitializing, newSelecte
17286
17286
  });
17287
17287
  }
17288
17288
  if (!currencyCode) {
17289
- // Non-shippable country: clear session so the next visit falls back to
17290
- // geolocation, but keep the current shopper's explicit selection visible
17291
- // in the URL (so a same-tab reload still honors it) and on the hello element.
17289
+ // Non-shippable country: revert any previously-converted international
17290
+ // prices back to the merchant's domestic (source) currency before bailing.
17291
+ if (localizationStore.exchangeRateTimeout) {
17292
+ clearTimeout(localizationStore.exchangeRateTimeout);
17293
+ localizationStore.exchangeRateTimeout = undefined;
17294
+ }
17295
+ const sourceCurrency = zonosStore.sourceCurrency;
17296
+ localizationStore.targetCurrency = sourceCurrency;
17297
+ localizationStore.exchangeRate = {
17298
+ rate: 1,
17299
+ targetFormat: {
17300
+ currencyCode: sourceCurrency,
17301
+ decimalDelimiter: '.',
17302
+ scale: 2,
17303
+ symbol: '',
17304
+ symbolLocation: 'before',
17305
+ thousandsDelimiter: ',',
17306
+ },
17307
+ };
17308
+ localizationStore.countryLandedCost = null;
17309
+ localizationStore.inclusivePricingConfigurations = [];
17310
+ currencyDisplay();
17311
+ // Clear session so the next visit falls back to geolocation, but keep
17312
+ // the current shopper's explicit selection visible in the URL (so a
17313
+ // same-tab reload still honors it) and on the hello element.
17292
17314
  window.sessionStorage.removeItem('zonos--country');
17293
17315
  setZCountryUrlParam(selectedCountryCode);
17294
17316
  (_b = document
@@ -1,6 +1,6 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-f1d45eac.js';
2
- import { t as trackConversionEvent, y as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, z as storeCreditStoreCreateOrder, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval, F as storeCreditStoreGetEffectiveAmount } from './cart-4cd47a1b.js';
3
- import { t as translate, s as storageStore } from './localization-79e08480.js';
2
+ import { t as trackConversionEvent, y as validateCheckoutSession, b as stripeStore, d as cartStore, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, z as storeCreditStoreCreateOrder, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval, F as storeCreditStoreGetEffectiveAmount } from './cart-76fb528f.js';
3
+ import { t as translate, s as storageStore } from './localization-76ce3e29.js';
4
4
  import { h as handleFetch, l as logError, j as jsonParse } from './handleFetch-a844cac1.js';
5
5
  import { i as isContrastColor } from './isContrastColor-f9e65e70.js';
6
6
  import { l as log } from './VarianceTest-572cecf5.js';
@@ -1,5 +1,5 @@
1
- import { d as cartStore } from './cart-4cd47a1b.js';
2
- import { s as storageStore } from './localization-79e08480.js';
1
+ import { d as cartStore } from './cart-76fb528f.js';
2
+ import { s as storageStore } from './localization-76ce3e29.js';
3
3
  import { l as logError, h as handleFetch } from './handleFetch-a844cac1.js';
4
4
 
5
5
  const placeTestOrder = async () => {
@@ -1,5 +1,5 @@
1
- import { d as cartStore } from './cart-4cd47a1b.js';
2
- import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-79e08480.js';
1
+ import { d as cartStore } from './cart-76fb528f.js';
2
+ import { o as applyInclusiveEffectiveRate, d as currencyFormat } from './localization-76ce3e29.js';
3
3
 
4
4
  const getDisplayCurrency = () => {
5
5
  var _a, _b;
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, a as Host, d as createEvent, g as getElement } from './index-cfd394c8.js';
2
- import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-79e08480.js';
2
+ import { t as translate, l as localizationStore, s as storageStore, q as storageStoreOnChange } from './localization-76ce3e29.js';
3
3
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
4
- import { Q as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-4cd47a1b.js';
4
+ import { Q as extractName, b as stripeStore, q as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-76fb528f.js';
5
5
  import { c as classes } from './classes-0d95c529.js';
6
6
  import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
7
7
  import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
2
2
  import { t as throttle_1 } from './throttle-5a66b4fd.js';
3
- import { b as stripeStore, t as trackConversionEvent, Q as extractName, E as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-4cd47a1b.js';
4
- import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-79e08480.js';
3
+ import { b as stripeStore, t as trackConversionEvent, Q as extractName, E as stripeStoreOnChange, q as stripeStorePrefetchLandedCost, d as cartStore } from './cart-76fb528f.js';
4
+ import { s as storageStore, r as getFallbackDefaultCountryCode, t as translate, q as storageStoreOnChange, l as localizationStore } from './localization-76ce3e29.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
6
6
  import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
7
7
  import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-2572bf77.js';