@zonos/elements 1.2.4-alpha.8 → 1.3.3-alpha.0

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 (175) hide show
  1. package/README.md +80 -1
  2. package/dist/cjs/{cart-90f7c8c0.js → cart-cfa5d5fd.js} +4 -4
  3. package/dist/cjs/{getBorderRadius-bf4a4276.js → getBorderRadius-c3c63ee6.js} +1 -1
  4. package/dist/cjs/index.cjs.js +5 -5
  5. package/dist/cjs/{isDarkColor-ff6ff183.js → isDarkColor-fc8c294a.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{localization-9caf3397.js → localization-4746acf7.js} +2 -2
  8. package/dist/cjs/{submitGtag-b141b45d.js → submitGtag-ca175427.js} +2 -2
  9. package/dist/cjs/zonos-address_2.cjs.entry.js +5 -5
  10. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +45 -16
  15. package/dist/cjs/zonos-checkout.cjs.entry.js +14 -9
  16. package/dist/cjs/zonos-controller.cjs.entry.js +14 -54
  17. package/dist/cjs/zonos-country-flag_4.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-elements.cjs.js +1 -1
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-hello.cjs.entry.js +8 -5
  21. package/dist/cjs/zonos-icon.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
  24. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  25. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  26. package/dist/cjs/{zonosStore-b43ef5db.js → zonosStore-10d1d6ff.js} +0 -8
  27. package/dist/collection/__tests__/build-utils/urlCheckOne.js +4 -1
  28. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +43 -10
  29. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +8 -3
  30. package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +4 -4
  31. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +6 -3
  32. package/dist/collection/components/main/zonos-controller.js +35 -54
  33. package/dist/collection/components/store/zonosStore.js +0 -8
  34. package/dist/collection/components/utils/api/{getZonosSetting.js → getZonosSettings.js} +2 -2
  35. package/dist/collection/components/utils/handleFetch.js +1 -1
  36. package/dist/collection/environment.js +14 -3
  37. package/dist/collection/scripts/{zonos.js → zonosBase.js} +23 -19
  38. package/dist/collection/types/generated/graphql.customer.types.js +65 -0
  39. package/dist/collection/types/generated/graphql.frontend.types.js +9 -0
  40. package/dist/components/localization.js +1 -1
  41. package/dist/components/zonos-checkout-finish2.js +40 -10
  42. package/dist/components/zonos-checkout.js +8 -3
  43. package/dist/components/zonos-controller.js +11 -50
  44. package/dist/components/zonos-dialog2.js +1 -1
  45. package/dist/components/zonos-hello.js +6 -3
  46. package/dist/components/zonosStore.js +0 -8
  47. package/dist/esm/{cart-b439be00.js → cart-d81b92ea.js} +4 -4
  48. package/dist/esm/{getBorderRadius-178a0a05.js → getBorderRadius-77e97943.js} +1 -1
  49. package/dist/esm/index.js +5 -5
  50. package/dist/esm/{isDarkColor-416d6047.js → isDarkColor-69090b29.js} +1 -1
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/{localization-a51ccbc2.js → localization-0c5b29fd.js} +2 -2
  53. package/dist/esm/{submitGtag-521826a2.js → submitGtag-8a0fbd41.js} +2 -2
  54. package/dist/esm/zonos-address_2.entry.js +5 -5
  55. package/dist/esm/zonos-badge.entry.js +1 -1
  56. package/dist/esm/zonos-banner.entry.js +1 -1
  57. package/dist/esm/zonos-button_2.entry.js +3 -3
  58. package/dist/esm/zonos-card_2.entry.js +1 -1
  59. package/dist/esm/zonos-cart-items_10.entry.js +45 -16
  60. package/dist/esm/zonos-checkout.entry.js +14 -9
  61. package/dist/esm/zonos-controller.entry.js +14 -54
  62. package/dist/esm/zonos-country-flag_4.entry.js +3 -3
  63. package/dist/esm/zonos-elements.js +1 -1
  64. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  65. package/dist/esm/zonos-hello.entry.js +8 -5
  66. package/dist/esm/zonos-icon.entry.js +1 -1
  67. package/dist/esm/zonos-notification.entry.js +1 -1
  68. package/dist/esm/zonos-payment.entry.js +5 -5
  69. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  70. package/dist/esm/zonos-text.entry.js +1 -1
  71. package/dist/esm/{zonosStore-61e74f58.js → zonosStore-34f07ee8.js} +0 -8
  72. package/dist/esm-es5/{cart-b439be00.js → cart-d81b92ea.js} +1 -1
  73. package/dist/esm-es5/{getBorderRadius-178a0a05.js → getBorderRadius-77e97943.js} +1 -1
  74. package/dist/esm-es5/index.js +1 -1
  75. package/dist/esm-es5/{isDarkColor-416d6047.js → isDarkColor-69090b29.js} +1 -1
  76. package/dist/esm-es5/loader.js +1 -1
  77. package/dist/esm-es5/{localization-a51ccbc2.js → localization-0c5b29fd.js} +1 -1
  78. package/dist/esm-es5/{submitGtag-521826a2.js → submitGtag-8a0fbd41.js} +1 -1
  79. package/dist/esm-es5/zonos-address_2.entry.js +1 -1
  80. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  81. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  82. package/dist/esm-es5/zonos-button_2.entry.js +1 -1
  83. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  84. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
  85. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  86. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  87. package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
  88. package/dist/esm-es5/zonos-elements.js +1 -1
  89. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  90. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  91. package/dist/esm-es5/zonos-icon.entry.js +1 -1
  92. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  93. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  94. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  95. package/dist/esm-es5/zonos-text.entry.js +1 -1
  96. package/dist/esm-es5/{zonosStore-61e74f58.js → zonosStore-34f07ee8.js} +1 -1
  97. package/dist/scripts/extractZonosQaUrl.js +1 -30
  98. package/dist/scripts/loadStripe.js +1 -118
  99. package/dist/scripts/loadZonos.js +1 -565
  100. package/dist/scripts/stripe.js +1 -126
  101. package/dist/scripts/zonos.js +1 -565
  102. package/dist/scripts/zonosBase.js +1 -0
  103. package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +3 -3
  104. package/dist/types/components/main/zonos-controller.d.ts +5 -2
  105. package/dist/types/components/store/zonosStore.d.ts +1 -3
  106. package/dist/types/components/utils/api/{getZonosSetting.d.ts → getZonosSettings.d.ts} +1 -1
  107. package/dist/types/components.d.ts +6 -2
  108. package/dist/types/scripts/{zonos.d.ts → zonosBase.d.ts} +6 -3
  109. package/dist/types/types/LogErrorRequestBody.d.ts +5 -0
  110. package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -2
  111. package/dist/types/types/generated/graphql.customer.types.d.ts +80 -0
  112. package/dist/types/types/generated/graphql.customer.types.ts +114 -0
  113. package/dist/types/types/generated/graphql.frontend.types.d.ts +33 -0
  114. package/dist/types/types/generated/graphql.frontend.types.ts +68 -0
  115. package/dist/types/types/global.d.ts +10 -2
  116. package/dist/types/types/hello/HelloConfig.d.ts +0 -1
  117. package/dist/zonos-elements/index.esm.js +1 -1
  118. package/dist/zonos-elements/p-02175f85.entry.js +1 -0
  119. package/dist/zonos-elements/{p-1685c8df.js → p-06a332cd.js} +1 -1
  120. package/dist/zonos-elements/{p-4ed71bd7.entry.js → p-124857ae.entry.js} +1 -1
  121. package/dist/zonos-elements/p-17ef815f.entry.js +1 -0
  122. package/dist/zonos-elements/{p-e98be2d0.system.entry.js → p-1f494581.system.entry.js} +1 -1
  123. package/dist/zonos-elements/p-24fbe845.system.js +1 -1
  124. package/dist/zonos-elements/{p-4846796a.js → p-2b41549a.js} +1 -1
  125. package/dist/zonos-elements/p-2e1e9074.js +1 -0
  126. package/dist/zonos-elements/{p-2801d868.entry.js → p-3509ffaa.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-1d4a970b.entry.js → p-3c8763a7.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-49f09b91.entry.js → p-3e7444c6.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-55f49f1e.js → p-4b3baf99.js} +1 -1
  130. package/dist/zonos-elements/{p-a504f64f.system.js → p-5066955b.system.js} +1 -1
  131. package/dist/zonos-elements/{p-e5ae22a9.system.entry.js → p-53ea93c2.system.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-f367f2fe.system.entry.js → p-5bada106.system.entry.js} +1 -1
  133. package/dist/zonos-elements/{p-f141519c.system.entry.js → p-72cfaee2.system.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-b85be1ab.system.js → p-7730250d.system.js} +1 -1
  135. package/dist/zonos-elements/p-80748529.system.entry.js +1 -0
  136. package/dist/zonos-elements/{p-089ba905.js → p-86f22026.js} +1 -1
  137. package/dist/zonos-elements/{p-a0e36ed3.entry.js → p-88600956.entry.js} +1 -1
  138. package/dist/zonos-elements/{p-89c210d6.entry.js → p-8b1cb8a4.entry.js} +1 -1
  139. package/dist/zonos-elements/p-8bd04aaa.entry.js +1 -0
  140. package/dist/zonos-elements/{p-47390db7.system.entry.js → p-935fa685.system.entry.js} +1 -1
  141. package/dist/zonos-elements/{p-639396bb.entry.js → p-9c1f19b6.entry.js} +1 -1
  142. package/dist/zonos-elements/{p-4d93275c.entry.js → p-a063c4b7.entry.js} +1 -1
  143. package/dist/zonos-elements/p-a174d834.system.js +1 -0
  144. package/dist/zonos-elements/{p-3c6988d7.js → p-a244579e.js} +1 -1
  145. package/dist/zonos-elements/{p-24eed2a8.system.js → p-a54d8db3.system.js} +1 -1
  146. package/dist/zonos-elements/{p-e1f6ab97.entry.js → p-ab00288a.entry.js} +1 -1
  147. package/dist/zonos-elements/{p-b51de536.system.js → p-ab179c88.system.js} +1 -1
  148. package/dist/zonos-elements/{p-4bee0bff.system.entry.js → p-b3a71ae4.system.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-d856a200.system.entry.js → p-b3e034bb.system.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-3cea383b.system.entry.js → p-bb7de2c4.system.entry.js} +1 -1
  151. package/dist/zonos-elements/p-c0494ed6.entry.js +1 -0
  152. package/dist/zonos-elements/{p-da060b1c.system.js → p-c1665c4f.system.js} +1 -1
  153. package/dist/zonos-elements/{p-2f43da39.system.entry.js → p-c1e298d5.system.entry.js} +1 -1
  154. package/dist/zonos-elements/{p-8c5595d9.system.entry.js → p-c520d819.system.entry.js} +1 -1
  155. package/dist/zonos-elements/{p-c9348bb0.system.entry.js → p-ca875e60.system.entry.js} +1 -1
  156. package/dist/zonos-elements/{p-b4601210.system.entry.js → p-ccd1794a.system.entry.js} +1 -1
  157. package/dist/zonos-elements/p-e2c7adaa.system.entry.js +1 -0
  158. package/dist/zonos-elements/{p-b6148206.entry.js → p-e3bca405.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-a376a37f.entry.js → p-e58cc024.entry.js} +1 -1
  160. package/dist/zonos-elements/{p-938803f4.entry.js → p-e6556b0d.entry.js} +1 -1
  161. package/dist/zonos-elements/{p-d2217f09.system.js → p-ed074fbf.system.js} +1 -1
  162. package/dist/zonos-elements/{p-560aa686.system.entry.js → p-f1e9b431.system.entry.js} +1 -1
  163. package/dist/zonos-elements/{p-4a15c5c7.system.entry.js → p-fbc09dae.system.entry.js} +1 -1
  164. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  165. package/package.json +9 -6
  166. package/dist/types/types/online-store/OnlineStoreConfig.d.ts +0 -3
  167. package/dist/zonos-elements/p-06fb9d1f.system.entry.js +0 -1
  168. package/dist/zonos-elements/p-19942abb.system.entry.js +0 -1
  169. package/dist/zonos-elements/p-494c77a7.entry.js +0 -1
  170. package/dist/zonos-elements/p-8c48b75e.system.js +0 -1
  171. package/dist/zonos-elements/p-a3a8b5e7.entry.js +0 -1
  172. package/dist/zonos-elements/p-afe26069.entry.js +0 -1
  173. package/dist/zonos-elements/p-e9b832c5.entry.js +0 -1
  174. package/dist/zonos-elements/p-ff95f098.js +0 -1
  175. /package/dist/collection/types/{online-store/OnlineStoreConfig.js → LogErrorRequestBody.js} +0 -0
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,n,t,r){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?t(e.value):i(e.value).then(a,s)}u((r=r.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(n){return u([e,n])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=n.call(e,t)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-b85be1ab.system.js","./p-b51de536.system.js","./p-da060b1c.system.js","./p-24eed2a8.system.js"],(function(e){"use strict";var n,t,r,i,o,a,s,u,c;return{setters:[function(e){n=e.z;t=e.c},function(e){r=e.h;i=e.l;o=e.a;a=e.b;s=e.t},function(e){u=e.i},function(e){c=e.g}],execute:function(){var l=this;var d=function(){var e=y.stripeLinkEventData;var n=y.stripeAddressEventData;if(!n||!n.complete){throw new Error("Missing stripe address data")}return{checkoutSessionId:B.checkoutSessionId||"",contact:{email:(e===null||e===void 0?void 0:e.value.email)||"",firstName:n.value.firstName||"",lastName:n.value.lastName||"",phone:n.value.phone||""},items:B.items.map((function(e){return e})),shippingAddress:{addressLine1:n.value.address.line1,addressLine2:n.value.address.line2||"",city:n.value.address.city,country:n.value.address.country,postalCode:n.value.address.postal_code,state:n.value.address.state}}};var v=function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,i,o,a,s;return __generator(this,(function(u){switch(u.label){case 0:t=d();return[4,e(t.checkoutSessionId,t.contact,t.shippingAddress)];case 1:i=u.sent();if(!i){throw new Error("Failed to build landed cost")}return[4,r("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/validate-landed-cost"),{body:i,headers:{"Content-Type":"application/json"},method:"POST"})];case 2:o=u.sent(),a=o.errors,s=o.json;if(!s||a.length){throw new Error("Invalid landed cost object: ".concat(((n=a.find(Boolean))===null||n===void 0?void 0:n.message)||"Unknown error"))}return[2,i]}}))}))};var f=function(e){return __awaiter(l,void 0,void 0,(function(){var t,i,o,a,s,u;return __generator(this,(function(c){switch(c.label){case 0:t=n.checkoutSettings.buildLandedCost;if(!t)return[3,2];return[4,v(t)];case 1:i=c.sent();return[2,i];case 2:o="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/calculate-landed-cost");return[4,r(o,{body:d(),method:"POST",signal:e===null||e===void 0?void 0:e.signal})];case 3:a=c.sent(),s=a.errors,u=a.json;if(s.length||!u){throw new Error("Failed to calculate landed cost")}return[2,u]}}))}))};var h=function(e){var n=e.theme;switch(n){default:return{".Input":{padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"}}}};var p=function(e){var n=e.borderStyle,t=e.theme;switch(t){case"DARK":return{borderRadius:c(n),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"};default:return{borderRadius:c(n)}}};var m=t((function(){return{clientSecret:sessionStorage.getItem("zonos--client-secret")||null,fetchingLandedCostAbordController:null,isFetchingLandedCost:false,isFetchingSession:false,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenFetchingLC:null,stripeBillingAddressElement:null,stripeElements:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null}})),g=m.onChange,w=m.reset,y=m.state;e("s",y);var _=function(e){var t=e.clientSecret,r=e.overrideBorderRaidus,i=e.overridePrimaryColor,a=e.overrideTheme;var s=i||n.appearance.colorPrimary;var c=s&&u(s)?"night":"flat";var l=a==="DARK"?"night":"flat";return{appearance:{labels:"floating",rules:Object.assign({},h({theme:"LIGHT"})),theme:a?l:c,variables:Object.assign({},p({borderStyle:r,theme:"LIGHT"}))},clientSecret:t,locale:o.selectedLocale}};var S=e("k",(function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,r,o;return __generator(this,(function(a){t=y.clientSecret;if(!y.stripe){i("Skip. Stripe is not initialized");return[2]}if(t){r=_({clientSecret:t,overrideBorderRaidus:e===null||e===void 0?void 0:e.overrideBorderRaidus,overridePrimaryColor:e===null||e===void 0?void 0:e.overridePrimaryColor,overrideTheme:e===null||e===void 0?void 0:e.overrideTheme});o=JSON.stringify(r)===JSON.stringify(y.stripeElementsOptions);if(!y.stripeElements){y.stripeElements=(n=y.stripe)===null||n===void 0?void 0:n.elements(r);y.stripeElementsOptions=r;i("Stripe elements initialized");return[2]}if(!o){y.stripeElements.update(r);y.stripeElementsOptions=r}i("Stripe elements initialized")}return[2]}))}))}));var b=e("o",(function(){sessionStorage.removeItem("zonos--client-secret");w();y.stripe=window.Zonos.stripe}));var k=function(){var e,n,t,r;var i=y.fetchingLandedCostAbordController;if(!i){return false}var o=JSON.stringify((e=y.stripeLinkUsedWhenFetchingLC)===null||e===void 0?void 0:e.value)!==JSON.stringify((n=y.stripeLinkEventData)===null||n===void 0?void 0:n.value);var a=JSON.stringify((t=y.stripeAddressUsedWhenFetchingLC)===null||t===void 0?void 0:t.value)!==JSON.stringify((r=y.stripeAddressEventData)===null||r===void 0?void 0:r.value);return o||a};var C=e("m",(function(){return __awaiter(l,void 0,void 0,(function(){var e,n,t,r,i,o,s,u,c,l,d,v,h,p;return __generator(this,(function(m){switch(m.label){case 0:i=!!((e=y.stripeAddressEventData)===null||e===void 0?void 0:e.complete);o=!!((n=y.stripeLinkEventData)===null||n===void 0?void 0:n.complete);s=k();if(s){(t=y.fetchingLandedCostAbordController)===null||t===void 0?void 0:t.abort();y.fetchingLandedCostAbordController=null}if(!(i&&o&&(s||!y.isFetchingLandedCost)))return[3,5];y.isFetchingLandedCost=true;if(y.stripeAddressEventData){y.stripeAddressUsedWhenFetchingLC=Object.assign({},y.stripeAddressEventData)}if(y.stripeLinkEventData){y.stripeLinkUsedWhenFetchingLC=Object.assign({},y.stripeLinkEventData)}m.label=1;case 1:m.trys.push([1,3,,4]);u=new AbortController;y.fetchingLandedCostAbordController=u;return[4,f(u)];case 2:c=m.sent(),l=c.checkoutSessionWorkflow,d=c.shipmentRatingCalculateWorkflow;y.fetchingLandedCostAbordController=null;B.landedCostData=(l===null||l===void 0?void 0:l.filter(Boolean))||null;B.shippingData=(d===null||d===void 0?void 0:d.filter(Boolean))||null;v=(r=B.landedCostData)===null||r===void 0?void 0:r.find(Boolean);h=!!v?v.subtotals:null;if(h){J({exchangeRate:h.exchangeRate,items:h.items,landedCostTotal:0,presentmentCurrencyCode:h.presentmentCurrencyCode,shipping:0,total:h.items})}return[3,4];case 3:p=m.sent();a(p);return[3,4];case 4:y.isFetchingLandedCost=false;m.label=5;case 5:return[2]}}))}))}));var E=function(e){var n=[];var t=true;switch(e){case"succeeded":{n=[s("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"","",s("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")];t=false;break}case"requires_capture":case"processing":{n=[s("Payment processing. We'll update you when payment is received.")];t=false;break}case"requires_payment_method":{n=[s("Payment failed. Please try another payment method.")];break}default:{n=[s("Something went wrong.")];break}}return{isError:t,messages:n}};var O=e("p",(function(e){var n=e.clientSecret,t=e.storybookForceStatus;return __awaiter(l,void 0,void 0,(function(){var e,r,i,o,u,c,l,d,v;return __generator(this,(function(f){switch(f.label){case 0:if(t){e=E(t),r=e.isError,i=e.messages;return[2,{error:r,messages:i}]}o=n||y.clientSecret;if(!y.stripe||!o){a("Failed to retrieve payment intent. Stripe is not initialized");return[2,{error:true,message:[s("Something went wrong.")]}]}return[4,y.stripe.retrievePaymentIntent(o)];case 1:u=f.sent().paymentIntent;c=u===null||u===void 0?void 0:u.status;l=E(c),d=l.isError,v=l.messages;return[2,{error:d,messages:v}]}}))}))}));var T=e("n",(function(){return __awaiter(l,void 0,void 0,(function(){var e,n,t,r,i,o,a,s;return __generator(this,(function(u){switch(u.label){case 0:r=!!((e=y.stripePaymentEventData)===null||e===void 0?void 0:e.complete);i=y.stripeElements;o=y.stripe;a=y.clientSecret;if(!(o&&i&&r&&a))return[3,2];return[4,o.confirmPayment({confirmParams:{receipt_email:(t=(n=y.stripeLinkEventData)===null||n===void 0?void 0:n.value)===null||t===void 0?void 0:t.email,return_url:window.location.href},elements:i,redirect:"if_required"})];case 1:s=u.sent().error;if(s){if(s.type==="card_error"||s.type==="validation_error"){throw new Error(s.message)}if(s.type==="invalid_request_error"){if(s.code==="payment_intent_unexpected_state"){return[2]}}throw new Error("An unexpected error occurred.")}u.label=2;case 2:return[2]}}))}))}));var x=e("l",(function(){return __awaiter(l,void 0,void 0,(function(){var e,n,t,s,u,c;return __generator(this,(function(l){switch(l.label){case 0:n=B.items.reduce((function(e,n){return e+n.amount*n.quantity}),0);if(!n||!o.targetCurrency){a("Fail to create checkout session - invalid total or currency");return[2,false]}y.isFetchingSession=true;return[4,r("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/create-checkout-session"),{body:{currency:((e=B.items.find(Boolean))===null||e===void 0?void 0:e.currencyCode)||"",itemsAmount:n,presentmentCountryCode:o.selectedCountryCode||null},method:"POST"})];case 1:t=l.sent(),s=t.errors,u=t.json;y.isFetchingSession=false;if(s.length||!u){a("Error occurs when creating checkout session",JSON.stringify(s,null,2));return[2,false]}c=u.checkoutSessionCreate;y.clientSecret=c.clientSecret;B.checkoutSessionId=c.id;J(Object.assign(Object.assign({},c.subtotals),{landedCostTotal:0,shipping:0,total:c.subtotals.items}));i("Exchange rate updated for cart items (checkout session create)","info",B.exchangeRate);i("done-init-checkout-session");return[2,true]}}))}))}));var A=function(e){var n=e.currency,t=e.id,i=e.itemsAmount,o=e.landedCostId,s=e.presentmentCountryCode;return __awaiter(l,void 0,void 0,(function(){var e,u,c;return __generator(this,(function(l){switch(l.label){case 0:return[4,r("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/update-checkout-session"),{body:{currency:n,id:t,itemsAmount:i,landedCostId:o,presentmentCountryCode:s},method:"POST"})];case 1:e=l.sent(),u=e.errors,c=e.json;if(u.length||!c){a("Error occurs when updating checkout session",JSON.stringify(u,null,2));return[2,{errors:u,json:c}]}return[2,{errors:[],json:c}]}}))}))};g("clientSecret",(function(e){if(e&&y.stripe){sessionStorage.setItem("zonos--client-secret",e)}if(!e){sessionStorage.removeItem("zonos--client-secret")}}));var j=function(e){var n=e.date,t=e.formatOptions,r=t===void 0?{day:"numeric",weekday:"long",year:"numeric"}:t;return new Intl.DateTimeFormat("en-US",r).format(n)};var z=function(e){var n=new Date;var t=e.getTime()-n.getTime();var r=Math.floor(t/(1e3*60*60*24));return r};var D=t((function(){return{checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id")||null,currency:"USD",dutiesTaxFees:0,error:null,exchangeRate:null,isSelectedShippingAboveDeminimis:false,isSelectedShippingGuarantee:false,items:[],landedCostData:null,selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,step:"customer-info",subtotal:0,total:0}})),P=D.onChange,L=D.reset,B=D.state;e("c",B);var I=e("b",(function(e){var n=e.minTransitAt?z(new Date(e.minTransitAt)):"";var t=e.maxTransitAt?z(new Date(e.maxTransitAt)):"";var r=e.minTransitAt?j({date:new Date(e.minTransitAt)}):"";return{expectedDate:r,maxTransit:t,minTransit:n}}));var N=e("g",(function(){sessionStorage.removeItem("zonos--checkout-session-id");L()}));var F=e("j",(function(e){var n=e.messages,t=e.title;B.step="error";B.error={messages:n,title:t}}));var J=e("a",(function(e){B.exchangeRate=e.exchangeRate;B.dutiesTaxFees=e.landedCostTotal;B.subtotal=e.items;B.total=e.total;B.currency=e.presentmentCurrencyCode}));var R=e("f",(function(e){var n=e.currency,t=e.itemsAmount,r=e.landedCostId;return __awaiter(l,void 0,void 0,(function(){var e,u;return __generator(this,(function(c){switch(c.label){case 0:if(r&&B.selectedLandedCost){e=B.selectedLandedCost.subtotals;J(e);i("Exchange rate updated for cart items (landed cost subtotal)","info",B.exchangeRate)}if(!B.checkoutSessionId){a("Could not update cart total without checkout session id");return[2,false]}return[4,A({currency:n,id:B.checkoutSessionId,itemsAmount:t,landedCostId:r,presentmentCountryCode:o.selectedCountryCode})];case 1:u=c.sent().json;if(!u){a("Error occurs when updating checkout session");F({messages:[s("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists")],title:s("Error updating Checkout")});return[2,false]}if(!r){J(u.checkoutSessionUpdate.subtotals);i("Exchange rate updated for cart items (checkout session update)","info",B.exchangeRate)}return[2,true]}}))}))}));var U=e("i",(function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,r,i,o,a,s,u,c,l,d,v,f;return __generator(this,(function(h){switch(h.label){case 0:B.selectedShippingOption=e;a=I(B.selectedShippingOption),s=a.expectedDate,u=a.maxTransit,c=a.minTransit;B.selectedShippingOptionExpectedDate=s;B.selectedShippingOptionTransitTime=c&&u?"".concat(c,"-").concat(u):"".concat(c||u);l=(n=B.landedCostData)===null||n===void 0?void 0:n.find((function(e){var n,t,r;return((t=(n=e.landedCost)===null||n===void 0?void 0:n.shipmentRating)===null||t===void 0?void 0:t.id)===((r=B.selectedShippingOption)===null||r===void 0?void 0:r.id)}));B.selectedLandedCost=l||null;if(!l){return[2,false]}B.shipping=l.subtotals.shipping;d=((t=l===null||l===void 0?void 0:l.landedCost)===null||t===void 0?void 0:t.landedCostGuaranteeCode)==="ZONOS";v=!!((i=(r=l===null||l===void 0?void 0:l.landedCost)===null||r===void 0?void 0:r.deMinimis)===null||i===void 0?void 0:i.find((function(e){return["DUTY","TAX"].includes(e.type)&&e.threshold==="ABOVE"})));B.isSelectedShippingAboveDeminimis=v;B.isSelectedShippingGuarantee=d;return[4,R({landedCostId:(o=l.landedCost)===null||o===void 0?void 0:o.id})];case 1:f=h.sent();return[2,f]}}))}))}));P("checkoutSessionId",(function(){if(!B.checkoutSessionId){sessionStorage.removeItem("zonos--checkout-session-id");return}sessionStorage.setItem("zonos--checkout-session-id",B.checkoutSessionId)}));var W=e("h",(function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,r;return __generator(this,(function(i){switch(i.label){case 0:B.items=e;t=(n=e.find(Boolean))===null||n===void 0?void 0:n.currencyCode;r=e.reduce((function(e,n){return e+n.amount*n.quantity}),0);if(!t||!r){return[2]}B.currency=t;y.isFetchingSession=true;return[4,R({currency:t,itemsAmount:r})];case 1:i.sent();y.isFetchingSession=false;return[2]}}))}))}));var q=function(){B.selectedShippingOption=null;B.isSelectedShippingAboveDeminimis=false;B.isSelectedShippingGuarantee=false;B.selectedShippingOptionExpectedDate="";B.selectedShippingOptionTransitTime="";B.shipping=0};var G=e("d",(function(){if(B.step==="customer-info"){B.step="shipping"}else if(B.step==="shipping"){B.step="payment"}else if(B.step==="payment"){B.step="finish"}}));var H=e("e",(function(){if(B.step==="payment"){B.step="shipping"}else if(B.step==="shipping"){B.step="customer-info";q()}}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,n,t,r){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?t(e.value):i(e.value).then(a,s)}u((r=r.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(n){return u([e,n])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=n.call(e,t)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-7730250d.system.js","./p-ab179c88.system.js","./p-c1665c4f.system.js","./p-a54d8db3.system.js"],(function(e){"use strict";var n,t,r,i,o,a,s,u,c;return{setters:[function(e){n=e.z;t=e.c},function(e){r=e.h;i=e.l;o=e.a;a=e.b;s=e.t},function(e){u=e.i},function(e){c=e.g}],execute:function(){var l=this;var d=function(){var e=y.stripeLinkEventData;var n=y.stripeAddressEventData;if(!n||!n.complete){throw new Error("Missing stripe address data")}return{checkoutSessionId:B.checkoutSessionId||"",contact:{email:(e===null||e===void 0?void 0:e.value.email)||"",firstName:n.value.firstName||"",lastName:n.value.lastName||"",phone:n.value.phone||""},items:B.items.map((function(e){return e})),shippingAddress:{addressLine1:n.value.address.line1,addressLine2:n.value.address.line2||"",city:n.value.address.city,country:n.value.address.country,postalCode:n.value.address.postal_code,state:n.value.address.state}}};var v=function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,i,o,a,s;return __generator(this,(function(u){switch(u.label){case 0:t=d();return[4,e(t.checkoutSessionId,t.contact,t.shippingAddress)];case 1:i=u.sent();if(!i){throw new Error("Failed to build landed cost")}return[4,r("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/validate-landed-cost"),{body:i,headers:{"Content-Type":"application/json"},method:"POST"})];case 2:o=u.sent(),a=o.errors,s=o.json;if(!s||a.length){throw new Error("Invalid landed cost object: ".concat(((n=a.find(Boolean))===null||n===void 0?void 0:n.message)||"Unknown error"))}return[2,i]}}))}))};var f=function(e){return __awaiter(l,void 0,void 0,(function(){var t,i,o,a,s,u;return __generator(this,(function(c){switch(c.label){case 0:t=n.checkoutSettings.buildLandedCost;if(!t)return[3,2];return[4,v(t)];case 1:i=c.sent();return[2,i];case 2:o="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/calculate-landed-cost");return[4,r(o,{body:d(),method:"POST",signal:e===null||e===void 0?void 0:e.signal})];case 3:a=c.sent(),s=a.errors,u=a.json;if(s.length||!u){throw new Error("Failed to calculate landed cost")}return[2,u]}}))}))};var h=function(e){var n=e.theme;switch(n){default:return{".Input":{padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"}}}};var p=function(e){var n=e.borderStyle,t=e.theme;switch(t){case"DARK":return{borderRadius:c(n),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"};default:return{borderRadius:c(n)}}};var m=t((function(){return{clientSecret:sessionStorage.getItem("zonos--client-secret")||null,fetchingLandedCostAbordController:null,isFetchingLandedCost:false,isFetchingSession:false,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenFetchingLC:null,stripeBillingAddressElement:null,stripeElements:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null}})),g=m.onChange,w=m.reset,y=m.state;e("s",y);var _=function(e){var t=e.clientSecret,r=e.overrideBorderRaidus,i=e.overridePrimaryColor,a=e.overrideTheme;var s=i||n.appearance.colorPrimary;var c=s&&u(s)?"night":"flat";var l=a==="DARK"?"night":"flat";return{appearance:{labels:"floating",rules:Object.assign({},h({theme:"LIGHT"})),theme:a?l:c,variables:Object.assign({},p({borderStyle:r,theme:"LIGHT"}))},clientSecret:t,locale:o.selectedLocale}};var S=e("k",(function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,r,o;return __generator(this,(function(a){t=y.clientSecret;if(!y.stripe){i("Skip. Stripe is not initialized");return[2]}if(t){r=_({clientSecret:t,overrideBorderRaidus:e===null||e===void 0?void 0:e.overrideBorderRaidus,overridePrimaryColor:e===null||e===void 0?void 0:e.overridePrimaryColor,overrideTheme:e===null||e===void 0?void 0:e.overrideTheme});o=JSON.stringify(r)===JSON.stringify(y.stripeElementsOptions);if(!y.stripeElements){y.stripeElements=(n=y.stripe)===null||n===void 0?void 0:n.elements(r);y.stripeElementsOptions=r;i("Stripe elements initialized");return[2]}if(!o){y.stripeElements.update(r);y.stripeElementsOptions=r}i("Stripe elements initialized")}return[2]}))}))}));var b=e("o",(function(){sessionStorage.removeItem("zonos--client-secret");w();y.stripe=window.Zonos.stripe}));var k=function(){var e,n,t,r;var i=y.fetchingLandedCostAbordController;if(!i){return false}var o=JSON.stringify((e=y.stripeLinkUsedWhenFetchingLC)===null||e===void 0?void 0:e.value)!==JSON.stringify((n=y.stripeLinkEventData)===null||n===void 0?void 0:n.value);var a=JSON.stringify((t=y.stripeAddressUsedWhenFetchingLC)===null||t===void 0?void 0:t.value)!==JSON.stringify((r=y.stripeAddressEventData)===null||r===void 0?void 0:r.value);return o||a};var C=e("m",(function(){return __awaiter(l,void 0,void 0,(function(){var e,n,t,r,i,o,s,u,c,l,d,v,h,p;return __generator(this,(function(m){switch(m.label){case 0:i=!!((e=y.stripeAddressEventData)===null||e===void 0?void 0:e.complete);o=!!((n=y.stripeLinkEventData)===null||n===void 0?void 0:n.complete);s=k();if(s){(t=y.fetchingLandedCostAbordController)===null||t===void 0?void 0:t.abort();y.fetchingLandedCostAbordController=null}if(!(i&&o&&(s||!y.isFetchingLandedCost)))return[3,5];y.isFetchingLandedCost=true;if(y.stripeAddressEventData){y.stripeAddressUsedWhenFetchingLC=Object.assign({},y.stripeAddressEventData)}if(y.stripeLinkEventData){y.stripeLinkUsedWhenFetchingLC=Object.assign({},y.stripeLinkEventData)}m.label=1;case 1:m.trys.push([1,3,,4]);u=new AbortController;y.fetchingLandedCostAbordController=u;return[4,f(u)];case 2:c=m.sent(),l=c.checkoutSessionWorkflow,d=c.shipmentRatingCalculateWorkflow;y.fetchingLandedCostAbordController=null;B.landedCostData=(l===null||l===void 0?void 0:l.filter(Boolean))||null;B.shippingData=(d===null||d===void 0?void 0:d.filter(Boolean))||null;v=(r=B.landedCostData)===null||r===void 0?void 0:r.find(Boolean);h=!!v?v.subtotals:null;if(h){J({exchangeRate:h.exchangeRate,items:h.items,landedCostTotal:0,presentmentCurrencyCode:h.presentmentCurrencyCode,shipping:0,total:h.items})}return[3,4];case 3:p=m.sent();a(p);return[3,4];case 4:y.isFetchingLandedCost=false;m.label=5;case 5:return[2]}}))}))}));var E=function(e){var n=[];var t=true;switch(e){case"succeeded":{n=[s("Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us."),"","",s("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.")];t=false;break}case"requires_capture":case"processing":{n=[s("Payment processing. We'll update you when payment is received.")];t=false;break}case"requires_payment_method":{n=[s("Payment failed. Please try another payment method.")];break}default:{n=[s("Something went wrong.")];break}}return{isError:t,messages:n}};var O=e("p",(function(e){var n=e.clientSecret,t=e.storybookForceStatus;return __awaiter(l,void 0,void 0,(function(){var e,r,i,o,u,c,l,d,v;return __generator(this,(function(f){switch(f.label){case 0:if(t){e=E(t),r=e.isError,i=e.messages;return[2,{error:r,messages:i}]}o=n||y.clientSecret;if(!y.stripe||!o){a("Failed to retrieve payment intent. Stripe is not initialized");return[2,{error:true,message:[s("Something went wrong.")]}]}return[4,y.stripe.retrievePaymentIntent(o)];case 1:u=f.sent().paymentIntent;c=u===null||u===void 0?void 0:u.status;l=E(c),d=l.isError,v=l.messages;return[2,{error:d,messages:v}]}}))}))}));var T=e("n",(function(){return __awaiter(l,void 0,void 0,(function(){var e,n,t,r,i,o,a,s;return __generator(this,(function(u){switch(u.label){case 0:r=!!((e=y.stripePaymentEventData)===null||e===void 0?void 0:e.complete);i=y.stripeElements;o=y.stripe;a=y.clientSecret;if(!(o&&i&&r&&a))return[3,2];return[4,o.confirmPayment({confirmParams:{receipt_email:(t=(n=y.stripeLinkEventData)===null||n===void 0?void 0:n.value)===null||t===void 0?void 0:t.email,return_url:window.location.href},elements:i,redirect:"if_required"})];case 1:s=u.sent().error;if(s){if(s.type==="card_error"||s.type==="validation_error"){throw new Error(s.message)}if(s.type==="invalid_request_error"){if(s.code==="payment_intent_unexpected_state"){return[2]}}throw new Error("An unexpected error occurred.")}u.label=2;case 2:return[2]}}))}))}));var x=e("l",(function(){return __awaiter(l,void 0,void 0,(function(){var e,n,t,s,u,c;return __generator(this,(function(l){switch(l.label){case 0:n=B.items.reduce((function(e,n){return e+n.amount*n.quantity}),0);if(!n||!o.targetCurrency){a("Fail to create checkout session - invalid total or currency");return[2,false]}y.isFetchingSession=true;return[4,r("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/create-checkout-session"),{body:{currency:((e=B.items.find(Boolean))===null||e===void 0?void 0:e.currencyCode)||"",itemsAmount:n,presentmentCountryCode:o.selectedCountryCode||null},method:"POST"})];case 1:t=l.sent(),s=t.errors,u=t.json;y.isFetchingSession=false;if(s.length||!u){a("Error occurs when creating checkout session",JSON.stringify(s,null,2));return[2,false]}c=u.checkoutSessionCreate;y.clientSecret=c.clientSecret;B.checkoutSessionId=c.id;J(Object.assign(Object.assign({},c.subtotals),{landedCostTotal:0,shipping:0,total:c.subtotals.items}));i("Exchange rate updated for cart items (checkout session create)","info",B.exchangeRate);i("done-init-checkout-session");return[2,true]}}))}))}));var A=function(e){var n=e.currency,t=e.id,i=e.itemsAmount,o=e.landedCostId,s=e.presentmentCountryCode;return __awaiter(l,void 0,void 0,(function(){var e,u,c;return __generator(this,(function(l){switch(l.label){case 0:return[4,r("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/update-checkout-session"),{body:{currency:n,id:t,itemsAmount:i,landedCostId:o,presentmentCountryCode:s},method:"POST"})];case 1:e=l.sent(),u=e.errors,c=e.json;if(u.length||!c){a("Error occurs when updating checkout session",JSON.stringify(u,null,2));return[2,{errors:u,json:c}]}return[2,{errors:[],json:c}]}}))}))};g("clientSecret",(function(e){if(e&&y.stripe){sessionStorage.setItem("zonos--client-secret",e)}if(!e){sessionStorage.removeItem("zonos--client-secret")}}));var j=function(e){var n=e.date,t=e.formatOptions,r=t===void 0?{day:"numeric",weekday:"long",year:"numeric"}:t;return new Intl.DateTimeFormat("en-US",r).format(n)};var z=function(e){var n=new Date;var t=e.getTime()-n.getTime();var r=Math.floor(t/(1e3*60*60*24));return r};var D=t((function(){return{checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id")||null,currency:"USD",dutiesTaxFees:0,error:null,exchangeRate:null,isSelectedShippingAboveDeminimis:false,isSelectedShippingGuarantee:false,items:[],landedCostData:null,selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,step:"customer-info",subtotal:0,total:0}})),P=D.onChange,L=D.reset,B=D.state;e("c",B);var I=e("b",(function(e){var n=e.minTransitAt?z(new Date(e.minTransitAt)):"";var t=e.maxTransitAt?z(new Date(e.maxTransitAt)):"";var r=e.minTransitAt?j({date:new Date(e.minTransitAt)}):"";return{expectedDate:r,maxTransit:t,minTransit:n}}));var N=e("g",(function(){sessionStorage.removeItem("zonos--checkout-session-id");L()}));var F=e("j",(function(e){var n=e.messages,t=e.title;B.step="error";B.error={messages:n,title:t}}));var J=e("a",(function(e){B.exchangeRate=e.exchangeRate;B.dutiesTaxFees=e.landedCostTotal;B.subtotal=e.items;B.total=e.total;B.currency=e.presentmentCurrencyCode}));var R=e("f",(function(e){var n=e.currency,t=e.itemsAmount,r=e.landedCostId;return __awaiter(l,void 0,void 0,(function(){var e,u;return __generator(this,(function(c){switch(c.label){case 0:if(r&&B.selectedLandedCost){e=B.selectedLandedCost.subtotals;J(e);i("Exchange rate updated for cart items (landed cost subtotal)","info",B.exchangeRate)}if(!B.checkoutSessionId){a("Could not update cart total without checkout session id");return[2,false]}return[4,A({currency:n,id:B.checkoutSessionId,itemsAmount:t,landedCostId:r,presentmentCountryCode:o.selectedCountryCode})];case 1:u=c.sent().json;if(!u){a("Error occurs when updating checkout session");F({messages:[s("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists")],title:s("Error updating Checkout")});return[2,false]}if(!r){J(u.checkoutSessionUpdate.subtotals);i("Exchange rate updated for cart items (checkout session update)","info",B.exchangeRate)}return[2,true]}}))}))}));var U=e("i",(function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,r,i,o,a,s,u,c,l,d,v,f;return __generator(this,(function(h){switch(h.label){case 0:B.selectedShippingOption=e;a=I(B.selectedShippingOption),s=a.expectedDate,u=a.maxTransit,c=a.minTransit;B.selectedShippingOptionExpectedDate=s;B.selectedShippingOptionTransitTime=c&&u?"".concat(c,"-").concat(u):"".concat(c||u);l=(n=B.landedCostData)===null||n===void 0?void 0:n.find((function(e){var n,t,r;return((t=(n=e.landedCost)===null||n===void 0?void 0:n.shipmentRating)===null||t===void 0?void 0:t.id)===((r=B.selectedShippingOption)===null||r===void 0?void 0:r.id)}));B.selectedLandedCost=l||null;if(!l){return[2,false]}B.shipping=l.subtotals.shipping;d=((t=l===null||l===void 0?void 0:l.landedCost)===null||t===void 0?void 0:t.landedCostGuaranteeCode)==="ZONOS";v=!!((i=(r=l===null||l===void 0?void 0:l.landedCost)===null||r===void 0?void 0:r.deMinimis)===null||i===void 0?void 0:i.find((function(e){return["DUTY","TAX"].includes(e.type)&&e.threshold==="ABOVE"})));B.isSelectedShippingAboveDeminimis=v;B.isSelectedShippingGuarantee=d;return[4,R({landedCostId:(o=l.landedCost)===null||o===void 0?void 0:o.id})];case 1:f=h.sent();return[2,f]}}))}))}));P("checkoutSessionId",(function(){if(!B.checkoutSessionId){sessionStorage.removeItem("zonos--checkout-session-id");return}sessionStorage.setItem("zonos--checkout-session-id",B.checkoutSessionId)}));var W=e("h",(function(e){return __awaiter(l,void 0,void 0,(function(){var n,t,r;return __generator(this,(function(i){switch(i.label){case 0:B.items=e;t=(n=e.find(Boolean))===null||n===void 0?void 0:n.currencyCode;r=e.reduce((function(e,n){return e+n.amount*n.quantity}),0);if(!t||!r){return[2]}B.currency=t;y.isFetchingSession=true;return[4,R({currency:t,itemsAmount:r})];case 1:i.sent();y.isFetchingSession=false;return[2]}}))}))}));var q=function(){B.selectedShippingOption=null;B.isSelectedShippingAboveDeminimis=false;B.isSelectedShippingGuarantee=false;B.selectedShippingOptionExpectedDate="";B.selectedShippingOptionTransitTime="";B.shipping=0};var G=e("d",(function(){if(B.step==="customer-info"){B.step="shipping"}else if(B.step==="shipping"){B.step="payment"}else if(B.step==="payment"){B.step="finish"}}));var H=e("e",(function(){if(B.step==="payment"){B.step="shipping"}else if(B.step==="shipping"){B.step="customer-info";q()}}))}}}));
@@ -1 +1 @@
1
- System.register(["./p-18904b7c.system.js","./p-b85be1ab.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,a,i,o,e;return{setters:[function(t){s=t.r;a=t.h;i=t.H},function(t){o=t.e},function(t){e=t.c}],execute:function(){var r=":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 .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";var n=t("zonos_card",function(){function t(t){s(this,t);this.actions=undefined;this.class=undefined;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}t.prototype.render=function(){return a(i,{style:{"--font-family":o()}},a("div",{class:e(["styled-card",this.class]),style:{padding:this.spacing}},this.label&&a("header",{class:"card-header",style:{padding:this.spacing}},a("zonos-text",{type:"subheader"},this.label),a("h-stack",{spacing:8},this.actions)),a("slot",null),(this.footerActions||this.footerContent)&&a("footer",{class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},a("div",null,this.footerContent),a("h-stack",{spacing:8},this.footerActions))))};return t}());n.style=r;var h=":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";var d=t("zonos_v_stack",function(){function t(t){s(this,t);this.spacing=24;this.class=""}t.prototype.render=function(){return a(i,{style:{"--font-family":o()}},a("div",{class:e(["vstack",this.class]),style:{"grid-row-gap":"".concat(this.spacing,"px")}},a("slot",null)))};return t}());d.style=h}}}));
1
+ System.register(["./p-18904b7c.system.js","./p-7730250d.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,a,i,o,e;return{setters:[function(t){s=t.r;a=t.h;i=t.H},function(t){o=t.e},function(t){e=t.c}],execute:function(){var r=":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 .styled-card{border:var(--amino-border);border-radius:var(--amino-radius-6);padding:var(--spacing, var(--amino-space-24));text-align:left}:host .styled-card hr{margin-left:calc(var(--spacing, var(--amino-space-24)) * -1);margin-right:calc(var(--spacing, var(--amino-space-24)) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, var(--amino-space-24));border-bottom:var(--amino-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, var(--amino-space-24)) * -1);padding:var(--spacing, var(--amino-space-24));border-top:var(--amino-border);background:var(--amino-surface-color-secondary);margin-top:var(--spacing, var(--amino-space-24));border-bottom-left-radius:var(--amino-radius-8);border-bottom-right-radius:var(--amino-radius-8);height:var(--footerHeight)}";var n=t("zonos_card",function(){function t(t){s(this,t);this.actions=undefined;this.class=undefined;this.footerActions=undefined;this.footerContent=undefined;this.footerHeight=undefined;this.label=undefined;this.spacing="24px"}t.prototype.render=function(){return a(i,{style:{"--font-family":o()}},a("div",{class:e(["styled-card",this.class]),style:{padding:this.spacing}},this.label&&a("header",{class:"card-header",style:{padding:this.spacing}},a("zonos-text",{type:"subheader"},this.label),a("h-stack",{spacing:8},this.actions)),a("slot",null),(this.footerActions||this.footerContent)&&a("footer",{class:"card-footer",style:{height:this.footerHeight?"".concat(this.footerHeight,"px"):"auto",padding:this.spacing}},a("div",null,this.footerContent),a("h-stack",{spacing:8},this.footerActions))))};return t}());n.style=r;var h=":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 .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";var d=t("zonos_v_stack",function(){function t(t){s(this,t);this.spacing=24;this.class=""}t.prototype.render=function(){return a(i,{style:{"--font-family":o()}},a("div",{class:e(["vstack",this.class]),style:{"grid-row-gap":"".concat(this.spacing,"px")}},a("slot",null)))};return t}());d.style=h}}}));
@@ -1 +1 @@
1
- System.register(["./p-18904b7c.system.js","./p-d2217f09.system.js","./p-b85be1ab.system.js","./p-b51de536.system.js","./p-da060b1c.system.js","./p-24eed2a8.system.js"],(function(n){"use strict";var t,s,o,e,a;return{setters:[function(n){t=n.r;s=n.h;o=n.H;e=n.d},function(n){a=n.s},function(){},function(){},function(){},function(){}],execute:function(){var c=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";var m=n("zonos_payment",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=a.stripe;this.stripeElements=a.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var t=this.el.querySelector(".zonos--payment-component");if(!t){console.error("Cannot find container element for paymentElement");return}n.mount(t);n.on("change",(function(n){a.stripePaymentEventData=n}));a.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return s(o,{class:"zonos--payment zonos--elements"},this.titleText&&s("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());m.style=c}}}));
1
+ System.register(["./p-18904b7c.system.js","./p-ed074fbf.system.js","./p-7730250d.system.js","./p-ab179c88.system.js","./p-c1665c4f.system.js","./p-a54d8db3.system.js"],(function(n){"use strict";var t,s,o,e,a;return{setters:[function(n){t=n.r;s=n.h;o=n.H;e=n.d},function(n){a=n.s},function(){},function(){},function(){},function(){}],execute:function(){var c=".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";var m=n("zonos_payment",function(){function n(n){t(this,n);this.titleText=undefined;this.stripe=a.stripe;this.stripeElements=a.stripeElements}n.prototype.watchInitStripe=function(){if(!this.stripeElements){return}var n=a.stripePaymentElement||this.stripeElements.create("payment",{layout:"tabs"});var t=this.el.querySelector(".zonos--payment-component");if(!t){console.error("Cannot find container element for paymentElement");return}n.mount(t);n.on("change",(function(n){a.stripePaymentEventData=n}));a.stripePaymentElement=n};n.prototype.componentDidLoad=function(){this.watchInitStripe()};n.prototype.render=function(){return s(o,{class:"zonos--payment zonos--elements"},this.titleText&&s("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),s("div",{class:"zonos--payment-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return e(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}},enumerable:false,configurable:true});return n}());m.style=c}}}));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-956efa27.js";export{s as setNonce}from"./p-956efa27.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-938803f4",[[1,"zonos-text",{class:[1],color:[1],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-afe26069",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["p-e9b832c5",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64]},[[9,"resize","handleResize"]]]]],["p-a3a8b5e7",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64]}]]],["p-684ed483",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-4ed71bd7",[[1,"zonos-country-select",{closeCountrySelect:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[1,"zonos-country-flag",{class:[1],countryCode:[1,"country-code"],size:[2]}]]],["p-a0e36ed3",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-a376a37f",[[1,"zonos-notification",{class:[1],notificationArray:[32],showNotification:[64]}]]],["p-4d93275c",[[1,"zonos-badge",{bold:[4],color:[1],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4],class:[1]}]]],["p-639396bb",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-89c210d6",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["p-b6148206",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32]},null,{stripe:["watchInitStripe"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}]]],["p-e1f6ab97",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],class:[1],hasContent:[32]}]]],["p-1d4a970b",[[1,"zonos-card",{actions:[16],class:[1],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}],[1,"zonos-v-stack",{spacing:[2],class:[1]}]]],["p-2801d868",[[1,"zonos-icon",{autoHeight:[4,"auto-height"],color:[1],content:[1],size:[2]}]]],["p-49f09b91",[[1,"zonos-button",{class:[1],color:[1],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],color:[1]}]]],["p-494c77a7",[[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],disabled:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],footerRightAction:[16],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32]}],[1,"zonos-logo",{theme:[1],width:[1],class:[1]}]]]],e)));
1
+ import{p as e,b as o}from"./p-956efa27.js";export{s as setNonce}from"./p-956efa27.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-e6556b0d",[[1,"zonos-text",{class:[1],color:[1],size:[1],type:[1],weight:[2],content:[1],ready:[32]}]]],["p-17ef815f",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],paymentError:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}]]],["p-8bd04aaa",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64]},[[9,"resize","handleResize"]]]]],["p-c0494ed6",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]}]]],["p-684ed483",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-124857ae",[[1,"zonos-country-select",{closeCountrySelect:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[1,"zonos-country-flag",{class:[1],countryCode:[1,"country-code"],size:[2]}]]],["p-88600956",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-e58cc024",[[1,"zonos-notification",{class:[1],notificationArray:[32],showNotification:[64]}]]],["p-a063c4b7",[[1,"zonos-badge",{bold:[4],color:[1],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4],class:[1]}]]],["p-9c1f19b6",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}]]],["p-8b1cb8a4",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],selectedItem:[32]}]]],["p-e3bca405",[[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32]},null,{stripe:["watchInitStripe"]}],[2,"zonos-link-authentication",{titleText:[1,"title-text"],stripe:[32]},null,{stripe:["watchInitStripe"]}]]],["p-ab00288a",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],class:[1],hasContent:[32]}]]],["p-3c8763a7",[[1,"zonos-card",{actions:[16],class:[1],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}],[1,"zonos-v-stack",{spacing:[2],class:[1]}]]],["p-3509ffaa",[[1,"zonos-icon",{autoHeight:[4,"auto-height"],color:[1],content:[1],size:[2]}]]],["p-3e7444c6",[[1,"zonos-button",{class:[1],color:[1],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],color:[1]}]]],["p-02175f85",[[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],defaultAddress:[16],disabled:[32]},null,{disabled:["watchFormComplete"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],disabled:[32]},null,{disabled:["watchFormComplete"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],order:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],footerRightAction:[16],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32]}],[1,"zonos-logo",{theme:[1],width:[1],class:[1]}]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.2.4-alpha.8",
3
+ "version": "1.3.3-alpha.0",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",
@@ -21,12 +21,13 @@
21
21
  "loader/"
22
22
  ],
23
23
  "scripts": {
24
- "build": "pnpm build:css && mkdir -p dist && pnpm build:components && pnpm build:scripts",
24
+ "build": "pnpm build:css && mkdir -p dist && pnpm build:components && pnpm build:scripts && pnpm css:copy",
25
25
  "build:components": "stencil build --docs",
26
26
  "build:scripts": "pnpm rollup --config ./rollup.config.ts --configPlugin typescript",
27
27
  "build:css": "pnpm css:sass && pnpm css:minify",
28
28
  "css:minify": "cleancss -O2 -o ./src/css/zonos-elements.css ./src/css/zonos-elements.css",
29
29
  "css:sass": "sass --embed-sources src/styles/css:./src/css",
30
+ "css:copy": "echo ./dist/zonos-elements ./www/dist/zonos-elements | xargs -n 1 cp ./src/css/zonos-elements.css",
30
31
  "dev": "concurrently 'pnpm build:css && mkdir -p dist && stencil build --watch --es5 --serve --no-open --port 7001' 'pnpm proxy' 'pnpm dev:scripts'",
31
32
  "dev:scripts": "pnpm build:scripts --watch",
32
33
  "dev:open": "open https://dev.elements.zonos.com:7002",
@@ -55,10 +56,11 @@
55
56
  "test:prod": "stencil test --spec --detectOpenHandles",
56
57
  "tsc": "tsc --noEmit",
57
58
  "tsc:prod": "pnpm tsc && pnpm demo:exec tsc",
58
- "version:major": "pnpm build && pnpm version major -m 'Bump version %s' && pnpm push:tags",
59
- "version:minor": "pnpm build && pnpm version minor -m 'Bump version %s' && pnpm push:tags",
60
- "version:patch": "pnpm build && pnpm version patch -m 'Bump version %s' && pnpm push:tags",
61
- "version:alpha": "pnpm build && pnpm version prerelease --preid=alpha -m 'Bump version %s' && pnpm push:tags"
59
+ "version:major": "pnpm build && pnpm version major -m 'Bump version %s' && pnpm version:save && pnpm push:tags",
60
+ "version:minor": "pnpm build && pnpm version minor -m 'Bump version %s' && pnpm version:save && pnpm push:tags",
61
+ "version:patch": "pnpm build && pnpm version patch -m 'Bump version %s' && pnpm version:save && pnpm push:tags",
62
+ "version:alpha": "pnpm build && pnpm version prerelease --preid=alpha -m 'Bump version %s' && pnpm version:save && pnpm push:tags",
63
+ "version:save": "pnpm ts-node build-utils/saveVersions.ts"
62
64
  },
63
65
  "dependencies": {
64
66
  "@stencil/core": "^4.9.0",
@@ -101,6 +103,7 @@
101
103
  "@types/jest": "^29.5.11",
102
104
  "@types/lodash": "^4.14.202",
103
105
  "@types/node": "^18.19.2",
106
+ "@types/prettier": "^2.7.3",
104
107
  "@types/react": "^18.2.42",
105
108
  "@types/react-dom": "^18.2.17",
106
109
  "@types/tinycolor2": "^1.4.6",
@@ -1,3 +0,0 @@
1
- export type OnlineStoreConfig = {
2
- allowedDomains: Array<string>;
3
- };
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(o,s,t,n){function e(o){return o instanceof t?o:new t((function(s){s(o)}))}return new(t||(t=Promise))((function(t,i){function a(o){try{c(n.next(o))}catch(o){i(o)}}function r(o){try{c(n["throw"](o))}catch(o){i(o)}}function c(o){o.done?t(o.value):e(o.value).then(a,r)}c((n=n.apply(o,s||[])).next())}))};var __generator=this&&this.__generator||function(o,s){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,e,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(s){return c([o,s])}}function c(r){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(t=0)),t)try{if(n=1,e&&(i=r[0]&2?e["return"]:r[0]?e["throw"]||((i=e["return"])&&i.call(e),0):e.next)&&!(i=i.call(e,r[1])).done)return i;if(e=0,i)r=[r[0]&2,i.value];switch(r[0]){case 0:case 1:i=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;e=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!i||r[1]>i[0]&&r[1]<i[3])){t.label=r[1];break}if(r[0]===6&&t.label<i[1]){t.label=i[1];i=r;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(r);break}if(i[2])t.ops.pop();t.trys.pop();continue}r=s.call(o,t)}catch(o){r=[6,o];e=0}finally{n=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,s,t){if(t||arguments.length===2)for(var n=0,e=s.length,i;n<e;n++){if(i||!(n in s)){if(!i)i=Array.prototype.slice.call(s,0,n);i[n]=s[n]}}return o.concat(i||Array.prototype.slice.call(s))};System.register(["./p-18904b7c.system.js","./p-d2217f09.system.js","./p-b51de536.system.js","./p-24eed2a8.system.js","./p-a504f64f.system.js","./p-b85be1ab.system.js","./p-23e7c655.system.js","./p-da060b1c.system.js"],(function(o){"use strict";var s,t,n,e,i,a,r,c,l,h,u,d,p,m,f,z,g,v,b,y,x,w;return{setters:[function(o){s=o.r;t=o.a;n=o.h;e=o.H;i=o.F;a=o.c;r=o.d},function(o){c=o.c;l=o.s;h=o.p;u=o.o;d=o.i;p=o.b},function(o){m=o.t;f=o.h;z=o.b},function(o){g=o.g},function(o){v=o.s;b=o.i},function(o){y=o.e;x=o.z},function(o){w=o.c},function(){}],execute:function(){var k=function(o){var s=o.amount,t=o.currency,n=o.showCurrencyText;return n?"".concat(new Intl.NumberFormat("en-US",{currency:t,style:"currency"}).format(s)," ").concat(t):new Intl.NumberFormat("en-US",{currency:t,style:"currency"}).format(s)};var C=":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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-8);font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}";var I=o("zonos_cart_items",function(){function o(o){s(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var s;var i=t("./assets/empty-item.jpeg");var a=((s=c.exchangeRate)===null||s===void 0?void 0:s.rate)||1;return n(e,{class:"zonos--cart-items zonos--elements"},n("table",{class:"zonos--cart-table"},n("tbody",null,c.items.map((function(s){var t=s.imageUrl;return n("tr",{class:"zonos--cart-item"},n("td",{class:"zonos--column zonos--cart-item-image"},t&&!o.errorImages.includes(t)?n("img",{alt:s.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[t],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):n("img",{alt:s.name,src:i,width:40})),n("td",{class:"zonos--column zonos--cart-item-name"},n("zonos-text",{type:"label"},s.name)),n("td",{class:"zonos--column zonos--cart-item-price"},n("zonos-text",{type:"semiBoldLabel"},k({amount:s.amount*s.quantity*a,currency:c.currency}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());I.style=C;var _='<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.58543 4.66016C8.95096 4.66016 9.24728 4.95863 9.24728 5.32682V5.33349C9.24728 5.70168 8.95096 6.00016 8.58543 6.00016C8.2199 6.00016 7.92358 5.70168 7.92358 5.33349V5.32682C7.92358 4.95863 8.2199 4.66016 8.58543 4.66016ZM8.58543 7.33349C8.95096 7.33349 9.24728 7.63197 9.24728 8.00016V10.6668C9.24728 11.035 8.95096 11.3335 8.58543 11.3335C8.2199 11.3335 7.92358 11.035 7.92358 10.6668V8.00016C7.92358 7.63197 8.2199 7.33349 8.58543 7.33349Z" fill="#4D505A"/>\n</svg>\n';var j=":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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}";var L=o("zonos_cart_subtotal",function(){function o(o){s(this,o)}o.prototype.render=function(){var o=c.total-c.dutiesTaxFees;var s=c.step==="payment"||c.step==="shipping";var t=function(){if(!c.selectedShippingOption){return n(i,null,n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Shipping")),n("zonos-text",{class:"zonos--caption",type:"caption"},m("No shipping method selected")))}return n(i,null,n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},c.selectedShippingOption.displayName),c.selectedShippingOptionTransitTime&&n("zonos-text",{class:"zonos--caption",type:"caption"},c.selectedShippingOptionTransitTime," ",m("business days")))};return n(e,{class:"zonos--cart-subtotal zonos--elements"},n("table",{class:"zonos--cart-table"},n("tr",{class:"zonos--row zonos--cart-subtotal"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("zonos-text",{type:"semiBoldLabel"},m("Cart subtotal"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("zonos-text",{type:"semiBoldLabel"},k({amount:c.subtotal,currency:c.currency})))),n("tr",{class:"zonos--row zonos--cart-shipping"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},t()),n("td",{class:"zonos--column zonos--cart-subtotal-price"},c.shipping?k({amount:c.shipping,currency:c.currency}):"-")),s&&n("tr",{class:"zonos--row zonos--cart-duties"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column zonos--cart-subtotal-title"},n("div",{class:"zonos--title-with-icon"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Duties, taxes, and fees")),n("zonos-icon",{content:_,size:16})),!!c.isSelectedShippingAboveDeminimis&&n("zonos-text",{color:"gray-800",type:"body"},m("Order is over the de minimis threshold for both duty and tax"))),n("td",{class:"zonos--column zonos--cart-subtotal-price"},n("div",{class:"zonos--cart-duty-tax-price"},c.dutiesTaxFees?k({amount:c.dutiesTaxFees,currency:c.currency}):"-",c.isSelectedShippingGuarantee&&n("zonos-badge",null,m("Guaranteed"))))),n("tr",{class:"zonos--row zonos--cart-pay-total"},n("td",{class:"zonos--column"}),n("td",{class:"zonos--column"},n("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Order total"))),n("td",{class:"zonos--column"},n("zonos-text",{type:"semiBoldLabel"},k({amount:c.step==="shipping"?o:c.total,currency:c.currency}))))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());L.style=j;var B='<svg color="var(--amino-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(--amino-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 S='<svg color="var(--amino-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(--amino-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 D=":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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}: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:var(--amino-space-24);border-radius:var(--border-radius, 10px);gap:var(--amino-space-24);max-width:360px;width:auto;margin:auto;margin-top:var(--amino-space-24);background-color:var(--amino-gray-50);padding:var(--amino-space-20)}: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}";var Z=o("zonos_checkout_finish",function(){function o(o){var t=this;s(this,o);this.closeClick=a(this,"closeClick",7);this.pullOrder=function(){return __awaiter(t,void 0,void 0,(function(){var o,s,t,n,e,i,a,r,l;return __generator(this,(function(h){switch(h.label){case 0:t="https://v1.route.js.zonos.com";n=c.checkoutSessionId;return[4,f("".concat(t,"/api/zonos-elements/get-order?checkoutSessionId=").concat(n))];case 1:e=h.sent(),i=e.errors,a=e.json;if(i.length||!(a===null||a===void 0?void 0:a.id)){return[2,null]}if(window.Zonos.isBigCommerce){r=a===null||a===void 0?void 0:a.id;l=(s=(o=a===null||a===void 0?void 0:a.metadata)===null||o===void 0?void 0:o.find((function(o){return(o===null||o===void 0?void 0:o.key)==="storeHash"})))===null||s===void 0?void 0:s.value;if(!r||!l){return[2,z("Unable to trigger BigCommerce /success: Missing orderId or storeHash")]}void f("".concat(t,"/api/bigcommerce/success?orderId=").concat(r,"&storeHash=").concat(l))}return[2,a]}}))}))};this.getPullOrder=function(o){if(o===void 0){o=0}return __awaiter(t,void 0,void 0,(function(){var s;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.pullOrder()];case 1:s=t.sent();if(!s)return[3,2];this.order=s;return[3,5];case 2:if(!(!s&&o<5))return[3,5];return[4,new Promise((function(o){return setTimeout(o,1e3)}))];case 3:t.sent();return[4,this.getPullOrder(o+1)];case 4:t.sent();t.label=5;case 5:return[2]}}))}))};this.checkPaymentStatus=function(){return __awaiter(t,void 0,void 0,(function(){var o,s,t,n,e;return __generator(this,(function(i){switch(i.label){case 0:this.isLoading=true;o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||l.clientSecret;if(!(o||this.storybookForceStatus))return[3,2];return[4,h({clientSecret:o,storybookForceStatus:this.storybookForceStatus})];case 1:s=i.sent(),t=s.error,n=s.messages;this.notificationType=t?"error":"success";this.notificationMessages=n||[];this.notificationTitle=t?m("Payment failed"):m("You're all set!");if(t){v("zonos-checkout-payment-fail")}else{v("zonos-checkout-success");e=new CustomEvent("zonos-checkout-success",{detail:{message:"Zonos Checkout successfully processed order"}});document.dispatchEvent(e)}if(this.notificationType==="success"){void this.getPullOrder()}i.label=2;case 2:u();this.isLoading=false;return[2]}}))}))};this.closeClickHandler=function(){t.closeClick.emit()};this.borderRadius="ROUNDED";this.storybookForceStatus=undefined;this.overrideNotification=undefined;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.order=null}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}void this.checkPaymentStatus()};o.prototype.render=function(){var o=this;return n(e,{class:"zonos--checkout-finish zonos--elements",style:{"--border-radius":g(this.borderRadius)}},this.isLoading&&n("div",{class:"loading-wrapper"},n("zonos-spinner",null)),!this.isLoading&&n(i,null,n("div",{class:"zonos--group"},this.notificationType==="success"?n("zonos-icon",{color:"blue-800",content:S,size:50}):n("zonos-icon",{color:"red-800",content:B,size:50}),n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),n("zonos-text",null,this.notificationMessages.map((function(o){return n(i,null,o,n("br",null))}))),n("zonos-button",{onClick:function(){return o.closeClickHandler()},size:"md",variant:"primary"},m("Keep shopping")))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());Z.style=D;var O=".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:calc(100% - 10px)}";var A=o("zonos_checkout_payment",function(){function o(o){var t=this;s(this,o);this.continueClicked=a(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.paymentError=false;this.submitBtnType=undefined;this.continueLoading=false;this.submitBtnColor=undefined;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){v("zonos-checkout-payment-info")}};o.prototype.render=function(){var o=this;var s;if(!l.stripeElements){return null}this.disabled=!((s=l.stripePaymentEventData)===null||s===void 0?void 0:s.complete);return n(e,{class:"zonos--checkout-payment zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Payment method")),this.paymentError&&n("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},m("We couldn't complete your payment. Please verify the payment details and try again.")),n("zonos-payment",null)),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},"Pay"," ",k({amount:c.total,currency:c.currency}))))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}());A.style=O;var M=":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}";var P=o("zonos_collapse",function(){function o(o){s(this,o);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight}o.prototype.getElementHeight=function(){var o="".concat(this.height,"px");var s="".concat(this.collapseSize,"px");return this.collapsed?s:o};o.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};o.prototype.componentDidRender=function(){var o=this;var s,t,n;(n=(t=(s=this.el.shadowRoot)===null||s===void 0?void 0:s.querySelector("iframe"))===null||t===void 0?void 0:t.contentWindow)===null||n===void 0?void 0:n.addEventListener("resize",(function(){o.height=o.el.scrollHeight}))};o.prototype.render=function(){this.height=this.el.scrollHeight;return n(e,{class:"zonos--elements zonos--collapse",style:{"--font-family":y(),height:this.getElementHeight()}},n("div",null,n("iframe",{class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),n("slot",null)))};Object.defineProperty(o.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return o}());P.style=M;var T=".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:calc(100% - 10px)}";var E=o("zonos_customer_info",function(){function o(o){var t=this;s(this,o);this.continueClicked=a(this,"continueClicked",7);this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnType=undefined;this.submitBtnColor=undefined;this.defaultAddress=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){v("zonos-checkout-customer-info")}};o.prototype.render=function(){var o=this;var s,t;if(!l.stripeElements){return null}this.disabled=!((s=l.stripeAddressEventData)===null||s===void 0?void 0:s.complete)||!((t=l.stripeLinkEventData)===null||t===void 0?void 0:t.complete);return n(e,{class:"zonos--customer-info zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Customer information")),n("zonos-link-authentication",{titleText:m("Contact")}),n("zonos-address",{defaultAddress:this.defaultAddress,titleText:m("Address"),type:"shipping"})),n("div",{class:"zonos--group-btn"},n("zonos-button",{backgroundColor:this.submitBtnColor,isDisabled:this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},m("Continue to shipping"))))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}());E.style=T;var H='<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(--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 .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:1002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:1001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:1001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:1002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var F=o("zonos_dialog",function(){function o(o){var t=this;s(this,o);this.closeDialog=a(this,"closeDialog",7);this.isMobileMode=function(){return t.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){t.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!t.noClickOutside){t.closeDialog.emit()}};this.open=false;this.headerText="";this.width="460px";this.height=undefined;this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.footerRightAction=null;this.borderStyle=undefined;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){if(this.open){document.body.style.overflow="hidden"}else{document.body.style.overflow="auto"}var o=g(this.borderStyle);return n(e,{class:w(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--font-family":y(),"--height":this.height||"initial","--width":this.width}},n("div",{class:"zonos--backdrop"}),n("div",{"aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},n("div",{class:"zonos--dialog"},this.isLoading&&n("div",{class:"zonos--loading"},n("zonos-spinner",{size:30})),(this.headerText||!this.noCloseButton)&&n("div",{class:"zonos--header"},this.headerText&&n("h3",{class:"zonos--header-text"},this.headerText),!this.noCloseButton&&n("zonos-button",{class:"zonos--close-button",icon:n("zonos-icon",{content:H}),noBackground:true,onClick:this.closeButtonHandler})),n("div",{class:w(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},n("slot",null)),this.footerRightAction&&n("div",{class:"zonos--footer"},n("div",{class:"zonos--footer-right-action"},this.footerRightAction)))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());F.style=U;var G=":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 img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var R=o("zonos_logo",function(){function o(o){s(this,o);this.theme="LIGHT";this.width="auto";this.class=""}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return n(e,{class:w(["zonos--elements zonos--logo",this.class]),style:{"--filter-color":o,"--font-family":y(),"--width":this.width}},n("img",{alt:"Zonos Logo",src:t("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());R.style=G;var V='<svg color="var(--amino-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 N='<svg color="var(--amino-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 K=":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 .zonos--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8)}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";var W=o("zonos_review",function(){function o(o){s(this,o);this.mobile=false;this.collapsed=false;this.isMobile=false}o.prototype.handleWindowResize=function(){this.isMobile=b(this.mobile)};o.prototype.componentWillLoad=function(){this.isMobile=b(this.mobile)};o.prototype.render=function(){var o=this;var s=this.isMobile?"boldSubheader":"semiBoldLabel";var t=this.isMobile?"boldSubheader":"secondaryPageHeader";var i=this.isMobile?"gray-1200":"gray-800";var a=c.total-c.dutiesTaxFees;var r=function(){if(!o.isMobile){return null}if(!o.collapsed){return n("zonos-icon",{color:"gray-1200",content:V})}return n("zonos-icon",{color:"gray-1200",content:N})};return n(e,{class:w(["zonos--review zonos--elements",this.isMobile&&"mobile"])},n("div",{class:"zonos--title"},n("zonos-text",{color:i,type:s},m("Pay")," ",x.organizationName),r()),n("div",{class:"zonos--total-pay"},n("zonos-text",{type:t},k({amount:c.step==="shipping"?a:c.total,currency:c.currency}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());W.style=K;var Y=".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";var q=o("zonos_shipping",function(){function o(o){var t=this;s(this,o);this.continueClicked=a(this,"continueClicked",7);this.handleRadioSelected=function(o){return __awaiter(t,void 0,void 0,(function(){var s,t,n;var e=this;return __generator(this,(function(i){switch(i.label){case 0:this.selectedShippingMethod=o.detail;if(!this.selectedShippingMethod){return[2]}t=((s=c.shippingData)===null||s===void 0?void 0:s.find((function(o){var s;return o.id===((s=e.selectedShippingMethod)===null||s===void 0?void 0:s.value)})))||null;if(!t){return[2]}return[4,d(t)];case 1:n=i.sent();if(!n){return[2]}this.disabled=false;return[2]}}))}))};this.continueClickHandler=function(){t.continueClicked.emit()};this.continueLoading=false;this.submitBtnColor=undefined;this.submitBtnType=undefined;this.selectedShippingMethod=null;this.disabled=true}o.prototype.watchFormComplete=function(){if(!this.disabled){v("zonos-checkout-shipping-info")}};o.prototype.render=function(){var o=this;var s;var t=(s=c.shippingData)===null||s===void 0?void 0:s.flatMap((function(o){var s,t;var n=p(o),e=n.expectedDate,i=n.maxTransit,a=n.minTransit;var r=e?"".concat(m("Expected delivery")," ").concat(e):"";var l=a&&i?"(".concat(a,"-").concat(i," ").concat(m("business days"),")"):"";var h=((t=(s=c.landedCostData)===null||s===void 0?void 0:s.find((function(s){var t;return((t=s.landedCost)===null||t===void 0?void 0:t.shipmentRating.id)===o.id})))===null||t===void 0?void 0:t.subtotals.shipping)||0;return{caption:l,label:o.displayName,price:k({amount:h,currency:c.currency}),sublabel:r,value:o.id}}));return n(e,{class:"zonos--shipping zonos--elements"},n("div",{class:"zonos--group"},n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Shipping information")),n("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},m("Shipping method")),!(t===null||t===void 0?void 0:t.length)?n("zonos-banner",{bannerTitle:"No shipping methods found - try editing your address or contacting support if the error persists",intent:"error"}):n("zonos-shipping-rich-radio",{items:t||[],onRadioSelected:function(s){return o.handleRadioSelected(s)}})),n("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:function(){return o.continueClickHandler()},size:"lg",variant:this.submitBtnType},m("Go to payment")))};Object.defineProperty(o,"watchers",{get:function(){return{disabled:["watchFormComplete"]}},enumerable:false,configurable:true});return o}());q.style=Y}}}));
@@ -1 +0,0 @@
1
- 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 s(t){try{a(i.next(t))}catch(t){r(t)}}function u(t){try{a(i["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):o(t.value).then(s,u)}a((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,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(t){return function(n){return a([t,n])}}function a(u){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,u[0]&&(e=0)),e)try{if(i=1,o&&(r=u[0]&2?o["return"]:u[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,u[1])).done)return r;if(o=0,r)u=[u[0]&2,r.value];switch(u[0]){case 0:case 1:r=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!r||u[1]>r[0]&&u[1]<r[3])){e.label=u[1];break}if(u[0]===6&&e.label<r[1]){e.label=r[1];r=u;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(u);break}if(r[2])e.ops.pop();e.trys.pop();continue}u=n.call(t,e)}catch(t){u=[6,t];o=0}finally{i=r=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-18904b7c.system.js","./p-d2217f09.system.js","./p-b51de536.system.js","./p-b85be1ab.system.js","./p-da060b1c.system.js","./p-24eed2a8.system.js"],(function(t){"use strict";var n,e,i,o,r,s,u,a,c,f,d,l,h,v;return{setters:[function(t){n=t.r;e=t.c;i=t.h;o=t.H},function(t){r=t.s},function(t){s=t.h;u=t.b;a=t.i;c=t.l;f=t.c;d=t.d},function(t){l=t.z;h=t.d;v=t.e},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,e,i;return __generator(this,(function(o){switch(o.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,s(t)];case 1:n=o.sent(),e=n.errors,i=n.json;if(e.length){u("Error occurs when getting zonos settings. If this is not an unauthorized error, it will use user setting or default setting");return[2,{errors:e,json:null}]}return[2,{errors:[],json:i}]}}))}))};var w=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var b=function(t){if(!t.placeOrderButtonSelector){return}if(!a(t.placeOrderButtonSelector)){u('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}w()};var y=function(t){var n=document.querySelector("zonos-hello");if(!n&&t){var e=document.createElement("zonos-hello");t.appendChild(e)}};var g=function(t){return __awaiter(m,void 0,void 0,(function(){var n,e;return __generator(this,(function(i){n=t.anchorElementSelector;if(!n||!a(n)){u('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}e=document.querySelector(n);c("Hello init complete");y(e);return[2]}))}))};var p=":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{visibility:hidden;opacity:0;height:0}";var z=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=e(this,"stripeInitEvent",7);this.disablePlaceOrderButtons=function(t){var n=t.disable;var e=l.checkoutSettings.placeOrderButtonSelector;if(!e){return}var i=function(t){var n=t.target;if(n.getAttribute("disabled")){t.preventDefault();t.stopPropagation()}};var o=document.querySelectorAll(e);o.forEach((function(t){if(n){t.setAttribute("disabled","true");t.addEventListener("click",i)}else{t.removeAttribute("disabled");t.removeEventListener("click",i)}}));if(n){setTimeout((function(){o.forEach((function(t){t.removeAttribute("disabled");t.removeEventListener("click",i)}))}),5e3)}};this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){c("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}r.stripe=t;void b(l.checkoutSettings);c("init checkout element");this.disablePlaceOrderButtons({disable:false});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,a,f;return __generator(this,(function(d){switch(d.label){case 0:i=t||v();if(i==="Inter"){if(!t){return[2]}c("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:t})}o="https://v1.route.js.zonos.com";return[4,s("".concat(o,"/api/zonos-elements/get-font-detail?family=").concat(i))];case 1:r=d.sent(),u=r.errors,a=r.json;if(u.length>0||!a){c("Failed to load font ".concat(i),"warn");return[2]}f=a.fontUrl;(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,f);if(!t){return[2]}c("[FONT] ".concat(t," font override applied"));l.appearance=Object.assign(Object.assign({},l.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){l.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,i,o,r;return __generator(this,(function(s){switch(s.label){case 0:return[4,_()];case 1:e=s.sent(),i=e.errors,o=e.json;if(((t=i[0])===null||t===void 0?void 0:t.type.toString())==="403"){c("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.disablePlaceOrderButtons({disable:true});this.initZonosNotification();h({overrideSettings:this.config,zonosSettings:o});void this.setupGoogleFont();if(l.helloSettings){void g(l.helloSettings)}return[4,f()];case 2:s.sent();r=((n=o===null||o===void 0?void 0:o.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!r||!this.stripeInitEvent){c("Checkout failed to load -- missing publishable key","warn");return[2]}if(l.checkoutSettings.subscriptionStatus==="INACTIVE"){c('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");c("zonos controller loaded");return[2]}if(l.checkoutSettings.visibilityStatus==="DISABLED"){c("=== Checkout is disabled by store owner ===","warn");c("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:r.token});c("zonos controller loaded");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){c("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){h({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){void d(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,l.appearance]}))}))};t.prototype.render=function(){return i(o,{class:"zonos--elements"})};return t}());z.style=p}}}));
@@ -1 +0,0 @@
1
- import{r as o,a as s,h as t,H as n,F as i,c as e,d as a}from"./p-956efa27.js";import{c as r,s as c,p as h,o as l,i as d,b as p}from"./p-4846796a.js";import{t as m,h as u,b as z}from"./p-3c6988d7.js";import{g}from"./p-ff95f098.js";import{s as f,i as y}from"./p-1685c8df.js";import{e as b,z as v}from"./p-089ba905.js";import{c as x}from"./p-b4b7f705.js";import"./p-55f49f1e.js";const w=({amount:o,currency:s,showCurrencyText:t})=>t?`${new Intl.NumberFormat("en-US",{currency:s,style:"currency"}).format(o)} ${s}`:new Intl.NumberFormat("en-US",{currency:s,style:"currency"}).format(o),k=class{constructor(s){o(this,s),this.errorImages=[]}render(){var o;const i=s("./assets/empty-item.jpeg"),e=(null===(o=r.exchangeRate)||void 0===o?void 0:o.rate)||1;return t(n,{class:"zonos--cart-items zonos--elements"},t("table",{class:"zonos--cart-table"},t("tbody",null,r.items.map((o=>{const s=o.imageUrl;return t("tr",{class:"zonos--cart-item"},t("td",{class:"zonos--column zonos--cart-item-image"},s&&!this.errorImages.includes(s)?t("img",{alt:o.name,onError:()=>{this.errorImages=[...this.errorImages,s]},src:o.imageUrl,style:{"min-width":"40px"},width:40}):t("img",{alt:o.name,src:i,width:40})),t("td",{class:"zonos--column zonos--cart-item-name"},t("zonos-text",{type:"label"},o.name)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"semiBoldLabel"},w({amount:o.amount*o.quantity*e,currency:r.currency}))))})))))}static get assetsDirs(){return["assets"]}};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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-8);font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}";const C=class{constructor(s){o(this,s)}render(){const o=r.total-r.dutiesTaxFees,s="payment"===r.step||"shipping"===r.step;return t(n,{class:"zonos--cart-subtotal zonos--elements"},t("table",{class:"zonos--cart-table"},t("tr",{class:"zonos--row zonos--cart-subtotal"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("zonos-text",{type:"semiBoldLabel"},m("Cart subtotal"))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("zonos-text",{type:"semiBoldLabel"},w({amount:r.subtotal,currency:r.currency})))),t("tr",{class:"zonos--row zonos--cart-shipping"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},r.selectedShippingOption?t(i,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},r.selectedShippingOption.displayName),r.selectedShippingOptionTransitTime&&t("zonos-text",{class:"zonos--caption",type:"caption"},r.selectedShippingOptionTransitTime," ",m("business days"))):t(i,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Shipping")),t("zonos-text",{class:"zonos--caption",type:"caption"},m("No shipping method selected")))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},r.shipping?w({amount:r.shipping,currency:r.currency}):"-")),s&&t("tr",{class:"zonos--row zonos--cart-duties"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("div",{class:"zonos--title-with-icon"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Duties, taxes, and fees")),t("zonos-icon",{content:'<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.96704 8.00065C1.96704 4.31875 4.93024 1.33398 8.58554 1.33398C12.2408 1.33398 15.204 4.31875 15.204 8.00065C15.204 11.6826 12.2408 14.6673 8.58554 14.6673C4.93024 14.6673 1.96704 11.6825 1.96704 8.00065Z" fill="#C5C6CA"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8.58543 4.66016C8.95096 4.66016 9.24728 4.95863 9.24728 5.32682V5.33349C9.24728 5.70168 8.95096 6.00016 8.58543 6.00016C8.2199 6.00016 7.92358 5.70168 7.92358 5.33349V5.32682C7.92358 4.95863 8.2199 4.66016 8.58543 4.66016ZM8.58543 7.33349C8.95096 7.33349 9.24728 7.63197 9.24728 8.00016V10.6668C9.24728 11.035 8.95096 11.3335 8.58543 11.3335C8.2199 11.3335 7.92358 11.035 7.92358 10.6668V8.00016C7.92358 7.63197 8.2199 7.33349 8.58543 7.33349Z" fill="#4D505A"/>\n</svg>\n',size:16})),!!r.isSelectedShippingAboveDeminimis&&t("zonos-text",{color:"gray-800",type:"body"},m("Order is over the de minimis threshold for both duty and tax"))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("div",{class:"zonos--cart-duty-tax-price"},r.dutiesTaxFees?w({amount:r.dutiesTaxFees,currency:r.currency}):"-",r.isSelectedShippingGuarantee&&t("zonos-badge",null,m("Guaranteed"))))),t("tr",{class:"zonos--row zonos--cart-pay-total"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},m("Order total"))),t("td",{class:"zonos--column"},t("zonos-text",{type:"semiBoldLabel"},w({amount:"shipping"===r.step?o:r.total,currency:r.currency}))))))}static get assetsDirs(){return["assets"]}};C.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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}";const I=class{constructor(s){o(this,s),this.closeClick=e(this,"closeClick",7),this.pullOrder=async()=>{var o,s;const t="https://v1.route.js.zonos.com",n=r.checkoutSessionId,{errors:i,json:e}=await u(`${t}/api/zonos-elements/get-order?checkoutSessionId=${n}`);if(i.length||!(null==e?void 0:e.id))return null;if(window.Zonos.isBigCommerce){const n=null==e?void 0:e.id,i=null===(s=null===(o=null==e?void 0:e.metadata)||void 0===o?void 0:o.find((o=>"storeHash"===(null==o?void 0:o.key))))||void 0===s?void 0:s.value;if(!n||!i)return z("Unable to trigger BigCommerce /success: Missing orderId or storeHash");u(`${t}/api/bigcommerce/success?orderId=${n}&storeHash=${i}`)}return e},this.getPullOrder=async(o=0)=>{const s=await this.pullOrder();s?this.order=s:!s&&o<5&&(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkPaymentStatus=async()=>{this.isLoading=!0;const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||c.clientSecret;if(o||this.storybookForceStatus){const{error:s,messages:t}=await h({clientSecret:o,storybookForceStatus:this.storybookForceStatus});if(this.notificationType=s?"error":"success",this.notificationMessages=t||[],this.notificationTitle=m(s?"Payment failed":"You're all set!"),s)f("zonos-checkout-payment-fail");else{f("zonos-checkout-success");const o=new CustomEvent("zonos-checkout-success",{detail:{message:"Zonos Checkout successfully processed order"}});document.dispatchEvent(o)}"success"===this.notificationType&&this.getPullOrder()}l(),this.isLoading=!1},this.closeClickHandler=()=>{this.closeClick.emit()},this.borderRadius="ROUNDED",this.storybookForceStatus=void 0,this.overrideNotification=void 0,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.order=null}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);this.checkPaymentStatus()}render(){return t(n,{class:"zonos--checkout-finish zonos--elements",style:{"--border-radius":g(this.borderRadius)}},this.isLoading&&t("div",{class:"loading-wrapper"},t("zonos-spinner",null)),!this.isLoading&&t(i,null,t("div",{class:"zonos--group"},t("zonos-icon","success"===this.notificationType?{color:"blue-800",content:'<svg color="var(--amino-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(--amino-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>',size:50}:{color:"red-800",content:'<svg color="var(--amino-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(--amino-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>',size:50}),t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),t("zonos-text",null,this.notificationMessages.map((o=>t(i,null,o,t("br",null))))),t("zonos-button",{onClick:()=>this.closeClickHandler(),size:"md",variant:"primary"},m("Keep shopping")))))}static get assetsDirs(){return["assets"]}};I.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-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}: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:var(--amino-space-24);border-radius:var(--border-radius, 10px);gap:var(--amino-space-24);max-width:360px;width:auto;margin:auto;margin-top:var(--amino-space-24);background-color:var(--amino-gray-50);padding:var(--amino-space-20)}: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}";const L=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.continueClickHandler=()=>{this.continueClicked.emit()},this.paymentError=!1,this.submitBtnType=void 0,this.continueLoading=!1,this.submitBtnColor=void 0,this.disabled=!0}watchFormComplete(){this.disabled||f("zonos-checkout-payment-info")}render(){var o;return c.stripeElements?(this.disabled=!(null===(o=c.stripePaymentEventData)||void 0===o?void 0:o.complete),t(n,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Payment method")),this.paymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},m("We couldn't complete your payment. Please verify the payment details and try again.")),t("zonos-payment",null)),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},"Pay"," ",w({amount:r.total,currency:r.currency}))))):null}static get watchers(){return{disabled:["watchFormComplete"]}}};L.style=".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:calc(100% - 10px)}";const j=class{constructor(s){o(this,s),this.collapsed=!1,this.collapseSize=0,this.height=this.el.scrollHeight}getElementHeight(){return this.collapsed?`${this.collapseSize}px`:`${this.height}px`}componentDidLoad(){this.height=this.el.scrollHeight}componentDidRender(){var o,s,t;null===(t=null===(s=null===(o=this.el.shadowRoot)||void 0===o?void 0:o.querySelector("iframe"))||void 0===s?void 0:s.contentWindow)||void 0===t||t.addEventListener("resize",(()=>{this.height=this.el.scrollHeight}))}render(){return this.height=this.el.scrollHeight,t(n,{class:"zonos--elements zonos--collapse",style:{"--font-family":b(),height:this.getElementHeight()}},t("div",null,t("iframe",{class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),t("slot",null)))}get el(){return a(this)}};j.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 B=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.continueClickHandler=()=>{this.continueClicked.emit()},this.continueLoading=!1,this.submitBtnType=void 0,this.submitBtnColor=void 0,this.defaultAddress=null,this.disabled=!0}watchFormComplete(){this.disabled||f("zonos-checkout-customer-info")}render(){var o,s;return c.stripeElements?(this.disabled=!(null===(o=c.stripeAddressEventData)||void 0===o?void 0:o.complete)||!(null===(s=c.stripeLinkEventData)||void 0===s?void 0:s.complete),t(n,{class:"zonos--customer-info zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Customer information")),t("zonos-link-authentication",{titleText:m("Contact")}),t("zonos-address",{defaultAddress:this.defaultAddress,titleText:m("Address"),type:"shipping"})),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,isDisabled:this.disabled,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},m("Continue to shipping"))))):null}static get watchers(){return{disabled:["watchFormComplete"]}}};B.style=".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:calc(100% - 10px)}";const D=class{constructor(s){o(this,s),this.closeDialog=e(this,"closeDialog",7),this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.closeDialog.emit()},this.clickOutsideDialogHandler=o=>{o.target!==o.currentTarget||this.noClickOutside||this.closeDialog.emit()},this.open=!1,this.headerText="",this.width="460px",this.height=void 0,this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.footerRightAction=null,this.borderStyle=void 0,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1}handleWindowResize(){this.isMobile=this.isMobileMode()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){document.body.style.overflow=this.open?"hidden":"auto";const o=g(this.borderStyle);return t(n,{class:x(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--border-radius":o,"--font-family":b(),"--height":this.height||"initial","--width":this.width}},t("div",{class:"zonos--backdrop"}),t("div",{"aria-hidden":"true",class:"zonos--dialog-layout",onClick:this.clickOutsideDialogHandler},t("div",{class:"zonos--dialog"},this.isLoading&&t("div",{class:"zonos--loading"},t("zonos-spinner",{size:30})),(this.headerText||!this.noCloseButton)&&t("div",{class:"zonos--header"},this.headerText&&t("h3",{class:"zonos--header-text"},this.headerText),!this.noCloseButton&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{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.closeButtonHandler})),t("div",{class:x(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},t("slot",null)),this.footerRightAction&&t("div",{class:"zonos--footer"},t("div",{class:"zonos--footer-right-action"},this.footerRightAction)))))}static get assetsDirs(){return["assets"]}};D.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 .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0px;top:0px;background:var(--amino-backdrop-color);z-index:-999;opacity:0;visibility:hidden;position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:1002;background:white}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--amino-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:1001;background:var(--amino-gray-0);max-width:90vw;max-height:90vh;min-height:500px;height:var(--height, auto);width:var(--width, auto);border-radius:var(--border-radius, var(--amino-radius-10));outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);border:var(--amino-border);overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-16) var(--amino-space-24)}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--amino-radius-10)}:host .zonos--header .zonos--close-button:hover{background:var(--amino-hover-color)}:host .zonos--body{padding:var(--amino-space-8) var(--amino-space-24);max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:var(--amino-space-16) var(--amino-space-24)}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:1001;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:1002;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";const S=class{constructor(s){o(this,s),this.theme="LIGHT",this.width="auto",this.class=""}render(){const o="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return t(n,{class:x(["zonos--elements zonos--logo",this.class]),style:{"--filter-color":o,"--font-family":b(),"--width":this.width}},t("img",{alt:"Zonos Logo",src:s("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};S.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 img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";const _=class{constructor(s){o(this,s),this.mobile=!1,this.collapsed=!1,this.isMobile=!1}handleWindowResize(){this.isMobile=y(this.mobile)}componentWillLoad(){this.isMobile=y(this.mobile)}render(){const o=this.isMobile?"boldSubheader":"semiBoldLabel",s=this.isMobile?"boldSubheader":"secondaryPageHeader",i=this.isMobile?"gray-1200":"gray-800",e=r.total-r.dutiesTaxFees;return t(n,{class:x(["zonos--review zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--title"},t("zonos-text",{color:i,type:o},m("Pay")," ",v.organizationName),(()=>this.isMobile?t("zonos-icon",this.collapsed?{color:"gray-1200",content:'<svg color="var(--amino-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>'}:{color:"gray-1200",content:'<svg color="var(--amino-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>'}):null)()),t("div",{class:"zonos--total-pay"},t("zonos-text",{type:s},w({amount:"shipping"===r.step?e:r.total,currency:r.currency}))))}static get assetsDirs(){return["assets"]}};_.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 .zonos--total-pay{margin:var(--amino-space-16) 0 var(--amino-space-32)}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--amino-space-24);-ms-flex-pack:justify;justify-content:space-between;padding:var(--amino-space-4) 0;margin-bottom:var(--amino-space-8)}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:var(--amino-space-8)}:host(.mobile) .zonos--total-pay{margin:0}";const Z=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.handleRadioSelected=async o=>{var s;if(this.selectedShippingMethod=o.detail,!this.selectedShippingMethod)return;const t=(null===(s=r.shippingData)||void 0===s?void 0:s.find((o=>{var s;return o.id===(null===(s=this.selectedShippingMethod)||void 0===s?void 0:s.value)})))||null;t&&await d(t)&&(this.disabled=!1)},this.continueClickHandler=()=>{this.continueClicked.emit()},this.continueLoading=!1,this.submitBtnColor=void 0,this.submitBtnType=void 0,this.selectedShippingMethod=null,this.disabled=!0}watchFormComplete(){this.disabled||f("zonos-checkout-shipping-info")}render(){var o;const s=null===(o=r.shippingData)||void 0===o?void 0:o.flatMap((o=>{var s,t;const{expectedDate:n,maxTransit:i,minTransit:e}=p(o),a=n?`${m("Expected delivery")} ${n}`:"",c=e&&i?`(${e}-${i} ${m("business days")})`:"",h=(null===(t=null===(s=r.landedCostData)||void 0===s?void 0:s.find((s=>{var t;return(null===(t=s.landedCost)||void 0===t?void 0:t.shipmentRating.id)===o.id})))||void 0===t?void 0:t.subtotals.shipping)||0;return{caption:c,label:o.displayName,price:w({amount:h,currency:r.currency}),sublabel:a,value:o.id}}));return t(n,{class:"zonos--shipping zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},m("Shipping information")),t("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},m("Shipping method")),(null==s?void 0:s.length)?t("zonos-shipping-rich-radio",{items:s||[],onRadioSelected:o=>this.handleRadioSelected(o)}):t("zonos-banner",{bannerTitle:"No shipping methods found - try editing your address or contacting support if the error persists",intent:"error"})),t("zonos-button",{backgroundColor:this.submitBtnColor,"is-disabled":this.disabled,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},m("Go to payment")))}static get watchers(){return{disabled:["watchFormComplete"]}}};Z.style=".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";export{k as zonos_cart_items,C as zonos_cart_subtotal,I as zonos_checkout_finish,L as zonos_checkout_payment,j as zonos_collapse,B as zonos_customer_info,D as zonos_dialog,S as zonos_logo,_ as zonos_review,Z as zonos_shipping}
@@ -1 +0,0 @@
1
- System.register(["./p-d2217f09.system.js","./p-b85be1ab.system.js","./p-18904b7c.system.js","./p-b51de536.system.js","./p-da060b1c.system.js","./p-24eed2a8.system.js"],(function(s){"use strict";return{setters:[function(t){var e={};e.cartStore=t.c;e.cartStoreApplySubtotals=t.a;e.cartStoreGetShippingTransitInfo=t.b;e.cartStoreNextStep=t.d;e.cartStorePreviousStep=t.e;e.cartStoreReCalculateTotal=t.f;e.cartStoreReset=t.g;e.cartStoreUpdateItems=t.h;e.cartStoreUpdateSelectedShippingOption=t.i;e.cartStoreUpdateToErrorState=t.j;s(e)},function(){},function(){},function(){},function(){},function(){}],execute:function(){}}}));
@@ -1 +0,0 @@
1
- import{r as o,c as t,h as n,H as e}from"./p-956efa27.js";import{s}from"./p-4846796a.js";import{h as i,b as r,i as a,l as c,c as l,d}from"./p-3c6988d7.js";import{z as h,d as u,e as f}from"./p-089ba905.js";import"./p-55f49f1e.js";import"./p-ff95f098.js";const m=class{constructor(n){o(this,n),this.stripeInitEvent=t(this,"stripeInitEvent",7),this.disablePlaceOrderButtons=({disable:o})=>{const t=h.checkoutSettings.placeOrderButtonSelector;if(!t)return;const n=o=>{o.target.getAttribute("disabled")&&(o.preventDefault(),o.stopPropagation())},e=document.querySelectorAll(t);e.forEach((t=>{o?(t.setAttribute("disabled","true"),t.addEventListener("click",n)):(t.removeAttribute("disabled"),t.removeEventListener("click",n))})),o&&setTimeout((()=>{e.forEach((o=>{o.removeAttribute("disabled"),o.removeEventListener("click",n)}))}),5e3)},this.config=void 0,this.zonosApiKey=void 0}async initCheckoutElement(o){var t;o?(s.stripe=o,(t=h.checkoutSettings).placeOrderButtonSelector&&(a(t.placeOrderButtonSelector)?(()=>{if(!document.querySelector("zonos-checkout")){const o=document.createElement("zonos-checkout");document.body.appendChild(o)}})():r(`Selector checkoutButtonAnchor "${t.placeOrderButtonSelector}" is not a valid selector`)),c("init checkout element"),this.disablePlaceOrderButtons({disable:!1})):c("Stripe is not loaded yet - cannot init checkout element","warn")}initZonosNotification(){if(document.querySelector("zonos-notification"))return;const o=document.createElement("zonos-notification");document.body.appendChild(o)}async setupGoogleFont(o){var t,n;const e=o||f();if("Inter"===e){if(!o)return;c("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn"),h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:o})}const{errors:s,json:r}=await i(`https://v1.route.js.zonos.com/api/zonos-elements/get-font-detail?family=${e}`);s.length>0||!r?c(`Failed to load font ${e}`,"warn"):(null===(n=(t=window.Zonos).injectSupportGoogleFont)||void 0===n||n.call(t,r.fontUrl),o&&(c(`[FONT] ${o} font override applied`),h.appearance=Object.assign(Object.assign({},h.appearance),{fontFamily:o})))}async componentWillLoad(){h.zonosApiKey=this.zonosApiKey,(async()=>{var o,t;const{errors:n,json:e}=await(async()=>{const{errors:o,json:t}=await i("https://v1.route.js.zonos.com/api/zonos-elements/zonos-settings");return o.length?(r("Error occurs when getting zonos settings. If this is not an unauthorized error, it will use user setting or default setting"),{errors:o,json:null}):{errors:[],json:t}})();if("403"===(null===(o=n[0])||void 0===o?void 0:o.type.toString()))return void c("Failed to load zonos settings. This domain may not have access","warn");this.disablePlaceOrderButtons({disable:!0}),this.initZonosNotification(),u({overrideSettings:this.config,zonosSettings:e}),this.setupGoogleFont(),h.helloSettings&&(async o=>{const{anchorElementSelector:t}=o;if(!t||!a(t))return void r(`Selector anchorElementSelector "${o.anchorElementSelector}" is not a valid selector.`);const n=document.querySelector(t);c("Hello init complete"),(o=>{if(!document.querySelector("zonos-hello")&&o){const t=document.createElement("zonos-hello");o.appendChild(t)}})(n)})(h.helloSettings),await l();const s=(null===(t=null==e?void 0:e.checkoutSettings)||void 0===t?void 0:t.externalServiceTokens.find((o=>"STRIPE_PUBLISHABLE_TOKEN"===o.type)))||null;if(s&&this.stripeInitEvent){if("INACTIVE"===h.checkoutSettings.subscriptionStatus)return c('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn"),void c("zonos controller loaded");if("DISABLED"===h.checkoutSettings.visibilityStatus)return c("=== Checkout is disabled by store owner ===","warn"),void c("zonos controller loaded");this.stripeInitEvent.emit({publishableKey:s.token}),c("zonos controller loaded")}else c("Checkout failed to load -- missing publishable key","warn")})()}async showNotification(o){const t=document.querySelector("zonos-notification");t?t.showNotification(o):c("Failed to show notification - zonos-notification not found","warn")}async overrideConfig(o){u({overrideSettings:o,zonosSettings:null})}async overrideCountry(o){d(o)}async getAppearanceSetting(){return h.appearance}render(){return n(e,{class:"zonos--elements"})}};m.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{visibility:hidden;opacity:0;height:0}";export{m as zonos_controller}
@@ -1 +0,0 @@
1
- import{r as o,h as s,F as t,H as c}from"./p-956efa27.js";import{k as e,c as n,h as i,g as a,s as h,l as r,j as l,m as u,d,n as z,o as m,e as k}from"./p-4846796a.js";import{a as p,l as f,t as g}from"./p-3c6988d7.js";import{z as v,m as b}from"./p-089ba905.js";import{s as w,i as y}from"./p-1685c8df.js";import{c as x}from"./p-b4b7f705.js";import{g as C}from"./p-ff95f098.js";import{i as B}from"./p-55f49f1e.js";const I='<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',j='<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>',L=class{constructor(s){o(this,s),this.applyStripeTheme=async()=>{var o,s,t;const c=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||v.appearance.theme;await e({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideTheme:this.isMobile?c:void 0})},this.isShippableCountry=(o=!0)=>!(!p.localizationLoaded||!p.isShippableCountry&&(o&&f("Checkout: not shippable country"),1)),this.getCurrentLocalePageEnum=()=>{switch(n.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=void 0,this.preview=!1,this.mobile=!1,this.defaultAddress=null,this.forceDialogOpen=!1,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.paymentError=!1,this.collapseReviewMobile=!1,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0}async initCartInfoHandler(o){i(o.detail)}async closeDialogHandler(){w("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==n.step||a(),n.step="customer-info"}async buildCartAndInit(){if(v.checkoutSettings.buildCartDetail){f("build cart detail");const o=await v.checkoutSettings.buildCartDetail();await i(o)}if(!h.clientSecret){const o=await r();if(f(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}attachCheckout(){const o=v.checkoutSettings.placeOrderButtonSelector;o&&document.querySelectorAll(o).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(this.isShippableCountry()){o.preventDefault(),o.stopPropagation(),f("zonos checkout button clicked"),h.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");w("zonos-checkout-start")}catch(o){h.isFetchingSession=!1,l({messages:[g("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:g("Error creating Checkout")})}}})),o.setAttribute("data-zonos-checkout-attached","true"))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}async init(){h.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe;const o=setInterval((()=>{const s=window.Zonos.internationalHideSelector;if(!s)return void clearInterval(o);const t=this.isShippableCountry(!1),c=document.querySelectorAll(s);t?null==c||c.forEach((o=>{const s=o;s.setAttribute("data-zonos-checkout-original-display",s.style.display),s.style.display="none"})):null==c||c.forEach((o=>{const s=o,t=s.getAttribute("data-zonos-checkout-original-display")||getComputedStyle(s).display;s.style.display=t||"initial"}))}),100),s=setInterval((()=>{h.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(f("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),setInterval((()=>{this.attachCheckout()}),50))),clearInterval(s)):f("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(s)}),1e4)}async setToFinishStep(o){n.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await u();const o=setInterval((()=>{!n.landedCostData&&h.isFetchingLandedCost||(n.landedCostData&&d(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{d(),this.submitLoading=!1}),500)}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0;try{await z(),d()}catch(o){console.error(o),this.paymentError=!0}this.submitLoading=!1}async handleFinishClick(){if(m(),this.preview)return n.step="customer-info",void await this.init();a();const o=window.location.href.split("?")[0];window.history.replaceState({},document.title,o),this.open=!1,window.location.reload()}async handleBackClick(){"customer-info"!==n.step?k():await this.closeDialogHandler()}handleWindowResize(){this.isMobile=y(this.mobile),this.applyStripeTheme(),f(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=y(this.mobile),this.applyStripeTheme(),f(`mobile: ${this.isMobile}`)}componentWillLoad(){this.init(),this.isMobile=y(this.mobile),f(`mobile: ${this.isMobile}`)}disconnectedCallback(){m(),a()}render(){var o;const e="finish"!==n.step&&"error"!==n.step&&!h.stripeElements||h.isFetchingSession,{colorPrimary:i,colorSecondary:a,logoUrl:r,style:l}=b(v.appearance,this.appearanceSettingsOverride),u="ENABLED"===v.appearance.zonosAttribution,d=v.appearance.theme,z=i&&B(i)?"DARK":"LIGHT",m=this.isMobile?d:z,k=this.isMobile?void 0:a,{customMessages:f}=p,w=(null===(o=f.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message)||"Know about duties and taxes before you buy. Shop with confidence!",y=this.getCurrentLocalePageEnum(),L=f.filter((o=>o.pageName===y)),H=()=>s("div",{class:"zonos--logo"},r&&s("img",{alt:`${v.organizationName} logo`,src:r,width:100})),S=()=>s("zonos-v-stack",null,H(),L.map((o=>s("zonos-custom-message",{icon:I,message:o.message}))),s("div",null,s("zonos-button",{class:"zonos--back-button",icon:s("zonos-icon",{content:'<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>'}),noBackground:!0,noPaddingLeft:!0,noPaddingRight:!0,onClick:()=>this.handleBackClick(),theme:m},g("Back")))),M=()=>u&&s("div",{class:"zonos--footer","data-theme":d},s("zonos-text",{type:"hintText"},g("Powered by")),s("zonos-logo",{theme:d,width:"100px"})),T=()=>{var o;const c=this.isMobile?"primary":void 0,e=null===(o=this.zonosReviewRef)||void 0===o?void 0:o.scrollHeight;return s("div",{class:"zonos--content",style:{"--border-radius":C(l)}},"finish"!==n.step&&"error"!==n.step&&s(t,null,s("div",{class:"zonos--left","data-theme":m,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&S(),"customer-info"===n.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:k,submitBtnType:c}),"shipping"===n.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:k,submitBtnType:c}),"payment"===n.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:k,submitBtnType:c})),s("div",{class:"zonos--right","data-theme":d},this.isMobile&&S(),!this.isMobile&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{content:j}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-collapse",{collapseSize:e,collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)},ref:o=>this.zonosReviewRef=o}),s("zonos-cart-items",null))),s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:I,message:w}))),!this.isMobile&&M()),this.isMobile&&M()),("finish"===n.step||"error"===n.step)&&s("div",{class:"zonos--done","data-theme":d},s("div",{class:"zonos--header"},H(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{content:j}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:d})),s("zonos-checkout-finish",{borderRadius:l,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===n.step&&n.error?Object.assign(Object.assign({},n.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})))};return s(c,{class:x(["zonos--checkout zonos--elements",u&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?T():s("zonos-dialog",{borderStyle:l,"data-theme":d,height:"980px",isLoading:e,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},T()))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged"],mobile:["handleMobileChange"]}}};L.style=".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)}.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);padding-bottom:var(--amino-space-80)}.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--footer.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center;position:absolute;bottom:var(--amino-space-32);right:var(--amino-space-56);gap:var(--amino-space-8)}.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)}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2}.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;gap:var(--amino-space-16);margin-top:var(--amino-space-24);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--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}.mobile.sc-zonos-checkout-h .zonos--footer.sc-zonos-checkout{bottom:0;left:0;padding:var(--amino-space-12);position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:var(--amino-gray-0)}";export{L as zonos_checkout}
@@ -1 +0,0 @@
1
- import{r as o,h as e,H as t}from"./p-956efa27.js";import{_ as s,i,f as n,g as r,z as a,m as l}from"./p-089ba905.js";import{h,b as d,a as m,i as c,t as p,g as f,s as g,l as u,e as w,f as z,j as b,k as v}from"./p-3c6988d7.js";import{c as x}from"./p-b4b7f705.js";import{g as y}from"./p-5883217a.js";var k=function(){return s.Date.now()},T=/\s/,E=/^\s+/,L=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(E,""):o},C=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,D=/^0o[0-7]+$/i,I=parseInt,R=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||i(o)&&"[object Symbol]"==n(o)}(o))return NaN;if(r(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=r(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=L(o);var t=j.test(o);return t||D.test(o)?I(o.slice(2),t?2:8):C.test(o)?NaN:+o},X=Math.max,S=Math.min,O=function(o,e,t){var s,i,n,a,l,h,d=0,m=!1,c=!1,p=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,d=e,a=o.apply(n,t)}function g(o){var t=o-h;return void 0===h||t>=e||t<0||c&&o-d>=n}function u(){var o=k();if(g(o))return w(o);l=setTimeout(u,function(o){var t=e-(o-h);return c?S(t,n-(o-d)):t}(o))}function w(o){return l=void 0,p&&s?f(o):(s=i=void 0,a)}function z(){var o=k(),t=g(o);if(s=arguments,i=this,h=o,t){if(void 0===l)return function(o){return d=o,l=setTimeout(u,e),m?f(o):a}(h);if(c)return clearTimeout(l),l=setTimeout(u,e),f(h)}return void 0===l&&(l=setTimeout(u,e)),a}return e=R(e)||0,r(t)&&(m=!!t.leading,n=(c="maxWait"in t)?X(R(t.maxWait)||0,e):n,p="trailing"in t?!!t.trailing:p),z.cancel=function(){void 0!==l&&clearTimeout(l),d=0,s=h=i=l=void 0},z.flush=function(){return void 0===l?a:w(k())},z};const B=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=a.helloSettings;i&&s||d("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&c(i)&&document.querySelectorAll(i)||[],l=s&&c(s)&&document.querySelectorAll(s)||[];if(r.length!==l.length)return d("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,m=h&&t&&c(t)&&document.querySelectorAll(t)||[];h&&m.length!==l.length&&d('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const p=[];for(let t=0;t<r.length;t++){const s=r[t],i=l[t];if(s&&i){const n={cartButtonNode:m[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};p.push(n)}}return p},N=class{constructor(e){o(this,e),this.getHelloPeekMessage=()=>{if(("productDetail"===a.currentHelloPage||"productList"===a.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===a.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(a.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return`${p("Welcome to")} ${a.organizationName}`}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==a.currentHelloPage&&"productList"!==a.currentHelloPage||"DISABLED"===a.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=m;if(!e)return d("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await h("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(d(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage();const{peekMessageBehavior:o,peekMessageDelay:e}=a.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=B();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage(),this.displayCurrency()},this.handleProductCountChange=O((()=>{const{productTitleElementSelector:o}=a.helloSettings;if(o){const o=B();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==m.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,a.currentHelloPage=(()=>{const{href:o}=window.location,{cartUrlPattern:e,homepageUrlPattern:t,productDetailUrlPattern:s,productListUrlPattern:i}=a.helloSettings;return e&&new RegExp(e).test(o)?"cart":s&&new RegExp(s).test(o)?"productDetail":i&&new RegExp(i).test(o)?"productList":t&&new RegExp(t).test(o)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void g(m.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return y(this.helloRef)},this.isShippableCountry=(o=!0)=>!(!m.localizationLoaded||!m.isShippableCountry&&(o&&u("Hello: not shippable country"),1)),this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=a.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[]}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&a.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),clearInterval(o))}),100)}async displayCurrency(){m.exchangeRate?w():console.error("Could not display currency. Exchange rate and format data is not available.")}async convertAndFormat(o){z(o)}async convert(o){b(o)}async format(o){v(o)}handleResize(){O(this.render.bind(this),500)}render(){var o,s;if(null===(o=a.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return u("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i}=m,n=this.mobileLocationOverride||a.helloSettings.mobileLocation,r=window.innerWidth<768,h=this.animateFromLeftOverride||r&&n.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,d=n.includes("TOP"),c=l(a.appearance,this.appearanceSettingsOverride),{theme:p}=c,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription)))),g=this.isShippableCountry()&&!!i;return e(t,{class:"zonos--hello zonos--elements","data-theme":p},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:x(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",h&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",d&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:x(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}};N.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:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";export{N as zonos_hello}
@@ -1 +0,0 @@
1
- import{z as p}from"./p-089ba905.js";const x=x=>x?"SHARP"===x?"0px":"10px":"SHARP"===p.appearance.style?"0px":"10px";export{x as g}