@zonos/elements 1.3.269 → 1.3.272
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.
- package/dist/cjs/{cart-87fbbb5a.js → cart-f1374a56.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-c86ed1f5.js → hasInclusivePrice-2f1232e3.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-952f32c4.js → invoice-3760bec0.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-1cb21c59.js → isCollectMobileTablet-d5c1a9ea.js} +2 -2
- package/dist/cjs/{localization-a969f224.js → localization-503c8477.js} +131 -3
- package/dist/cjs/{paypal-cfe1e8e9.js → paypal-5e9b8224.js} +2 -2
- package/dist/cjs/{placeTestOrder-613878fb.js → placeTestOrder-d1be2c8e.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-5a333d29.js → renderCheckoutCurrency-4486b06e.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +117 -7
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +4 -1
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/euWithdrawalRate.js +40 -0
- package/dist/collection/components/store/hello/localization.js +3 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -0
- package/dist/collection/components/store/translationStore/strings.base.js +6 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -0
- package/dist/collection/components/store/translationStore/strings.french.js +6 -0
- package/dist/collection/components/store/translationStore/strings.german.js +6 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -0
- package/dist/collection/components/utils/checkout/euWithdrawalNotice.js +74 -0
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +6 -2
- package/dist/collection/types/generated/graphql.internal.types.js +315 -182
- package/dist/esm/{cart-663ef7d5.js → cart-1415dcf0.js} +1 -1
- package/dist/esm/{hasInclusivePrice-f8bd057d.js → hasInclusivePrice-a3b0f71c.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-db7211a6.js → invoice-117efa2c.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-24c912b1.js → isCollectMobileTablet-2c62fdaa.js} +2 -2
- package/dist/esm/{localization-dc19e8bb.js → localization-29723d89.js} +130 -4
- package/dist/esm/{paypal-cdbe69ef.js → paypal-cb5559d4.js} +2 -2
- package/dist/esm/{placeTestOrder-ba67e208.js → placeTestOrder-443376eb.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-fb1cbd28.js → renderCheckoutCurrency-8390b5bf.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +118 -8
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm-es5/{cart-663ef7d5.js → cart-1415dcf0.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-f8bd057d.js → hasInclusivePrice-a3b0f71c.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-db7211a6.js → invoice-117efa2c.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-24c912b1.js → isCollectMobileTablet-2c62fdaa.js} +1 -1
- package/dist/esm-es5/localization-29723d89.js +1 -0
- package/dist/esm-es5/{paypal-cdbe69ef.js → paypal-cb5559d4.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-ba67e208.js → placeTestOrder-443376eb.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-fb1cbd28.js → renderCheckoutCurrency-8390b5bf.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +38 -3
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/store/checkout/euWithdrawalRate.d.ts +19 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -0
- package/dist/types/components/utils/checkout/euWithdrawalNotice.d.ts +9 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +8 -3
- package/dist/types/types/checkout/CheckoutConfig.d.ts +10 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +396 -218
- package/dist/types/types/generated/graphql.internal.types.ts +508 -258
- package/dist/types/types/utils/ZonosSettings.d.ts +9 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-0fa932e6.system.js +1 -0
- package/dist/zonos-elements/{p-680da401.entry.js → p-15c2dfea.entry.js} +1 -1
- package/dist/zonos-elements/{p-d932973f.system.js → p-17c7a727.system.js} +1 -1
- package/dist/zonos-elements/{p-09d32e53.system.entry.js → p-18c9565b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-24aa6708.js +1 -0
- package/dist/zonos-elements/{p-a237429e.entry.js → p-2585034d.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/p-2cda42d5.system.js +1 -0
- package/dist/zonos-elements/{p-513e8278.entry.js → p-2d1055d5.entry.js} +1 -1
- package/dist/zonos-elements/{p-f5684fc2.system.js → p-318e704a.system.js} +1 -1
- package/dist/zonos-elements/{p-699276f2.system.js → p-3b600b89.system.js} +1 -1
- package/dist/zonos-elements/{p-9092f655.entry.js → p-3efe0875.entry.js} +1 -1
- package/dist/zonos-elements/{p-c62293d5.system.entry.js → p-48f3e2d2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-488c1af1.entry.js → p-4c94cfd3.entry.js} +1 -1
- package/dist/zonos-elements/{p-243dda5f.js → p-53b65b80.js} +1 -1
- package/dist/zonos-elements/{p-be64a52e.entry.js → p-53be08c8.entry.js} +1 -1
- package/dist/zonos-elements/{p-0581cfc9.system.entry.js → p-54a9c772.system.entry.js} +1 -1
- package/dist/zonos-elements/p-58521b25.js +1 -0
- package/dist/zonos-elements/{p-48ec0b61.system.entry.js → p-5bd47a30.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-57b55808.entry.js → p-60f0ff42.entry.js} +1 -1
- package/dist/zonos-elements/{p-ba127f51.entry.js → p-6609467e.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ea67d63.system.entry.js → p-6b87101d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f0bdb87.system.entry.js → p-73730eb9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-82ce355d.system.entry.js → p-7536cf94.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-263d14da.system.entry.js → p-792fce17.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7ce6b8f7.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4af88255.entry.js → p-7d859914.entry.js} +1 -1
- package/dist/zonos-elements/{p-accccb9c.entry.js → p-831bcfb6.entry.js} +1 -1
- package/dist/zonos-elements/{p-0daed059.system.entry.js → p-9259e19b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-93324ee5.entry.js +1 -0
- package/dist/zonos-elements/p-99ef86c3.js +1 -0
- package/dist/zonos-elements/{p-9a509268.entry.js → p-a956e28f.entry.js} +1 -1
- package/dist/zonos-elements/{p-bbef037c.js → p-aa3a7538.js} +1 -1
- package/dist/zonos-elements/{p-c4ef873a.system.entry.js → p-aafc2155.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9377b5c2.entry.js → p-b1b7d786.entry.js} +1 -1
- package/dist/zonos-elements/{p-84d4f04d.entry.js → p-b375372e.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f817a47.system.js → p-b453ae2b.system.js} +1 -1
- package/dist/zonos-elements/{p-049fc407.entry.js → p-bd2daace.entry.js} +1 -1
- package/dist/zonos-elements/{p-9799193c.entry.js → p-c16c7978.entry.js} +1 -1
- package/dist/zonos-elements/{p-44147850.js → p-c425d3d9.js} +1 -1
- package/dist/zonos-elements/{p-fc270539.system.entry.js → p-c45df586.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c935390d.js +1 -0
- package/dist/zonos-elements/{p-1bde60d5.system.entry.js → p-ccc8d669.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cd5444b0.js → p-cdea0f7d.js} +1 -1
- package/dist/zonos-elements/{p-8a24701c.system.entry.js → p-d2ba9e3c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c2023a08.system.js → p-e77dd304.system.js} +1 -1
- package/dist/zonos-elements/{p-57c3c68f.entry.js → p-ea91600a.entry.js} +1 -1
- package/dist/zonos-elements/{p-882fb843.system.entry.js → p-eb254a96.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7662d32a.system.js → p-eb77dd11.system.js} +1 -1
- package/dist/zonos-elements/{p-858103a0.entry.js → p-ee00f232.entry.js} +1 -1
- package/dist/zonos-elements/{p-b0ed0fe7.system.entry.js → p-f4be6ce5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-df0c8fb6.system.entry.js → p-f5d9e5e5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-71528303.system.entry.js → p-f98cdb98.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fd849c69.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/localization-dc19e8bb.js +0 -1
- package/dist/zonos-elements/p-097d7819.js +0 -1
- package/dist/zonos-elements/p-2be4335f.js +0 -1
- package/dist/zonos-elements/p-33a37c42.system.entry.js +0 -1
- package/dist/zonos-elements/p-4b6e367d.system.js +0 -1
- package/dist/zonos-elements/p-56711a61.js +0 -1
- package/dist/zonos-elements/p-a3a79b2f.system.js +0 -1
- package/dist/zonos-elements/p-c5caf47b.system.js +0 -1
- package/dist/zonos-elements/p-d437bc28.js +0 -1
- package/dist/zonos-elements/p-e05e5825.entry.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-
|
|
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-1415dcf0.js";import{t as translate,s as storageStore}from"./localization-29723d89.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-
|
|
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-1415dcf0.js";import{s as storageStore}from"./localization-29723d89.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};
|
package/dist/esm-es5/{renderCheckoutCurrency-fb1cbd28.js → renderCheckoutCurrency-8390b5bf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as cartStore}from"./cart-
|
|
1
|
+
import{d as cartStore}from"./cart-1415dcf0.js";import{w as applyInclusiveEffectiveRate,h as currencyFormat}from"./localization-29723d89.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};
|