@zonos/elements 1.3.269 → 1.3.270

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 (146) hide show
  1. package/dist/cjs/{cart-87fbbb5a.js → cart-3ff48a0e.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-c86ed1f5.js → hasInclusivePrice-aec06153.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-952f32c4.js → invoice-ff716652.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-1cb21c59.js → isCollectMobileTablet-3ac53cab.js} +2 -2
  6. package/dist/cjs/{localization-a969f224.js → localization-5c1c9c6a.js} +6 -2
  7. package/dist/cjs/{paypal-cfe1e8e9.js → paypal-c55b6c45.js} +2 -2
  8. package/dist/cjs/{placeTestOrder-613878fb.js → placeTestOrder-230f534b.js} +2 -2
  9. package/dist/cjs/{renderCheckoutCurrency-5a333d29.js → renderCheckoutCurrency-e9d8efa8.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 +3 -3
  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 +2 -2
  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-policy-consent_2.cjs.entry.js +3 -3
  28. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +6 -2
  29. package/dist/esm/{cart-663ef7d5.js → cart-44fa77ef.js} +1 -1
  30. package/dist/esm/{hasInclusivePrice-f8bd057d.js → hasInclusivePrice-f0440925.js} +1 -1
  31. package/dist/esm/index.js +7 -7
  32. package/dist/esm/{invoice-db7211a6.js → invoice-89e71796.js} +2 -2
  33. package/dist/esm/{isCollectMobileTablet-24c912b1.js → isCollectMobileTablet-323d2ba1.js} +2 -2
  34. package/dist/esm/{localization-dc19e8bb.js → localization-066586b6.js} +6 -2
  35. package/dist/esm/{paypal-cdbe69ef.js → paypal-8725008c.js} +2 -2
  36. package/dist/esm/{placeTestOrder-ba67e208.js → placeTestOrder-38be871e.js} +2 -2
  37. package/dist/esm/{renderCheckoutCurrency-fb1cbd28.js → renderCheckoutCurrency-802f4481.js} +2 -2
  38. package/dist/esm/zonos-address-display_8.entry.js +2 -2
  39. package/dist/esm/zonos-address_4.entry.js +2 -2
  40. package/dist/esm/zonos-card_5.entry.js +3 -3
  41. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  42. package/dist/esm/zonos-checkout.entry.js +3 -3
  43. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  44. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  45. package/dist/esm/zonos-collect.entry.js +4 -4
  46. package/dist/esm/zonos-controller.entry.js +2 -2
  47. package/dist/esm/zonos-country-flag.entry.js +1 -1
  48. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  49. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  50. package/dist/esm/zonos-hello.entry.js +1 -1
  51. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  52. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  53. package/dist/esm/zonos-invoice.entry.js +4 -4
  54. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  55. package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
  56. package/dist/esm-es5/{cart-663ef7d5.js → cart-44fa77ef.js} +1 -1
  57. package/dist/esm-es5/{hasInclusivePrice-f8bd057d.js → hasInclusivePrice-f0440925.js} +1 -1
  58. package/dist/esm-es5/index.js +1 -1
  59. package/dist/esm-es5/{invoice-db7211a6.js → invoice-89e71796.js} +1 -1
  60. package/dist/esm-es5/{isCollectMobileTablet-24c912b1.js → isCollectMobileTablet-323d2ba1.js} +1 -1
  61. package/dist/esm-es5/{localization-dc19e8bb.js → localization-066586b6.js} +1 -1
  62. package/dist/esm-es5/{paypal-cdbe69ef.js → paypal-8725008c.js} +1 -1
  63. package/dist/esm-es5/{placeTestOrder-ba67e208.js → placeTestOrder-38be871e.js} +1 -1
  64. package/dist/esm-es5/{renderCheckoutCurrency-fb1cbd28.js → renderCheckoutCurrency-802f4481.js} +1 -1
  65. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  66. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  67. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  68. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  69. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  70. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  71. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  72. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  73. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  74. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  75. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  76. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  77. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  78. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  79. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  80. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  81. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  82. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  83. package/dist/scripts/index.js +1 -1
  84. package/dist/scripts/loadZonos.js +1 -1
  85. package/dist/scripts/zonos.js +1 -1
  86. package/dist/zonos-elements/index.esm.js +1 -1
  87. package/dist/zonos-elements/{p-0daed059.system.entry.js → p-08c7dc07.system.entry.js} +1 -1
  88. package/dist/zonos-elements/{p-9799193c.entry.js → p-0d251428.entry.js} +1 -1
  89. package/dist/zonos-elements/{p-7662d32a.system.js → p-0d2d7fc4.system.js} +1 -1
  90. package/dist/zonos-elements/{p-a237429e.entry.js → p-0e9c0eff.entry.js} +1 -1
  91. package/dist/zonos-elements/{p-33a37c42.system.entry.js → p-0fb8b711.system.entry.js} +1 -1
  92. package/dist/zonos-elements/{p-44147850.js → p-208b270a.js} +1 -1
  93. package/dist/zonos-elements/{p-680da401.entry.js → p-225f19b6.entry.js} +1 -1
  94. package/dist/zonos-elements/p-238370ad.system.js +1 -0
  95. package/dist/zonos-elements/{p-097d7819.js → p-260a5b57.js} +1 -1
  96. package/dist/zonos-elements/{p-b0ed0fe7.system.entry.js → p-2651ca93.system.entry.js} +1 -1
  97. package/dist/zonos-elements/{p-c2023a08.system.js → p-27beefda.system.js} +1 -1
  98. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  99. package/dist/zonos-elements/{p-82ce355d.system.entry.js → p-2df84888.system.entry.js} +1 -1
  100. package/dist/zonos-elements/{p-57b55808.entry.js → p-2f61dc3c.entry.js} +1 -1
  101. package/dist/zonos-elements/{p-049fc407.entry.js → p-30e819ed.entry.js} +1 -1
  102. package/dist/zonos-elements/{p-d932973f.system.js → p-31a3b070.system.js} +1 -1
  103. package/dist/zonos-elements/{p-71528303.system.entry.js → p-553ca694.system.entry.js} +1 -1
  104. package/dist/zonos-elements/{p-fc270539.system.entry.js → p-5812b323.system.entry.js} +1 -1
  105. package/dist/zonos-elements/{p-df0c8fb6.system.entry.js → p-5ab4bc26.system.entry.js} +1 -1
  106. package/dist/zonos-elements/{p-c62293d5.system.entry.js → p-5df77315.system.entry.js} +1 -1
  107. package/dist/zonos-elements/{p-488c1af1.entry.js → p-6704b83e.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-4af88255.entry.js → p-69ad7325.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-c4ef873a.system.entry.js → p-6ac77d9f.system.entry.js} +1 -1
  110. package/dist/zonos-elements/{p-8f817a47.system.js → p-703f2737.system.js} +1 -1
  111. package/dist/zonos-elements/{p-263d14da.system.entry.js → p-72666536.system.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-cd5444b0.js → p-7792f4c2.js} +1 -1
  113. package/dist/zonos-elements/{p-48ec0b61.system.entry.js → p-7e03bd33.system.entry.js} +1 -1
  114. package/dist/zonos-elements/{p-f5684fc2.system.js → p-801dd8d8.system.js} +1 -1
  115. package/dist/zonos-elements/{p-858103a0.entry.js → p-91702715.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-9377b5c2.entry.js → p-9abfb6b0.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-243dda5f.js → p-9e414000.js} +1 -1
  118. package/dist/zonos-elements/{p-882fb843.system.entry.js → p-a2885536.system.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-84d4f04d.entry.js → p-a977cddd.entry.js} +1 -1
  120. package/dist/zonos-elements/{p-8a24701c.system.entry.js → p-acd7009a.system.entry.js} +1 -1
  121. package/dist/zonos-elements/{p-9ea67d63.system.entry.js → p-ad4c8167.system.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-699276f2.system.js → p-b1125711.system.js} +1 -1
  123. package/dist/zonos-elements/{p-accccb9c.entry.js → p-b15ceaff.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-1bde60d5.system.entry.js → p-b1a4f385.system.entry.js} +1 -1
  125. package/dist/zonos-elements/{p-bbef037c.js → p-bea9d128.js} +1 -1
  126. package/dist/zonos-elements/p-bfcc1432.js +1 -0
  127. package/dist/zonos-elements/p-c049c527.js +1 -0
  128. package/dist/zonos-elements/{p-4b6e367d.system.js → p-c76ec587.system.js} +1 -1
  129. package/dist/zonos-elements/{p-8f0bdb87.system.entry.js → p-ccd0fa8f.system.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-9092f655.entry.js → p-d29dbeb3.entry.js} +1 -1
  131. package/dist/zonos-elements/{p-ba127f51.entry.js → p-d4c966cb.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-57c3c68f.entry.js → p-d659153c.entry.js} +1 -1
  133. package/dist/zonos-elements/p-debd2e30.js +1 -0
  134. package/dist/zonos-elements/{p-be64a52e.entry.js → p-e11c3410.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-513e8278.entry.js → p-eb96d62f.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-e05e5825.entry.js → p-ebc966d8.entry.js} +1 -1
  137. package/dist/zonos-elements/{p-c5caf47b.system.js → p-f5d4775a.system.js} +1 -1
  138. package/dist/zonos-elements/{p-09d32e53.system.entry.js → p-fb83134b.system.entry.js} +1 -1
  139. package/dist/zonos-elements/{p-0581cfc9.system.entry.js → p-fc651784.system.entry.js} +1 -1
  140. package/dist/zonos-elements/{p-9a509268.entry.js → p-fcf3ed5c.entry.js} +1 -1
  141. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  142. package/package.json +1 -1
  143. package/dist/zonos-elements/p-2be4335f.js +0 -1
  144. package/dist/zonos-elements/p-56711a61.js +0 -1
  145. package/dist/zonos-elements/p-a3a79b2f.system.js +0 -1
  146. package/dist/zonos-elements/p-d437bc28.js +0 -1
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-8e19daff.js";import{t as trackConversionEvent,v as isPolicyConsentRequired,E as policyConsentStore,A as validateCheckoutSession,b as stripeStore,d as cartStore,x as stripeStoreHandleInventoryCheck,y as storeCreditStoreApplyCredit,J as stripeStoreRecordPolicyConsent,z as storeCreditStoreCoversFullAmount,B as storeCreditStoreCreateOrder,u as cartStoreNextStep,h as cartStoreClearCheckoutInterval,I as storeCreditStoreGetEffectiveAmount}from"./cart-663ef7d5.js";import{t as translate,s as storageStore}from"./localization-dc19e8bb.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{i as isContrastColor}from"./isContrastColor-fbddacb6.js";import{l as log}from"./VarianceTest-572cecf5.js";import{i as isAnalyticsRelayInIframe,e as enqueueRelayEvent,s as submitGtag}from"./submitGtag-c7ea1f2a.js";
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,n){function o(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?t(e.value):o(e.value).then(i,u)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(e){return function(r){return s([e,r])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(n=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=r.call(e,t)}catch(e){u=[6,e];o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-8e19daff.js";import{t as trackConversionEvent,v as isPolicyConsentRequired,E as policyConsentStore,A as validateCheckoutSession,b as stripeStore,d as cartStore,x as stripeStoreHandleInventoryCheck,y as storeCreditStoreApplyCredit,J as stripeStoreRecordPolicyConsent,z as storeCreditStoreCoversFullAmount,B as storeCreditStoreCreateOrder,u as cartStoreNextStep,h as cartStoreClearCheckoutInterval,I as storeCreditStoreGetEffectiveAmount}from"./cart-44fa77ef.js";import{t as translate,s as storageStore}from"./localization-066586b6.js";import{h as handleFetch,g as getIsTestMode,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{i as isContrastColor}from"./isContrastColor-fbddacb6.js";import{l as log}from"./VarianceTest-572cecf5.js";import{i as isAnalyticsRelayInIframe,e as enqueueRelayEvent,s as submitGtag}from"./submitGtag-c7ea1f2a.js";
2
2
  /*!
3
3
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-663ef7d5.js";import{s as storageStore}from"./localization-dc19e8bb.js";import{l as logError,h as handleFetch}from"./handleFetch-a844cac1.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2,{errors:c.map((function(r){return r.message})),json:null}]}return[2,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
1
+ var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-44fa77ef.js";import{s as storageStore}from"./localization-066586b6.js";import{l as logError,h as handleFetch}from"./handleFetch-a844cac1.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2,{errors:c.map((function(r){return r.message})),json:null}]}return[2,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
@@ -1 +1 @@
1
- import{d as cartStore}from"./cart-663ef7d5.js";import{u as applyInclusiveEffectiveRate,h as currencyFormat}from"./localization-dc19e8bb.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};var renderCheckoutCurrency=function(r){var a=r.amount,t=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;var n=t?a:applyInclusiveEffectiveRate(a);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(t){var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}var d=i?n:n*o;return currencyFormat({amount:d,currency:l})};export{renderCheckoutCurrency as r};
1
+ import{d as cartStore}from"./cart-44fa77ef.js";import{u as applyInclusiveEffectiveRate,h as currencyFormat}from"./localization-066586b6.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};var renderCheckoutCurrency=function(r){var a=r.amount,t=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;var n=t?a:applyInclusiveEffectiveRate(a);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(t){var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}var f=i?n:n*o;return currencyFormat({amount:f,currency:l})};export{renderCheckoutCurrency as r};