@zonos/elements 1.3.167 → 1.3.169

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 (198) hide show
  1. package/dist/cjs/{CheckoutConfig-626b48e5.js → CheckoutConfig-f5e68e14.js} +1 -1
  2. package/dist/cjs/{cart-dbeee1e9.js → cart-36799bbe.js} +4 -4
  3. package/dist/cjs/{getBorderRadius-d184b623.js → getBorderRadius-94ef609c.js} +1 -1
  4. package/dist/cjs/{handleFetch-3673a0c2.js → handleFetch-7b7f9f7c.js} +79 -1
  5. package/dist/cjs/index.cjs.js +46 -9
  6. package/dist/cjs/{isDarkColor-08d92ed7.js → isDarkColor-ec4a4e7d.js} +1 -1
  7. package/dist/cjs/{paypal-38ab2263.js → paypal-3eae38bd.js} +14 -6
  8. package/dist/cjs/zonos-address_7.cjs.entry.js +5 -5
  9. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  12. package/dist/cjs/zonos-card.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +32 -42
  15. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-controller.cjs.entry.js +8 -6
  17. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  18. package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
  19. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +6 -6
  20. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  21. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  22. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  23. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  24. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  30. package/dist/cjs/{zonosStore-7975e4b6.js → zonosStore-3812b318.js} +3 -0
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +8 -0
  32. package/dist/collection/components/main/zonos-controller.js +3 -1
  33. package/dist/collection/components/store/checkout/paypal.js +8 -0
  34. package/dist/collection/components/store/zonosStore.js +3 -0
  35. package/dist/collection/components/utils/api/paypalCreateOrder.js +2 -2
  36. package/dist/collection/components/utils/handleFetch.js +14 -1
  37. package/dist/collection/components/utils/logging/getAdditionalLogMetadata.js +19 -0
  38. package/dist/collection/components/utils/logging/prepLoadTimeApiLog.js +29 -0
  39. package/dist/collection/components/utils/logging/sendBulkLoadTimeApiLog.js +30 -0
  40. package/dist/collection/components/utils/logging/sendLoadCheckoutFacadeLog.js +1 -1
  41. package/dist/collection/components/utils/logging/sendLoadNativeCheckoutLog.js +23 -0
  42. package/dist/collection/components/utils/logging/sendLoadScriptLog.js +1 -17
  43. package/dist/collection/scripts/_zonosBase.js +9 -0
  44. package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
  45. package/dist/collection/types/generated/graphql.internal.types.js +35 -0
  46. package/dist/esm/{CheckoutConfig-646aae20.js → CheckoutConfig-2994efd9.js} +1 -1
  47. package/dist/esm/{cart-f2f5f13f.js → cart-b2e57589.js} +4 -4
  48. package/dist/esm/{getBorderRadius-740610fb.js → getBorderRadius-ada3ccad.js} +1 -1
  49. package/dist/esm/{handleFetch-b4633675.js → handleFetch-8d72c8cd.js} +79 -2
  50. package/dist/esm/index.js +47 -10
  51. package/dist/esm/{isDarkColor-2f59d721.js → isDarkColor-446fccb7.js} +1 -1
  52. package/dist/esm/{paypal-7d253663.js → paypal-38da5d52.js} +14 -6
  53. package/dist/esm/zonos-address_7.entry.js +5 -5
  54. package/dist/esm/zonos-badge.entry.js +1 -1
  55. package/dist/esm/zonos-banner.entry.js +1 -1
  56. package/dist/esm/zonos-button_3.entry.js +3 -3
  57. package/dist/esm/zonos-card.entry.js +2 -2
  58. package/dist/esm/zonos-cart-items_13.entry.js +6 -6
  59. package/dist/esm/zonos-checkout.entry.js +31 -41
  60. package/dist/esm/zonos-collapse.entry.js +1 -1
  61. package/dist/esm/zonos-controller.entry.js +8 -6
  62. package/dist/esm/zonos-country-flag.entry.js +5 -5
  63. package/dist/esm/zonos-country-select_4.entry.js +5 -5
  64. package/dist/esm/zonos-empty-state-payment_4.entry.js +6 -6
  65. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  66. package/dist/esm/zonos-hello.entry.js +5 -5
  67. package/dist/esm/zonos-input.entry.js +2 -2
  68. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  69. package/dist/esm/zonos-logo.entry.js +1 -1
  70. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  71. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  72. package/dist/esm/zonos-text.entry.js +1 -1
  73. package/dist/esm/zonos-toggle.entry.js +1 -1
  74. package/dist/esm/zonos-v-stack.entry.js +1 -1
  75. package/dist/esm/{zonosStore-71d7e02f.js → zonosStore-d3c5a0a5.js} +3 -0
  76. package/dist/esm-es5/{CheckoutConfig-646aae20.js → CheckoutConfig-2994efd9.js} +1 -1
  77. package/dist/esm-es5/{cart-f2f5f13f.js → cart-b2e57589.js} +1 -1
  78. package/dist/esm-es5/{getBorderRadius-740610fb.js → getBorderRadius-ada3ccad.js} +1 -1
  79. package/dist/esm-es5/handleFetch-8d72c8cd.js +1 -0
  80. package/dist/esm-es5/index.js +1 -1
  81. package/dist/esm-es5/{isDarkColor-2f59d721.js → isDarkColor-446fccb7.js} +1 -1
  82. package/dist/esm-es5/paypal-38da5d52.js +17 -0
  83. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  84. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  85. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  86. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  87. package/dist/esm-es5/zonos-card.entry.js +1 -1
  88. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  89. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  90. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  91. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  92. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  93. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  94. package/dist/esm-es5/zonos-empty-state-payment_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-input.entry.js +1 -1
  98. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  99. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  100. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  101. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  102. package/dist/esm-es5/zonos-text.entry.js +1 -1
  103. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  104. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  105. package/dist/esm-es5/{zonosStore-71d7e02f.js → zonosStore-d3c5a0a5.js} +1 -1
  106. package/dist/scripts/index.d.ts +24 -0
  107. package/dist/scripts/index.js +1 -1
  108. package/dist/scripts/loadZonos.js +1 -1
  109. package/dist/scripts/zonos.js +1 -1
  110. package/dist/types/components/store/checkout/paypal.d.ts +2 -0
  111. package/dist/types/components/utils/api/paypalCreateOrder.d.ts +1 -1
  112. package/dist/types/components/utils/logging/getAdditionalLogMetadata.d.ts +15 -0
  113. package/dist/types/components/utils/logging/prepLoadTimeApiLog.d.ts +23 -0
  114. package/dist/types/components/utils/logging/sendBulkLoadTimeApiLog.d.ts +1 -0
  115. package/dist/types/components/utils/logging/sendLoadNativeCheckoutLog.d.ts +3 -0
  116. package/dist/types/components/utils/logging/sendLoadScriptLog.d.ts +0 -12
  117. package/dist/types/scripts/_getNextFallbackUrl.d.ts +1 -1
  118. package/dist/types/scripts/_zonosBase.d.ts +5 -0
  119. package/dist/types/types/LogLoadScript.d.ts +1 -0
  120. package/dist/types/types/checkout/CheckoutConfig.d.ts +4 -0
  121. package/dist/types/types/checkout/api/Paypal.d.ts +3 -1
  122. package/dist/types/types/generated/graphql.frontend.types.d.ts +11 -0
  123. package/dist/types/types/generated/graphql.frontend.types.ts +21 -0
  124. package/dist/types/types/generated/graphql.internal.types.d.ts +51 -5
  125. package/dist/types/types/generated/graphql.internal.types.ts +68 -5
  126. package/dist/zonos-elements/index.esm.js +1 -1
  127. package/dist/zonos-elements/{p-68584880.entry.js → p-00ad3c73.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-25ad92dc.system.entry.js → p-0bfca3a9.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-82a0fcb7.system.entry.js → p-0def1397.system.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-09e4f412.system.entry.js → p-0e63259c.system.entry.js} +1 -1
  131. package/dist/zonos-elements/{p-466de014.system.entry.js → p-1a20922f.system.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-16413274.system.entry.js → p-1edbfb1f.system.entry.js} +1 -1
  133. package/dist/zonos-elements/{p-c7219337.system.entry.js → p-236f32c8.system.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-dd999b44.js → p-30fdcbee.js} +1 -1
  135. package/dist/zonos-elements/{p-acabfba5.entry.js → p-3731e7f5.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-6549915d.entry.js → p-3eac4b10.entry.js} +1 -1
  137. package/dist/zonos-elements/{p-7c028742.entry.js → p-41dfc828.entry.js} +1 -1
  138. package/dist/zonos-elements/{p-163425d9.entry.js → p-461ca324.entry.js} +1 -1
  139. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  140. package/dist/zonos-elements/{p-c9035262.js → p-47f79a6d.js} +1 -1
  141. package/dist/zonos-elements/p-48173901.js +17 -0
  142. package/dist/zonos-elements/{p-a9a95fae.system.js → p-5187ba8f.system.js} +1 -1
  143. package/dist/zonos-elements/{p-669a7b5d.system.entry.js → p-53cb8867.system.entry.js} +1 -1
  144. package/dist/zonos-elements/{p-8654b135.system.entry.js → p-56758218.system.entry.js} +1 -1
  145. package/dist/zonos-elements/{p-3edccfff.system.entry.js → p-56a8b1f6.system.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-0febd074.system.entry.js → p-58f660d4.system.entry.js} +1 -1
  147. package/dist/zonos-elements/p-5ac76fa9.system.entry.js +1 -0
  148. package/dist/zonos-elements/p-677e7b4b.entry.js +1 -0
  149. package/dist/zonos-elements/{p-b6fdbbf4.system.js → p-69255ed2.system.js} +1 -1
  150. package/dist/zonos-elements/{p-57281d6c.system.entry.js → p-6c0c8722.system.entry.js} +1 -1
  151. package/dist/zonos-elements/p-71539c8a.js +1 -0
  152. package/dist/zonos-elements/{p-ed74742d.system.entry.js → p-739014f8.system.entry.js} +1 -1
  153. package/dist/zonos-elements/{p-073bc210.entry.js → p-8048932d.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-77581c1c.entry.js → p-829f6a40.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-7011d8e2.entry.js → p-864c7c7d.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-73e9a8f5.entry.js → p-90633d63.entry.js} +1 -1
  157. package/dist/zonos-elements/p-9261869c.system.js +1 -0
  158. package/dist/zonos-elements/{p-672707ce.js → p-98aa88b1.js} +1 -1
  159. package/dist/zonos-elements/{p-e4a52de7.entry.js → p-9f9e4f74.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-98e9c9cf.js → p-a1cfbd0a.js} +1 -1
  161. package/dist/zonos-elements/{p-3bff5a9f.system.js → p-a3888f1d.system.js} +1 -1
  162. package/dist/zonos-elements/{p-405f70b1.entry.js → p-b0c39400.entry.js} +1 -1
  163. package/dist/zonos-elements/{p-72319b4d.entry.js → p-b5b9aa6c.entry.js} +1 -1
  164. package/dist/zonos-elements/{p-20ca31fd.system.entry.js → p-be9e1818.system.entry.js} +1 -1
  165. package/dist/zonos-elements/p-bf113a46.system.js +17 -0
  166. package/dist/zonos-elements/{p-0150bb1e.entry.js → p-bfa028a2.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-85235fa0.system.entry.js → p-c4fa8524.system.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-73a3e5bb.system.js → p-c5c2976f.system.js} +1 -1
  169. package/dist/zonos-elements/{p-41688151.system.entry.js → p-c82f488b.system.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-ab699c84.entry.js → p-cb52cfdf.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-75a8e67d.entry.js → p-cc6d9f7d.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-82166888.system.entry.js → p-ce853f8f.system.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-15971b78.entry.js → p-cedf08f0.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-e174b37b.system.entry.js → p-d0944cc8.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-eb5835d1.system.entry.js → p-d49c6a3e.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-c556ff98.js → p-dd0259f4.js} +1 -1
  177. package/dist/zonos-elements/{p-20802055.entry.js → p-e09cea9c.entry.js} +1 -1
  178. package/dist/zonos-elements/p-e4f8114a.system.js +1 -0
  179. package/dist/zonos-elements/{p-c371558a.system.entry.js → p-e99e75dd.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-83645bb4.entry.js → p-eb294265.entry.js} +1 -1
  181. package/dist/zonos-elements/p-ef4bad3a.system.js +1 -0
  182. package/dist/zonos-elements/{p-8addb07b.system.entry.js → p-f378b4d3.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-718c9603.system.entry.js → p-fd352222.system.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-fa15b9b5.entry.js → p-fe2c27c4.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-607a6750.entry.js → p-febb90e0.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-93499c9b.entry.js → p-ff1c6d9a.entry.js} +1 -1
  187. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  188. package/package.json +1 -1
  189. package/dist/esm-es5/handleFetch-b4633675.js +0 -1
  190. package/dist/esm-es5/paypal-7d253663.js +0 -17
  191. package/dist/zonos-elements/p-18e5b741.system.js +0 -1
  192. package/dist/zonos-elements/p-4508c22b.entry.js +0 -1
  193. package/dist/zonos-elements/p-4a0d1e3c.system.js +0 -17
  194. package/dist/zonos-elements/p-6658cc02.system.js +0 -1
  195. package/dist/zonos-elements/p-d0adc1b5.system.entry.js +0 -1
  196. package/dist/zonos-elements/p-d9b0094e.system.js +0 -1
  197. package/dist/zonos-elements/p-e97f9606.js +0 -17
  198. package/dist/zonos-elements/p-f0c8150e.js +0 -1
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-d184b623.js');
9
- const cart = require('./cart-dbeee1e9.js');
10
- const handleFetch = require('./handleFetch-3673a0c2.js');
11
- const paypal = require('./paypal-38ab2263.js');
12
- require('./isDarkColor-08d92ed7.js');
8
+ const getBorderRadius = require('./getBorderRadius-94ef609c.js');
9
+ const cart = require('./cart-36799bbe.js');
10
+ const handleFetch = require('./handleFetch-7b7f9f7c.js');
11
+ const paypal = require('./paypal-3eae38bd.js');
12
+ require('./isDarkColor-ec4a4e7d.js');
13
13
 
14
14
  const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
15
15
  <mask id="mask0_3739_19124" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="536" height="200">
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-dbeee1e9.js');
7
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const cart = require('./cart-36799bbe.js');
7
+ const zonosStore = require('./zonosStore-3812b318.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
- require('./handleFetch-3673a0c2.js');
12
- require('./isDarkColor-08d92ed7.js');
13
- require('./getBorderRadius-d184b623.js');
11
+ require('./handleFetch-7b7f9f7c.js');
12
+ require('./isDarkColor-ec4a4e7d.js');
13
+ require('./getBorderRadius-94ef609c.js');
14
14
 
15
15
  const getHasMoreSpaceAbove = (ref) => {
16
16
  const componentRect = ref.getBoundingClientRect();
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
7
- const cart = require('./cart-dbeee1e9.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
+ const cart = require('./cart-36799bbe.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
- const handleFetch = require('./handleFetch-3673a0c2.js');
9
+ const handleFetch = require('./handleFetch-7b7f9f7c.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
11
- require('./isDarkColor-08d92ed7.js');
12
- require('./getBorderRadius-d184b623.js');
11
+ require('./isDarkColor-ec4a4e7d.js');
12
+ require('./getBorderRadius-94ef609c.js');
13
13
 
14
14
  var root = zonosStore._root;
15
15
 
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-d184b623.js');
8
+ const getBorderRadius = require('./getBorderRadius-94ef609c.js');
9
9
 
10
10
  const zonosInputCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}";
11
11
  const ZonosInputStyle0 = zonosInputCss;
@@ -3,12 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-dbeee1e9.js');
7
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const cart = require('./cart-36799bbe.js');
7
+ const zonosStore = require('./zonosStore-3812b318.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
- require('./handleFetch-3673a0c2.js');
10
- require('./isDarkColor-08d92ed7.js');
11
- require('./getBorderRadius-d184b623.js');
9
+ require('./handleFetch-7b7f9f7c.js');
10
+ require('./isDarkColor-ec4a4e7d.js');
11
+ require('./getBorderRadius-94ef609c.js');
12
12
 
13
13
  const GreenCheckDuotoneIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
14
14
  <path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
 
9
9
  const zonosLogoCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-d184b623.js');
8
+ const getBorderRadius = require('./getBorderRadius-94ef609c.js');
9
9
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
10
10
 
11
11
  const zonosShippingRichRadioCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const getBorderRadius = require('./getBorderRadius-d184b623.js');
9
- const isDarkColor = require('./isDarkColor-08d92ed7.js');
8
+ const getBorderRadius = require('./getBorderRadius-94ef609c.js');
9
+ const isDarkColor = require('./isDarkColor-ec4a4e7d.js');
10
10
 
11
11
  const zonosStripeInputCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}:host(.dark){color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}:host{margin:1px;height:calc(var(--zonos-elements-size-xl) - 2px);}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size)}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:24px 4px 2px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix~.zonos--floated-label label{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none;border:var(--zonos--border)}:host .zonos--floated-input:focus~.zonos--floated-label::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content~.zonos--floated-label label,:host .zonos--floated-input:focus~.zonos--floated-label label{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label label{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}:host .zonos--floated-label::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.dark) .zonos--label-wrapper{background:#30313d}";
12
12
  const ZonosStripeInputStyle0 = zonosStripeInputCss;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
9
9
  const styles = require('./styles-d1e64fb9.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
 
9
9
  const zonosToggleCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .wrapper{position:relative;border-radius:6px;background-color:var(--zonos-elements-gray-50);display:-ms-flexbox;display:flex}:host .zonos--toggle-selected-slider{z-index:1;position:absolute;background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}:host .zonos--option{background:transparent;border:0;z-index:2;cursor:pointer;padding:4px 12px;border-radius:6px;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-size:var(--zonos-elements-font-size-base);font-weight:500;color:var(--zonos-elements-text-color-secondary)}:host .zonos--option:focus{outline:none}:host .zonos--option:hover:not(.selected){color:var(--zonos-elements-text-color)}:host .zonos--option.selected{color:var(--zonos-elements-text-color);background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const zonosStore = require('./zonosStore-7975e4b6.js');
6
+ const zonosStore = require('./zonosStore-3812b318.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
 
9
9
  const zonosVStackCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";
@@ -2901,6 +2901,9 @@ const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
2901
2901
  zonosStore.currencyConverter = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.currencyConverter;
2902
2902
  zonosStore.onCountryChange = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.onCountryChange;
2903
2903
  zonosStore.overrideCurrencyFormat = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.overrideCurrencyFormat;
2904
+ if (zonosStore.storeId) {
2905
+ window.Zonos.storeId = zonosStore.storeId;
2906
+ }
2904
2907
  };
2905
2908
  const zonosStoreFontFamily = () => {
2906
2909
  const fontFamily = zonosStore.appearance.fontFamily || 'Inter';
@@ -26,6 +26,7 @@ import { allLogs, log } from "../../utils/logging/log";
26
26
  import { logError } from "../../utils/logging/logError";
27
27
  import { sendErrorLog } from "../../utils/logging/sendErrorLog";
28
28
  import { sendLoadCheckoutFacadeLog } from "../../utils/logging/sendLoadCheckoutFacadeLog";
29
+ import { sendLoadNativeCheckoutLog } from "../../utils/logging/sendLoadNativeCheckoutLog";
29
30
  import { mergeConfig } from "../../utils/mergeConfig";
30
31
  import { styles } from "../../utils/styles";
31
32
  import { submitGtag } from "../../utils/submitGtag";
@@ -424,6 +425,8 @@ export class ZonosCheckout {
424
425
  });
425
426
  button.addEventListener('click', async (e) => {
426
427
  var _a;
428
+ // Start tracking load time
429
+ const startTime = performance.now();
427
430
  // Allow no country set for legacy facades. Otherwise enforce it being a shippable country and not disabled.
428
431
  if (!window.Zonos.isLegacyCheckout &&
429
432
  (!isShippableCountry() || isDisabledCountry())) {
@@ -472,6 +475,11 @@ export class ZonosCheckout {
472
475
  if (window.Zonos.isLegacyCheckout) {
473
476
  void sendLoadCheckoutFacadeLog();
474
477
  }
478
+ else {
479
+ const endTime = performance.now();
480
+ const loadTime = endTime - startTime;
481
+ void sendLoadNativeCheckoutLog({ loadTime });
482
+ }
475
483
  }
476
484
  catch (err) {
477
485
  // stop loading
@@ -149,6 +149,8 @@ export class ZonosController {
149
149
  ? Object.assign(Object.assign({}, this.config.checkoutSettings), {
150
150
  // Don't allow to override settlement currencies setting. This setting is only configured by Zonos
151
151
  allowedSettlementCurrencies: undefined,
152
+ // Don't allow to override capture delay setting. This setting is only configured by Zonos
153
+ captureDelay: undefined,
152
154
  // Don't allow to override subscription status
153
155
  subscriptionStatus: undefined,
154
156
  // Set success redirect url to store url if it's legacy checkout.
@@ -249,7 +251,7 @@ export class ZonosController {
249
251
  zonosStore.organizationName = organizationName;
250
252
  }
251
253
  render() {
252
- return h(Host, { key: '14d142f73eae70c229b638ef298e20c9c7c5713d', class: "zonos--elements" });
254
+ return h(Host, { key: 'eed6d0d8b034a43bb4bccf5937b8eccc5d5744c9', class: "zonos--elements" });
253
255
  }
254
256
  static get is() { return "zonos-controller"; }
255
257
  static get encapsulation() { return "shadow"; }
@@ -13,6 +13,7 @@ import { logError } from "../../utils/logging/logError";
13
13
  import { submitGtag } from "../../utils/submitGtag";
14
14
  import { validateCheckoutSession } from "../../utils/validateCheckoutSession";
15
15
  const { reset: paypalStoreReset, state: paypalStore } = createStore(() => ({
16
+ intent: 'capture',
16
17
  orderIdCreated: null,
17
18
  paypalButtons: [],
18
19
  paypalClientId: '',
@@ -20,8 +21,10 @@ const { reset: paypalStoreReset, state: paypalStore } = createStore(() => ({
20
21
  }));
21
22
  const paypalStoreCreaterOrder = async ({ checkoutSessionId, }) => {
22
23
  var _a, _b;
24
+ const uppercaseIntent = paypalStore.intent.toUpperCase();
23
25
  const { errors, json } = await paypalCreateOrder({
24
26
  checkoutSessionId,
27
+ intent: uppercaseIntent,
25
28
  });
26
29
  const paypalOrderId = (_a = json === null || json === void 0 ? void 0 : json.paypalOrderCreate) === null || _a === void 0 ? void 0 : _a.paypalOrderId;
27
30
  if (errors.length || !paypalOrderId) {
@@ -181,11 +184,16 @@ const paypalInitScript = async ({ currency }) => {
181
184
  zonosStore.checkoutSettings.mode === 'LIVE'
182
185
  ? 'production'
183
186
  : 'sandbox';
187
+ const hasAuthorizeSettingSet = zonosStore.checkoutSettings.captureDelay &&
188
+ zonosStore.checkoutSettings.captureDelay > 0;
189
+ paypalStore.intent = hasAuthorizeSettingSet ? 'authorize' : 'capture';
190
+ log('==== Paypal order intent', 'info', paypalStore.intent);
184
191
  // send paypal publishable key out to load paypal
185
192
  window.Zonos.paypal = await loadScript({
186
193
  clientId: paypalClientId.token,
187
194
  currency,
188
195
  environment,
196
+ intent: paypalStore.intent,
189
197
  });
190
198
  log('==== Paypal script loaded');
191
199
  };
@@ -142,6 +142,9 @@ const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
142
142
  zonosStore.currencyConverter = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.currencyConverter;
143
143
  zonosStore.onCountryChange = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.onCountryChange;
144
144
  zonosStore.overrideCurrencyFormat = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.overrideCurrencyFormat;
145
+ if (zonosStore.storeId) {
146
+ window.Zonos.storeId = zonosStore.storeId;
147
+ }
145
148
  };
146
149
  const zonosStoreFontFamily = () => {
147
150
  const fontFamily = zonosStore.appearance.fontFamily || 'Inter';
@@ -1,7 +1,7 @@
1
1
  import { handleFetch } from "../handleFetch";
2
- export const paypalCreateOrder = async ({ checkoutSessionId, }) => {
2
+ export const paypalCreateOrder = async ({ checkoutSessionId, intent, }) => {
3
3
  const { errors, json } = await handleFetch('/api/zonos-elements/create-paypal-order', {
4
- body: { checkoutSessionId },
4
+ body: { checkoutSessionId, intent },
5
5
  method: 'POST',
6
6
  });
7
7
  return { errors, json };
@@ -15,6 +15,7 @@ import { getIsTestMode } from "./checkout/getIsTestMode";
15
15
  import { fallbackApiList, getNextFallbackApiType, MAIN_BASE_API_TYPE, } from "./getNextFallbackApi";
16
16
  import { jsonParse } from "./jsonParse";
17
17
  import { log } from "./logging/log";
18
+ import { prepLoadTimeApiLog } from "./logging/prepLoadTimeApiLog";
18
19
  import { sendErrorLog } from "./logging/sendErrorLog";
19
20
  const getResponseBody = async ({ response, shouldLog = true, shouldThrow = false, }) => {
20
21
  try {
@@ -152,11 +153,24 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
152
153
  const basePathType = isBigcommerceEndpoint
153
154
  ? 'vercel'
154
155
  : _basePathType;
156
+ const startTime = performance.now();
155
157
  const _c = await handleRequest({
156
158
  basePathType,
157
159
  options,
158
160
  path,
159
161
  }), { errors, response } = _c, rest = __rest(_c, ["errors", "response"]);
162
+ const endTime = performance.now();
163
+ const duration = endTime - startTime;
164
+ // Send the load time api log
165
+ log(`${path} (${duration.toFixed(2)}ms)`, 'info');
166
+ // No need to send the load time api log for the log-script-load endpoint
167
+ const internalDuration = response === null || response === void 0 ? void 0 : response.headers.get('Zonos-Duration');
168
+ prepLoadTimeApiLog({
169
+ apiPath: path,
170
+ apiType: basePathType,
171
+ loadTimeInternal: internalDuration ? Number(internalDuration) : 0,
172
+ loadTimeTotal: duration,
173
+ });
160
174
  const nextFallbackApiType = getNextFallbackApiType(basePathType);
161
175
  const unknownError = errors.find(({ type }) => type === 'unknown');
162
176
  const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404;
@@ -208,7 +222,6 @@ export const handleFetch = async (path, _opts) => {
208
222
  method });
209
223
  // This is for testing fallback API, set fallback API type to start with
210
224
  const useFallbackApi = new URLSearchParams(window.location.search).get('useFallbackApi');
211
- log(path, 'info');
212
225
  return handleRequestWithFallback({
213
226
  basePathType: useFallbackApi || MAIN_BASE_API_TYPE,
214
227
  options,
@@ -0,0 +1,19 @@
1
+ import { getNavigatorConnection } from "./getNavigatorConnection";
2
+ export const getAdditionalLogMetadata = () => {
3
+ const userAgentData = 'userAgentData' in window.navigator
4
+ ? // userAgentData is not yet supported in all browsers
5
+ window.navigator.userAgentData
6
+ : null;
7
+ const baseConnection = getNavigatorConnection();
8
+ return {
9
+ connectionDownlink: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.downlink,
10
+ connectionEffectiveType: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.effectiveType,
11
+ connectionRtt: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.rtt,
12
+ connectionSaveData: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.saveData,
13
+ screenHeight: window.screen.height,
14
+ screenWidth: window.screen.width,
15
+ userAgent: userAgentData && userAgentData.brands.length > 0
16
+ ? userAgentData
17
+ : window.navigator.userAgent,
18
+ };
19
+ };
@@ -0,0 +1,29 @@
1
+ import { getAdditionalLogMetadata } from "./getAdditionalLogMetadata";
2
+ const blackListPaths = [
3
+ '/api/zonos-elements/log-script-load',
4
+ '/api/zonos-elements/log-bulk-load',
5
+ ];
6
+ /**
7
+ * Prepares the load time api log for the given API call to send to the server later
8
+ * This function is used to prepare the load time api log for the given API call.
9
+ * It adds the load time api log to the loadTimeApiInfoList.
10
+ */
11
+ export const prepLoadTimeApiLog = ({ apiPath, apiType, loadTimeInternal, loadTimeTotal, }) => {
12
+ if (blackListPaths.includes(apiPath)) {
13
+ return;
14
+ }
15
+ const apiPathWithoutParams = apiPath.split('?')[0] || apiPath;
16
+ const scriptLoadLogBody = {
17
+ cache: 'miss',
18
+ cdnLoadTime: loadTimeTotal - loadTimeInternal,
19
+ eventName: 'jsdelivr',
20
+ flag: 'LOG_LOAD_TIME_API',
21
+ href: apiPathWithoutParams,
22
+ loadTime: loadTimeInternal,
23
+ metadata: Object.assign(Object.assign({ apiType }, getAdditionalLogMetadata()), { loadTimeClientMiddleware: loadTimeTotal - loadTimeInternal, loadTimeInternal,
24
+ loadTimeTotal }),
25
+ scriptLoadUrl: apiType,
26
+ storeId: window.Zonos.storeId,
27
+ };
28
+ window.Zonos.loadTimeApiInfoList.push(scriptLoadLogBody);
29
+ };
@@ -0,0 +1,30 @@
1
+ import { handleFetch } from "../handleFetch";
2
+ import { log } from "./log";
3
+ let numberOfFailures = 0;
4
+ export const sendBulkLoadTimeApiLog = async () => {
5
+ // Don't send the log if there are no API calls to send
6
+ if (window.Zonos.loadTimeApiInfoList.length === 0) {
7
+ return;
8
+ }
9
+ log('Sending bulk load time api log', 'info', {
10
+ loadTimeApiInfoList: window.Zonos.loadTimeApiInfoList,
11
+ });
12
+ // Clone the list so we can clear it after sending the log
13
+ const loadTimeApiInfoListArray = [...window.Zonos.loadTimeApiInfoList];
14
+ // Clear the list after sending the log successfully
15
+ window.Zonos.loadTimeApiInfoList.length = 0;
16
+ // Clear the list after sending the log successfully
17
+ const { errors } = await handleFetch('/api/zonos-elements/log-bulk-load', {
18
+ body: loadTimeApiInfoListArray,
19
+ method: 'POST',
20
+ });
21
+ if (errors.length) {
22
+ // If there are errors, add the logs back to the list so we can try again later
23
+ window.Zonos.loadTimeApiInfoList.push(...loadTimeApiInfoListArray);
24
+ numberOfFailures++;
25
+ if (numberOfFailures > 5 && window.Zonos.logIntervalId) {
26
+ // If there are more than 3 failures, stop the interval
27
+ clearInterval(window.Zonos.logIntervalId);
28
+ }
29
+ }
30
+ };
@@ -1,6 +1,6 @@
1
1
  import { handleFetch } from "../handleFetch";
2
+ import { getAdditionalLogMetadata } from "./getAdditionalLogMetadata";
2
3
  import { allLogs, getElapsedTime } from "./log";
3
- import { getAdditionalLogMetadata } from "./sendLoadScriptLog";
4
4
  const disabled = false;
5
5
  export const sendLoadCheckoutFacadeLog = async () => {
6
6
  if (disabled) {
@@ -0,0 +1,23 @@
1
+ import { handleFetch } from "../handleFetch";
2
+ import { getAdditionalLogMetadata } from "./getAdditionalLogMetadata";
3
+ import { allLogs } from "./log";
4
+ const disabled = false;
5
+ export const sendLoadNativeCheckoutLog = async ({ loadTime, }) => {
6
+ if (disabled) {
7
+ return;
8
+ }
9
+ const scriptLoadLogBody = {
10
+ cache: 'miss',
11
+ eventName: 'jsdelivr',
12
+ flag: 'LOG_NATIVE_CHECKOUT_LOAD',
13
+ href: window.location.href,
14
+ loadTime,
15
+ metadata: Object.assign({ allLogs }, getAdditionalLogMetadata()),
16
+ scriptLoadUrl: 'nativeCheckout',
17
+ storeId: window.Zonos.storeId,
18
+ };
19
+ void handleFetch('/api/zonos-elements/log-script-load', {
20
+ body: scriptLoadLogBody,
21
+ method: 'POST',
22
+ });
23
+ };
@@ -1,21 +1,5 @@
1
1
  import { handleFetch } from "../handleFetch";
2
- import { getNavigatorConnection } from "./getNavigatorConnection";
3
- export const getAdditionalLogMetadata = () => {
4
- const userAgentData = 'userAgentData' in window.navigator
5
- ? // userAgentData is not yet supported in all browsers
6
- window.navigator.userAgentData
7
- : null;
8
- const baseConnection = getNavigatorConnection();
9
- return {
10
- connectionDownlink: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.downlink,
11
- connectionEffectiveType: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.effectiveType,
12
- connectionRtt: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.rtt,
13
- connectionSaveData: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.saveData,
14
- userAgent: userAgentData && userAgentData.brands.length > 0
15
- ? userAgentData
16
- : window.navigator.userAgent,
17
- };
18
- };
2
+ import { getAdditionalLogMetadata } from "./getAdditionalLogMetadata";
19
3
  const disabled = true;
20
4
  export const sendLoadScriptLog = async (params) => {
21
5
  // turn off for now
@@ -1,6 +1,7 @@
1
1
  var _a;
2
2
  import { log } from "../components/utils/logging/log";
3
3
  import { logError } from "../components/utils/logging/logError";
4
+ import { sendBulkLoadTimeApiLog } from "../components/utils/logging/sendBulkLoadTimeApiLog";
4
5
  import { checkIfLoadVersionDomain } from "./_checkIfLoadVersionDomain";
5
6
  import { getNextFallbackUrl, MAIN_LOAD_CDN_TYPE, } from "./_getNextFallbackUrl";
6
7
  import { getWithTestPublicCredential } from "./_getWithTestPublicCredential";
@@ -64,6 +65,8 @@ Zonos.cartData = null;
64
65
  Zonos.paypal = null;
65
66
  Zonos.getCurrentTimestamp = () => new Date().getTime();
66
67
  Zonos.zonosController = null;
68
+ Zonos.loadTimeApiInfoList = [];
69
+ Zonos.logIntervalId = null;
67
70
  Zonos.init = async (params) => {
68
71
  const { appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, overrideCurrencyFormat, storeId, zonosApiKey, } = params;
69
72
  _a.cartId = getCartIdFromQueryParam();
@@ -156,6 +159,12 @@ Zonos.init = async (params) => {
156
159
  },
157
160
  });
158
161
  _a.doneInit = true;
162
+ if (!_a.logIntervalId) {
163
+ // log the load time of all API calls every 2 seconds
164
+ _a.logIntervalId = setInterval(() => {
165
+ void sendBulkLoadTimeApiLog();
166
+ }, 2000);
167
+ }
159
168
  };
160
169
  Zonos.injectCustomScriptForHostedCheckout = () => {
161
170
  const cartData = _a.cartData;
@@ -468,6 +468,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
468
468
  cleanupTestZonosElementSetting(variables, requestHeaders) {
469
469
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cleanupTestZonosElementSetting', 'mutation');
470
470
  },
471
+ createBulkLoadEvent(variables, requestHeaders) {
472
+ return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createBulkLoadEvent', 'mutation');
473
+ },
471
474
  createErrorEvent(variables, requestHeaders) {
472
475
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createErrorEvent', 'mutation');
473
476
  },
@@ -281,6 +281,12 @@ export const cartAdjustmentType = {
281
281
  PromoCode: 'PROMO_CODE',
282
282
  Shipping: 'SHIPPING',
283
283
  };
284
+ export const cashFlowTablesEnumInput = {
285
+ Bill: 'BILL',
286
+ Deposit: 'DEPOSIT',
287
+ Invoice: 'INVOICE',
288
+ Payout: 'PAYOUT',
289
+ };
284
290
  export const catalogItemExportJobAction = {
285
291
  Email: 'EMAIL',
286
292
  None: 'NONE',
@@ -313,6 +319,10 @@ export const checkoutMerchantOfRecordType = {
313
319
  Merchant: 'MERCHANT',
314
320
  Zonos: 'ZONOS',
315
321
  };
322
+ export const checkoutPaypalOrderIntent = {
323
+ Authorize: 'AUTHORIZE',
324
+ Capture: 'CAPTURE',
325
+ };
316
326
  export const checkoutSessionCreationModeType = {
317
327
  WithPaymentIntent: 'WITH_PAYMENT_INTENT',
318
328
  WithoutPaymentIntent: 'WITHOUT_PAYMENT_INTENT',
@@ -1275,16 +1285,30 @@ export const endOfDayBehavior = {
1275
1285
  };
1276
1286
  export const entityType = {
1277
1287
  AppearanceSetting: 'APPEARANCE_SETTING',
1288
+ Carrier: 'CARRIER',
1278
1289
  CarrierAccount: 'CARRIER_ACCOUNT',
1279
1290
  CheckoutSetting: 'CHECKOUT_SETTING',
1291
+ CountryStateTaxRate: 'COUNTRY_STATE_TAX_RATE',
1292
+ Deminimis: 'DEMINIMIS',
1280
1293
  ExternalFulfillmentSetting: 'EXTERNAL_FULFILLMENT_SETTING',
1294
+ Fee: 'FEE',
1295
+ FeeRule: 'FEE_RULE',
1281
1296
  FulfillmentCenter: 'FULFILLMENT_CENTER',
1297
+ HsCode: 'HS_CODE',
1282
1298
  ItemSetting: 'ITEM_SETTING',
1299
+ LandedCostCarrier: 'LANDED_COST_CARRIER',
1300
+ LandedCostServiceLevel: 'LANDED_COST_SERVICE_LEVEL',
1301
+ LandedCostServiceLevelCountry: 'LANDED_COST_SERVICE_LEVEL_COUNTRY',
1283
1302
  LandedCostSetting: 'LANDED_COST_SETTING',
1303
+ Levy: 'LEVY',
1284
1304
  RateChart: 'RATE_CHART',
1285
1305
  Rule: 'RULE',
1306
+ ServiceLevel: 'SERVICE_LEVEL',
1307
+ ServiceLevelCountry: 'SERVICE_LEVEL_COUNTRY',
1286
1308
  ShippingProfile: 'SHIPPING_PROFILE',
1287
1309
  ShippingZone: 'SHIPPING_ZONE',
1310
+ StateSalesTax: 'STATE_SALES_TAX',
1311
+ StoreFeeRule: 'STORE_FEE_RULE',
1288
1312
  Unknown: 'UNKNOWN',
1289
1313
  };
1290
1314
  export const errorDetail = {
@@ -1988,6 +2012,10 @@ export const orderCompleteBillingMethod = {
1988
2012
  BillingDgs: 'BILLING_DGS',
1989
2013
  Legacy: 'LEGACY',
1990
2014
  };
2015
+ export const orderMerchantOfRecordType = {
2016
+ Merchant: 'MERCHANT',
2017
+ Zonos: 'ZONOS',
2018
+ };
1991
2019
  export const orderNoteType = {
1992
2020
  Comment: 'COMMENT',
1993
2021
  NotificationSent: 'NOTIFICATION_SENT',
@@ -2114,6 +2142,10 @@ export const paypalMockResponse = {
2114
2142
  InternalServerError: 'INTERNAL_SERVER_ERROR',
2115
2143
  TransactionRefused: 'TRANSACTION_REFUSED',
2116
2144
  };
2145
+ export const paypalOrderIntent = {
2146
+ Authorize: 'AUTHORIZE',
2147
+ Capture: 'CAPTURE',
2148
+ };
2117
2149
  export const paypalOrderStatus = {
2118
2150
  Approved: 'APPROVED',
2119
2151
  Completed: 'COMPLETED',
@@ -2705,6 +2737,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
2705
2737
  partyInfo(variables, requestHeaders) {
2706
2738
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'partyInfo', 'query');
2707
2739
  },
2740
+ paypalOrder(variables, requestHeaders) {
2741
+ return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'paypalOrder', 'query');
2742
+ },
2708
2743
  paypalOrderCapture(variables, requestHeaders) {
2709
2744
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'paypalOrderCapture', 'mutation');
2710
2745
  },
@@ -1,4 +1,4 @@
1
- import { g as getIsTestMode, h as handleFetch, l as log, b as logError } from './handleFetch-b4633675.js';
1
+ import { g as getIsTestMode, h as handleFetch, l as log, b as logError } from './handleFetch-8d72c8cd.js';
2
2
 
3
3
  const getTempCartById = async ({ cartId, retries, }) => {
4
4
  const isTestMode = getIsTestMode();