@zonos/elements 1.3.280 → 1.3.281
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/{TaxId-12acedde.js → TaxId-cd9d490e.js} +1 -1
- package/dist/cjs/{cart-0fa312a5.js → cart-3313cb0c.js} +2 -2
- package/dist/cjs/{collect-f9c4ca7c.js → collect-2659c5af.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-95431bca.js → hasInclusivePrice-d132daaa.js} +1 -1
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/{invoice-ce757565.js → invoice-26f52c07.js} +2 -2
- package/dist/cjs/{localization-7fded969.js → localization-6189080f.js} +80 -80
- package/dist/cjs/{paypal-57ab3ab6.js → paypal-f6a256b5.js} +2 -2
- package/dist/cjs/{placeTestOrder-35e0d3bd.js → placeTestOrder-695f2b32.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-41d48407.js → renderCheckoutCurrency-fe56094f.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-b8abf6de.js → shouldRenderTaxIdInput-7d19556c.js} +1 -1
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +4 -4
- package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_5.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +14 -11
- package/dist/cjs/zonos-checkout.cjs.entry.js +4 -4
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -7
- package/dist/cjs/zonos-invoice.cjs.entry.js +5 -5
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
- package/dist/collection/components/store/translationStore/strings.arabic.js +4 -4
- package/dist/collection/components/store/translationStore/strings.base.js +4 -4
- package/dist/collection/components/store/translationStore/strings.chinese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.danish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.dutch.js +4 -4
- package/dist/collection/components/store/translationStore/strings.french.js +4 -4
- package/dist/collection/components/store/translationStore/strings.german.js +4 -4
- package/dist/collection/components/store/translationStore/strings.hebrew.js +4 -4
- package/dist/collection/components/store/translationStore/strings.indonesian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.italian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.japanese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.korean.js +4 -4
- package/dist/collection/components/store/translationStore/strings.norwegian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.polish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.portuguese.js +4 -4
- package/dist/collection/components/store/translationStore/strings.russian.js +4 -4
- package/dist/collection/components/store/translationStore/strings.spanish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.swedish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.turkish.js +4 -4
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +4 -4
- package/dist/collection/components/utils/taxIdValidationResult.js +6 -3
- package/dist/collection/types/checkout/TaxId.js +1 -1
- package/dist/esm/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
- package/dist/esm/{cart-4699e6ab.js → cart-c66ec17e.js} +2 -2
- package/dist/esm/{collect-24cc2e12.js → collect-915fd59d.js} +2 -2
- package/dist/esm/{hasInclusivePrice-f81ddcd6.js → hasInclusivePrice-6fd935f3.js} +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/{invoice-575dc93d.js → invoice-2a17c93c.js} +2 -2
- package/dist/esm/{localization-da2f407f.js → localization-6d36209f.js} +80 -80
- package/dist/esm/{paypal-d4436abd.js → paypal-cae1d404.js} +2 -2
- package/dist/esm/{placeTestOrder-d87b2c6a.js → placeTestOrder-955269d2.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-08526996.js → renderCheckoutCurrency-951386a5.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
- package/dist/esm/zonos-address-display_8.entry.js +4 -4
- package/dist/esm/zonos-address_4.entry.js +4 -4
- package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
- package/dist/esm/zonos-card_5.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +14 -11
- package/dist/esm/zonos-checkout.entry.js +4 -4
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
- package/dist/esm/zonos-collect.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +3 -3
- 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 +3 -3
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
- package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
- package/dist/esm/zonos-invoice.entry.js +5 -5
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
- package/dist/esm-es5/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
- package/dist/esm-es5/{cart-4699e6ab.js → cart-c66ec17e.js} +1 -1
- package/dist/esm-es5/{collect-24cc2e12.js → collect-915fd59d.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-f81ddcd6.js → hasInclusivePrice-6fd935f3.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-575dc93d.js → invoice-2a17c93c.js} +1 -1
- package/dist/esm-es5/localization-6d36209f.js +1 -0
- package/dist/esm-es5/{paypal-d4436abd.js → paypal-cae1d404.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-d87b2c6a.js → placeTestOrder-955269d2.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-08526996.js → renderCheckoutCurrency-951386a5.js} +1 -1
- package/dist/esm-es5/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.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-airwallex-payment.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 +2 -2
- 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/translationStore/strings.arabic.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.base.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.danish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.french.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.german.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.italian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.korean.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.polish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.russian.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +2 -2
- package/dist/types/components/utils/taxIdValidationResult.d.ts +1 -1
- package/dist/types/types/checkout/TaxId.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-3f90cb36.entry.js → p-03fda4a8.entry.js} +1 -1
- package/dist/zonos-elements/{p-81c4f04a.system.entry.js → p-060c521b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-85796e67.entry.js → p-09da3c76.entry.js} +1 -1
- package/dist/zonos-elements/{p-f55a2352.system.js → p-0ac1aa87.system.js} +1 -1
- package/dist/zonos-elements/{p-275fa2da.js → p-156891c5.js} +1 -1
- package/dist/zonos-elements/p-1577a739.js +1 -0
- package/dist/zonos-elements/{p-cf0c8c77.system.entry.js → p-179caaea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-19f4e77a.entry.js → p-1ee5f392.entry.js} +1 -1
- package/dist/zonos-elements/p-26ca8ce7.js +1 -0
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-6451537c.entry.js → p-30067eed.entry.js} +1 -1
- package/dist/zonos-elements/{p-96e7b465.js → p-3246d120.js} +1 -1
- package/dist/zonos-elements/{p-1bb85ff1.entry.js → p-38879af9.entry.js} +1 -1
- package/dist/zonos-elements/{p-2dbdf883.system.js → p-39695a8b.system.js} +1 -1
- package/dist/zonos-elements/{p-6197aa73.system.entry.js → p-3e6bbf0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6049eef.system.entry.js → p-3f6fe80a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-564c7bb5.system.entry.js → p-40b96482.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc2d5dd9.entry.js → p-4441c451.entry.js} +1 -1
- package/dist/zonos-elements/{p-362215b6.system.entry.js → p-4c3f5fda.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-66223935.system.entry.js → p-54a8d4cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aff7112b.entry.js → p-5677d31f.entry.js} +1 -1
- package/dist/zonos-elements/p-56fc3210.js +1 -0
- package/dist/zonos-elements/{p-944148db.system.entry.js → p-5a61c301.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5e1aad7d.entry.js +1 -0
- package/dist/zonos-elements/{p-12452213.entry.js → p-683ec0bf.entry.js} +1 -1
- package/dist/zonos-elements/{p-28b1c189.entry.js → p-6df034d6.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bea1787.entry.js → p-6df6cb8a.entry.js} +1 -1
- package/dist/zonos-elements/{p-016b5bde.system.js → p-717cbe90.system.js} +1 -1
- package/dist/zonos-elements/{p-ec53c436.system.entry.js → p-71cb16da.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dbd5be5d.entry.js → p-727387ed.entry.js} +1 -1
- package/dist/zonos-elements/{p-807e7ebc.entry.js → p-746bdebe.entry.js} +1 -1
- package/dist/zonos-elements/{p-48d55793.system.js → p-7ac8846c.system.js} +1 -1
- package/dist/zonos-elements/{p-a30f03d6.system.js → p-8005e102.system.js} +1 -1
- package/dist/zonos-elements/{p-67b2e46c.js → p-8051403a.js} +1 -1
- package/dist/zonos-elements/{p-46f88c11.system.entry.js → p-8308f7d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0adab1d5.system.entry.js → p-86d6961c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9448d960.js +1 -0
- package/dist/zonos-elements/{p-2b8345d8.system.js → p-989cb22b.system.js} +1 -1
- package/dist/zonos-elements/{p-3068247c.system.entry.js → p-a23d3b3f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b05da593.system.entry.js → p-a34269b1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a553e132.js +1 -0
- package/dist/zonos-elements/{p-f3759c70.js → p-a5f8dc19.js} +1 -1
- package/dist/zonos-elements/{p-c2014d57.system.entry.js → p-a6535773.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4a479ad.entry.js → p-a6773627.entry.js} +1 -1
- package/dist/zonos-elements/{p-7237ec6f.system.entry.js → p-ae30e6c0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-72c1bd64.entry.js → p-b406bb39.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b361d2b.js → p-bcf5cffb.js} +1 -1
- package/dist/zonos-elements/p-bf942ef0.system.js +1 -0
- package/dist/zonos-elements/p-c345d1f5.system.js +1 -0
- package/dist/zonos-elements/{p-dff1d3be.entry.js → p-d4337686.entry.js} +1 -1
- package/dist/zonos-elements/{p-40a0c1d3.system.js → p-ddf68916.system.js} +1 -1
- package/dist/zonos-elements/{p-65fe75e1.entry.js → p-df8b8827.entry.js} +1 -1
- package/dist/zonos-elements/{p-43a14674.system.entry.js → p-e0ec0aa3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e210edd9.system.js +1 -0
- package/dist/zonos-elements/{p-db9cb522.entry.js → p-e7a45f6c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b54f10c.entry.js → p-edf613ea.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6cd6e62.system.entry.js → p-ee3c7b11.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a7f0e824.system.entry.js → p-f156e2e5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-788a16bb.system.js → p-f314217a.system.js} +1 -1
- package/dist/zonos-elements/{p-a5afcea1.system.entry.js → p-f3e1a6a7.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/localization-da2f407f.js +0 -1
- package/dist/zonos-elements/p-39e2642f.js +0 -1
- package/dist/zonos-elements/p-3f8f4c78.js +0 -1
- package/dist/zonos-elements/p-63a383f4.js +0 -1
- package/dist/zonos-elements/p-75da4ba0.entry.js +0 -1
- package/dist/zonos-elements/p-79b6070a.js +0 -1
- package/dist/zonos-elements/p-94329e56.js +0 -1
- package/dist/zonos-elements/p-b330e451.system.js +0 -1
- package/dist/zonos-elements/p-b8c019b9.system.js +0 -1
- package/dist/zonos-elements/p-fd2d4d04.system.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,i){function a(o){try{c(t.next(o))}catch(o){i(o)}}function r(o){try{c(t["throw"](o))}catch(o){i(o)}}function c(o){o.done?n(o.value):s(o.value).then(a,r)}c((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,s,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return c([o,e])}}function c(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(n=0)),n)try{if(t=1,s&&(i=r[0]&2?s["return"]:r[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,r[1])).done)return i;if(s=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;s=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){n.label=r[1];break}if(r[0]===6&&n.label<i[1]){n.label=i[1];i=r;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(r);break}if(i[2])n.ops.pop();n.trys.pop();continue}r=e.call(o,n)}catch(o){r=[6,o];s=0}finally{t=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,n){if(n||arguments.length===2)for(var t=0,s=e.length,i;t<s;t++){if(i||!(t in e)){if(!i)i=Array.prototype.slice.call(e,0,t);i[t]=e[t]}}return o.concat(i||Array.prototype.slice.call(e))};System.register(["./p-7261e245.system.js","./p-f55a2352.system.js","./p-788a16bb.system.js","./p-fd2d4d04.system.js","./p-47a1d469.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-30e9a6d7.system.js","./p-d938f42f.system.js","./p-6f23a26a.system.js","./p-23e7c655.system.js","./p-c9e433c0.system.js","./p-a30f03d6.system.js","./p-b330e451.system.js","./p-b8c019b9.system.js","./p-45bd8072.system.js","./p-dab78981.system.js","./p-2b8345d8.system.js","./p-d706852e.system.js","./p-e977562b.system.js"],(function(o){"use strict";var e,n,t,s,i,a,r,c,l,d,h,u,f,p,m,v,b,g,y,z,x,w,k,C,_,j,S,I,L,M,Z,H,P,V,U,D,O,B,T,F;return{setters:[function(o){e=o.r;n=o.d;t=o.h;s=o.F;i=o.a;a=o.g},function(o){r=o.b;c=o.c;l=o.t;d=o.Q;h=o.F;u=o.R;f=o.d;p=o.v;m=o.G},function(o){v=o.s;b=o.c;g=o.a;y=o.b},function(o){z=o.t;x=o.s;w=o.l},function(o){k=o.z},function(o){C=o.h;_=o.s;j=o.g;S=o.i;I=o.a},function(o){L=o.c},function(o){M=o.g},function(o){Z=o.l;H=o.b},function(o){P=o.i;V=o.a},function(o){U=o.c},function(o){D=o.l},function(o){O=o.c},function(o){B=o.r},function(o){T=o.p},function(o){F=o.r},function(){},function(){},function(){},function(){}],execute:function(){var R='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var N='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var A=":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;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var E=A;var W=30;var Y=o("zonos_invoice_finish",function(){function o(o){var t=this;e(this,o);this.closeClick=n(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=z("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,a,r;return __generator(this,(function(c){switch(c.label){case 0:n=x.checkoutSessionId;t=new URLSearchParams;t.set("checkoutSessionId",n||"");return[4,C("/api/zonos-elements/get-order?".concat(t.toString()))];case 1:s=c.sent(),i=s.baseUrl,a=s.errors,r=s.json;if(a.length||!(r===null||r===void 0?void 0:r.id)){return[2,{baseUrl:i,order:null}]}return[4,(e=(o=k.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:i,zonosOrder:r})];case 2:c.sent();return[2,{baseUrl:i,order:r}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(t,__spreadArray([],o,true),void 0,(function(o){var e,n,t,s,i,a,r,c;if(o===void 0){o=0}return __generator(this,(function(l){switch(l.label){case 0:if(o===0){Z("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:t=l.sent(),s=t.baseUrl,i=t.order;a=!!((n=(e=i===null||i===void 0?void 0:i.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value);r=x.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||W;Z("=== Polling order (".concat(o," attemps)"),"info");if(!i)return[3,2];Z("=== InvoiceOrder info found","info");if(o>10){void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(r,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(o," attempts")],metadata:{allLogs:H,checkoutSessionId:x.checkoutSessionId||"",orderId:i.id,storeId:k.storeId}})}this.order=i;return[3,6];case 2:if(!((!i||!a)&&o<c))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:l.sent();return[4,this.getPullOrder(o+1)];case 4:l.sent();return[3,6];case 5:void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(r),errors:["Invoice order not found after ".concat(c," attempts")],metadata:{allLogs:H,checkoutSessionId:x.checkoutSessionId||"",storeId:k.storeId}});l.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,a,u,f;return __generator(this,(function(p){switch(p.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||r.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,c({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=p.sent(),n=e.error,t=e.messages,s=e.status;i=s==="requires_action"||n;this.notificationType=i?"error":"success";this.notificationMessages=t||[];this.notificationTitle=i?z("Payment failed"):z("You're all set!");Z("=== Payment intent retrieve status","info",{clientSecret:o,error:n,messages:t,status:s});a=new URL(window.location.href);a.searchParams.delete("payment_intent_client_secret");a.searchParams.delete("payment_intent");a.searchParams.delete("redirect_status");a.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",a.toString());if(!(n&&(t===null||t===void 0?void 0:t.length)))return[3,2];v({event:"zonos-checkout-payment-fail"});void _({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(x.checkoutSessionId)],metadata:{allLogs:H,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:v({event:"zonos-checkout-success"});u=x.checkoutSessionId;void l({checkoutSessionId:u,eventName:"checkout_orderCompleted"});f=L("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(f);return[4,this.handleSuccessBehavior()];case 3:p.sent();p.label=4;case 4:this.isLoading=false;d();h();x.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=u("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();d();h();b();x.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(g.paypalErrorMessage){this.notificationType="error";this.notificationTitle=z("Payment failed");this.notificationMessages=[g.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!g.orderIdCreated)return[3,2];v({event:"zonos-checkout-success"});o=x.checkoutSessionId;void l({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=u("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:d();h();b();x.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var n=new URL("".concat(window.location.origin,"/receipt"));n.searchParams.set("referenceId",e);var t=j();if(t){n.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){n.searchParams.set("zonosQaUrl",s)}return n.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(f.isStagingMode){void this.checkStagingOrderStatus()}else if(g.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return t(i,{key:"fc28974043d0f3661919e85aa6cc3839debbac4e",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"7a6f37edfde51802035afde1e47184603a81e869",class:"zonos--finish-details"},t("div",{key:"0242af14a36960e490411712bf1c345975d22e28",class:"zonos--group"},this.notificationType==="success"?t("zonos-icon",{"aria-label":"Order success",content:N,iconColor:"blue-800",size:50}):t("zonos-icon",{"aria-label":"Order failed",content:R,iconColor:"red-800",size:50}),t("zonos-text",{key:"ac0bbc63089b78868a2dea35c2d55699e0c677fc",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"cce14998b08c79a87b5aaf9701d1132e558c0bc6",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"c4970d76cbeb63f6dd661bc2c0950ace271f9aac",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return t(s,null,o,t("br",null))}))),this.order&&e&&t("div",{key:"c79a6fe5bfe1398244a7fbf611430be6f42de16b",class:"zonos--button-container"},t("zonos-button",{key:"c5ab942d9ced619c068b7398a38af5995a8f43ee",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},z("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());Y.style=E;var q='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var Q='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var G='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var K=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";var J=K;var X=o("zonos_invoice_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=P(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=P(this.mobile);this.isTablet=V(this.tablet)};o.prototype.render=function(){var o=this;var e;var n=(e=D.find((function(o){return o.code===w.selectedLocale})))===null||e===void 0?void 0:e.label;var s="gray-1000";return t(i,{key:"edea53dbca2832f4f718fd54b74225d9a64b8d01",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"d2594dfbc8cfff20539e94c279c6096042ee6d00",class:"zonos--invoice-footer"},t("div",{key:"927668578baf306674f56dce375acd1a5e1f335e",class:"zonos--invoice-locale-wrapper"},t("zonos-button",{key:"022b7cb00f7c9ab6305a6ab874f16531f9ab017f",buttonColor:s,class:"zonos--invoice-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:Q,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},t("span",{key:"88c1b732f19daaace304214d9028f3b6a131e0d2",class:"zonos--invoice-locale-label"},n,t("zonos-icon",{key:"ac383ce2fbcba6b0bd366b8c8126ce10df11d817","aria-hidden":"true",class:"zonos--invoice-locale-chevron",content:q,iconColor:s,size:18}))),t("div",{key:"a89f540cdbeb921640f4f466df4c48e12065d90b",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},t("zonos-language-select",{key:"fe017a6300484fc2e657b9f286438f23861a9a96",handleOnClose:function(){return o.toggleLanguageDialog()}}))),t("div",{key:"b9513e7ab5ee4e809d52074fb2c0950a7ac4bfe5",class:"zonos--invoice-footer-icon-wrapper"},t("div",{key:"55ee92bab8cc5dc6983705b925089cca4083fe42",class:"zonos--invoice-footer-logo"},t("zonos-text",{key:"c8bc7791da058aee313b02797b4555ef5b6ff689",textColor:s},z("Powered by")),t("a",{key:"4493b09d84504d4f797fa0d391cae79ba2266611",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"8c79f8ef0c16d4bb0210e9b7481bc519b97bbddb",autoHeight:true,content:G,size:42}))),t("div",{key:"ee6b57b36973750637e0f66f4e883fe7c32acf23",class:"dot"}),t("a",{key:"7aebd09ef1aea4bd9b4a4ed48ffb207e8ed32978",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"11e7cbb7531b396255374dbf0528f603145bc0b5",textColor:s},z("Privacy policy"))))))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());X.style=J;var $='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var oo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var eo=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var no=eo;var to=o("zonos_invoice_order_details",function(){function o(o){e(this,o);this.collapseClicked=n(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=S(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return t("zonos-icon",{"aria-label":"Collapse expanded section",content:$,iconColor:"gray-1200"})}return t("zonos-icon",{"aria-label":"Expand collapsed section",content:oo,iconColor:"gray-1200"})};return t(i,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},t("div",{class:"zonos--order-details-header-text"},t("zonos-text",{type:"boldSubheader"},z("Pay [organizationName]",{organizationName:k.organizationName})),e()),t("zonos-text",{type:"boldSubheader"},B({amount:O.amountTotalDue||0,isForeign:true}))),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--invoice-order-details-content"},t("zonos-invoice-cart-items",{isMobile:this.isMobile}),t("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());to.style=no;var so='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var io='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var ao=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";var ro=ao;var co=o("zonos_invoice_payment",function(){function o(o){var t=this;e(this,o);this.continueClicked=n(this,"continueClicked",7);this.paypalSessionFailed=n(this,"paypalSessionFailed",7);this.paypalSessionDone=n(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=r.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(t,[o],void 0,(function(o){var e,n;var t=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=r.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((n=r.stripeElements)===null||n===void 0?void 0:n.submit());setTimeout((function(){var o;(o=t.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}r.checkoutSettlementCurrency=s;v({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(t,void 0,void 0,(function(){var e,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:t.sent();return[3,3];case 2:e=t.sent();n=document.createElement("textarea");n.style.position="fixed";n.style.left="-1000px";n.style.top="-1000px";n.style.width="1px";n.style.height="1px";n.value=o;n.id="zonos-copy-card-number";document.body.appendChild(n);n.select();document.execCommand("copy");document.body.removeChild(n);return[3,3];case 3:window.Zonos.showNotification({message:z("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,T()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;p();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("currency",(function(){void y({currency:f.currency})}))];void y({currency:f.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=r.hasPaymentError;if(!r.stripeElements){return null}if(!r.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=j();var a=f.isStagingMode||I();var c=((e=r.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var l=function(){if(a){var e=k.appearance.theme;return t(s,null,o.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:z("No payment method needed for staging"),theme:e}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},z("Place test order"))))}if(r.isFetchingSession||O.isFetchingPayorInfo){return null}return t(s,null,o.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},z("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},r.customErrorMessage||z("We couldn't complete your payment. Please verify the payment details and try again.")),g.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},g.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!c&&t(s,null,t("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&r.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&r.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!f.checkoutSession){Z("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:f.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},z("Pay [orderTotal]",{orderTotal:B({amount:O.amountTotalDue||0,isForeign:true})})),r.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&r.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&r.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},z("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:function(e){var n=e.detail.orderId;o.paypalSessionDone.emit(n)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:c?"block":"none"}})),n&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},z("Test cards")),t("zonos-text",{textColor:"gray-700"},z("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:so}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},z("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:io}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},z("Failure")," (****0002)")),t("zonos-notification",null)))};return t(i,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},z("Payment method")),l()))};Object.defineProperty(o.prototype,"ele",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());co.style=ro;var lo=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var ho=lo;var uo=o("zonos_invoice_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=P(this.mobile);this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return t(i,{key:"b1dbfed233d47a45ee1e37408d086593049c64d6",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"fa1cb0796cc5ffd31488c730da1e21f6a7c93c8d",class:"zonos--title"},t("zonos-text",{key:"3759a2ebb1ae8456139fb053d32a64ace12917e7",textColor:o,type:"semiBoldLabel"},z("Pay [organizationName]",{organizationName:k.organizationName}))),t("div",{key:"b5b0c86569fdc26465ea9ac585c5ea5c2b9172bc",class:"zonos--total-pay"},F({content:t("zonos-text",{type:"secondaryPageHeader"},B({amount:O.amountTotalDue||0,isForeign:true})),isLoading:O.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());uo.style=ho}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,e,n,t){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,i){function a(o){try{c(t.next(o))}catch(o){i(o)}}function r(o){try{c(t["throw"](o))}catch(o){i(o)}}function c(o){o.done?n(o.value):s(o.value).then(a,r)}c((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,s,i,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(o){return function(e){return c([o,e])}}function c(r){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(n=0)),n)try{if(t=1,s&&(i=r[0]&2?s["return"]:r[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,r[1])).done)return i;if(s=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;s=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){n.label=r[1];break}if(r[0]===6&&n.label<i[1]){n.label=i[1];i=r;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(r);break}if(i[2])n.ops.pop();n.trys.pop();continue}r=e.call(o,n)}catch(o){r=[6,o];s=0}finally{t=i=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(o,e,n){if(n||arguments.length===2)for(var t=0,s=e.length,i;t<s;t++){if(i||!(t in e)){if(!i)i=Array.prototype.slice.call(e,0,t);i[t]=e[t]}}return o.concat(i||Array.prototype.slice.call(e))};System.register(["./p-7261e245.system.js","./p-0ac1aa87.system.js","./p-f314217a.system.js","./p-c345d1f5.system.js","./p-47a1d469.system.js","./p-01174496.system.js","./p-bf37ccc7.system.js","./p-30e9a6d7.system.js","./p-d938f42f.system.js","./p-6f23a26a.system.js","./p-23e7c655.system.js","./p-c9e433c0.system.js","./p-8005e102.system.js","./p-bf942ef0.system.js","./p-e210edd9.system.js","./p-45bd8072.system.js","./p-dab78981.system.js","./p-989cb22b.system.js","./p-d706852e.system.js","./p-e977562b.system.js"],(function(o){"use strict";var e,n,t,s,i,a,r,c,l,d,h,u,f,p,m,v,b,g,y,z,x,w,k,C,_,j,S,I,L,M,Z,H,P,V,U,D,O,B,T,F;return{setters:[function(o){e=o.r;n=o.d;t=o.h;s=o.F;i=o.a;a=o.g},function(o){r=o.b;c=o.c;l=o.t;d=o.Q;h=o.F;u=o.R;f=o.d;p=o.v;m=o.G},function(o){v=o.s;b=o.c;g=o.a;y=o.b},function(o){z=o.t;x=o.s;w=o.l},function(o){k=o.z},function(o){C=o.h;_=o.s;j=o.g;S=o.i;I=o.a},function(o){L=o.c},function(o){M=o.g},function(o){Z=o.l;H=o.b},function(o){P=o.i;V=o.a},function(o){U=o.c},function(o){D=o.l},function(o){O=o.c},function(o){B=o.r},function(o){T=o.p},function(o){F=o.r},function(){},function(){},function(){},function(){}],execute:function(){var R='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var N='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var A=":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;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";var E=A;var W=30;var Y=o("zonos_invoice_finish",function(){function o(o){var t=this;e(this,o);this.closeClick=n(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=z("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,a,r;return __generator(this,(function(c){switch(c.label){case 0:n=x.checkoutSessionId;t=new URLSearchParams;t.set("checkoutSessionId",n||"");return[4,C("/api/zonos-elements/get-order?".concat(t.toString()))];case 1:s=c.sent(),i=s.baseUrl,a=s.errors,r=s.json;if(a.length||!(r===null||r===void 0?void 0:r.id)){return[2,{baseUrl:i,order:null}]}return[4,(e=(o=k.checkoutSettings).onOrderSuccess)===null||e===void 0?void 0:e.call(o,{zonosApiRoute:i,zonosOrder:r})];case 2:c.sent();return[2,{baseUrl:i,order:r}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:o.sent();return[2]}}))}))};this.getPullOrder=function(){var o=[];for(var e=0;e<arguments.length;e++){o[e]=arguments[e]}return __awaiter(t,__spreadArray([],o,true),void 0,(function(o){var e,n,t,s,i,a,r,c;if(o===void 0){o=0}return __generator(this,(function(l){switch(l.label){case 0:if(o===0){Z("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:t=l.sent(),s=t.baseUrl,i=t.order;a=!!((n=(e=i===null||i===void 0?void 0:i.references)===null||e===void 0?void 0:e.find((function(o){return(o===null||o===void 0?void 0:o.key)==="zonosOrderNumber"})))===null||n===void 0?void 0:n.value);r=x.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||W;Z("=== Polling order (".concat(o," attemps)"),"info");if(!i)return[3,2];Z("=== InvoiceOrder info found","info");if(o>10){void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(r,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(o," attempts")],metadata:{allLogs:H,checkoutSessionId:x.checkoutSessionId||"",orderId:i.id,storeId:k.storeId}})}this.order=i;return[3,6];case 2:if(!((!i||!a)&&o<c))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:l.sent();return[4,this.getPullOrder(o+1)];case 4:l.sent();return[3,6];case 5:void _({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(r),errors:["Invoice order not found after ".concat(c," attempts")],metadata:{allLogs:H,checkoutSessionId:x.checkoutSessionId||"",storeId:k.storeId}});l.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,e,n,t,s,i,a,u,f;return __generator(this,(function(p){switch(p.label){case 0:o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||r.clientSecret;if(!(o||this.storybookForceStatus))return[3,4];return[4,c({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:e=p.sent(),n=e.error,t=e.messages,s=e.status;i=s==="requires_action"||n;this.notificationType=i?"error":"success";this.notificationMessages=t||[];this.notificationTitle=i?z("Payment failed"):z("You're all set!");Z("=== Payment intent retrieve status","info",{clientSecret:o,error:n,messages:t,status:s});a=new URL(window.location.href);a.searchParams.delete("payment_intent_client_secret");a.searchParams.delete("payment_intent");a.searchParams.delete("redirect_status");a.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",a.toString());if(!(n&&(t===null||t===void 0?void 0:t.length)))return[3,2];v({event:"zonos-checkout-payment-fail"});void _({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(o.split("_secret_")[0]||o,'" status: ').concat(s," - checkout session: ").concat(x.checkoutSessionId)],metadata:{allLogs:H,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:v({event:"zonos-checkout-success"});u=x.checkoutSessionId;void l({checkoutSessionId:u,eventName:"checkout_orderCompleted"});f=L("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(f);return[4,this.handleSuccessBehavior()];case 3:p.sent();p.label=4;case 4:this.isLoading=false;d();h();x.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=u("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();d();h();b();x.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:if(g.paypalErrorMessage){this.notificationType="error";this.notificationTitle=z("Payment failed");this.notificationMessages=[g.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!g.orderIdCreated)return[3,2];v({event:"zonos-checkout-success"});o=x.checkoutSessionId;void l({checkoutSessionId:o,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=z("You're all set!");this.notificationMessages=u("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();e.label=2;case 2:d();h();b();x.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(o){var e=o.cartId;var n=new URL("".concat(window.location.origin,"/receipt"));n.searchParams.set("referenceId",e);var t=j();if(t){n.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){n.searchParams.set("zonosQaUrl",s)}return n.toString()}}o.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(f.isStagingMode){void this.checkStagingOrderStatus()}else if(g.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};o.prototype.render=function(){var o=this;var e=window.Zonos.cartId;return t(i,{key:"fc28974043d0f3661919e85aa6cc3839debbac4e",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"7a6f37edfde51802035afde1e47184603a81e869",class:"zonos--finish-details"},t("div",{key:"0242af14a36960e490411712bf1c345975d22e28",class:"zonos--group"},this.notificationType==="success"?t("zonos-icon",{"aria-label":"Order success",content:N,iconColor:"blue-800",size:50}):t("zonos-icon",{"aria-label":"Order failed",content:R,iconColor:"red-800",size:50}),t("zonos-text",{key:"ac0bbc63089b78868a2dea35c2d55699e0c677fc",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&t("zonos-badge",{key:"cce14998b08c79a87b5aaf9701d1132e558c0bc6",badgeColor:"gray"},this.confirmationId),t("zonos-text",{key:"c4970d76cbeb63f6dd661bc2c0950ace271f9aac",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(o){return t(s,null,o,t("br",null))}))),this.order&&e&&t("div",{key:"c79a6fe5bfe1398244a7fbf611430be6f42de16b",class:"zonos--button-container"},t("zonos-button",{key:"c5ab942d9ced619c068b7398a38af5995a8f43ee",onClick:function(){window.open(o.getReceiptUrl({cartId:e}),"_blank")},size:"lg",variant:"primary"},z("View receipt"))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());Y.style=E;var q='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var Q='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n';var G='<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n';var K=":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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";var J=K;var X=o("zonos_invoice_footer",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}o.prototype.handleGlobalClick=function(o){if(!this.el.contains(o.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};o.prototype.handleMobileChange=function(){this.isMobile=P(this.mobile)};o.prototype.handleTabletChange=function(){this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){this.isMobile=P(this.mobile);this.isTablet=V(this.tablet)};o.prototype.render=function(){var o=this;var e;var n=(e=D.find((function(o){return o.code===w.selectedLocale})))===null||e===void 0?void 0:e.label;var s="gray-1000";return t(i,{key:"edea53dbca2832f4f718fd54b74225d9a64b8d01",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"d2594dfbc8cfff20539e94c279c6096042ee6d00",class:"zonos--invoice-footer"},t("div",{key:"927668578baf306674f56dce375acd1a5e1f335e",class:"zonos--invoice-locale-wrapper"},t("zonos-button",{key:"022b7cb00f7c9ab6305a6ab874f16531f9ab017f",buttonColor:s,class:"zonos--invoice-footer-language-button",icon:t("zonos-icon",{"aria-label":"Language select",content:Q,iconColor:s}),onClick:function(){return o.toggleLanguageDialog()},variant:"subtle"},t("span",{key:"88c1b732f19daaace304214d9028f3b6a131e0d2",class:"zonos--invoice-locale-label"},n,t("zonos-icon",{key:"ac383ce2fbcba6b0bd366b8c8126ce10df11d817","aria-hidden":"true",class:"zonos--invoice-locale-chevron",content:q,iconColor:s,size:18}))),t("div",{key:"a89f540cdbeb921640f4f466df4c48e12065d90b",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},t("zonos-language-select",{key:"fe017a6300484fc2e657b9f286438f23861a9a96",handleOnClose:function(){return o.toggleLanguageDialog()}}))),t("div",{key:"b9513e7ab5ee4e809d52074fb2c0950a7ac4bfe5",class:"zonos--invoice-footer-icon-wrapper"},t("div",{key:"55ee92bab8cc5dc6983705b925089cca4083fe42",class:"zonos--invoice-footer-logo"},t("zonos-text",{key:"c8bc7791da058aee313b02797b4555ef5b6ff689",textColor:s},z("Powered by")),t("a",{key:"4493b09d84504d4f797fa0d391cae79ba2266611",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"8c79f8ef0c16d4bb0210e9b7481bc519b97bbddb",autoHeight:true,content:G,size:42}))),t("div",{key:"ee6b57b36973750637e0f66f4e883fe7c32acf23",class:"dot"}),t("a",{key:"7aebd09ef1aea4bd9b4a4ed48ffb207e8ed32978",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"11e7cbb7531b396255374dbf0528f603145bc0b5",textColor:s},z("Privacy policy"))))))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return o}());X.style=J;var $='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var oo='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var eo=":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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";var no=eo;var to=o("zonos_invoice_order_details",function(){function o(o){e(this,o);this.collapseClicked=n(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}o.prototype.handleCollapseChangeFromProp=function(o){this.collapseState=o};o.prototype.handleCollapseChange=function(o){this.collapseClicked.emit(o)};o.prototype.handleWindowResize=function(){this.isMobile=S(this.mobile)};o.prototype.componentWillLoad=function(){this.handleWindowResize()};o.prototype.render=function(){var o=this;var e=function(){if(o.collapseState){return t("zonos-icon",{"aria-label":"Collapse expanded section",content:$,iconColor:"gray-1200"})}return t("zonos-icon",{"aria-label":"Expand collapsed section",content:oo,iconColor:"gray-1200"})};return t(i,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--wrapper"},t("button",{class:"zonos--order-details-header",onClick:function(){o.collapseState=!o.collapseState},type:"button"},t("div",{class:"zonos--order-details-header-text"},t("zonos-text",{type:"boldSubheader"},z("Pay [organizationName]",{organizationName:k.organizationName})),e()),t("zonos-text",{type:"boldSubheader"},B({amount:O.amountTotalDue||0,isForeign:true}))),t("div",{class:"zonos--order-details-wrapper"},t("zonos-collapse",{collapsed:this.collapseState},t("div",{class:"zonos--invoice-order-details-content"},t("zonos-invoice-cart-items",{isMobile:this.isMobile}),t("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return o}());to.style=no;var so='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var io='<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>';var ao=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";var ro=ao;var co=o("zonos_invoice_payment",function(){function o(o){var t=this;e(this,o);this.continueClicked=n(this,"continueClicked",7);this.paypalSessionFailed=n(this,"paypalSessionFailed",7);this.paypalSessionDone=n(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var o;return!!((o=r.stripePaymentEventData)===null||o===void 0?void 0:o.complete)};this.continueClickHandler=function(o){return __awaiter(t,[o],void 0,(function(o){var e,n;var t=this;var s=o.currencyCode;return __generator(this,(function(o){if(!this.handleValidate()){void((e=r.stripeBillingAddressElement)===null||e===void 0?void 0:e.getValue());this.showErrorBanner=true;void((n=r.stripeElements)===null||n===void 0?void 0:n.submit());setTimeout((function(){var o;(o=t.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),10);return[2]}r.checkoutSettlementCurrency=s;v({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(o){return __awaiter(t,void 0,void 0,(function(){var e,n;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(o)];case 1:t.sent();return[3,3];case 2:e=t.sent();n=document.createElement("textarea");n.style.position="fixed";n.style.left="-1000px";n.style.top="-1000px";n.style.width="1px";n.style.height="1px";n.value=o;n.id="zonos-copy-card-number";document.body.appendChild(n);n.select();document.execCommand("copy");document.body.removeChild(n);return[3,3];case 3:window.Zonos.showNotification({message:z("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.internalContinueLoading=true;return[4,T()];case 1:o=e.sent().errors;if(o.length){this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;p();return[2]}}))}))}}o.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};o.prototype.stripePaymentErrorWatcher=function(){var o=this;if(this.hasStripePaymentError){setTimeout((function(){var e;(e=o.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),50)}};o.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[m("currency",(function(){void y({currency:f.currency})}))];void y({currency:f.currency})};o.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;var e;this.hasStripePaymentError=r.hasPaymentError;if(!r.stripeElements){return null}if(!r.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var n=j();var a=f.isStagingMode||I();var c=((e=r.stripePaymentEventData)===null||e===void 0?void 0:e.value.type)==="external_paypal";var l=function(){if(a){var e=k.appearance.theme;return t(s,null,o.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},o.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:z("No payment method needed for staging"),theme:e}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:o.submitBtnColor,loading:o.internalContinueLoading,onClick:function(){void o.placeTestOrder()},size:"lg",variant:o.submitBtnType},z("Place test order"))))}if(r.isFetchingSession||O.isFetchingPayorInfo){return null}return t(s,null,o.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},z("Missing required fields. Make sure all fields are completed.")),o.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},r.customErrorMessage||z("We couldn't complete your payment. Please verify the payment details and try again.")),g.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},g.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!c&&t(s,null,t("zonos-button",{backgroundColor:o.submitBtnColor,bold:true,isDisabled:o.continueLoading&&r.checkoutSettlementCurrency==="USD",loading:o.continueLoading&&r.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!f.checkoutSession){Z("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:f.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:o.submitBtnType},z("Pay [orderTotal]",{orderTotal:B({amount:O.amountTotalDue||0,isForeign:true})})),r.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:o.continueLoading&&r.checkoutSettlementCurrency!=="USD",loading:o.continueLoading&&r.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:o.sent();return[2]}}))}))},size:"lg",variant:"subtle"},z("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:function(e){var n=e.detail.orderId;o.paypalSessionDone.emit(n)},onPaypalSessionFail:function(){return o.paypalSessionFailed.emit()},style:{display:c?"block":"none"}})),n&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},z("Test cards")),t("zonos-text",{textColor:"gray-700"},z("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("zonos-icon",{content:so}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4242424242424242")}},z("Success")," (****4242)"),t("zonos-button",{icon:t("zonos-icon",{content:io}),justifyContent:"flex-start",onClick:function(){return o.copyCardToClipboard("4000000000000002")}},z("Failure")," (****0002)")),t("zonos-notification",null)))};return t(i,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},z("Payment method")),l()))};Object.defineProperty(o.prototype,"ele",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return o}());co.style=ro;var lo=':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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';var ho=lo;var uo=o("zonos_invoice_review",function(){function o(o){e(this,o);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}o.prototype.handleWindowResize=function(){this.isMobile=P(this.mobile);this.isTablet=V(this.tablet)};o.prototype.componentWillLoad=function(){var o=this;this.handleWindowResize();setTimeout((function(){o.isLoading=false}),1e3)};o.prototype.render=function(){var o=this.isMobile?"gray-1000":"gray-800";return t(i,{key:"b1dbfed233d47a45ee1e37408d086593049c64d6",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},t("div",{key:"fa1cb0796cc5ffd31488c730da1e21f6a7c93c8d",class:"zonos--title"},t("zonos-text",{key:"3759a2ebb1ae8456139fb053d32a64ace12917e7",textColor:o,type:"semiBoldLabel"},z("Pay [organizationName]",{organizationName:k.organizationName}))),t("div",{key:"b5b0c86569fdc26465ea9ac585c5ea5c2b9172bc",class:"zonos--total-pay"},F({content:t("zonos-text",{type:"secondaryPageHeader"},B({amount:O.amountTotalDue||0,isForeign:true})),isLoading:O.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());uo.style=ho}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
System.register(["./p-7261e245.system.js","./p-c345d1f5.system.js","./p-47a1d469.system.js","./p-c9e433c0.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.a},function(e){s=e.A;a=e.t;l=e.l},function(e){i=e.f},function(e){c=e.l},function(){},function(){}],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<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"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=":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--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var f=d;var h=e("zonos_language_select",function(){function e(e){var t=this;o(this,e);this.handleOnClose=function(){};this.languageSelected=function(e){void s(e);t.handleOnClose()}}e.prototype.render=function(){var e=this;var o=l.selectedLocale;return t(n,{key:"30aab5aabd31e7353a523454dad44d76b416c7c9",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("div",{key:"633e04207127715dd7765a3983fffa786ab67a35",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"d09f65d2df7eef7eb35d25f2e5c26103c47d9bad",handleOnClose:function(){return e.handleOnClose()},label:a("Select a language")}),t("div",{key:"0f8797c1c2af191f3fcb514b5b627264a9ea9bfe",class:"zonos--language-select-content"},c.map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=f;var g='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var u=":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--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var p=u;var m=e("zonos_select_dialog_header",function(){function e(e){o(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"e122c65cde136ca184224d5ccd22d5fdb369f126",class:"zonos--elements",style:{"--zonos--font-family":i()}},t("zonos-v-stack",{key:"d6f5d0f9773adcb8fe0f782858401e1eca338b23",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"6c4dd78b11c3d2bcd5b9235d1d9087b663872f98",class:"zonos--select-dialog-header"},t("zonos-text",{key:"1dafcb49c92f82fd4342b917e808732fe5f0e553",type:"boldLabel"},this.label),t("zonos-button",{key:"fd9742527683709d6685348be79e0b157829927d",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:g,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"4e386e0b1b11ef28fce172b21f57c313e9e9ca5d"})))};return e}());m.style=p}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,d as e,h as s,a as t,g as n}from"./p-ce75b047.js";import{b as o,c as i,f as l,l as r,m as c,n as m}from"./p-
|
|
1
|
+
import{r as a,d as e,h as s,a as t,g as n}from"./p-ce75b047.js";import{b as o,c as i,f as l,l as r,m as c,n as m}from"./p-a5f8dc19.js";import{d as h}from"./p-8051403a.js";import{e as p,t as y,l as w}from"./p-9448d960.js";import{z as x}from"./p-9a417eeb.js";import{l as z}from"./p-0a377722.js";import{l as d}from"./p-41dd1cb8.js";import"./p-34d6eb83.js";import"./p-f1aea919.js";import"./p-bcf5cffb.js";const f=class{constructor(s){a(this,s),this.airwallexPaymentSuccess=e(this,"airwallexPaymentSuccess",7),this.airwallexPaymentError=e(this,"airwallexPaymentError",7),this.element=null,this.storeUnsubscribeList=[],this.mountingClientSecret=null,this.hasError=!1,this.clientSecret=o.clientSecret,this.getDropInOptions=a=>{var e;return{autoCapture:!(x.checkoutSettings.captureDelay&&x.checkoutSettings.captureDelay>0),client_secret:a,country_code:(null===(e=i.shippingAddress)||void 0===e?void 0:e.location.countryCode)||void 0,currency:o.currency||h.currency,intent_id:o.paymentIntentId||void 0}},this.mountPaymentElement=async()=>{var a;const e=this.clientSecret;if(!e)return;if(this.mountingClientSecret===e)return;if(this.mountingClientSecret=e,!await l())return this.hasError=!0,void(this.mountingClientSecret=null);const s=this.el.querySelector(".zonos--airwallex-payment-component");if(!s)return d("Cannot find container element for Airwallex payment element"),this.hasError=!0,void(this.mountingClientSecret=null);try{null===(a=this.element)||void 0===a||a.destroy(),this.element=null;const t=await r("dropIn",this.getDropInOptions(e));if(!t)return d("Failed to create Airwallex payment element"),this.hasError=!0,void(this.mountingClientSecret=null);t.mount(s),t.on("success",(()=>{z("Airwallex payment succeeded"),o.hasPaymentError=!1,o.paymentConfirmed=!0,this.airwallexPaymentSuccess.emit()})),t.on("error",(a=>{d(a),o.hasPaymentError=!0,this.airwallexPaymentError.emit()})),this.element=t,this.hasError=!1}catch(a){d(a),this.hasError=!0,this.mountingClientSecret=null}},this.localeChangeHandler=()=>{this.element&&this.clientSecret&&this.element.update(this.getDropInOptions(this.clientSecret),{locale:c(w.selectedLocale)})}}clientSecretWatcher(){this.mountPaymentElement()}componentWillLoad(){this.storeUnsubscribeList=[m("clientSecret",(a=>{this.clientSecret=a})),p("selectedLocale",this.localeChangeHandler)]}componentDidLoad(){this.mountPaymentElement()}disconnectedCallback(){var a;this.storeUnsubscribeList.forEach((a=>a())),null===(a=this.element)||void 0===a||a.destroy(),this.element=null}render(){return s(t,{key:"3d5f4aaea91533348ae6273757b8af6f17a7ab59",class:"zonos--airwallex-payment zonos--elements"},this.hasError&&s("zonos-banner",{key:"27fe7775145b9ff4f9b572ee592eb0cdc5f2ef13",class:"zonos--payment-error-banner",intent:"error"},y("We couldn't complete your payment. Please verify the payment details and try again.")),s("div",{key:"48a50ebcc6ad1e3b3cbf807ef5d466030995a171",class:"zonos--airwallex-payment-component"}))}get el(){return n(this)}static get watchers(){return{clientSecret:["clientSecretWatcher"]}}};f.style=".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}";export{f as zonos_airwallex_payment}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(t,o,s){if(s||arguments.length===2)for(var e=0,n=o.length,a;e<n;e++){if(a||!(e in o)){if(!a)a=Array.prototype.slice.call(o,0,e);a[e]=o[e]}}return t.concat(a||Array.prototype.slice.call(o))};System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(t,o,s){if(s||arguments.length===2)for(var e=0,n=o.length,a;e<n;e++){if(a||!(e in o)){if(!a)a=Array.prototype.slice.call(o,0,e);a[e]=o[e]}}return t.concat(a||Array.prototype.slice.call(o))};System.register(["./p-7261e245.system.js","./p-0ac1aa87.system.js","./p-a1bd3a53.system.js","./p-47a1d469.system.js","./p-23e7c655.system.js","./p-1aa93d1e.system.js","./p-c345d1f5.system.js","./p-01174496.system.js","./p-d938f42f.system.js","./p-dab78981.system.js","./p-30e9a6d7.system.js","./p-989cb22b.system.js"],(function(t){"use strict";var o,s,e,n,a,i,r,h,f;return{setters:[function(t){o=t.r;s=t.e;e=t.h;n=t.a},function(t){a=t.d},function(t){i=t.c},function(t){r=t.f},function(t){h=t.c},function(t){f=t.s},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var c=":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--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";var l=c;var d=t("zonos_collect_cart_items",function(){function t(t){o(this,t);this.errorImages=[]}t.prototype.render=function(){var t=this;var o=s("./assets/empty-item.jpeg");var r=a.items.filter((function(t){return!t.isRestricted}));return e(n,{key:"b59fc5d56e5672ed47312fa930a1f35bf987b58d",class:"zonos--collect-cart-items zonos--elements"},e("table",{key:"1f1020fd843fc2e86a12f426786f275e2c45c7c6",class:"zonos--cart-table"},e("tbody",{key:"b383812ea0967e3715701c09753fda8b3dbfe612"},r.map((function(s){var n=s.imageUrl;var a=i(s.name);return e("tr",{class:"zonos--collect-cart-item"},e("td",{class:"zonos--column zonos--cart-item-image"},n&&!t.errorImages.includes(n)?e("img",{alt:s.name,onError:function(){t.errorImages=__spreadArray(__spreadArray([],t.errorImages,true),[n],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):e("img",{alt:s.name,src:o,width:40})),e("td",{class:"zonos--column zonos--cart-item-name"},e("div",null,a.map((function(t){return e("zonos-text",{type:"semiBoldLabel"},t)})))))})))))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());d.style=l;var m=":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:row;flex-direction:row;gap:var(--spacing, 24px)}";var p=m;var u=t("zonos_h_stack",function(){function t(t){o(this,t);this.spacing=24}t.prototype.render=function(){return e(n,{key:"f06155d19be654e8af1f3fe31d8b90c9714803a1",style:{"--spacing":"".concat(this.spacing,"px"),"--zonos--font-family":r()}},e("slot",{key:"6cfa7de515d78cc8376e9c863e54e6875392bd0a"}))};return t}());u.style=p;var y=":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:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height);min-height:var(--zonos--skeleton-height);max-width:100%}";var b=y;var g=t("zonos_skeleton",function(){function t(t){o(this,t);this.skeletonWidth="100%";this.skeletonHeight="14px"}t.prototype.render=function(){return e(n,{key:"58a2bedd58be3710e9e769efda15097c3ba19ea8",class:h(["zonos--elements zonos--skeleton"]),style:f({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})};return t}());g.style=b}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var t=function(n,e){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e))t[e]=n[e]};return t(n,e)};return function(n,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function i(){this.constructor=n}n.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}();var __awaiter=this&&this.__awaiter||function(t,n,e,i){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i["throw"](t))}catch(t){r(t)}}function c(t){t.done?e(t.value):o(t.value).then(u,s)}c((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return c([t,n])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;o=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];o=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||arguments.length===2)for(var i=0,o=n.length,r;i<o;i++){if(r||!(i in n)){if(!r)r=Array.prototype.slice.call(n,0,i);r[i]=n[i]}}return t.concat(r||Array.prototype.slice.call(n))};System.register(["./p-7261e245.system.js","./p-f55a2352.system.js","./p-fd2d4d04.system.js","./p-47a1d469.system.js","./p-4160bbc2.system.js","./p-01174496.system.js","./p-d938f42f.system.js","./p-e977562b.system.js","./p-dab78981.system.js","./p-30e9a6d7.system.js","./p-2b8345d8.system.js"],(function(t){"use strict";var n,e,i,o,r,u,s,c,a,f,d,l,h,v,w,m,p,g,y,_;return{setters:[function(t){n=t.r;e=t.d;i=t.h;o=t.a},function(t){r=t.b},function(t){u=t.j;s=t.k;c=t.m;a=t.s;f=t.c},function(t){d=t.z;l=t.e;h=t.f},function(t){v=t.g;w=t.i;m=t.a},function(t){p=t.h;g=t.l},function(t){y=t.l},function(t){_=t.a},function(){},function(){},function(){}],execute:function(){var b=this;var S=function(){return __awaiter(b,void 0,void 0,(function(){var t,n,e,i,o,r,s;return __generator(this,(function(c){switch(c.label){case 0:if(window.Zonos.cartSettings){y("Reusing cached zonos settings");return[2,{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode}]}t=v();n=new URLSearchParams;if(t.overrideShouldEnabledCustomAddress){n.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress)}e=u();if(e){n.set("zCountry",e)}return[4,p("/api/zonos-elements/zonos-settings?".concat(n.toString()))];case 1:i=c.sent(),o=i.errors,r=i.json,s=i.zonosMode;if(o.length){g("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:o,json:null,zonosMode:s}]}return[2,{errors:[],json:r,zonosMode:s}]}}))}))};var z=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var j=function(t){if(!t.placeOrderButtonSelector&&!t.alwaysTriggerInternationalCheckoutSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!s(t.placeOrderButtonSelector)){g('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}if(t.alwaysTriggerInternationalCheckoutSelector&&!s(t.alwaysTriggerInternationalCheckoutSelector)){g('Selector alwaysTriggerInternationalCheckoutSelector "'.concat(t.alwaysTriggerInternationalCheckoutSelector,'" is not a valid selector'));return}z()};var O=function(){var t=document.querySelector("zonos-collect");if(!t){var n=document.createElement("zonos-collect");document.body.appendChild(n)}};var I=function(){if(!window.Zonos.cartData){return}O()};var k=function(){var t=document.querySelector("zonos-invoice");if(!t){var n=document.createElement("zonos-invoice");document.body.appendChild(n)}};var C=function(){if(!window.Zonos.cartData){return}k()};var A="zonos-domestic-element-hide-style";var T=typeof document!=="undefined"&&function(){try{document.querySelector(":is(.zonos-is-probe)");return true}catch(t){return false}}();var E=function(t){var n=[];var e=0;var i=0;var o="";for(var r=0;r<t.length;r++){var u=t[r];if(u==="("){e++}else if(u===")"){e--}else if(u==="["){i++}else if(u==="]"){i--}if(u===","&&e===0&&i===0){var s=o.trim();if(s){n.push(s)}o=""}else{o+=u}}var c=o.trim();if(c){n.push(c)}return n};var P=function(t){var n=t.merchantSelector,e=t.supportsIs;if(e){return"body.z-intl :is(".concat(n,")")}return E(n).map((function(t){return"body.z-intl ".concat(t)})).join(", ")};var x=function(t){if(typeof document==="undefined"||!t){return}var n=P({merchantSelector:t,supportsIs:T});try{document.querySelector(n)}catch(e){y('Skip domesticElementSelector injection: "'.concat(t,'" produced an invalid CSS selector ("').concat(n,'")'),"warn");return}if(document.getElementById(A)){return}var e=document.createElement("style");e.id=A;e.textContent="".concat(n," { display: none !important; }");(document.head||document.body).appendChild(e);y("Zonos domestic element hide style injected")};var L=function(t){var n=document.querySelector(t);var e=document.querySelector("zonos-hello");if(!e&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var F=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};var G=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var o=document.querySelector(i);if(o){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483647";document.body.appendChild(r);return i};var B=function(t){return __awaiter(b,void 0,void 0,(function(){var n,e,i,o,r;return __generator(this,(function(u){if(window.Zonos.isLegacyCheckout){y("Hello is disabled when isLegacyCheckout","info");return[2]}n=t.anchorElementSelector;e=n;if(!t.anchorElementSelector&&t.desktopLocation){i=G({position:"bottom-right"});e=i}if(!e||!s(e)){g('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}y("Hello init complete");o=L(e);if(!o){r=new MutationObserver((function(){var t=L(e);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){L(e)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){y("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=G({position:F(t.notFoundElementFallback)});L(n)}}),3e3)}return[2]}))}))};var D=function(){function t(t,n){var e=this;this.targetId=t;this.allowedEvents=n;this.listeners=new Map;this.handleMessage=function(t){var n,i,o;var r=t.data;var u=((n=e.iframe)===null||n===void 0?void 0:n.contentWindow)||((o=(i=e.iframe)===null||i===void 0?void 0:i.contentDocument)===null||o===void 0?void 0:o.defaultView);if(t.source!==u){return}if(!e.isValidMessage(r)){return}var s=e.listeners.get(r.type);s===null||s===void 0?void 0:s.forEach((function(t){try{t(r.payload)}catch(t){g("Error in event listener:",t)}}))};this.initializeEventListeners();this.iframe=document.getElementById(this.targetId)}t.prototype.initializeEventListeners=function(){window.addEventListener("message",this.handleMessage)};t.prototype.isValidMessage=function(t){if(!t||typeof t!=="object")return false;var n=t;return n.id===this.targetId&&typeof n.type==="string"&&this.allowedEvents.includes(n.type)&&n.payload!==undefined};t.prototype.on=function(t,n){var e=this;if(!this.listeners.has(t)){this.listeners.set(t,new Set)}y("[CheckoutAddressService] listening to ".concat(t),"info");var i=n;var o=this.listeners.get(t);if(o){o.add(i)}return function(){var n=e.listeners.get(t);if(n){n.delete(i)}}};t.prototype.destroy=function(){window.removeEventListener("message",this.handleMessage);this.listeners.clear()};return t}();var M=function(t){__extends(n,t);function n(){y("=== [Google Places Service] Initializing","info");return t.call(this,w.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])||this}n.prototype.sendMessage=function(t,n){var e;if(!((e=this.iframe)===null||e===void 0?void 0:e.contentWindow)){return}var i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:n,type:t};y("GooglePlacesService] parent --\x3e ".concat(t),"info",n);this.iframe.contentWindow.postMessage(i,"*")};n.prototype.initialize=function(){this.sendMessage("initializeGooglePlacesService",{})};n.prototype.fetchSuggestions=function(t){var n=t.country,e=t.query,i=t.type;if(!n){return}this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[n],input:e},type:i})};n.prototype.selectPlace=function(t){var n=t.placeId,e=t.type;this.sendMessage("placeSelected",{placeId:n,type:e})};return n}(D);var H=function(){function t(){var t=this;this.googlePlaceInitialized=false;y("=== [CheckoutAddressService] Initializing","info");this.googlePlaces=new M;this.googlePlaces.on("onInitializeGooglePlacesService",(function(){y("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info");t.googlePlaceInitialized=true}));this.initialize()}t.prototype.initialize=function(){this.googlePlaces.initialize()};t.prototype.onInitializeGooglePlacesService=function(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(function(){y("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService");t()}))};t.prototype.isGooglePlaceInitialized=function(){return this.googlePlaceInitialized};t.prototype.onAddressSuggestions=function(t){this.suggestionsCallback=t;return this.googlePlaces.on("onFetchAutocompleteSuggestions",(function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}y.apply(void 0,__spreadArray(["[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ".concat(n[0].type),"info"],n,false));t.apply(void 0,n)}))};t.prototype.onAddressSelected=function(t){this.placeSelectedCallback=t;return this.googlePlaces.on("onPlaceSelected",(function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}y.apply(void 0,__spreadArray(["[CheckoutAddressService] parent <-- onPlaceSelected ".concat(n[0].type),"info"],n,false));t.apply(void 0,n)}))};t.prototype.getAddressSuggestions=function(t){var n=t.country,e=t.query,i=t.type;if(!this.googlePlaceInitialized){return}this.googlePlaces.fetchSuggestions({country:n,query:e,type:i})};t.prototype.selectAddress=function(t){var n=t.placeId,e=t.type;this.googlePlaces.selectPlace({placeId:n,type:e})};t.prototype.destroy=function(){this.googlePlaces.destroy();if(this.suggestionsCallback){this.suggestionsCallback=undefined}if(this.placeSelectedCallback){this.placeSelectedCallback=undefined}};return t}();var R=":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{visibility:hidden;opacity:0;height:0}";var N=R;var U=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=e(this,"paypalInitEvent",7);this.stripeInitEvent=e(this,"stripeInitEvent",7)}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}r.stripe=t;void j(d.checkoutSettings);y("init checkout element");return[2]}))}))};t.prototype.initCollectElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init Collect element","warn");return[2]}r.stripe=t;void I();y("init Collect element");return[2]}))}))};t.prototype.initInvoiceElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init Invoice element","warn");return[2]}r.stripe=t;void C();y("init Invoice element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,r,u,s,c;return __generator(this,(function(a){switch(a.label){case 0:i=t||h();if(i==="Inter"){if(!t){return[2]}y("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t})}o=new URLSearchParams;o.set("family",i);return[4,p("/api/zonos-elements/get-font-detail?".concat(o.toString()))];case 1:r=a.sent(),u=r.errors,s=r.json;if(u.length>0){y("Failed to load font ".concat(i),"warn");d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:"Inter"});return[2]}c=s===null||s===void 0?void 0:s.fontUrl;if(c){(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,c)}if(!t){return[2]}y("[FONT] ".concat(t," font override applied"));d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void B(d.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.injectCustomHTML=function(t){if(!t){return}if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect||window.Zonos.isInvoice){y("=== Skip injecting custom HTML for hosted checkout","info");return}y("=== Injecting custom HTML for hosted checkout");var n=document.createElement("template");n.innerHTML=t;var e=n.content.querySelectorAll("script");e.forEach((function(t){var n=document.createElement("script");if(t.src){n.src=t.src;n.async=t.async}else{n.textContent=t.innerHTML}document.body.appendChild(n)}));_()};t.prototype.initGooglePlacesService=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e;return __generator(this,(function(i){n=t===null||t===void 0?void 0:t.genericSettings;if(!n){return[2]}e=n.signedTokenGooglePlaces;if(!e){return[2]}m({id:w.GOOGLE_PLACES,onload:function(){d.checkoutAddressService=new H},src:"".concat("https://route.elements.zonos.com","/iframe/google-maps?signedToken=").concat(e)});return[2]}))}))};t.prototype.buildBaseConfig=function(t){var n,e;var i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:undefined,captureDelay:undefined,subscriptionStatus:undefined});if(window.Zonos.isCollect||window.Zonos.isInvoice){return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})})}if(!this.config.checkoutSettings){return Object.assign(Object.assign({},this.config),{checkoutSettings:undefined})}var o=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&((n=this.config.checkoutSettings)===null||n===void 0?void 0:n.successBehavior)==="CLOSE_MODAL";return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:o?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:o?((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||(t===null||t===void 0?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();d.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,i,o,r,u,s,a,f,h,v,w,m,p,g,_,b;var z=this;return __generator(this,(function(j){switch(j.label){case 0:return[4,S()];case 1:u=j.sent(),s=u.errors,a=u.json,f=u.zonosMode;if(((n=(t=s[0])===null||t===void 0?void 0:t.type)===null||n===void 0?void 0:n.toString())==="403"){y("Failed to load zonos settings. This domain may not have access","warn");return[2]}h=((e=a===null||a===void 0?void 0:a.checkoutSettings)===null||e===void 0?void 0:e.customHTML)||"";this.injectCustomHTML(h);this.initZonosNotification();v=function(){var t,n,e;if(window.Zonos.isLegacyCheckout){return((t=a===null||a===void 0?void 0:a.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=z.config.appearance)===null||n===void 0?void 0:n.logoUrl)}return(e=z.config.appearance)===null||e===void 0?void 0:e.logoUrl};w=this.buildBaseConfig(a);m=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:v()})}),w);l({overrideSettings:m,zonosSettings:a});d.zonosMode=f;x(d.checkoutSettings.domesticElementSelector);void this.setupGoogleFont();if(d.helloSettings.visibilityStatus==="DISABLED"){y("=== Hello is disabled by store owner ===","warn")}if(d.helloSettings&&d.helloSettings.visibilityStatus==="ENABLED"){y("Initializing hello");void B(d.helloSettings)}return[4,c()];case 2:j.sent();p=((i=a===null||a===void 0?void 0:a.checkoutSettings)===null||i===void 0?void 0:i.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!p||!this.stripeInitEvent){y("Checkout failed to load -- missing publishable key","warn");return[2]}if(window.Zonos.isCollect||window.Zonos.isInvoice){this.stripeInitEvent.emit({publishableKey:p.token});void this.initGooglePlacesService(a);return[2]}if(d.checkoutSettings.subscriptionStatus==="INACTIVE"){y('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");y("zonos controller loaded");return[2]}if(d.checkoutSettings.visibilityStatus==="DISABLED"){y("=== Checkout is disabled by store owner ===","warn");y("zonos controller loaded");return[2]}g=typeof((o=d.checkoutSettings)===null||o===void 0?void 0:o.buildCartDetail)==="function"||typeof((r=d.checkoutSettings)===null||r===void 0?void 0:r.createCartId)==="function";_=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");b=!!(window.Zonos.cartId&&window.Zonos.cartData)||!!_;if(!g&&!b){y("Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present","warn");return[2]}this.stripeInitEvent.emit({publishableKey:p.token});void this.initGooglePlacesService(a);return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){y("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.checkoutSessionId=null;r.clientSecret="";return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){l({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){y("Override country code to ".concat(t));void f({isInitializing:false,newSelectedCountryCode:t});return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,d.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d.organizationName=t;return[2]}))}))};t.prototype.render=function(){return i(o,{key:"925af89a63419b44e6372de48c66e0898d039ae0",class:"zonos--elements"})};return t}());U.style=N}}}));
|
|
1
|
+
var __extends=this&&this.__extends||function(){var t=function(n,e){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e))t[e]=n[e]};return t(n,e)};return function(n,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function i(){this.constructor=n}n.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}();var __awaiter=this&&this.__awaiter||function(t,n,e,i){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i["throw"](t))}catch(t){r(t)}}function c(t){t.done?e(t.value):o(t.value).then(u,s)}c((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return c([t,n])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;o=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];o=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||arguments.length===2)for(var i=0,o=n.length,r;i<o;i++){if(r||!(i in n)){if(!r)r=Array.prototype.slice.call(n,0,i);r[i]=n[i]}}return t.concat(r||Array.prototype.slice.call(n))};System.register(["./p-7261e245.system.js","./p-0ac1aa87.system.js","./p-c345d1f5.system.js","./p-47a1d469.system.js","./p-4160bbc2.system.js","./p-01174496.system.js","./p-d938f42f.system.js","./p-e977562b.system.js","./p-dab78981.system.js","./p-30e9a6d7.system.js","./p-989cb22b.system.js"],(function(t){"use strict";var n,e,i,o,r,u,s,c,a,f,d,l,h,v,w,m,p,g,y,_;return{setters:[function(t){n=t.r;e=t.d;i=t.h;o=t.a},function(t){r=t.b},function(t){u=t.j;s=t.k;c=t.m;a=t.s;f=t.c},function(t){d=t.z;l=t.e;h=t.f},function(t){v=t.g;w=t.i;m=t.a},function(t){p=t.h;g=t.l},function(t){y=t.l},function(t){_=t.a},function(){},function(){},function(){}],execute:function(){var b=this;var S=function(){return __awaiter(b,void 0,void 0,(function(){var t,n,e,i,o,r,s;return __generator(this,(function(c){switch(c.label){case 0:if(window.Zonos.cartSettings){y("Reusing cached zonos settings");return[2,{errors:[],json:window.Zonos.cartSettings,zonosMode:window.Zonos.zonosMode}]}t=v();n=new URLSearchParams;if(t.overrideShouldEnabledCustomAddress){n.set("overrideShouldEnabledCustomAddress",t.overrideShouldEnabledCustomAddress)}e=u();if(e){n.set("zCountry",e)}return[4,p("/api/zonos-elements/zonos-settings?".concat(n.toString()))];case 1:i=c.sent(),o=i.errors,r=i.json,s=i.zonosMode;if(o.length){g("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:o,json:null,zonosMode:s}]}return[2,{errors:[],json:r,zonosMode:s}]}}))}))};var z=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var j=function(t){if(!t.placeOrderButtonSelector&&!t.alwaysTriggerInternationalCheckoutSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!s(t.placeOrderButtonSelector)){g('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}if(t.alwaysTriggerInternationalCheckoutSelector&&!s(t.alwaysTriggerInternationalCheckoutSelector)){g('Selector alwaysTriggerInternationalCheckoutSelector "'.concat(t.alwaysTriggerInternationalCheckoutSelector,'" is not a valid selector'));return}z()};var O=function(){var t=document.querySelector("zonos-collect");if(!t){var n=document.createElement("zonos-collect");document.body.appendChild(n)}};var I=function(){if(!window.Zonos.cartData){return}O()};var k=function(){var t=document.querySelector("zonos-invoice");if(!t){var n=document.createElement("zonos-invoice");document.body.appendChild(n)}};var C=function(){if(!window.Zonos.cartData){return}k()};var A="zonos-domestic-element-hide-style";var T=typeof document!=="undefined"&&function(){try{document.querySelector(":is(.zonos-is-probe)");return true}catch(t){return false}}();var E=function(t){var n=[];var e=0;var i=0;var o="";for(var r=0;r<t.length;r++){var u=t[r];if(u==="("){e++}else if(u===")"){e--}else if(u==="["){i++}else if(u==="]"){i--}if(u===","&&e===0&&i===0){var s=o.trim();if(s){n.push(s)}o=""}else{o+=u}}var c=o.trim();if(c){n.push(c)}return n};var P=function(t){var n=t.merchantSelector,e=t.supportsIs;if(e){return"body.z-intl :is(".concat(n,")")}return E(n).map((function(t){return"body.z-intl ".concat(t)})).join(", ")};var x=function(t){if(typeof document==="undefined"||!t){return}var n=P({merchantSelector:t,supportsIs:T});try{document.querySelector(n)}catch(e){y('Skip domesticElementSelector injection: "'.concat(t,'" produced an invalid CSS selector ("').concat(n,'")'),"warn");return}if(document.getElementById(A)){return}var e=document.createElement("style");e.id=A;e.textContent="".concat(n," { display: none !important; }");(document.head||document.body).appendChild(e);y("Zonos domestic element hide style injected")};var L=function(t){var n=document.querySelector(t);var e=document.querySelector("zonos-hello");if(!e&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var F=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};var G=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var o=document.querySelector(i);if(o){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483647";document.body.appendChild(r);return i};var B=function(t){return __awaiter(b,void 0,void 0,(function(){var n,e,i,o,r;return __generator(this,(function(u){if(window.Zonos.isLegacyCheckout){y("Hello is disabled when isLegacyCheckout","info");return[2]}n=t.anchorElementSelector;e=n;if(!t.anchorElementSelector&&t.desktopLocation){i=G({position:"bottom-right"});e=i}if(!e||!s(e)){g('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}y("Hello init complete");o=L(e);if(!o){r=new MutationObserver((function(){var t=L(e);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){L(e)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){y("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=G({position:F(t.notFoundElementFallback)});L(n)}}),3e3)}return[2]}))}))};var D=function(){function t(t,n){var e=this;this.targetId=t;this.allowedEvents=n;this.listeners=new Map;this.handleMessage=function(t){var n,i,o;var r=t.data;var u=((n=e.iframe)===null||n===void 0?void 0:n.contentWindow)||((o=(i=e.iframe)===null||i===void 0?void 0:i.contentDocument)===null||o===void 0?void 0:o.defaultView);if(t.source!==u){return}if(!e.isValidMessage(r)){return}var s=e.listeners.get(r.type);s===null||s===void 0?void 0:s.forEach((function(t){try{t(r.payload)}catch(t){g("Error in event listener:",t)}}))};this.initializeEventListeners();this.iframe=document.getElementById(this.targetId)}t.prototype.initializeEventListeners=function(){window.addEventListener("message",this.handleMessage)};t.prototype.isValidMessage=function(t){if(!t||typeof t!=="object")return false;var n=t;return n.id===this.targetId&&typeof n.type==="string"&&this.allowedEvents.includes(n.type)&&n.payload!==undefined};t.prototype.on=function(t,n){var e=this;if(!this.listeners.has(t)){this.listeners.set(t,new Set)}y("[CheckoutAddressService] listening to ".concat(t),"info");var i=n;var o=this.listeners.get(t);if(o){o.add(i)}return function(){var n=e.listeners.get(t);if(n){n.delete(i)}}};t.prototype.destroy=function(){window.removeEventListener("message",this.handleMessage);this.listeners.clear()};return t}();var M=function(t){__extends(n,t);function n(){y("=== [Google Places Service] Initializing","info");return t.call(this,w.GOOGLE_PLACES,["fetchAutocompleteSuggestions","initializeGooglePlacesService","placeSelected","onFetchAutocompleteSuggestions","onInitializeGooglePlacesService","onPlaceSelected"])||this}n.prototype.sendMessage=function(t,n){var e;if(!((e=this.iframe)===null||e===void 0?void 0:e.contentWindow)){return}var i={id:this.targetId,logType:window.Zonos.iframeLogType,payload:n,type:t};y("GooglePlacesService] parent --\x3e ".concat(t),"info",n);this.iframe.contentWindow.postMessage(i,"*")};n.prototype.initialize=function(){this.sendMessage("initializeGooglePlacesService",{})};n.prototype.fetchSuggestions=function(t){var n=t.country,e=t.query,i=t.type;if(!n){return}this.sendMessage("fetchAutocompleteSuggestions",{request:{includedRegionCodes:[n],input:e},type:i})};n.prototype.selectPlace=function(t){var n=t.placeId,e=t.type;this.sendMessage("placeSelected",{placeId:n,type:e})};return n}(D);var H=function(){function t(){var t=this;this.googlePlaceInitialized=false;y("=== [CheckoutAddressService] Initializing","info");this.googlePlaces=new M;this.googlePlaces.on("onInitializeGooglePlacesService",(function(){y("=== [CheckoutAddressService] parent <-- onInitializeGooglePlacesService","info");t.googlePlaceInitialized=true}));this.initialize()}t.prototype.initialize=function(){this.googlePlaces.initialize()};t.prototype.onInitializeGooglePlacesService=function(t){return this.googlePlaces.on("onInitializeGooglePlacesService",(function(){y("[CheckoutAddressService] parent <-- onInitializeGooglePlacesService");t()}))};t.prototype.isGooglePlaceInitialized=function(){return this.googlePlaceInitialized};t.prototype.onAddressSuggestions=function(t){this.suggestionsCallback=t;return this.googlePlaces.on("onFetchAutocompleteSuggestions",(function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}y.apply(void 0,__spreadArray(["[CheckoutAddressService] parent <-- onFetchAutocompleteSuggestions ".concat(n[0].type),"info"],n,false));t.apply(void 0,n)}))};t.prototype.onAddressSelected=function(t){this.placeSelectedCallback=t;return this.googlePlaces.on("onPlaceSelected",(function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}y.apply(void 0,__spreadArray(["[CheckoutAddressService] parent <-- onPlaceSelected ".concat(n[0].type),"info"],n,false));t.apply(void 0,n)}))};t.prototype.getAddressSuggestions=function(t){var n=t.country,e=t.query,i=t.type;if(!this.googlePlaceInitialized){return}this.googlePlaces.fetchSuggestions({country:n,query:e,type:i})};t.prototype.selectAddress=function(t){var n=t.placeId,e=t.type;this.googlePlaces.selectPlace({placeId:n,type:e})};t.prototype.destroy=function(){this.googlePlaces.destroy();if(this.suggestionsCallback){this.suggestionsCallback=undefined}if(this.placeSelectedCallback){this.placeSelectedCallback=undefined}};return t}();var R=":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{visibility:hidden;opacity:0;height:0}";var N=R;var U=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=e(this,"paypalInitEvent",7);this.stripeInitEvent=e(this,"stripeInitEvent",7)}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}r.stripe=t;void j(d.checkoutSettings);y("init checkout element");return[2]}))}))};t.prototype.initCollectElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init Collect element","warn");return[2]}r.stripe=t;void I();y("init Collect element");return[2]}))}))};t.prototype.initInvoiceElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){y("Stripe is not loaded yet - cannot init Invoice element","warn");return[2]}r.stripe=t;void C();y("init Invoice element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,r,u,s,c;return __generator(this,(function(a){switch(a.label){case 0:i=t||h();if(i==="Inter"){if(!t){return[2]}y("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t})}o=new URLSearchParams;o.set("family",i);return[4,p("/api/zonos-elements/get-font-detail?".concat(o.toString()))];case 1:r=a.sent(),u=r.errors,s=r.json;if(u.length>0){y("Failed to load font ".concat(i),"warn");d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:"Inter"});return[2]}c=s===null||s===void 0?void 0:s.fontUrl;if(c){(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,c)}if(!t){return[2]}y("[FONT] ".concat(t," font override applied"));d.appearance=Object.assign(Object.assign({},d.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void B(d.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.injectCustomHTML=function(t){if(!t){return}if(!window.Zonos.isLegacyCheckout||window.Zonos.isCollect||window.Zonos.isInvoice){y("=== Skip injecting custom HTML for hosted checkout","info");return}y("=== Injecting custom HTML for hosted checkout");var n=document.createElement("template");n.innerHTML=t;var e=n.content.querySelectorAll("script");e.forEach((function(t){var n=document.createElement("script");if(t.src){n.src=t.src;n.async=t.async}else{n.textContent=t.innerHTML}document.body.appendChild(n)}));_()};t.prototype.initGooglePlacesService=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e;return __generator(this,(function(i){n=t===null||t===void 0?void 0:t.genericSettings;if(!n){return[2]}e=n.signedTokenGooglePlaces;if(!e){return[2]}m({id:w.GOOGLE_PLACES,onload:function(){d.checkoutAddressService=new H},src:"".concat("https://route.elements.zonos.com","/iframe/google-maps?signedToken=").concat(e)});return[2]}))}))};t.prototype.buildBaseConfig=function(t){var n,e;var i=Object.assign(Object.assign({},this.config.checkoutSettings),{allowedSettlementCurrencies:undefined,captureDelay:undefined,subscriptionStatus:undefined});if(window.Zonos.isCollect||window.Zonos.isInvoice){return Object.assign(Object.assign({},this.config),{checkoutSettings:i,helloSettings:Object.assign(Object.assign({},this.config.helloSettings),{visibilityStatus:"DISABLED"})})}if(!this.config.checkoutSettings){return Object.assign(Object.assign({},this.config),{checkoutSettings:undefined})}var o=window.Zonos.isLegacyCheckout&&!!window.Zonos.cartData&&((n=this.config.checkoutSettings)===null||n===void 0?void 0:n.successBehavior)==="CLOSE_MODAL";return Object.assign(Object.assign({},this.config),{checkoutSettings:Object.assign(Object.assign({},i),{successBehavior:o?"ZONOS_SUCCESS_PAGE":this.config.checkoutSettings.successBehavior,successRedirectUrl:o?((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||(t===null||t===void 0?void 0:t.onlineStoreSettings.url):this.config.checkoutSettings.successRedirectUrl})})};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();d.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,i,o,r,u,s,a,f,h,v,w,m,p,g,_,b;var z=this;return __generator(this,(function(j){switch(j.label){case 0:return[4,S()];case 1:u=j.sent(),s=u.errors,a=u.json,f=u.zonosMode;if(((n=(t=s[0])===null||t===void 0?void 0:t.type)===null||n===void 0?void 0:n.toString())==="403"){y("Failed to load zonos settings. This domain may not have access","warn");return[2]}h=((e=a===null||a===void 0?void 0:a.checkoutSettings)===null||e===void 0?void 0:e.customHTML)||"";this.injectCustomHTML(h);this.initZonosNotification();v=function(){var t,n,e;if(window.Zonos.isLegacyCheckout){return((t=a===null||a===void 0?void 0:a.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=z.config.appearance)===null||n===void 0?void 0:n.logoUrl)}return(e=z.config.appearance)===null||e===void 0?void 0:e.logoUrl};w=this.buildBaseConfig(a);m=Object.assign(Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:v()})}),w);l({overrideSettings:m,zonosSettings:a});d.zonosMode=f;x(d.checkoutSettings.domesticElementSelector);void this.setupGoogleFont();if(d.helloSettings.visibilityStatus==="DISABLED"){y("=== Hello is disabled by store owner ===","warn")}if(d.helloSettings&&d.helloSettings.visibilityStatus==="ENABLED"){y("Initializing hello");void B(d.helloSettings)}return[4,c()];case 2:j.sent();p=((i=a===null||a===void 0?void 0:a.checkoutSettings)===null||i===void 0?void 0:i.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!p||!this.stripeInitEvent){y("Checkout failed to load -- missing publishable key","warn");return[2]}if(window.Zonos.isCollect||window.Zonos.isInvoice){this.stripeInitEvent.emit({publishableKey:p.token});void this.initGooglePlacesService(a);return[2]}if(d.checkoutSettings.subscriptionStatus==="INACTIVE"){y('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");y("zonos controller loaded");return[2]}if(d.checkoutSettings.visibilityStatus==="DISABLED"){y("=== Checkout is disabled by store owner ===","warn");y("zonos controller loaded");return[2]}g=typeof((o=d.checkoutSettings)===null||o===void 0?void 0:o.buildCartDetail)==="function"||typeof((r=d.checkoutSettings)===null||r===void 0?void 0:r.createCartId)==="function";_=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");b=!!(window.Zonos.cartId&&window.Zonos.cartData)||!!_;if(!g&&!b){y("Skip loading Stripe because no cart callback (buildCartDetail/createCartId), prefetched cart, or payment client secret is present","warn");return[2]}this.stripeInitEvent.emit({publishableKey:p.token});void this.initGooglePlacesService(a);return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){y("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.checkoutSessionId=null;r.clientSecret="";return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){l({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){y("Override country code to ".concat(t));void f({isInitializing:false,newSelectedCountryCode:t});return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,d.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d.organizationName=t;return[2]}))}))};t.prototype.render=function(){return i(o,{key:"925af89a63419b44e6372de48c66e0898d039ae0",class:"zonos--elements"})};return t}());U.style=N}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,d as e,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as a,t as n,h as l}from"./p-3f8f4c78.js";import{z as r}from"./p-9a417eeb.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-2b97f7ed.js";import{h as c,T as m,D as g}from"./p-79b6070a.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-6b361d2b.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-11206fe2.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=a.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isDomesticCountry=()=>{var o,e;const{selectedCountryCode:t}=a;return!!t&&!!(null===(e=null===(o=r.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===e?void 0:e.includes(t))},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const o=a.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?l({amount:o.dutyDeminimus}):null;return e?n("Spend up to [threshold] duty free.",{threshold:e}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=a;if(this.isDomesticCountry())return null;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return n("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?l({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?n("Spend up to [threshold] tax free.",{threshold:e}):n("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${n("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${n("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`]:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${n("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${n("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:n("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${n("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:n("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${n("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:n("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=a.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:n("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:n("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:n("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:o,inclusivePriceMessage:e,taxDeMinimisMessage:i})=>{if(c()&&e)switch(e.inclusiveType){case"DUTIES_FEES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},e.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},e.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,e.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(a.countryLandedCost);default:return f.includes(a.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(a.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o,e;const{selectedCountryCode:s}=a,l=this.getAdditionalDutyTaxMessage(),c=null!==(o=this.animateFromLeftOverride)&&void 0!==o?o:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=a,f=n("Welcome to [storeName]",{storeName:r.organizationName}),b=(null===(e=g.find((o=>"hello_default"===o.pageName)))||void 0===e?void 0:e.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),p=h(b),v=this.getCurrentPageEnum(),z=g.filter((o=>o.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},t("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},t("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},t("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},f),t("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:p,textColor:"gray-800"})),t("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),(x||w||C||!!(null==l?void 0:l.length))&&t("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},t("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==l?void 0:l.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},t("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},t("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.style=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
1
|
+
import{r as e,d as o,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as a,t as n,h as l}from"./p-9448d960.js";import{z as r}from"./p-9a417eeb.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-2b97f7ed.js";import{h as c,T as m,D as g}from"./p-26ca8ce7.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-bcf5cffb.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-11206fe2.js";const p=({href:e,text:o})=>`<zonos-link href="${e}" target="_blank" rel="noopener noreferrer">${o}</zonos-link>`,b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){e(this,i),this.closeDialog=o(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=e=>{!e.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async e=>{this.showCountrySelect=e},this.setShowLanguageSelect=async e=>{this.showLanguageSelect=e},this.hasTaxId=()=>{var e;return null===(e=a.countryLandedCost)||void 0===e?void 0:e.hasTaxId},this.isDomesticCountry=()=>{var e,o;const{selectedCountryCode:t}=a;return!!t&&!!(null===(o=null===(e=r.genericSettings)||void 0===e?void 0:e.domesticCountries)||void 0===o?void 0:o.includes(t))},this.isNoThresholdCountry=e=>!(!e||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(e),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const e=a.countryLandedCost;if(!(null==e?void 0:e.allowLowValueOrders)&&"GB"===(null==e?void 0:e.countryCode))return n("Duties will apply to all orders.");const o=(null==e?void 0:e.dutyDeminimus)?l({amount:e.dutyDeminimus}):null;return o?n("Spend up to [threshold] duty free.",{threshold:o}):n("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:e}=a;if(this.isDomesticCountry())return null;if(!(null==e?void 0:e.allowLowValueOrders)&&"GB"===(null==e?void 0:e.countryCode))return n("Taxes will apply to all orders.");const o=(null==e?void 0:e.vatTaxDeminimus)?l({amount:e.vatTaxDeminimus}):null;return o&&!this.isNoThresholdCountry(null==e?void 0:e.countryCode)?n("Spend up to [threshold] tax free.",{threshold:o}):n("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=e=>[`${n("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`],this.getUkDutyTaxMessage=e=>e.allowLowValueOrders?[`${n("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:n("Learn more.")})}`]:[n("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=e=>c()?[]:[`${n("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:n("Learn more.")})}`],this.getNewZealandDutyTaxMessge=e=>c()?null:[`${n("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:n("Learn more.")})}`],this.getNorwayDutyTaxMessage=e=>c()?null:[`${n("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:n("Learn more.")})}`],this.getSingaporeDutyTaxMessage=e=>c()?null:[`${n("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:n("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const e=a.inclusivePricingConfigurations,o=null==e?void 0:e.find(Boolean),t=null==o?void 0:o.configurations[m],s=null==o?void 0:o.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:n("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:n("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:n("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:e,inclusivePriceMessage:o,taxDeMinimisMessage:i})=>{if(c()&&o)switch(o.inclusiveType){case"DUTIES_FEES":return t(s,null,o.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},o.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,o.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},o.message)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:b}),t("zonos-text",{"aria-label":"Duty de minimis message"},e)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,o.message))}return t(s,null,e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:b}),t("zonos-text",{"aria-label":"Duty de minimis message"},e)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!a.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(a.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(a.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(a.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(a.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(a.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(a.countryLandedCost);default:return f.includes(a.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(a.countryLandedCost):null}}}globalClickHandler(e){this.clickOutsideDialogHandler(e)}isOpenHandler(e){e||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var e,o;const{selectedCountryCode:s}=a,l=this.getAdditionalDutyTaxMessage(),c=null!==(e=this.animateFromLeftOverride)&&void 0!==e?e:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const e=this.dialogRef.getBoundingClientRect();return e.top>=window.innerHeight-e.bottom})(),{customMessages:g}=a,f=n("Welcome to [storeName]",{storeName:r.organizationName}),p=(null===(o=g.find((e=>"hello_default"===e.pageName)))||void 0===o?void 0:o.message)||n("Know about duties and taxes before you buy. Shop with confidence!"),b=h(p),v=this.getCurrentPageEnum(),z=g.filter((e=>e.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"18729a31c9a2a29e5f7a49dde7630c3899cd245c",class:"zonos--elements"},t("div",{key:"cedfa2485f68f41aa099bc8a88446c2aa95a9262",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:e=>e&&(this.dialogRef=e)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"3dd21da6f9eab3b1597e59fc93330a6601698d7d"},t("div",{key:"48f98dac07ec1bc299df9fe69ddf74f98cd5a51c",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"9f5a1133b3326b287d8ed62625d416b4d4e5f41c",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"0eb3b34b3f0b869a8039640c7ac3ef706f1bde20",spacing:24},t("zonos-country-flag",{key:"3d39e4fc432736b35bab328da59e043591891f66",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"7e14d107cafcdf9c153813b486c28511c341ed5e",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"a1069a846e7e0118e4be0908f82a147b12df815e",type:"boldSubheader"},f),t("zonos-text",{key:"2f238d337eeb6034c9fbccf1540e7ab981d8b269",innerHTML:b,textColor:"gray-800"})),t("zonos-v-stack",{key:"19d806fe8fb23ac05a9c4093e90beda94fdc1388",spacing:8},this.restrictedItems.map((e=>{var o;return e&&t("zonos-banner",{bannerTitle:e.name,intent:"error"},null===(o=e.itemRestrictions)||void 0===o?void 0:o.map((e=>t("zonos-text",{textColor:"red-800"},null==e?void 0:e.note))))})),(x||w||C||!!(null==l?void 0:l.length))&&t("zonos-card",{key:"eda99f84ee5318ed6fd4bb26d2ac66a92742a05d",spacing:"12px"},t("zonos-v-stack",{key:"86e170fd626ee23c67e35dfad72a28355031920e",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==l?void 0:l.map((e=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:e})))))),z.map((e=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:e.message})))))),t("zonos-hello-dialog-footer",{key:"94875c94b85a19a91390862d7e8ec4c978feb583",appearanceSettings:this.appearanceSettings,setShowCountrySelect:e=>this.setShowCountrySelect(e),setShowLanguageSelect:e=>this.setShowLanguageSelect(e)})),this.showCountrySelect&&t("div",{key:"3a1c43cee0f8f7fb95523e90d21b6a799bdf704c"},t("zonos-country-select",{key:"914e3e1db72458aca439ca37b8e861c49730f332",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"26f01ac1caac824eab2a8ae73cc5a1de843b354c"},t("zonos-language-select",{key:"6318c9bc7824e90314d036973bba1a3175a4d4a8",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.style=":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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as o}from"./p-8051403a.js";import{w as r,h as n}from"./p-9448d960.js";const u=({amount:u,isForeign:i})=>{var t,a;const d=(null===(t=o.exchangeRate)||void 0===t?void 0:t.rate)||1,s=i?u:r(u),v=o.currency;if((null===(a=o.items[0])||void 0===a?void 0:a.currencyCode)===v)return n({amount:s,currency:v});const c=o.displayBaseCurrency,e=(()=>{var r,n;return o.displayBaseCurrency&&(null===(r=o.exchangeRate)||void 0===r?void 0:r.sourceCurrencyCode)?null===(n=o.exchangeRate)||void 0===n?void 0:n.sourceCurrencyCode:o.currency})();return n(i?{amount:c?s/d:s,currency:e}:{amount:c?s:s*d,currency:e})};export{u as r}
|