@zonos/elements 1.3.8-alpha.1 → 1.3.8-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/cjs/{cart-c22d66c8.js → cart-cdce5003.js} +4 -6
  2. package/dist/cjs/{submitGtag-9c0a8038.js → submitGtag-6c250312.js} +4 -2
  3. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -4
  4. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-cart-items_9.cjs.entry.js +2 -2
  6. package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
  7. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  8. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
  13. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +2 -0
  14. package/dist/collection/components/store/checkout/cart.js +3 -0
  15. package/dist/collection/components/store/checkout/stripe.js +1 -6
  16. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -4
  17. package/dist/collection/components/utils/logging/sendErrorLog.js +3 -1
  18. package/dist/collection/types/generated/graphql.customer.types.js +22 -0
  19. package/dist/collection/types/generated/graphql.frontend.types.js +3 -0
  20. package/dist/components/stripe.js +5 -7
  21. package/dist/components/submitGtag.js +1 -1
  22. package/dist/components/trackConversionEvent.js +1 -1
  23. package/dist/components/zonos-address2.js +2 -4
  24. package/dist/components/zonos-checkout-finish2.js +3 -1
  25. package/dist/components/zonos-checkout-footer2.js +1 -1
  26. package/dist/components/zonos-checkout.js +1 -1
  27. package/dist/components/zonos-controller.js +1 -1
  28. package/dist/components/zonos-country-flag2.js +1 -1
  29. package/dist/components/zonos-country-select2.js +1 -1
  30. package/dist/components/zonos-hello-dialog-footer2.js +1 -1
  31. package/dist/components/zonos-hello-dialog2.js +1 -1
  32. package/dist/components/zonos-hello.js +2 -2
  33. package/dist/components/zonos-language-select2.js +1 -1
  34. package/dist/components/zonos-link-authentication2.js +1 -1
  35. package/dist/esm/{cart-f70b9be6.js → cart-6be7e36f.js} +4 -6
  36. package/dist/esm/{submitGtag-1d7ee6b8.js → submitGtag-67d79f43.js} +4 -2
  37. package/dist/esm/zonos-address_4.entry.js +2 -4
  38. package/dist/esm/zonos-card_2.entry.js +1 -1
  39. package/dist/esm/zonos-cart-items_9.entry.js +2 -2
  40. package/dist/esm/zonos-checkout.entry.js +2 -2
  41. package/dist/esm/zonos-controller.entry.js +1 -1
  42. package/dist/esm/zonos-country-flag.entry.js +1 -1
  43. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  44. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  45. package/dist/esm/zonos-hello.entry.js +2 -2
  46. package/dist/esm/zonos-payment.entry.js +1 -1
  47. package/dist/esm-es5/{cart-f70b9be6.js → cart-6be7e36f.js} +1 -1
  48. package/dist/esm-es5/submitGtag-67d79f43.js +1 -0
  49. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  50. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  51. package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -1
  52. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  53. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  54. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  55. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  56. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  57. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  58. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  59. package/dist/scripts/loadZonos.js +1 -1
  60. package/dist/scripts/zonos.js +1 -1
  61. package/dist/scripts/zonosBase.js +1 -1
  62. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  63. package/dist/types/types/generated/graphql.customer.types.d.ts +26 -0
  64. package/dist/types/types/generated/graphql.customer.types.ts +34 -0
  65. package/dist/types/types/generated/graphql.frontend.types.d.ts +12 -1
  66. package/dist/types/types/generated/graphql.frontend.types.ts +24 -1
  67. package/dist/zonos-elements/{p-7da1d7da.entry.js → p-01b49a3e.entry.js} +1 -1
  68. package/dist/zonos-elements/p-066c5893.system.js +1 -1
  69. package/dist/zonos-elements/{p-d93d74c1.system.entry.js → p-09c9bf58.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-0ed00121.entry.js → p-2f84b148.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-4da6d5bb.system.entry.js → p-3c2082c8.system.entry.js} +1 -1
  72. package/dist/zonos-elements/p-4a37f7c8.entry.js +1 -0
  73. package/dist/zonos-elements/{p-04acf5ef.entry.js → p-72390726.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-6dc7222d.js → p-776f07e7.js} +1 -1
  75. package/dist/zonos-elements/{p-fc0a051b.entry.js → p-7cb2dfd5.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-2eb62b45.system.entry.js → p-865900d4.system.entry.js} +1 -1
  77. package/dist/zonos-elements/{p-780ab968.entry.js → p-8f423d46.entry.js} +1 -1
  78. package/dist/zonos-elements/{p-4c4ccf82.system.js → p-93053feb.system.js} +1 -1
  79. package/dist/zonos-elements/{p-824882ce.system.entry.js → p-a38876df.system.entry.js} +1 -1
  80. package/dist/zonos-elements/p-a6a83331.system.entry.js +1 -0
  81. package/dist/zonos-elements/{p-56318a1f.system.entry.js → p-af3ff326.system.entry.js} +1 -1
  82. package/dist/zonos-elements/p-bc8b6f99.js +1 -0
  83. package/dist/zonos-elements/{p-d9ba11cf.system.entry.js → p-c284e71c.system.entry.js} +1 -1
  84. package/dist/zonos-elements/p-c6f186fe.system.entry.js +1 -0
  85. package/dist/zonos-elements/{p-7736198d.system.entry.js → p-db49edae.system.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-373e579c.entry.js → p-dd25205e.entry.js} +1 -1
  87. package/dist/zonos-elements/{p-e043e830.entry.js → p-e67ed67d.entry.js} +1 -1
  88. package/dist/zonos-elements/{p-039803aa.system.js → p-eb5dc3ef.system.js} +1 -1
  89. package/dist/zonos-elements/{p-cbc7edb4.entry.js → p-f15f8441.entry.js} +1 -1
  90. package/dist/zonos-elements/{p-32f43296.entry.js → p-f5b75c6b.entry.js} +1 -1
  91. package/dist/zonos-elements/{p-c97cb066.system.entry.js → p-fe3851a4.system.entry.js} +1 -1
  92. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  93. package/package.json +1 -1
  94. package/dist/esm-es5/submitGtag-1d7ee6b8.js +0 -1
  95. package/dist/zonos-elements/p-4679840f.js +0 -1
  96. package/dist/zonos-elements/p-5d73cde0.system.entry.js +0 -1
  97. package/dist/zonos-elements/p-86fe18ea.system.entry.js +0 -1
  98. package/dist/zonos-elements/p-9a9902ca.entry.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,n,e,t){function s(o){return o instanceof e?o:new e((function(n){n(o)}))}return new(e||(e=Promise))((function(e,c){function i(o){try{u(t.next(o))}catch(o){c(o)}}function r(o){try{u(t["throw"](o))}catch(o){c(o)}}function u(o){o.done?e(o.value):s(o.value).then(i,r)}u((t=t.apply(o,n||[])).next())}))};var __generator=this&&this.__generator||function(o,n){var e={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},t,s,c,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(o){return function(n){return u([o,n])}}function u(r){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(e=0)),e)try{if(t=1,s&&(c=r[0]&2?s["return"]:r[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,r[1])).done)return c;if(s=0,c)r=[r[0]&2,c.value];switch(r[0]){case 0:case 1:c=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(c=e.trys,c=c.length>0&&c[c.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!c||r[1]>c[0]&&r[1]<c[3])){e.label=r[1];break}if(r[0]===6&&e.label<c[1]){e.label=c[1];c=r;break}if(c&&e.label<c[2]){e.label=c[2];e.ops.push(r);break}if(c[2])e.ops.pop();e.trys.pop();continue}r=n.call(o,e)}catch(o){r=[6,o];s=0}finally{t=c=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-039803aa.system.js","./p-75490d7c.system.js","./p-4c4ccf82.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-c476a347.system.js","./p-95dee6f4.system.js"],(function(o){"use strict";var n,e,t,s,c,i,r,u,a,h,d,l,f,z,m,k,v,p,g,b,w,y,x,_,C,j,B,O,L,A,I,S,H;return{setters:[function(o){n=o.r;e=o.h;t=o.F;s=o.H},function(o){c=o.l;i=o.a;r=o.s;u=o.b;a=o.c;h=o.d;d=o.e;l=o.i;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.m;g=o.n;b=o.o;w=o.p;y=o.q;x=o.r;_=o.t},function(o){C=o.z;j=o.m},function(o){B=o.s;O=o.a;L=o.t},function(o){A=o.i},function(o){I=o.c},function(o){S=o.g},function(o){H=o.i}],execute:function(){var M=this;var N=function(o){if(o===void 0){o=true}if(!c.localizationLoaded){return false}if(!c.isShippableCountry){if(o){i("Checkout: not shippable country")}return false}return true};var P=function(o){var n=o.domesticRedirectedBtnSelector,e=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var t=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,i,l;var f=this;return __generator(this,(function(z){o=document.querySelector(n);s=r();if(!o&&s){c=document.createElement("button");c.style.display="none";c.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(c);e===null||e===void 0?void 0:e(s);t.disconnect();return[2]}i=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!i||!l){return[2]}t.disconnect();l.addEventListener("click",(function(o){return __awaiter(f,void 0,void 0,(function(){var n,e,t,s,c,r,l;return __generator(this,(function(f){t=i.value;if(!t){return[2]}u(t);if(!N(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}c=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(n=c.get("shippingAddress.address1"))!==null&&n!==void 0?n:r&&r.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:(e=c.get("shippingAddress.stateOrProvince"))!==null&&e!==void 0?e:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){h("One or more shipping address field is missing",Object.entries(l));void B({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:C.storeId}});return[2]}d({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));t.observe(document.body,{childList:true,subtree:true})};var E='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var Z='<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';var D='<svg color="var(--amino-gray-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(--amino-gray-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 T=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56) var(--amino-space-76)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";var R=T;var V=o("zonos_checkout",function(){function o(o){var e=this;n(this,o);this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o,n,e,t,s;return __generator(this,(function(c){switch(c.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||C.appearance.theme;return[4,l({overrideBorderRaidus:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.style,overridePrimaryColor:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.colorPrimary,overrideSecondaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorSecondary,overrideTheme:this.isMobile?s:undefined})];case 1:c.sent();return[2]}}))}))};this.getCurrentLocalePageEnum=function(){switch(f.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.defaultAddress=null;this.forceDialogOpen=false;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.paymentError=false;this.collapseReviewMobile=false;this.isAttachError=false;this.isMobile=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=o.detail;void z(n);return[2]}))}))};o.prototype.closeDialogHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){O("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&f.step==="finish"){m()}f.step="customer-info";return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(e){switch(e.label){case 0:if(!C.checkoutSettings.buildCartDetail)return[3,3];i("build cart detail");return[4,C.checkoutSettings.buildCartDetail()];case 1:o=e.sent();return[4,z(o)];case 2:e.sent();e.label=3;case 3:if(!!k.clientSecret)return[3,5];return[4,v()];case 4:n=e.sent();i("stripeStoreInitCheckoutSession: ".concat(n));if(!n){return[2,false]}e.label=5;case 5:return[4,this.applyStripeTheme()];case 6:e.sent();return[2,true]}}))}))};o.prototype.attachCheckout=function(){var o=this;var n=C.checkoutSettings.placeOrderButtonSelector;if(!n){return}var e=document.querySelectorAll("".concat(n,", ").concat(this.domesticRedirectedBtnSelector));e.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}n.addEventListener("click",(function(n){return __awaiter(o,void 0,void 0,(function(){var o,e;return __generator(this,(function(t){switch(t.label){case 0:if(!N()){return[2]}n.preventDefault();n.stopPropagation();i("zonos checkout button clicked");k.isFetchingSession=true;this.open=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,this.buildCartAndInit()];case 2:o=t.sent();if(!o){throw new Error("Error building cart")}O("zonos-checkout-start");void L("checkout_open");return[3,4];case 3:e=t.sent();k.isFetchingSession=false;p({messages:[_("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:_("Error creating Checkout")});return[3,4];case 4:return[2]}}))}))}));n.removeAttribute("disabled");n.setAttribute("data-zonos-checkout-attached","true");if(n.matches(o.domesticRedirectedBtnSelector)){n.dispatchEvent(new CustomEvent("click"));a();n.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;var e=this;return __generator(this,(function(t){k.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;P({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){e.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});o=setInterval((function(){var n=window.Zonos.internationalHideSelector;if(!n){clearInterval(o);return}var e=N(false);var t=document.querySelectorAll(n);if(!e){t===null||t===void 0?void 0:t.forEach((function(o){var n=o;var e=n.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(n).display;n.style.display=e||"initial"}));return}t===null||t===void 0?void 0:t.forEach((function(o){var n=o;var e=n.style.display;n.setAttribute("data-zonos-checkout-original-display",e);n.style.display="none"}))}),100);n=setInterval((function(){k.stripe=window.Zonos.stripe;e.stripe=window.Zonos.stripe;if(!e.stripe){i("waiting for stripe to be loaded");return}if(e.storybookPaymentStatusOverride){clearInterval(n);return}i("init checkout");if(e.preview||e.forceDialogOpen){void e.buildCartAndInit()}else{e.attachCheckout();var o=new MutationObserver((function(){e.attachCheckout()}));o.observe(document.body,{childList:true,subtree:true})}clearInterval(n)}),50);setTimeout((function(){clearInterval(n)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var n=this;return __generator(this,(function(e){switch(e.label){case 0:this.submitLoading=true;return[4,g()];case 1:e.sent();o=setInterval((function(){if(f.landedCostData||!k.isFetchingLandedCost){if(f.landedCostData){b()}n.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(n){this.submitLoading=true;setTimeout((function(){b();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(n){switch(n.label){case 0:this.paymentError=false;this.submitLoading=true;n.label=1;case 1:n.trys.push([1,3,,4]);return[4,w()];case 2:n.sent();b();return[3,4];case 3:o=n.sent();h(o);this.paymentError=true;return[3,4];case 4:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,n;return __generator(this,(function(e){switch(e.label){case 0:y();if(!this.preview)return[3,2];f.step="customer-info";return[4,this.init()];case 1:e.sent();return[2];case 2:m();o=window.location.href;n=o.split("?")[0];window.history.replaceState({},document.title,n);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleBackClick=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(f.step==="customer-info"))return[3,2];return[4,this.closeDialogHandler()];case 1:o.sent();return[2];case 2:x();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.componentWillLoad=function(){void this.init();this.isMobile=A(this.mobile);i("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){y();m()};o.prototype.render=function(){var o=this;var n;var i=f.step!=="finish"&&f.step!=="error"&&!k.stripeElements||k.isFetchingSession;var r=j(C.appearance,this.appearanceSettingsOverride),u=r.colorPrimary,a=r.colorSecondary,h=r.logoUrl,d=r.style;var l=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var m=u&&H(u)?"DARK":"LIGHT";var v=this.isMobile?z:m;var p=!this.isMobile?a:undefined;var g=c.customMessages;var b=(n=g.find((function(o){return o.pageName==="checkout_default"})))===null||n===void 0?void 0:n.message;var w=this.getCurrentLocalePageEnum();var y=g.filter((function(o){return o.pageName===w}));var x=function(){return e("div",{class:"zonos--logo"},h&&e("img",{alt:"".concat(C.organizationName," logo"),src:h,width:100}))};var B=function(){return e("zonos-v-stack",null,x(),y.map((function(o){return e("zonos-custom-message",{icon:Z,message:o.message})})),e("div",null,e("zonos-button",{class:"zonos--back-button",icon:e("zonos-icon",{"aria-label":"Back to previous step",content:E}),noBackground:true,noPaddingLeft:true,noPaddingRight:true,onClick:function(){return o.handleBackClick()},theme:v},_("Back"))))};var O=function(){return e("div",{class:"zonos--content",style:{"--border-radius":S(d)}},f.step!=="finish"&&f.step!=="error"&&e(t,null,e("div",{class:"zonos--left","data-theme":v,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&B(),f.step==="customer-info"&&e("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:p}),f.step==="shipping"&&e("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:p}),f.step==="payment"&&e("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:p})),e("div",{class:"zonos--right","data-theme":z},o.isMobile&&B(),!o.isMobile&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.closeDialogHandler()}}),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),e("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},e("zonos-cart-items",null))),e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Z,message:b}))))),(f.step==="finish"||f.step==="error")&&e("div",{class:"zonos--done","data-theme":z},e("div",{class:"zonos--header"},x(),e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),e("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:f.step==="error"&&!!f.error?Object.assign(Object.assign({},f.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),e("zonos-checkout-footer",null))};return e(s,{class:I(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?O():e("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:i,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},O()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());V.style=R}}}));
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,c){function i(o){try{u(t.next(o))}catch(o){c(o)}}function r(o){try{u(t["throw"](o))}catch(o){c(o)}}function u(o){o.done?n(o.value):s(o.value).then(i,r)}u((t=t.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},t,s,c,i;return i={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function r(o){return function(e){return u([o,e])}}function u(r){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,r[0]&&(n=0)),n)try{if(t=1,s&&(c=r[0]&2?s["return"]:r[0]?s["throw"]||((c=s["return"])&&c.call(s),0):s.next)&&!(c=c.call(s,r[1])).done)return c;if(s=0,c)r=[r[0]&2,c.value];switch(r[0]){case 0:case 1:c=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(!(c=n.trys,c=c.length>0&&c[c.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!c||r[1]>c[0]&&r[1]<c[3])){n.label=r[1];break}if(r[0]===6&&n.label<c[1]){n.label=c[1];c=r;break}if(c&&n.label<c[2]){n.label=c[2];n.ops.push(r);break}if(c[2])n.ops.pop();n.trys.pop();continue}r=e.call(o,n)}catch(o){r=[6,o];s=0}finally{t=c=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-d1ab0823.system.js","./p-eb5dc3ef.system.js","./p-75490d7c.system.js","./p-93053feb.system.js","./p-aed0098c.system.js","./p-23e7c655.system.js","./p-c476a347.system.js","./p-95dee6f4.system.js"],(function(o){"use strict";var e,n,t,s,c,i,r,u,a,h,d,l,f,z,m,k,v,p,g,b,w,y,x,_,C,j,B,O,L,A,I,S,H;return{setters:[function(o){e=o.r;n=o.h;t=o.F;s=o.H},function(o){c=o.l;i=o.a;r=o.s;u=o.b;a=o.c;h=o.d;d=o.e;l=o.i;f=o.f;z=o.g;m=o.h;k=o.j;v=o.k;p=o.m;g=o.n;b=o.o;w=o.p;y=o.q;x=o.r;_=o.t},function(o){C=o.z;j=o.m},function(o){B=o.s;O=o.a;L=o.t},function(o){A=o.i},function(o){I=o.c},function(o){S=o.g},function(o){H=o.i}],execute:function(){var M=this;var N=function(o){if(o===void 0){o=true}if(!c.localizationLoaded){return false}if(!c.isShippableCountry){if(o){i("Checkout: not shippable country")}return false}return true};var P=function(o){var e=o.domesticRedirectedBtnSelector,n=o.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var t=new MutationObserver((function(){return __awaiter(M,void 0,void 0,(function(){var o,s,c,i,l;var f=this;return __generator(this,(function(z){o=document.querySelector(e);s=r();if(!o&&s){c=document.createElement("button");c.style.display="none";c.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(c);n===null||n===void 0?void 0:n(s);t.disconnect();return[2]}i=document.querySelector('select[name="shippingAddress.countryCode"]');l=document.querySelector("#checkout-shipping-continue");if(!i||!l){return[2]}t.disconnect();l.addEventListener("click",(function(o){return __awaiter(f,void 0,void 0,(function(){var e,n,t,s,c,r,l;return __generator(this,(function(f){t=i.value;if(!t){return[2]}u(t);if(!N(false)){a();return[2]}s=document.querySelector("form");if(!s){return[2]}c=new FormData(s);r=document.querySelector("input#addressLine1Input");l={address1:(e=c.get("shippingAddress.address1"))!==null&&e!==void 0?e:r&&r.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:(n=c.get("shippingAddress.stateOrProvince"))!==null&&n!==void 0?n:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(l).some((function(o){return o===undefined||o===null}))){h("One or more shipping address field is missing",Object.entries(l));void B({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(l))],metadata:{domain:window.location.hostname,storeId:C.storeId}});return[2]}d({address1:l.address1,address2:l.address2,city:l.city,countryCode:l.countryCode,firstName:l.firstName,lastName:l.lastName,phone:l.phone,postalCode:l.postalCode,state:l.stateOrProvince});o.preventDefault();o.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));t.observe(document.body,{childList:true,subtree:true})};var E='<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var Z='<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';var D='<svg color="var(--amino-gray-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(--amino-gray-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 T=".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--amino-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:var(--amino-space-48) var(--amino-space-56) var(--amino-space-76)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--amino-gray-0));border-right:1px solid var(--amino-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--amino-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--amino-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:var(--amino-space-24);padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--back-button.sc-zonos-checkout{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 var(--amino-space-8) var(--amino-space-8)}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--close-button.sc-zonos-checkout{position:absolute;right:var(--amino-space-24);top:var(--amino-space-24)}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:var(--amino-space-76);margin-bottom:var(--amino-space-8)}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--amino-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:var(--amino-space-32)}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:var(--amino-space-12);padding-bottom:var(--amino-space-76)}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:var(--amino-space-0)}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:var(--amino-space-16)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--amino-border);border-radius:var(--border-radius, var(--amino-radius-10));background-color:var(--amino-gray-50);padding:var(--amino-space-12);margin-top:var(--amino-space-32)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:var(--amino-space-8)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";var R=T;var V=o("zonos_checkout",function(){function o(o){var n=this;e(this,o);this.applyStripeTheme=function(){return __awaiter(n,void 0,void 0,(function(){var o,e,n,t,s;return __generator(this,(function(c){switch(c.label){case 0:s=((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme)||C.appearance.theme;return[4,l({overrideBorderRaidus:(e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.style,overridePrimaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorPrimary,overrideSecondaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorSecondary,overrideTheme:this.isMobile?s:undefined})];case 1:c.sent();return[2]}}))}))};this.getCurrentLocalePageEnum=function(){switch(f.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.appearanceSettingsOverride=undefined;this.preview=false;this.mobile=false;this.defaultAddress=null;this.forceDialogOpen=false;this.open=this.forceDialogOpen;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.paymentError=false;this.collapseReviewMobile=false;this.isAttachError=false;this.isMobile=false;this.zonosReviewRef=undefined;this.storybookPaymentStatusOverride=undefined;this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button"}o.prototype.initCartInfoHandler=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=o.detail;void z(e);return[2]}))}))};o.prototype.closeDialogHandler=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){O("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&f.step==="finish"){m()}f.step="customer-info";return[2]}))}))};o.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;return __generator(this,(function(n){switch(n.label){case 0:if(!C.checkoutSettings.buildCartDetail)return[3,3];i("build cart detail");return[4,C.checkoutSettings.buildCartDetail()];case 1:o=n.sent();return[4,z(o)];case 2:n.sent();n.label=3;case 3:if(!!k.clientSecret)return[3,5];return[4,v()];case 4:e=n.sent();i("stripeStoreInitCheckoutSession: ".concat(e));if(!e){return[2,false]}n.label=5;case 5:return[4,this.applyStripeTheme()];case 6:n.sent();return[2,true]}}))}))};o.prototype.attachCheckout=function(){var o=this;var e=C.checkoutSettings.placeOrderButtonSelector;if(!e){return}var n=document.querySelectorAll("".concat(e,", ").concat(this.domesticRedirectedBtnSelector));n.forEach((function(e){var n=e.getAttribute("data-zonos-checkout-attached");if(n){return}e.addEventListener("click",(function(e){return __awaiter(o,void 0,void 0,(function(){var o,n;return __generator(this,(function(t){switch(t.label){case 0:if(!N()){return[2]}e.preventDefault();e.stopPropagation();i("zonos checkout button clicked");k.isFetchingSession=true;this.open=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,this.buildCartAndInit()];case 2:o=t.sent();if(!o){throw new Error("Error building cart")}O("zonos-checkout-start");void L("checkout_open");return[3,4];case 3:n=t.sent();k.isFetchingSession=false;p({messages:[_("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:_("Error creating Checkout")});return[3,4];case 4:return[2]}}))}))}));e.removeAttribute("disabled");e.setAttribute("data-zonos-checkout-attached","true");if(e.matches(o.domesticRedirectedBtnSelector)){e.dispatchEvent(new CustomEvent("click"));a();e.remove()}}))};o.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};o.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;var n=this;return __generator(this,(function(t){k.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;P({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(o){n.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},name:"".concat(o.firstName," ").concat(o.lastName),phone:o.phone}}});o=setInterval((function(){var e=window.Zonos.internationalHideSelector;if(!e){clearInterval(o);return}var n=N(false);var t=document.querySelectorAll(e);if(!n){t===null||t===void 0?void 0:t.forEach((function(o){var e=o;var n=e.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(e).display;e.style.display=n||"initial"}));return}t===null||t===void 0?void 0:t.forEach((function(o){var e=o;var n=e.style.display;e.setAttribute("data-zonos-checkout-original-display",n);e.style.display="none"}))}),100);e=setInterval((function(){k.stripe=window.Zonos.stripe;n.stripe=window.Zonos.stripe;if(!n.stripe){i("waiting for stripe to be loaded");return}if(n.storybookPaymentStatusOverride){clearInterval(e);return}i("init checkout");if(n.preview||n.forceDialogOpen){void n.buildCartAndInit()}else{n.attachCheckout();var o=new MutationObserver((function(){n.attachCheckout()}));o.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){f.step="finish";this.storybookPaymentStatusOverride=o;return[2]}))}))};o.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;var e=this;return __generator(this,(function(n){switch(n.label){case 0:this.submitLoading=true;return[4,g()];case 1:n.sent();o=setInterval((function(){if(f.landedCostData||!k.isFetchingLandedCost){if(f.landedCostData){b()}e.submitLoading=false;clearInterval(o)}}),500);return[2]}}))}))};o.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(e){this.submitLoading=true;setTimeout((function(){b();o.submitLoading=false}),500);return[2]}))}))};o.prototype.handleCheckoutPaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:this.paymentError=false;this.submitLoading=true;e.label=1;case 1:e.trys.push([1,3,,4]);return[4,w()];case 2:e.sent();b();return[3,4];case 3:o=e.sent();h(o);this.paymentError=true;return[3,4];case 4:this.submitLoading=false;return[2]}}))}))};o.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var o,e;return __generator(this,(function(n){switch(n.label){case 0:y();if(!this.preview)return[3,2];f.step="customer-info";return[4,this.init()];case 1:n.sent();return[2];case 2:m();o=window.location.href;e=o.split("?")[0];window.history.replaceState({},document.title,e);this.open=false;window.location.reload();return[2]}}))}))};o.prototype.handleBackClick=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!(f.step==="customer-info"))return[3,2];return[4,this.closeDialogHandler()];case 1:o.sent();return[2];case 2:x();return[2]}}))}))};o.prototype.handleWindowResize=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.handleMobileChange=function(){this.isMobile=A(this.mobile);void this.applyStripeTheme();i("mobile: ".concat(this.isMobile))};o.prototype.componentWillLoad=function(){void this.init();this.isMobile=A(this.mobile);i("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){y();m()};o.prototype.render=function(){var o=this;var e;var i=f.step!=="finish"&&f.step!=="error"&&!k.stripeElements||k.isFetchingSession;var r=j(C.appearance,this.appearanceSettingsOverride),u=r.colorPrimary,a=r.colorSecondary,h=r.logoUrl,d=r.style;var l=C.appearance.zonosAttribution==="ENABLED";var z=C.appearance.theme;var m=u&&H(u)?"DARK":"LIGHT";var v=this.isMobile?z:m;var p=!this.isMobile?a:undefined;var g=c.customMessages;var b=(e=g.find((function(o){return o.pageName==="checkout_default"})))===null||e===void 0?void 0:e.message;var w=this.getCurrentLocalePageEnum();var y=g.filter((function(o){return o.pageName===w}));var x=function(){return n("div",{class:"zonos--logo"},h&&n("img",{alt:"".concat(C.organizationName," logo"),src:h,width:100}))};var B=function(){return n("zonos-v-stack",null,x(),y.map((function(o){return n("zonos-custom-message",{icon:Z,message:o.message})})),n("div",null,n("zonos-button",{class:"zonos--back-button",icon:n("zonos-icon",{"aria-label":"Back to previous step",content:E}),noBackground:true,noPaddingLeft:true,noPaddingRight:true,onClick:function(){return o.handleBackClick()},theme:v},_("Back"))))};var O=function(){return n("div",{class:"zonos--content",style:{"--border-radius":S(d)}},f.step!=="finish"&&f.step!=="error"&&n(t,null,n("div",{class:"zonos--left","data-theme":v,style:{"--primary-color":!o.isMobile?u:""}},!o.isMobile&&B(),f.step==="customer-info"&&n("zonos-customer-info",{continueLoading:o.submitLoading,defaultAddress:o.defaultAddress,onContinueClicked:function(){return o.handleCustomerInfoContinue()},submitBtnColor:p}),f.step==="shipping"&&n("zonos-shipping",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleShippingContinue()},submitBtnColor:p}),f.step==="payment"&&n("zonos-checkout-payment",{continueLoading:o.submitLoading,onContinueClicked:function(){return o.handleCheckoutPaymentContinue()},paymentError:o.paymentError,submitBtnColor:p})),n("div",{class:"zonos--right","data-theme":z},o.isMobile&&B(),!o.isMobile&&n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.closeDialogHandler()}}),n("div",{class:"flex--wrapper"},n("div",{class:"zonos--wrapper"},n("zonos-review",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onClick:function(){if(!o.isMobile){return}o.collapseReviewMobile=!o.collapseReviewMobile}}),n("zonos-collapse",{collapsed:o.collapseReviewMobile&&o.isMobile},n("zonos-cart-items",null))),n("zonos-v-stack",{spacing:16},n("zonos-cart-subtotal",null),n("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Z,message:b}))))),(f.step==="finish"||f.step==="error")&&n("div",{class:"zonos--done","data-theme":z},n("div",{class:"zonos--header"},x(),n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{"aria-label":"Close checkout dialog",content:D}),noBackground:true,onClick:function(){return o.handleFinishClick()},theme:z})),n("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return o.handleFinishClick()},overrideNotification:f.step==="error"&&!!f.error?Object.assign(Object.assign({},f.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),n("zonos-checkout-footer",null))};return n(s,{class:I(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?O():n("zonos-dialog",{borderStyle:d,"data-theme":z,height:"980px",isLoading:i,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return o.closeDialogHandler()},open:this.open,width:"1200px"},O()))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}},enumerable:false,configurable:true});return o}());V.style=R}}}));
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as o,H as e,d as i}from"./p-58127116.js";import{j as n,d as a,l as c,t as h,n as r}from"./p-776f07e7.js";import{z as l,d}from"./p-9cdc6b5f.js";import{i as p}from"./p-81a54668.js";import{c as m}from"./p-b4b7f705.js";import{g as u}from"./p-3d4fc5aa.js";import{i as b}from"./p-e71fbec9.js";const f=class{constructor(o){s(this,o),this.invalidCharacters=t(this,"invalidCharacters",7),this.type=void 0,this.titleText=void 0,this.defaultAddress=null,this.stripe=window.Zonos.stripe,this.hasInvalidCharacters=!1,this.isDirtyAddress=!1}getStripeAddressInstance(){return"billing"===this.type?{stripeAddressElement:n.stripeBillingAddressElement,stripeAddressEventData:n.stripeBillingAddressEventData,stripeElements:n.stripeElementsForBillingAddress}:{stripeAddressElement:n.stripeAddressElement,stripeAddressEventData:n.stripeAddressEventData,stripeElements:n.stripeElements}}updateAddressEventData({event:s,type:t}){"billing"===t?n.stripeBillingAddressEventData=s:n.stripeAddressEventData=s;const o=this.checkInvalidCharacters(s);this.invalidCharacters.emit(o),this.hasInvalidCharacters=o}updateAddressElement({stripeAddressElement:s,type:t}){"shipping"!==t?n.stripeBillingAddressElement=s:n.stripeAddressElement=s}checkInvalidCharacters(s){if(!s.complete||"ALL"===l.checkoutSettings.allowedCharacterSets)return!1;const{address:t,firstName:o,lastName:e,name:i}=s.value,{city:n,country:a,line1:c,line2:h,postal_code:r,state:d}=t,p=(s=>{const t=/[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;return Object.entries(s).reduce(((s,[o,e])=>t.test(e)?Object.assign(Object.assign({},s),{[o]:!0}):s),{})})({city:n,country:a,line1:c,line2:h||"",name:i||`${o} ${e}`,postal_code:r,state:d});return!!Object.keys(p).length}async watchInitStripe(){var s,t;this.stripe=window.Zonos.stripe;const{stripeAddressEventData:o,stripeElements:e}=this.getStripeAddressInstance();if(!this.stripe||!e)return void a("Stripe is not initialized. Couldn't load stripe element.");(null===(s=this.defaultAddress)||void 0===s?void 0:s.phone)||null===(t=this.defaultAddress)||void 0===t||delete t.phone;const i=c.shippingZoneCountries,n=i?Object.values(i).map((s=>s.code)):[],h=e.create("address",{allowedCountries:"shipping"===this.type?n:[],contacts:this.defaultAddress?[this.defaultAddress]:[],defaultValues:{address:Object.assign(Object.assign({},null==o?void 0:o.value.address),{country:(null==o?void 0:o.value.address.country)||c.selectedCountryCode||"AL"}),firstName:null==o?void 0:o.value.firstName,lastName:null==o?void 0:o.value.lastName,phone:null==o?void 0:o.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});h.mount(this.el.querySelector(".zonos--address-component")),h.on("change",(s=>{const t=s.value;!this.isDirtyAddress&&t.address.line1.length>=3&&(this.isDirtyAddress=!0,setTimeout((()=>{if(p())this.el.scrollIntoView({behavior:"smooth",block:"end"});else{const s="shipping"===this.type?100:600,t=this.el.closest(".zonos--group"),o=this.el.getBoundingClientRect().top+s;null==t||t.scrollTo({behavior:"smooth",top:o})}}),600)),this.updateAddressEventData({event:Object.assign(Object.assign({},s),{elementMode:this.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:t.firstName||t.name.split(" ")[0],lastName:t.lastName||t.name.split(" ")[1]})}),type:this.type})})),this.updateAddressElement({stripeAddressElement:h,type:this.type})}disconnectedCallback(){const s=this.getStripeAddressInstance().stripeAddressElement;null==s||s.destroy()}componentDidLoad(){const s=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!s&&s.value.address.line1.length>0,this.watchInitStripe(),setTimeout((()=>{const s=this.getStripeAddressInstance().stripeAddressEventData;s&&this.checkInvalidCharacters(s)}),500)}render(){return o(e,{key:"3927946760be161a50ccf924cef5a58503887ac8",class:"zonos--address zonos--elements"},o("zonos-text",{key:"ac95946a7322dbfab13b3d29df2e22d251ba553c",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"552c6e94d64a842f702c5499320713c8b8fcab6b",class:"zonos--address-component"}),this.hasInvalidCharacters&&o("zonos-banner",{bannerTitle:h("Please ensure your text uses the Latin alphabet only (A-Z, a-z)."),intent:"error"}))}get el(){return i(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};f.style=".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";const z=["blue","cyan","green","orange","purple","red","gray","glass"],k=class{constructor(o){s(this,o),this.checkboxSelected=t(this,"checkboxSelected",7),this.backgroundColor="blue",this.label=void 0,this.isChecked=!1,this.isDisabled=!1,this.size=12,this.fontSize="base",this.borderStyle=void 0}render(){const s=z.includes(this.backgroundColor),t=s?`var(--amino-${this.backgroundColor}-600)`:this.backgroundColor,i=s?`var(--amino-${this.backgroundColor}-200)`:b(t)?"var(--amino-gray-0)":"var(--amino-gray-800)",n=u(this.borderStyle,"4px");return o(e,{key:"5f8516f5933b739cc3f21d901e50dec1c761fa58",class:m(["zonos--elements zonos--checkbox"]),style:{"--background-color":t,"--border-radius":n,"--font-family":d(),"--size":`${this.size}px`}},o("label",{key:"6544f51a8c892d616123ab4194d069b055e3dc86",class:m([this.isDisabled&&"disabled"])},o("input",{key:"958e35bf16be575230748fccdb1a3916942c3a30",checked:this.isChecked,disabled:this.isDisabled,hidden:!0,onChange:s=>{this.checkboxSelected.emit(s.target.checked)},type:"checkbox"}),o("span",{key:"2c55e0a190b092dd083c433c35143e253910f54f",class:"checkmark-container"},o("svg",{key:"0aa1f705b728055835159a399173a170aee4f7c0",class:"checkmark",color:i,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"d526bbafde4d4399be3f3a0a7cc87e92634d9548","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&o("zonos-text",{size:this.fontSize},this.label)))}};k.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:var(--amino-space-8);-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--size);width:var(--size);background-color:transparent;border:1.5px solid var(--amino-gray-400);position:relative;border-radius:var(--border-radius, var(--amino-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--background-color);border-radius:var(--border-radius, var(--amino-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";const y=class{constructor(t){s(this,t),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight,this.iframe=null}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var s,t,o;this.iframe=(null===(s=this.el.shadowRoot)||void 0===s?void 0:s.querySelector("iframe"))||null,null===(o=null===(t=this.iframe)||void 0===t?void 0:t.contentWindow)||void 0===o||o.addEventListener("resize",(()=>{this.iframe&&(this.height=parseFloat(getComputedStyle(this.iframe).height))}))}render(){return this.collapsed?this.el.style.overflow="hidden":setTimeout((()=>{this.collapsed||(this.el.style.overflow="visible")}),300),o(e,{key:"7ac8b898feadfb4424b3b48a98135cb18994f4e0",class:"zonos--elements zonos--collapse",style:{"--font-family":d(),height:this.getElementHeight()}},o("div",{key:"4a527ec319b59041196284d4d9a8f22b943a74e6"},o("iframe",{key:"2fb51c16e13ca90561b1b1e6cab89d87e4a37a47",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),o("slot",{key:"6d7849f6c35be611446b0da36d657396e5ca3122"})))}get el(){return i(this)}};y.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";const g=class{constructor(t){s(this,t),this.titleText=void 0,this.stripe=n.stripe}watchInitStripe(){if(!this.stripe||!n.stripeElements)return;const s=n.stripeLinkElement||n.stripeElements.create("linkAuthentication"),t=this.el.querySelector(".zonos--link-authentication-component");t?(s.mount(t),s.on("change",(s=>{n.stripeLinkEventData=s,r()})),n.stripeLinkElement=s):a("Cannot find container element for linkAuthenticationElement")}componentDidLoad(){this.watchInitStripe()}render(){return o(e,{key:"671681b3ca3e95ab25a70cb44e84db7e2b3903e8",class:"zonos--link-authentication zonos--elements"},o("zonos-text",{key:"8d20c795500e3ce27b92cdeb0446908e550f9f13",class:"zonos--title",type:"semiBoldLabel"},this.titleText),o("div",{key:"b8374d7d7a4844b4c2cf6363b8d2d225bb52b21d",class:"zonos--link-authentication-component"}))}get el(){return i(this)}static get watchers(){return{stripe:["watchInitStripe"]}}};g.style=".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";export{f as zonos_address,k as zonos_checkbox,y as zonos_collapse,g as zonos_link_authentication}
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-58127116.js";import{l as e}from"./p-6dc7222d.js";import{d as a}from"./p-9cdc6b5f.js";import{c as n}from"./p-b4b7f705.js";import"./p-e71fbec9.js";import"./p-3d4fc5aa.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
1
+ import{r as t,h as s,H as o,d as i}from"./p-58127116.js";import{l as e}from"./p-776f07e7.js";import{d as a}from"./p-9cdc6b5f.js";import{c as n}from"./p-b4b7f705.js";import"./p-e71fbec9.js";import"./p-3d4fc5aa.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}