@zonos/elements 1.5.2 → 1.5.3

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 (189) hide show
  1. package/dist/cjs/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
  2. package/dist/cjs/{cart-BJpqPdFU.js → cart-C39TMSgB.js} +14 -0
  3. package/dist/cjs/{collect-CyUttsvB.js → collect-lF9DenLk.js} +2 -2
  4. package/dist/cjs/{getMissingRequiredShippingFields-DEbNbRAZ.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
  5. package/dist/cjs/index.cjs.js +61 -42
  6. package/dist/cjs/{invoice-DzRkkpLu.js → invoice-BD3pCr8P.js} +1 -1
  7. package/dist/cjs/{paypal-DCSqbdjW.js → paypal-Bd1qmwiv.js} +1 -1
  8. package/dist/cjs/{placeTestOrder-Bkip4PUT.js → placeTestOrder-BMQRvX2q.js} +1 -1
  9. package/dist/cjs/{renderCheckoutCurrency-BDvEZ3Hv.js → renderCheckoutCurrency-DE2p8CT8.js} +1 -1
  10. package/dist/cjs/{taxIdFields-e4OCgr8K.js → taxIdFields-BKbk2bhi.js} +1 -1
  11. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +4 -4
  12. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +5 -5
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +41 -15
  17. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +1 -1
  18. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +5 -5
  19. package/dist/cjs/zonos-collect.cjs.entry.js +3 -3
  20. package/dist/cjs/zonos-controller.cjs.entry.js +63 -38
  21. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +3 -3
  22. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-invoice.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +2 -2
  25. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +10 -1
  26. package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
  27. package/dist/collection/components/main/zonos-controller.js +24 -9
  28. package/dist/collection/components/store/checkout/stripe.js +13 -1
  29. package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
  30. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
  31. package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
  32. package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
  33. package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
  34. package/dist/collection/scripts/_loadStripe.js +15 -4
  35. package/dist/collection/scripts/_zonosBase.js +40 -31
  36. package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
  37. package/dist/esm/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +14 -2
  38. package/dist/esm/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +3 -3
  39. package/dist/esm/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
  40. package/dist/esm/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
  41. package/dist/esm/index.js +61 -42
  42. package/dist/esm/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +2 -2
  43. package/dist/esm/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
  44. package/dist/esm/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +2 -2
  45. package/dist/esm/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +2 -2
  46. package/dist/esm/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
  47. package/dist/esm/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
  48. package/dist/esm/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
  49. package/dist/esm/zonos-address-completion-dialog_7.entry.js +5 -5
  50. package/dist/esm/zonos-address-display_2.entry.js +1 -1
  51. package/dist/esm/zonos-address_4.entry.js +3 -3
  52. package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
  53. package/dist/esm/zonos-card_5.entry.js +3 -3
  54. package/dist/esm/zonos-cart-items_12.entry.js +8 -8
  55. package/dist/esm/zonos-checkout.entry.js +42 -16
  56. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  57. package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
  58. package/dist/esm/zonos-collect.entry.js +4 -4
  59. package/dist/esm/zonos-controller.entry.js +63 -38
  60. package/dist/esm/zonos-country-flag.entry.js +1 -1
  61. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  62. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  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 +7 -7
  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-policy-consent_2.entry.js +3 -3
  69. package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
  70. package/dist/esm-es5/{cart-BS5mSI8x.js → cart-b84n0nhi.js} +9 -9
  71. package/dist/esm-es5/{collect-B9ZxDDl7.js → collect-B_AEVONL.js} +2 -2
  72. package/dist/esm-es5/{getMissingRequiredShippingFields-BkEV865q.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
  73. package/dist/esm-es5/{hasInclusivePrice-zSvDReDb.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
  74. package/dist/esm-es5/index.js +76 -65
  75. package/dist/esm-es5/{invoice-6iTuS6ek.js → invoice-dQ0ONK5Q.js} +1 -1
  76. package/dist/esm-es5/{localization-CXHiWcJp.js → localization-B5CRzthT.js} +1 -1
  77. package/dist/esm-es5/{paypal-BE_NVBoy.js → paypal-CF_oM0B6.js} +1 -1
  78. package/dist/esm-es5/{placeTestOrder-BXA9K9Iy.js → placeTestOrder-BTpfyqPL.js} +1 -1
  79. package/dist/esm-es5/{renderCheckoutCurrency-KMa4HlAf.js → renderCheckoutCurrency-CpeuDWx-.js} +4 -4
  80. package/dist/esm-es5/{shouldShowLanguageSelect-BI_ApEsQ.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
  81. package/dist/esm-es5/{taxIdFields-BUKnHMaL.js → taxIdFields-BCyXnc9O.js} +2 -2
  82. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
  83. package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
  84. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  85. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  86. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  87. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  88. package/dist/esm-es5/zonos-checkout.entry.js +20 -9
  89. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  90. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  91. package/dist/esm-es5/zonos-collect.entry.js +6 -6
  92. package/dist/esm-es5/zonos-controller.entry.js +22 -13
  93. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  94. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  95. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  96. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  97. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  98. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  99. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  100. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  101. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  102. package/dist/scripts/index.d.ts +16 -0
  103. package/dist/scripts/index.js +1 -1
  104. package/dist/scripts/loadZonos.js +1 -1
  105. package/dist/scripts/zonos.js +1 -1
  106. package/dist/types/components/main/mountCheckoutWithoutStripe.d.ts +8 -0
  107. package/dist/types/components/store/checkout/stripe.d.ts +4 -1
  108. package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
  109. package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
  110. package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
  111. package/dist/types/scripts/_zonosBase.d.ts +16 -0
  112. package/dist/zonos-elements/index.esm.js +1 -1
  113. package/dist/zonos-elements/{p-08b01c96.entry.js → p-02faff47.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-573a4e7c.system.entry.js → p-0c68cbbb.system.entry.js} +6 -6
  115. package/dist/zonos-elements/{p-68325c5a.system.entry.js → p-1cd2d097.system.entry.js} +4 -4
  116. package/dist/zonos-elements/{p-af741506.entry.js → p-255e411a.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-dJcbnNlE.system.js → p-2c_UqKJL.system.js} +2 -2
  118. package/dist/zonos-elements/{p-BUfCTQXY.system.js → p-3AUMK-5E.system.js} +113 -113
  119. package/dist/zonos-elements/{p-dd003161.entry.js → p-3ee87d8b.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-8f9f859f.system.entry.js → p-42fa5694.system.entry.js} +5 -5
  121. package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
  122. package/dist/zonos-elements/{p-ebc7ea54.system.entry.js → p-4ce4c49f.system.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-9b3668a4.system.entry.js → p-5622fc50.system.entry.js} +263 -252
  124. package/dist/zonos-elements/{p-3a506614.system.entry.js → p-59457fd9.system.entry.js} +71 -62
  125. package/dist/zonos-elements/{p-7fe83919.entry.js → p-66398133.entry.js} +1 -1
  126. package/dist/zonos-elements/{p-9df31243.system.entry.js → p-674323ac.system.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-97729873.entry.js → p-71d9a5b7.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-30bf4700.system.entry.js → p-81780f8f.system.entry.js} +2 -2
  129. package/dist/zonos-elements/{p-1986cc37.entry.js → p-821b83a2.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-5a296dbc.system.entry.js → p-877a82d2.system.entry.js} +61 -61
  131. package/dist/zonos-elements/p-8daec112.entry.js +1 -0
  132. package/dist/zonos-elements/{p-150047b3.system.entry.js → p-93bc75fd.system.entry.js} +19 -19
  133. package/dist/zonos-elements/{p-b540c636.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-4b65f192.entry.js → p-9a4947a5.entry.js} +1 -1
  135. package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
  136. package/dist/zonos-elements/{p-D4xpkSsK.js → p-BIJM2Kj-.js} +1 -1
  137. package/dist/zonos-elements/{p-D-Lnf8mS.system.js → p-BOh4ifdL.system.js} +2 -2
  138. package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
  139. package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
  140. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  141. package/dist/zonos-elements/{p-DC1OPJDq.system.js → p-BvoPE_nb.system.js} +1 -1
  142. package/dist/zonos-elements/{p-C5fs3rIR.js → p-C3E55OqH.js} +1 -1
  143. package/dist/zonos-elements/{p-BnQyot7Y.system.js → p-C3gF3UV5.system.js} +29 -29
  144. package/dist/zonos-elements/{p-BKUlQxBd.system.js → p-CD2ahEZn.system.js} +1 -1
  145. package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
  146. package/dist/zonos-elements/{p-Cp1IAJvW.system.js → p-CEV0O_IQ.system.js} +4 -4
  147. package/dist/zonos-elements/{p-yv7ekcdG.system.js → p-CZ-uYiCo.system.js} +2 -2
  148. package/dist/zonos-elements/{p-CP7KnfR3.system.js → p-Cn2xE-9t.system.js} +79 -68
  149. package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
  150. package/dist/zonos-elements/{p-Dv5a-V6w.system.js → p-Cw_Qnyow.system.js} +1 -1
  151. package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
  152. package/dist/zonos-elements/{p-CVRbGFV3.js → p-D9OPKqLg.js} +1 -1
  153. package/dist/zonos-elements/{p-DrbN3rPL.js → p-Df62LRNs.js} +2 -2
  154. package/dist/zonos-elements/{p-DKnphvmJ.js → p-Lsqrpzc5.js} +1 -1
  155. package/dist/zonos-elements/{p-DrS-0mk7.system.js → p-YQFbWtjn.system.js} +1 -1
  156. package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
  157. package/dist/zonos-elements/{p-bb1b414a.system.entry.js → p-a6bb296c.system.entry.js} +6 -6
  158. package/dist/zonos-elements/{p-13015d34.system.entry.js → p-abb85879.system.entry.js} +3 -3
  159. package/dist/zonos-elements/{p-383343c7.entry.js → p-b8653024.entry.js} +1 -1
  160. package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
  161. package/dist/zonos-elements/{p-96b250d8.system.entry.js → p-be067e12.system.entry.js} +2 -2
  162. package/dist/zonos-elements/{p-Cl5yV0ak.js → p-bmrOH9oh.js} +1 -1
  163. package/dist/zonos-elements/{p-71d29603.entry.js → p-c185bc23.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-13d5b2f9.entry.js → p-c6e78de2.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-a3c147d2.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
  166. package/dist/zonos-elements/{p-0909ef77.entry.js → p-cbb96382.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-6db7317a.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
  168. package/dist/zonos-elements/{p-e43470f7.system.entry.js → p-df240119.system.entry.js} +17 -17
  169. package/dist/zonos-elements/{p-f2ed52bc.system.entry.js → p-e16e4db6.system.entry.js} +15 -15
  170. package/dist/zonos-elements/{p-7214c953.system.entry.js → p-eb016dd8.system.entry.js} +16 -16
  171. package/dist/zonos-elements/{p-709d1561.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-e374aaa4.entry.js → p-ed8a7a7f.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-3466bcba.entry.js → p-ef932fda.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-bfa9e32a.entry.js → p-f792ba5f.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-aK18R41t.js → p-fZcKMzE-.js} +1 -1
  176. package/dist/zonos-elements/{p-C-zdj7MK.js → p-fdritVtG.js} +1 -1
  177. package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
  178. package/dist/zonos-elements/{p-CMneHjck.system.js → p-v8IEjQ2z.system.js} +10 -10
  179. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  180. package/package.json +10 -10
  181. package/dist/zonos-elements/p-43c0ebe9.entry.js +0 -1
  182. package/dist/zonos-elements/p-8ac26831.entry.js +0 -1
  183. package/dist/zonos-elements/p-BI6VAB5B.js +0 -1
  184. package/dist/zonos-elements/p-BJ_kE5rM.js +0 -1
  185. package/dist/zonos-elements/p-DATNIakn.js +0 -1
  186. package/dist/zonos-elements/p-af4ad54b.entry.js +0 -1
  187. package/dist/zonos-elements/p-bac94956.entry.js +0 -1
  188. package/dist/zonos-elements/p-cf6bf7a4.entry.js +0 -1
  189. package/dist/zonos-elements/p-db40b9c3.entry.js +0 -1
package/dist/esm/index.js CHANGED
@@ -4,6 +4,7 @@ import { g as getGenericSettingsOverride, I as IframeService } from './getGeneri
4
4
  import { t as thrownMessage, s as sendErrorLog, g as getIsTestMode, a as getIsStagingMode, h as handleFetch, l as logError, b as safeRemoveItem, c as safeGetItem } from './handleFetch-BFVO7oAR.js';
5
5
  import { l as log } from './VarianceTest-BJmZPrZl.js';
6
6
  export { a as availableTestKeys } from './VarianceTest-BJmZPrZl.js';
7
+ import { h as holdStripeForNativeCheckout, m as markBigCommerceHostChecked, i as isBigCommerceNativeCheckout } from './_isBigCommerceNativeCheckout-Bb90IMVt.js';
7
8
  import { g as getAbandonedCartRenewTokenValue, _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector } from './CheckoutConfig-D5SpFsQJ.js';
8
9
  export { d as domesticRedirectedBtnSelector } from './CheckoutConfig-D5SpFsQJ.js';
9
10
  export { c as countryRequireShortAddressCode } from './ShortAddressCode-nJ6oI8-n.js';
@@ -223,7 +224,7 @@ const getZonosQaUrl = () => {
223
224
  return null;
224
225
  }
225
226
  const qaUrl = extractZonosQaUrl(window.location.href);
226
- const cdnUrl = "https://v1.5.2.js.zonos.com";
227
+ const cdnUrl = "https://v1.5.3.js.zonos.com";
227
228
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
228
229
  if (!qaUrl &&
229
230
  (cdnUrl.includes('test.') ||
@@ -399,13 +400,23 @@ const hasCheckoutCartCallback = () => {
399
400
  (typeof ((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.createCartId) === 'function' ||
400
401
  typeof ((_b = window.Zonos) === null || _b === void 0 ? void 0 : _b.buildCartDetail) === 'function');
401
402
  };
403
+ /**
404
+ * The only function that may inject Stripe.js. Native BigCommerce checkout
405
+ * returns null before `window.Stripe` is read or `js.stripe.com/v3` is added.
406
+ * Callers decide whether to ask for Stripe. They do not load it themselves.
407
+ */
408
+ const loadStripeScript = () => {
409
+ if (holdStripeForNativeCheckout()) {
410
+ return Promise.resolve(null);
411
+ }
412
+ return zonosStripeLoadScript(null);
413
+ };
402
414
  const stripePromise = Promise.resolve().then(() => {
403
- // Skip eagerly loading Stripe when no checkout cart callback is configured
404
- // (e.g. a Hello-only integration). Stripe is loaded on demand instead.
415
+ // Hello-only pages have no cart callback, so they skip the eager preload.
405
416
  if (!hasCheckoutCartCallback()) {
406
417
  return null;
407
418
  }
408
- return zonosStripeLoadScript(null);
419
+ return loadStripeScript();
409
420
  });
410
421
  let loadCalled = false;
411
422
  stripePromise.catch((err) => {
@@ -421,7 +432,7 @@ const zonosLoadStripe = async (...args) => {
421
432
  // Fall back to loading Stripe on demand if the eager preload was skipped
422
433
  // (callbacks set after the microtask, or Collect/Invoice flows that don't
423
434
  // use cart callbacks). `zonosStripeLoadScript` is idempotent.
424
- const maybeStripe = (_a = (await stripePromise)) !== null && _a !== void 0 ? _a : (await zonosStripeLoadScript(null));
435
+ const maybeStripe = (_a = (await stripePromise)) !== null && _a !== void 0 ? _a : (await loadStripeScript());
425
436
  return initStripe(maybeStripe, args, startTime);
426
437
  };
427
438
 
@@ -512,10 +523,10 @@ const zonosLoadUrl = (() => {
512
523
  return null;
513
524
  })();
514
525
  const startLoadTime = Date.now();
515
- const ZONOS_URL = "https://v1.5.2.js.zonos.com";
516
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.5.2";
517
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.5.2";
518
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.5.2";
526
+ const ZONOS_URL = "https://v1.5.3.js.zonos.com";
527
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.5.3";
528
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.5.3";
529
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.5.3";
519
530
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
520
531
  const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
521
532
  class Zonos {
@@ -533,7 +544,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
533
544
  ? new URLSearchParams(window.location.search).get('iframeLogType')
534
545
  : null;
535
546
  Zonos.isBigCommerce = false;
536
- Zonos.releaseDate = "1793899893283";
547
+ Zonos.releaseDate = "1794098254078";
537
548
  Zonos.isLegacyCheckout = false;
538
549
  Zonos.googleAnalyticId = null;
539
550
  Zonos.googleAnalyticReady = false;
@@ -558,7 +569,7 @@ Zonos.isNpm = true;
558
569
  Zonos.zonosQaUrl = null;
559
570
  Zonos.zonosQaUrlApi = null;
560
571
  Zonos.trackEventLogs = [];
561
- Zonos.version = `v${"1.5.2"}`;
572
+ Zonos.version = `v${"1.5.3"}`;
562
573
  Zonos.modeAlerted = false;
563
574
  Zonos.cartData = null;
564
575
  Zonos.paypal = null;
@@ -581,6 +592,9 @@ Zonos.init = async (params) => {
581
592
  // do nothing if zonos is already initialized
582
593
  return;
583
594
  }
595
+ // Host detection has already copied `isBigCommerce`. Settle the
596
+ // native-checkout answer once, before buttons or Stripe are touched.
597
+ markBigCommerceHostChecked();
584
598
  log(`====== ZONOS DEBUG MODE: on (${_a.version}) ======`);
585
599
  _a.zonosApiKey = zonosApiKey;
586
600
  _a.storeId = storeId;
@@ -837,47 +851,52 @@ Zonos.injectController = ({ config, }) => {
837
851
  if (document.querySelector('zonos-controller')) {
838
852
  return;
839
853
  }
840
- // if placeOrderAnchor is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
841
- if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.placeOrderButtonSelector) {
842
- const placeOrderButtonSelector = config.checkoutSettings.placeOrderButtonSelector;
843
- _a.disablePlaceOrderButtons({
844
- config,
845
- disable: true,
846
- placeOrderButtonSelector,
847
- });
848
- // create a mutation observer to see if any new elements that match our selector is added to the DOM
849
- const observer = new MutationObserver(() => {
854
+ // Native BigCommerce checkout never calls attachCheckout, which is what
855
+ // marks these buttons handled. Disabling them here would flicker the
856
+ // store's own buttons after every DOM mutation.
857
+ if (!isBigCommerceNativeCheckout()) {
858
+ // if placeOrderAnchor is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
859
+ if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.placeOrderButtonSelector) {
860
+ const placeOrderButtonSelector = config.checkoutSettings.placeOrderButtonSelector;
850
861
  _a.disablePlaceOrderButtons({
851
862
  config,
852
863
  disable: true,
853
864
  placeOrderButtonSelector,
854
865
  });
855
- });
856
- observer.observe(document.body, {
857
- childList: true,
858
- subtree: true,
859
- });
860
- }
861
- // if alwaysTriggerInternationalCheckoutSelector is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
862
- if ((_c = config.checkoutSettings) === null || _c === void 0 ? void 0 : _c.alwaysTriggerInternationalCheckoutSelector) {
863
- const alwaysTriggerInternationalCheckoutSelector = config.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;
864
- _a.disablePlaceOrderButtons({
865
- config,
866
- disable: true,
867
- placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
868
- });
869
- // create a mutation observer to see if any new elements that match our selector is added to the DOM
870
- const observer = new MutationObserver(() => {
866
+ // create a mutation observer to see if any new elements that match our selector is added to the DOM
867
+ const observer = new MutationObserver(() => {
868
+ _a.disablePlaceOrderButtons({
869
+ config,
870
+ disable: true,
871
+ placeOrderButtonSelector,
872
+ });
873
+ });
874
+ observer.observe(document.body, {
875
+ childList: true,
876
+ subtree: true,
877
+ });
878
+ }
879
+ // if alwaysTriggerInternationalCheckoutSelector is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
880
+ if ((_c = config.checkoutSettings) === null || _c === void 0 ? void 0 : _c.alwaysTriggerInternationalCheckoutSelector) {
881
+ const alwaysTriggerInternationalCheckoutSelector = config.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;
871
882
  _a.disablePlaceOrderButtons({
872
883
  config,
873
884
  disable: true,
874
885
  placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
875
886
  });
876
- });
877
- observer.observe(document.body, {
878
- childList: true,
879
- subtree: true,
880
- });
887
+ // create a mutation observer to see if any new elements that match our selector is added to the DOM
888
+ const observer = new MutationObserver(() => {
889
+ _a.disablePlaceOrderButtons({
890
+ config,
891
+ disable: true,
892
+ placeOrderButtonSelector: alwaysTriggerInternationalCheckoutSelector,
893
+ });
894
+ });
895
+ observer.observe(document.body, {
896
+ childList: true,
897
+ subtree: true,
898
+ });
899
+ }
881
900
  }
882
901
  const zonosController = document.createElement('zonos-controller');
883
902
  zonosController.config = config;
@@ -1,6 +1,6 @@
1
1
  import { c as createStore, z as zonosStore } from './zonosStore-BXP9FvIt.js';
2
- import { d as cartStore, Z as cartStoreUpdateSelectedShippingOption, b as stripeStore, a1 as stripeStoreBuildAddressForPartyCreate } from './cart-BS5mSI8x.js';
3
- import { s as storageStore } from './localization-CXHiWcJp.js';
2
+ import { h as cartStore, $ as cartStoreUpdateSelectedShippingOption, e as stripeStore, a3 as stripeStoreBuildAddressForPartyCreate } from './cart-b84n0nhi.js';
3
+ import { s as storageStore } from './localization-B5CRzthT.js';
4
4
  import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-BFVO7oAR.js';
5
5
  import { b as allLogs } from './VarianceTest-BJmZPrZl.js';
6
6
 
@@ -19542,4 +19542,4 @@ const initLocalizationStore = async () => {
19542
19542
  }
19543
19543
  };
19544
19544
 
19545
- export { getSupportedLanguages as A, applyInclusiveEffectiveRate as B, getFallbackDefaultCountryCode as C, localizationStoreUpdateSelectedLocale as D, VARIANT_TEST_KEY_EXPIRATION as V, fetchCheckoutId as a, fetchBigCommerceCheckout as b, isCountryInShippingZone as c, localizationStoreUpdateSelectedCountryCode as d, storageStoreSetEnabledVariantTestKeys as e, filterValidTests as f, getZCountryUrlParam as g, localizationStoreOnChange as h, isBigCommerceCustomerLoggedIn as i, currencyFormat as j, languages as k, localizationStore as l, getOverridenZCountry as m, isValidSelector as n, initLocalizationStore as o, setZCountryUrlParam as p, currencyDisplay as q, currencyConvertAndFormat as r, storageStore as s, translate as t, currencyConvert as u, shouldShowHelloWidget as v, getExchangeRate as w, numberFormat as x, translationStoreOnChange as y, storageStoreOnChange as z };
19545
+ export { getSupportedLanguages as A, applyInclusiveEffectiveRate as B, getFallbackDefaultCountryCode as C, localizationStoreUpdateSelectedLocale as D, VARIANT_TEST_KEY_EXPIRATION as V, fetchCheckoutId as a, fetchBigCommerceCheckout as b, isCountryInShippingZone as c, localizationStoreUpdateSelectedCountryCode as d, storageStoreSetEnabledVariantTestKeys as e, filterValidTests as f, getZCountryUrlParam as g, localizationStoreOnChange as h, isBigCommerceCustomerLoggedIn as i, currencyFormat as j, languages as k, localizationStore as l, isValidSelector as m, getOverridenZCountry as n, initLocalizationStore as o, setZCountryUrlParam as p, currencyDisplay as q, currencyConvertAndFormat as r, storageStore as s, translate as t, currencyConvert as u, shouldShowHelloWidget as v, getExchangeRate as w, numberFormat as x, translationStoreOnChange as y, storageStoreOnChange as z };
@@ -1,6 +1,6 @@
1
1
  import { z as zonosStore, c as createStore } from './zonosStore-BXP9FvIt.js';
2
- import { x as cartStoreNextStep, j as cartStoreClearCheckoutInterval, t as trackConversionEvent, y as isPolicyConsentRequired, G as policyConsentStore, C as validateCheckoutSession, b as stripeStore, d as cartStore, n as stripeStoreHandleInventoryCheck, A as storeCreditStoreApplyCredit, T as stripeStoreRecordPolicyConsent, B as storeCreditStoreCoversFullAmount, D as storeCreditStoreCreateOrder, K as storeCreditStoreGetEffectiveAmount } from './cart-BS5mSI8x.js';
3
- import { s as storageStore, t as translate } from './localization-CXHiWcJp.js';
2
+ import { z as cartStoreNextStep, m as cartStoreClearCheckoutInterval, u as trackConversionEvent, A as isPolicyConsentRequired, I as policyConsentStore, E as validateCheckoutSession, e as stripeStore, h as cartStore, r as stripeStoreHandleInventoryCheck, C as storeCreditStoreApplyCredit, V as stripeStoreRecordPolicyConsent, D as storeCreditStoreCoversFullAmount, F as storeCreditStoreCreateOrder, M as storeCreditStoreGetEffectiveAmount } from './cart-b84n0nhi.js';
3
+ import { s as storageStore, t as translate } from './localization-B5CRzthT.js';
4
4
  import { h as handleFetch, g as getIsTestMode, l as logError, j as jsonParse } from './handleFetch-BFVO7oAR.js';
5
5
  import { i as isContrastColor } from './isContrastColor-CWLU13s9.js';
6
6
  import { l as log } from './VarianceTest-BJmZPrZl.js';
@@ -1,5 +1,5 @@
1
- import { d as cartStore } from './cart-BS5mSI8x.js';
2
- import { s as storageStore } from './localization-CXHiWcJp.js';
1
+ import { h as cartStore } from './cart-b84n0nhi.js';
2
+ import { s as storageStore } from './localization-B5CRzthT.js';
3
3
  import { l as logError, h as handleFetch } from './handleFetch-BFVO7oAR.js';
4
4
 
5
5
  const placeTestOrder = async () => {
@@ -1,5 +1,5 @@
1
- import { d as cartStore } from './cart-BS5mSI8x.js';
2
- import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-CXHiWcJp.js';
1
+ import { h as cartStore } from './cart-b84n0nhi.js';
2
+ import { B as applyInclusiveEffectiveRate, j as currencyFormat } from './localization-B5CRzthT.js';
3
3
 
4
4
  const getDisplayCurrency = () => {
5
5
  var _a, _b;
@@ -1,4 +1,4 @@
1
- import { A as getSupportedLanguages } from './localization-CXHiWcJp.js';
1
+ import { A as getSupportedLanguages } from './localization-B5CRzthT.js';
2
2
 
3
3
  /**
4
4
  * Whether to offer the language selector. Hidden when the merchant has narrowed
@@ -1,8 +1,8 @@
1
1
  import { r as requireIsObject, f as getDefaultExportFromCjs } from './zonosStore-BXP9FvIt.js';
2
2
  import { r as requireDebounce } from './debounce-DHj2iHA1.js';
3
3
  import { h } from './index-_lt63o7c.js';
4
- import { V as resolveTaxIdSelection, b as stripeStore } from './cart-BS5mSI8x.js';
5
- import { t as translate } from './localization-CXHiWcJp.js';
4
+ import { X as resolveTaxIdSelection, e as stripeStore } from './cart-b84n0nhi.js';
5
+ import { t as translate } from './localization-B5CRzthT.js';
6
6
  import { t as taxIdLabelForCheckout, d as isCheckoutTaxIdTypeValue } from './taxIdRules-xYlx7ZXW.js';
7
7
 
8
8
  var throttle_1;