@zonos/elements 1.3.32 → 1.3.33

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 (79) hide show
  1. package/dist/cjs/{cart-d07e8ea1.js → cart-11b47252.js} +3 -2
  2. package/dist/cjs/index.cjs.js +12 -5
  3. package/dist/cjs/{submitGtag-f1aeac3e.js → submitGtag-3a1d091e.js} +1 -1
  4. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
  6. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
  7. package/dist/cjs/zonos-controller.cjs.entry.js +3 -2
  8. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-notification_2.cjs.entry.js +1 -1
  14. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
  15. package/dist/collection/components/main/zonos-controller.js +2 -1
  16. package/dist/collection/components/store/hello/localization.js +3 -2
  17. package/dist/collection/scripts/_zonosBase.js +8 -1
  18. package/dist/esm/{cart-a90aa9ae.js → cart-22ba08ec.js} +3 -2
  19. package/dist/esm/index.js +12 -5
  20. package/dist/esm/{submitGtag-849e2bc9.js → submitGtag-1435eec8.js} +1 -1
  21. package/dist/esm/zonos-address_8.entry.js +1 -1
  22. package/dist/esm/zonos-cart-items_12.entry.js +2 -2
  23. package/dist/esm/zonos-checkout.entry.js +5 -3
  24. package/dist/esm/zonos-controller.entry.js +3 -2
  25. package/dist/esm/zonos-country-flag.entry.js +1 -1
  26. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  27. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  28. package/dist/esm/zonos-hello.entry.js +1 -1
  29. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  30. package/dist/esm/zonos-notification_2.entry.js +1 -1
  31. package/dist/esm-es5/{cart-a90aa9ae.js → cart-22ba08ec.js} +1 -1
  32. package/dist/esm-es5/index.js +1 -1
  33. package/dist/esm-es5/{submitGtag-849e2bc9.js → submitGtag-1435eec8.js} +1 -1
  34. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  35. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  36. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  37. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  38. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  39. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  40. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  41. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  42. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  43. package/dist/esm-es5/zonos-notification_2.entry.js +1 -1
  44. package/dist/scripts/index.d.ts +5 -0
  45. package/dist/scripts/index.js +1 -1
  46. package/dist/scripts/loadZonos.js +1 -1
  47. package/dist/scripts/zonos.js +1 -1
  48. package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
  49. package/dist/zonos-elements/index.esm.js +1 -1
  50. package/dist/zonos-elements/{p-41ef293d.js → p-11672829.js} +1 -1
  51. package/dist/zonos-elements/{p-16ab16f9.system.entry.js → p-28e6963b.system.entry.js} +1 -1
  52. package/dist/zonos-elements/{p-93e493ce.entry.js → p-35604380.entry.js} +1 -1
  53. package/dist/zonos-elements/{p-7a6dcfa2.entry.js → p-36bb4360.entry.js} +1 -1
  54. package/dist/zonos-elements/{p-cc965417.entry.js → p-3b95a9a3.entry.js} +1 -1
  55. package/dist/zonos-elements/p-450eb8ff.system.js +1 -0
  56. package/dist/zonos-elements/{p-b6c515e1.system.entry.js → p-478357b0.system.entry.js} +1 -1
  57. package/dist/zonos-elements/{p-21b61106.system.entry.js → p-56152835.system.entry.js} +1 -1
  58. package/dist/zonos-elements/{p-8aadefbb.entry.js → p-6f589755.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-1eab7a86.entry.js → p-74bd6150.entry.js} +1 -1
  60. package/dist/zonos-elements/{p-3ba86711.system.js → p-7624013b.system.js} +1 -1
  61. package/dist/zonos-elements/{p-2d6d0d57.js → p-84997f2e.js} +1 -1
  62. package/dist/zonos-elements/{p-38a90e86.system.entry.js → p-88129ef9.system.entry.js} +1 -1
  63. package/dist/zonos-elements/{p-af0d3ca0.system.entry.js → p-95d52a24.system.entry.js} +1 -1
  64. package/dist/zonos-elements/{p-6de51a79.system.entry.js → p-a0b17e0b.system.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-344ce057.entry.js → p-b5825bb7.entry.js} +1 -1
  66. package/dist/zonos-elements/{p-85503e70.system.entry.js → p-b8a4b345.system.entry.js} +1 -1
  67. package/dist/zonos-elements/{p-672e80e5.system.entry.js → p-cdb53aaf.system.entry.js} +1 -1
  68. package/dist/zonos-elements/{p-057380ad.system.js → p-dafa2b79.system.js} +1 -1
  69. package/dist/zonos-elements/p-ddb1cfe2.entry.js +1 -0
  70. package/dist/zonos-elements/{p-da787898.system.entry.js → p-dec21ca2.system.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-9d599745.entry.js → p-e09df465.entry.js} +1 -1
  72. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  73. package/dist/zonos-elements/{p-717faabd.system.entry.js → p-eb566457.system.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-6f04e132.entry.js → p-fa7e2a01.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-e344cb12.entry.js → p-fe296307.entry.js} +1 -1
  76. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  77. package/package.json +1 -1
  78. package/dist/zonos-elements/p-8b771620.entry.js +0 -1
  79. package/dist/zonos-elements/p-ca8fb99c.system.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):i(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,n,i;return{setters:[function(t){o=t.p;n=t.b;e("setNonce",t.s)},function(e){i=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return o(n)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-af0d3ca0.system",[[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],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],showSessionTimoutScreen:[32],checkoutTimeoutInterval:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-da787898.system",[[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],isHelloWidgetRendered:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-717faabd.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-d2992457.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-966ab4e7.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-71882ac9.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-b903af96.system",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-ed333de6.system",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}]]],["p-6de51a79.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-2a45c837.system",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-01304a58.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-16ab16f9.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-38a90e86.system",[[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],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-73ba4398.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-b6c515e1.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-da2e5289.system",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-c0fcc0fa.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-9de374a7.system",[[17,"zonos-button",{buttonColor:[1,"button-color"],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"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-85503e70.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-672e80e5.system",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-21b61106.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):i(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(o=0)),o)try{if(n=1,i&&(s=a[0]&2?i["return"]:a[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;if(i=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(a[0]===6&&o.label<s[1]){o.label=s[1];s=a;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(a);break}if(s[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-56ba5cbf.system.js"],(function(e,t){"use strict";var o,n,i;return{setters:[function(t){o=t.p;n=t.b;e("setNonce",t.s)},function(e){i=e.g}],execute:function(){var e=this;var s=function(){var e=t.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return o(n)};s().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,i()];case 1:e.sent();return[2,n([["p-95d52a24.system",[[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],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],showSessionTimoutScreen:[32],checkoutTimeoutInterval:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-dec21ca2.system",[[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],isHelloWidgetRendered:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-eb566457.system",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-d2992457.system",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-966ab4e7.system",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-71882ac9.system",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-b903af96.system",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-ed333de6.system",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}]]],["p-a0b17e0b.system",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-2a45c837.system",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-01304a58.system",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-28e6963b.system",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-88129ef9.system",[[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],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-73ba4398.system",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-478357b0.system",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-da2e5289.system",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-c0fcc0fa.system",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-9de374a7.system",[[17,"zonos-button",{buttonColor:[1,"button-color"],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"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-b8a4b345.system",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-cdb53aaf.system",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-56152835.system",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],t)]}}))}))}))}}}));
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-057380ad.system.js","./p-0b538ed4.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(t){"use strict";var n,o,e,i,r,u,s,a,c,f,d,h,l,v;return{setters:[function(t){n=t.r;o=t.c;e=t.h;i=t.H},function(t){r=t.r;u=t.u;s=t.h;a=t.v;c=t.a},function(t){f=t.z;d=t.b;h=t.d},function(t){l=t.a;v=t.l},function(){},function(){}],execute:function(){var w=this;var m=function(){return __awaiter(w,void 0,void 0,(function(){var t,n,o,e;return __generator(this,(function(i){switch(i.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,r(t)];case 1:n=i.sent(),o=n.errors,e=n.json;if(o.length){l("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:o,json:null}]}return[2,{errors:[],json:e}]}}))}))};var _=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector){return}if(!u(t.placeOrderButtonSelector)){l('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}_()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var e=document.createElement("zonos-hello");n.appendChild(e);return true}return false};var b=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var e=".zonos--hello-mobile-wrapper";var i=document.querySelector(e);if(i){return e}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return e};var y=function(t){return __awaiter(w,void 0,void 0,(function(){var n,o,e,i,r;return __generator(this,(function(s){n=t.anchorElementSelector;o=b({position:"bottom-right"});e=n||o;if(!e||!u(e)){l('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}v("Hello init complete");i=g(e);if(!i){r=new MutationObserver((function(){var t=g(e);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect();g(o)}),1e3)}return[2]}))}))};var z=":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 j=z;var k=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=o(this,"stripeInitEvent",7);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){v("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}s.stripe=t;void p(f.checkoutSettings);v("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,e,i,u,s,a,c;return __generator(this,(function(d){switch(d.label){case 0:e=t||h();if(e==="Inter"){if(!t){return[2]}v("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}i="https://v1.route.js.zonos.com";return[4,r("".concat(i,"/api/zonos-elements/get-font-detail?family=").concat(e))];case 1:u=d.sent(),s=u.errors,a=u.json;if(s.length>0||!a){v("Failed to load font ".concat(e),"warn");return[2]}c=a.fontUrl;(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,c);if(!t){return[2]}v("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void y(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,e,i,r,u;return __generator(this,(function(s){switch(s.label){case 0:return[4,m()];case 1:o=s.sent(),e=o.errors,i=o.json;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){v("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();r=Object.assign(Object.assign({},this.config),{subscriptionStatus:undefined});d({overrideSettings:r,zonosSettings:i});void this.setupGoogleFont();if(f.helloSettings){void y(f.helloSettings)}return[4,a()];case 2:s.sent();u=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!u||!this.stripeInitEvent){v("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){v('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");v("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){v("=== Checkout is disabled by store owner ===","warn");v("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:u.token});v("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(o){n=document.querySelector("zonos-notification");if(!n){v("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){d({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 c(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return e(i,{key:"c98dfffe6973da6ae6ad1fef367ed84b3eb3dc0c",class:"zonos--elements"})};return t}());k.style=j}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-d99232c5.system.js","./p-dafa2b79.system.js","./p-0b538ed4.system.js","./p-63db40b9.system.js","./p-e37440ad.system.js","./p-a8cb25de.system.js"],(function(t){"use strict";var n,o,e,i,r,u,s,a,c,f,d,h,l,v;return{setters:[function(t){n=t.r;o=t.c;e=t.h;i=t.H},function(t){r=t.r;u=t.u;s=t.h;a=t.v;c=t.a},function(t){f=t.z;d=t.b;h=t.d},function(t){l=t.a;v=t.l},function(){},function(){}],execute:function(){var w=this;var m=function(){return __awaiter(w,void 0,void 0,(function(){var t,n,o,e;return __generator(this,(function(i){switch(i.label){case 0:t="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/zonos-settings");return[4,r(t)];case 1:n=i.sent(),o=n.errors,e=n.json;if(o.length){l("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:o,json:null}]}return[2,{errors:[],json:e}]}}))}))};var _=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector){return}if(!u(t.placeOrderButtonSelector)){l('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}_()};var b=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var e=document.createElement("zonos-hello");n.appendChild(e);return true}return false};var g=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var e=".zonos--hello-mobile-wrapper";var i=document.querySelector(e);if(i){return e}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return e};var y=function(t){return __awaiter(w,void 0,void 0,(function(){var n,o,e,i,r;return __generator(this,(function(s){n=t.anchorElementSelector;o=g({position:"bottom-right"});e=n||o;if(!e||!u(e)){l('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}v("Hello init complete");i=b(e);if(!i){r=new MutationObserver((function(){var t=b(e);if(t){r.disconnect()}}));r.observe(document.body,{childList:true,subtree:true});setTimeout((function(){r.disconnect();b(o)}),1e3)}return[2]}))}))};var z=":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 j=z;var k=t("zonos_controller",function(){function t(t){n(this,t);this.stripeInitEvent=o(this,"stripeInitEvent",7);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){v("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}s.stripe=t;void p(f.checkoutSettings);v("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,e,i,u,s,a,c;return __generator(this,(function(d){switch(d.label){case 0:e=t||h();if(e==="Inter"){if(!t){return[2]}v("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}i="https://v1.route.js.zonos.com";return[4,r("".concat(i,"/api/zonos-elements/get-font-detail?family=").concat(e))];case 1:u=d.sent(),s=u.errors,a=u.json;if(s.length>0||!a){v("Failed to load font ".concat(e),"warn");return[2]}c=a.fontUrl;(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,c);if(!t){return[2]}v("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void y(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,e,i,r,u;return __generator(this,(function(s){switch(s.label){case 0:return[4,m()];case 1:o=s.sent(),e=o.errors,i=o.json;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){v("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();r=Object.assign(Object.assign({},this.config),{subscriptionStatus:undefined});d({overrideSettings:r,zonosSettings:i});void this.setupGoogleFont();if(f.helloSettings){void y(f.helloSettings)}return[4,a()];case 2:s.sent();u=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!u||!this.stripeInitEvent){v("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){v('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");v("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){v("=== Checkout is disabled by store owner ===","warn");v("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:u.token});v("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(o){n=document.querySelector("zonos-notification");if(!n){v("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){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){v("Override country code to ".concat(t));void c(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return e(i,{key:"d7af0426a1f93b8ec8b37ef73babe045bc2a7624",class:"zonos--elements"})};return t}());k.style=j}}}));
@@ -1 +1 @@
1
- import{r as o,c as e,h as t,H as s}from"./p-ce347974.js";import{l as i,B as n,t as a}from"./p-2d6d0d57.js";import{z as l}from"./p-5821856c.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const c=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,f=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=i.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.dutyDeminimus)?n({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] duty free",{threshold:e}):a("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.vatTaxDeminimus)?n({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] tax free",{threshold:e}):a("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:n({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:100*o.vatTaxRate+"%"}),`${a("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${c({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:n({amount:o.vatTaxDeminimus})})],this.getAdditionalDutyTaxMessage=()=>{if(!i.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(i.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(i.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(i.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(i.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=i,n=this.getDutyMessage(),c=this.getTaxMessage(),f=this.getAdditionalDutyTaxMessage(),m=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),g=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:b}=i,u=a("Welcome to [storeName]",{storeName:l.organizationName}),p=(null===(o=b.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),z=h(p),w=this.getCurrentPageEnum(),v=b.filter((o=>o.pageName===w));return t(s,{key:"af2c46bcc413205d644a2b94ee2ff568d3d004f2",class:"zonos--elements"},t("div",{key:"67a563de9e702e370d057ee3cc45bc0c14feedc5","aria-hidden":"true",class:r(["zonos--hello-dialog",m&&"zonos--hello-dialog-animate-from-left",g&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"412a8d2f4c01e4ff216feb92a979be5987bcd8c7"},t("div",{key:"b2921acfc77c6a402a14256a6f1c28607f6533e7",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"aa623c0533a5f852dab7f0f98d6dc26f62ef899a",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9",spacing:24},t("zonos-country-flag",{key:"57afef45e0bebe9bdfa715306f6ec2c30aca8dc1",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"954b970c82fd631efadbd9c916e8bad78f0e1321",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"cde98a9636e6150d6cab009970938a0cf61bc05a",type:"boldSubheader"},u),t("zonos-text",{key:"b63fc79317f23854737c1f2dd2cbde38f3841f2a",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"e115a03222d2271b358c3f1ae3feb938bafcdbef",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"6f5ef13c8ce1171b99c148f43f491ced8f29cd57",spacing:"12px"},t("zonos-v-stack",{key:"816a373a6dcf69976279af51f09d136f18c6b4a8",spacing:12},t("div",{key:"51fc31937cb4885c7a98ee5fbc0755a00158f172",class:"zonos--flex-message"},t("zonos-icon",{key:"bc659d649b3a7f046225270870e7ae31597027f4","aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"e63ce2eb6f381718ca26962c7429f266bf8cf8d9"},n)),t("div",{key:"6f49eac81be52709ad8f35c04cccd7d2fec03b7a",class:"zonos--flex-message"},t("zonos-icon",{key:"d95f29c3c42480c89a34e831740cfdbb3d64c058","aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"c226092fef030070af3af1d45debab989fb4f1b7"},c)),null==f?void 0:f.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{innerHTML:o})))))),v.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"32739e817940a937b59380197934ced91f2afc50",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"be58e393680370837ae35d5d4f85f77cf9620db2"},t("zonos-country-select",{key:"bc5c7e086513a44f817e5769acf2ca382b01fcc4",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7cbee089b9661602bb23e5e2821030d04891f18a"},t("zonos-language-select",{key:"55d654b2b339cfd83e3fe9814d914a382a891af3",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};f.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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{f as zonos_hello_dialog}
1
+ import{r as o,c as e,h as t,H as s}from"./p-ce347974.js";import{l as i,B as n,t as a}from"./p-84997f2e.js";import{z as l}from"./p-5821856c.js";import{c as r}from"./p-b4b7f705.js";import{f as h}from"./p-a87561b8.js";import{g as d}from"./p-5883217a.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const c=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,f=class{constructor(t){o(this,t),this.closeDialog=e(this,"closeDialog",7),this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(l.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=i.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU"].includes(o),this.getDutyMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.dutyDeminimus)?n({amount:o.dutyDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] duty free",{threshold:e}):a("Duties will apply to all orders")},this.getTaxMessage=()=>{const{countryLandedCost:o}=i,e=(null==o?void 0:o.vatTaxDeminimus)?n({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?a("Spend [threshold] tax free",{threshold:e}):a("Taxes will apply to all orders")},this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?null:[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:n({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>[a("Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders",{percentage:100*o.vatTaxRate+"%"}),`${a("The low-value GST law passed July 1st, 2018 applies to this retailer.")} ${c({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>[a("[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.",{percentage:100*o.vatTaxRate+"%",threshold:n({amount:o.vatTaxDeminimus})})],this.getAdditionalDutyTaxMessage=()=>{if(!i.countryLandedCost)return null;if(!this.hasTaxId())return null;switch(i.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(i.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(i.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(i.countryLandedCost);default:return null}},this.isOpen=!1,this.setIsOpen=()=>{},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettings=void 0,this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o;const{selectedCountryCode:e}=i,n=this.getDutyMessage(),c=this.getTaxMessage(),f=this.getAdditionalDutyTaxMessage(),m=this.animateFromLeftOverride||this.dialogRef&&d(this.dialogRef),g=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:b}=i,u=a("Welcome to [storeName]",{storeName:l.organizationName}),p=(null===(o=b.find((o=>"hello_default"===o.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),z=h(p),w=this.getCurrentPageEnum(),v=b.filter((o=>o.pageName===w));return t(s,{key:"af2c46bcc413205d644a2b94ee2ff568d3d004f2",class:"zonos--elements"},t("div",{key:"67a563de9e702e370d057ee3cc45bc0c14feedc5","aria-hidden":"true",class:r(["zonos--hello-dialog",m&&"zonos--hello-dialog-animate-from-left",g&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"412a8d2f4c01e4ff216feb92a979be5987bcd8c7"},t("div",{key:"b2921acfc77c6a402a14256a6f1c28607f6533e7",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"aa623c0533a5f852dab7f0f98d6dc26f62ef899a",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"4fdac9331a5b2506a5ca1c7c1b6bfecf822bfcd9",spacing:24},t("zonos-country-flag",{key:"57afef45e0bebe9bdfa715306f6ec2c30aca8dc1",class:"zonos--hello-country-flag",countryCode:e}),t("zonos-v-stack",{key:"954b970c82fd631efadbd9c916e8bad78f0e1321",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"cde98a9636e6150d6cab009970938a0cf61bc05a",type:"boldSubheader"},u),t("zonos-text",{key:"b63fc79317f23854737c1f2dd2cbde38f3841f2a",innerHTML:z,textColor:"gray-800"})),t("zonos-v-stack",{key:"e115a03222d2271b358c3f1ae3feb938bafcdbef",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),t("zonos-card",{key:"6f5ef13c8ce1171b99c148f43f491ced8f29cd57",spacing:"12px"},t("zonos-v-stack",{key:"816a373a6dcf69976279af51f09d136f18c6b4a8",spacing:12},t("div",{key:"51fc31937cb4885c7a98ee5fbc0755a00158f172",class:"zonos--flex-message"},t("zonos-icon",{key:"bc659d649b3a7f046225270870e7ae31597027f4","aria-label":"Duty de minimis",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"e63ce2eb6f381718ca26962c7429f266bf8cf8d9"},n)),t("div",{key:"6f49eac81be52709ad8f35c04cccd7d2fec03b7a",class:"zonos--flex-message"},t("zonos-icon",{key:"d95f29c3c42480c89a34e831740cfdbb3d64c058","aria-label":"Tax de minimis",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{key:"c226092fef030070af3af1d45debab989fb4f1b7"},c)),null==f?void 0:f.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{innerHTML:o})))))),v.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"32739e817940a937b59380197934ced91f2afc50",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"be58e393680370837ae35d5d4f85f77cf9620db2"},t("zonos-country-select",{key:"bc5c7e086513a44f817e5769acf2ca382b01fcc4",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"7cbee089b9661602bb23e5e2821030d04891f18a"},t("zonos-language-select",{key:"55d654b2b339cfd83e3fe9814d914a382a891af3",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};f.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--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:calc(100% - 32px);top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{f as zonos_hello_dialog}
@@ -1 +1 @@
1
- import{r as t,h as s,H as o,d as i}from"./p-ce347974.js";import{l as e}from"./p-2d6d0d57.js";import{d as a}from"./p-5821856c.js";import{c as n}from"./p-b4b7f705.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
1
+ import{r as t,h as s,H as o,d as i}from"./p-ce347974.js";import{l as e}from"./p-84997f2e.js";import{d as a}from"./p-5821856c.js";import{c as n}from"./p-b4b7f705.js";import"./p-eaa335e1.js";import"./p-9a1c0d02.js";import"./p-31b3d26b.js";const h=class{constructor(s){t(this,s),this.countryCode=e.selectedCountryCode,this.size=void 0}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const t=`https://zonos-store-assets.s3.amazonaws.com/images/elements-flags/${this.countryCode}.svg`,i=a();return s(o,{class:"zonos--elements",style:this.size?{"--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--font-family":i}},s("div",{class:n(["flag-container"])},s("div",{class:"flag-icon",style:{backgroundImage:`url(${t})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-ce347974.js";export{s as setNonce}from"./p-ce347974.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-8b771620",[[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],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],showSessionTimoutScreen:[32],checkoutTimeoutInterval:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-8aadefbb",[[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],isHelloWidgetRendered:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-7a6dcfa2",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-d8c1eb99",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-63a27875",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-c3619b3d",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-3523c3b4",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-c21802e9",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}]]],["p-e344cb12",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-6c3390b7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-2aa72606",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-93e493ce",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-6f04e132",[[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],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-3541e6dd",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-1eab7a86",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-e3c014ae",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-699a5376",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-22882fd6",[[17,"zonos-button",{buttonColor:[1,"button-color"],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"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-cc965417",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-344ce057",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-9d599745",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
1
+ import{p as e,b as o}from"./p-ce347974.js";export{s as setNonce}from"./p-ce347974.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-ddb1cfe2",[[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],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],showSessionTimoutScreen:[32],checkoutTimeoutInterval:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-6f589755",[[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],isHelloWidgetRendered:[32],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-36bb4360",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-d8c1eb99",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-63a27875",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-c3619b3d",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-3523c3b4",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-c21802e9",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}]]],["p-fe296307",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-6c3390b7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-2aa72606",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-35604380",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}]]],["p-fa7e2a01",[[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],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-3541e6dd",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-74bd6150",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-e3c014ae",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-699a5376",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-22882fd6",[[17,"zonos-button",{buttonColor:[1,"button-color"],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"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-3b95a9a3",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-b5825bb7",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],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"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-e09df465",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{paymentError:[4,"payment-error"],submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.3.32",
3
+ "version": "1.3.33",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",
@@ -1 +0,0 @@
1
- import{r as o,h as s,H as e,F as t}from"./p-ce347974.js";import{l as n,s as c,a as i,b as r,c as a,i as h,d as l,e as u,f as d,g as z,h as m,j as k,k as p,t as g,m as f,n as b,o as v,p as y,q as w}from"./p-2d6d0d57.js";import{z as C,g as x,m as I}from"./p-5821856c.js";import{c as O,s as S,a as A,t as T,g as H}from"./p-41ef293d.js";import{i as L}from"./p-81a54668.js";import{l as N,a as j}from"./p-eaa335e1.js";import{c as B}from"./p-b4b7f705.js";import{g as P}from"./p-31b3d26b.js";import{i as D}from"./p-9a1c0d02.js";import{R as M}from"./p-08e7107d.js";const E=({key:o,value:s})=>s?{key:o,value:s}:null,R=o=>[E({key:"brand",value:o.itemBrand}),E({key:"material",value:o.itemMaterial}),E({key:"category",value:o.itemCategory}),E({key:"color",value:o.itemColor}),E({key:"customization",value:o.itemCustomization}),E({key:"descriptionDetailed",value:o.itemDescriptionDetailed}),E({key:"fabricContent",value:o.itemFabricContent}),E({key:"ltlClass",value:o.itemLtlClass}),E({key:"pickingLocation",value:o.itemPickingLocation}),E({key:"shipFromLocation",value:o.itemShipFromLocation}),E({key:"size",value:o.itemSize}),E({key:"status",value:o.status})].filter(Boolean),$=o=>{if(!o)return"POUND";switch(o.toUpperCase()){case"KG":return"KILOGRAM";case"OZ":return"OUNCE";case"G":return"GRAM";default:return"POUND"}},U=o=>{if(!o)return[];const s=[];return o.length&&s.push({type:"LENGTH",unitOfMeasure:"INCH",value:o.length}),o.width&&s.push({type:"WIDTH",unitOfMeasure:"INCH",value:o.width}),o.weight&&s.push({type:"WEIGHT",unitOfMeasure:$(o.weightUnits),value:o.weight}),o.height&&s.push({type:"HEIGHT",unitOfMeasure:"INCH",value:o.height}),s},_=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(document.dispatchEvent(O("legacyCheckoutError","Unable to initiate checkout process in a country where shipping is not available")),o&&N("Checkout: not shippable country"),1)),G='<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',F=class{constructor(s){o(this,s),this.onChangeLocaleListener=()=>{},this.applyStripeTheme=async()=>{var o,s,e,t;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||C.appearance.theme;await h({overrideBorderRaidus:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.style,overridePrimaryColor:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.colorPrimary,overrideSecondaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorSecondary,overrideTheme:this.isMobile?n:void 0})},this.getCurrentLocalePageEnum=()=>{switch(l.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=!0,this.isAttachError=!1,this.isMobile=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.domesticRedirectedBtnSelector="#zonos--domestic-redirected-checkout-button",this.legacyCheckoutHiddenBtnSelector="#legacy-checkout-hidden-button",this.isLegacyCheckout=!1,this.confirmDialogOpen=!1,this.showSessionTimoutScreen=!1,this.checkoutTimeoutInterval=null,this.inventoryCheckErrorMessage=null}async initCartInfoHandler(o){u(o.detail)}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var s,e;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,A("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==l.step||d(),l.step="customer-info",z(),this.clearCheckoutTimeoutInterval(),null===(e=(s=C.checkoutSettings).onClose)||void 0===e||e.call(s)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if(window.Zonos.tempCartData){const o=(o=>{var s;return(null===(s=null==o?void 0:o.items)||void 0===s?void 0:s.map((o=>({amount:o.unitPrice||0,attributes:R(o),countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:"USD",description:o.itemDescriptionLong||"",imageUrl:o.imageURL||"",itemType:"PHYSICAL_GOOD",measurements:U(o),name:o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""}))))||[]})(window.Zonos.tempCartData);await u(o)}else if(C.checkoutSettings.buildCartDetail&&n.selectedCountryCode){N("build cart detail");const o=await C.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency});await u(o)}if(!m.clientSecret){const o=await k();if(N(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return await this.applyStripeTheme(),!0}clearCheckoutTimeoutInterval(){this.checkoutTimeoutInterval&&(clearTimeout(this.checkoutTimeoutInterval),this.checkoutTimeoutInterval=null)}startCheckoutTimeoutInterval(){if(this.preview)return;const o=new URLSearchParams(window.location.search).get("zonosCheckoutTimeout"),s=o&&!isNaN(parseInt(o,10))?parseInt(o,10):54e5;N(`==START CHECKOUT TIMEOUT - ${s}==`),this.checkoutTimeoutInterval=setTimeout((()=>{this.showSessionTimoutScreen=!0}),s)}reloadCheckoutSession(){window.location.reload()}attachCheckout(){const o=C.checkoutSettings.placeOrderButtonSelector;N(`attach checkout ${o}`),o&&document.querySelectorAll(`${o}, ${this.domesticRedirectedBtnSelector}`).forEach((o=>{o.getAttribute("data-zonos-checkout-attached")||(o.addEventListener("click",(async o=>{if(_()){o.preventDefault(),o.stopPropagation(),N("zonos checkout button clicked"),m.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");this.startCheckoutTimeoutInterval(),A("zonos-checkout-start"),T("checkout_open")}catch(o){m.isFetchingSession=!1,p({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.removeAttribute("disabled"),o.setAttribute("data-zonos-checkout-attached","true"),o.matches(this.domesticRedirectedBtnSelector)&&(o.dispatchEvent(O("click")),r(),o.remove()),o.matches(this.legacyCheckoutHiddenBtnSelector)&&(this.isLegacyCheckout=!0,o.dispatchEvent(O("click")),o.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useLegacyQueryParam(){const o=new URLSearchParams(window.location.search),s={country:o.get("country"),customerAddress1:o.get("customerAddress1"),customerAddress2:o.get("customerAddress2"),customerCity:o.get("customerCity"),customerEmail:o.get("customerEmail"),customerName:o.get("customerName"),customerPhone:o.get("customerPhone"),customerState:o.get("customerState"),customerZip:o.get("customerZip")};s.customerAddress1&&s.customerCity&&s.customerName&&s.customerPhone&&s.customerState&&s.customerZip&&s.country&&(this.defaultAddress={address:{city:s.customerCity,country:s.country,line1:s.customerAddress1,line2:s.customerAddress2||"",postal_code:s.customerZip,state:s.customerState},email:s.customerEmail||"",name:s.customerName,phone:s.customerPhone})}async init(){m.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:s})=>{if(!window.Zonos.isBigCommerce)return;const e=new MutationObserver((async()=>{const t=document.querySelector(o),n=c();if(!t&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==s||s(n),void e.disconnect()}const h=document.querySelector('select[name="shippingAddress.countryCode"]'),l=document.querySelector("#checkout-shipping-continue");h&&l&&(e.disconnect(),l.addEventListener("click",(async o=>{var s,e;const t=h.value;if(!t)return;if(i(t),!_(!1))return void r();const n=document.querySelector("form");if(!n)return;const c=new FormData(n),l=document.querySelector("input#addressLine1Input"),u={address1:null!==(s=c.get("shippingAddress.address1"))&&void 0!==s?s:l&&l.value,address2:c.get("shippingAddress.address2"),city:c.get("shippingAddress.city"),countryCode:c.get("shippingAddress.countryCode"),firstName:c.get("shippingAddress.firstName"),lastName:c.get("shippingAddress.lastName"),phone:c.get("shippingAddress.phone"),postalCode:c.get("shippingAddress.postalCode"),stateOrProvince:null!==(e=c.get("shippingAddress.stateOrProvince"))&&void 0!==e?e:c.get("shippingAddress.stateOrProvinceCode")};if(Object.values(u).some((o=>null==o)))return j("One or more shipping address field is missing",Object.entries(u)),void S({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(u))],metadata:{domain:window.location.hostname,storeId:C.storeId}});a({address1:u.address1,address2:u.address2,city:u.city,countryCode:u.countryCode,firstName:u.firstName,lastName:u.lastName,phone:u.phone,postalCode:u.postalCode,state:u.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));e.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:this.domesticRedirectedBtnSelector,onShippingAddressSessionFound:o=>{this.defaultAddress={address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}}}),window.Zonos.tempCartData&&this.useLegacyQueryParam();const o=setInterval((()=>{m.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(N("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):N("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){l.step="finish",this.storybookPaymentStatusOverride=o}async handleCustomerInfoContinue(){this.submitLoading=!0,await f();const o=setInterval((()=>{!l.landedCostData&&m.isFetchingLandedCost||(l.landedCostData&&b(),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{b(),this.submitLoading=!1}),500)}handleInventoryCheckDialogCancel(){this.inventoryCheckErrorMessage=null}handleInventoryCheckDialogConfirm(){this.inventoryCheckErrorMessage=null,this.closeDialogHandler({confirmed:!0})}async handleInventoryCheck(){const{onInventoryCheck:o}=C.checkoutSettings;return"function"!=typeof o?null:await o({items:l.items})}async handleCheckoutPaymentContinue(){this.paymentError=!1,this.submitLoading=!0,this.inventoryCheckErrorMessage=null;try{this.inventoryCheckErrorMessage=await this.handleInventoryCheck()}catch(o){this.inventoryCheckErrorMessage=g("Unable to check inventory. Please try again.")}if(this.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await v(),b(),this.clearCheckoutTimeoutInterval()}catch(o){j(o),this.paymentError=!0}this.submitLoading=!1}}async handleFinishClick(){if(y(),this.preview)return l.step="customer-info",void await this.init();if(d(),this.isLegacyCheckout&&window.Zonos.tempCartData){const o=window.Zonos.tempCartData.contShoppingURL;return void(window.location.href=o)}const o=window.location.href.split("?")[0],s=H();this.open=!1,s||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=L(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=L(this.mobile),this.applyStripeTheme(),N(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=x(this.appearanceSettingsOverride.theme))}handleAddressChange(){y()}componentWillLoad(){this.init(),this.isMobile=L(this.mobile),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=w("selectedLocale",(()=>{this.applyStripeTheme()})),N(`mobile: ${this.isMobile}`)}disconnectedCallback(){y(),d(),this.onChangeLocaleListener()}render(){var o;const c="finish"!==l.step&&"error"!==l.step&&!m.stripeElements||m.isFetchingSession,{colorPrimary:i,colorSecondary:r,logoUrl:a,style:h}=I(C.appearance,this.appearanceSettingsOverride),u="ENABLED"===C.appearance.zonosAttribution,d=C.appearance.theme,z=i&&D(i)?"DARK":"LIGHT",k=this.isMobile?d:z,p=this.isMobile?void 0:r,{customMessages:f}=n,b=null===(o=f.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),y=f.filter((o=>o.pageName===v)),w=()=>{const o=this.preview?`${a}?timestamp=${Date.now()}`:a;return s("div",{class:"zonos--logo"},o&&s("img",{alt:`${C.organizationName} logo`,src:o,width:100}))},x=H(),O=()=>s("zonos-v-stack",null,s("div",{class:"zonos--logo-wrapper"},w(),x&&s("zonos-badge",{badgeColor:"orange",size:"small"},g("Test mode"))),s("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),y.map((o=>s("zonos-custom-message",{icon:G,message:o.message})))),S=()=>this.showSessionTimoutScreen?s("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:g("Your checkout session has expired. Please reload the page to continue."),restStateTitle:g("Session timed out"),restStateType:"Warning"},s("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},g("Reload"))):s("div",{class:"zonos--content",style:{"--border-radius":P({overrideBorderStyle:h})}},"finish"!==l.step&&"error"!==l.step&&s(t,null,s("div",{class:"zonos--left","data-theme":k,style:{"--primary-color":this.isMobile?"":i}},!this.isMobile&&O(),"customer-info"===l.step&&s("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.defaultAddress,isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:p}),"shipping"===l.step&&s("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:p}),"payment"===l.step&&s("zonos-checkout-payment",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleCheckoutPaymentContinue(),paymentError:this.paymentError,submitBtnColor:p})),s("div",{class:"zonos--right","data-theme":d},this.isMobile&&O(),!this.isLegacyCheckout&&s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:M}),noBackground:!0,onClick:()=>this.closeDialogHandler()}),s("div",{class:"flex--wrapper"},s("div",{class:"zonos--wrapper"},s("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),s("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},s("zonos-cart-items",null),this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:G,message:b})))),s("zonos-cart-restricted-items",null),!this.isMobile&&s("zonos-v-stack",{spacing:16},s("zonos-cart-subtotal",null),s("zonos-custom-message",{class:"zonos--checkout-default-message",icon:G,message:b}))))),("finish"===l.step||"error"===l.step)&&s("div",{class:"zonos--done","data-theme":d},s("div",{class:"zonos--header"},w(),s("zonos-button",{class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close checkout dialog",content:M}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:d})),s("zonos-checkout-finish",{borderRadius:h,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===l.step&&l.error?Object.assign(Object.assign({},l.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),s("zonos-checkout-footer",{"data-theme":d,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return s(e,{class:B(["zonos--checkout zonos--elements",u&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile"])},this.preview?S():s("zonos-dialog",{borderStyle:h,"data-theme":d,height:"980px",isLoading:c,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},S()),s("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:g("Don't close"),dialogConfirmBtnText:g("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:g("Would you like to close checkout and return to the site?"),dialogTitle:g("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),s("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:g("Return to cart"),dialogIntent:"danger",dialogOpen:!!this.inventoryCheckErrorMessage,dialogSubtitle:this.inventoryCheckErrorMessage,dialogTitle:g("Couldn't place order"),dialogType:"alert",onCancelClicked:()=>{this.handleInventoryCheckDialogCancel()},onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}}};F.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(--zonos-elements-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(--zonos-elements-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:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;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;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.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:24px;top:24px;z-index:2}.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-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.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:76px;margin-bottom:8px}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.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:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";export{F as zonos_checkout}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{a(r.next(n))}catch(n){i(n)}}function s(n){try{a(r["throw"](n))}catch(n){i(n)}}function a(n){n.done?t(n.value):o(n.value).then(u,s)}a((r=r.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(t=0)),t)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=e.call(n,t)}catch(n){s=[6,n];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-63db40b9.system.js"],(function(n){"use strict";var e,t;return{setters:[function(n){e=n.l;t=n.a}],execute:function(){var r=this;var o=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(e).origin;var i=t.some((function(n){return o.includes(n)}));var u=r.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var i=["jsdelivr","unpkg","vercel"];var u=function(n){var e=i.indexOf(n);var t=i[e+1];return t||null};var s=function(n){if(!n){return null}var e=new URL(n).searchParams;var t=e.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var a=function(){if(typeof window==="undefined"){return null}var n=s(window.location.href);if(!n){return null}if(n==="dev-elements"){return"https://dev.elements.zonos.com"}var t="preview.js.zonos.com";var r="https://".concat(n,".").concat(t);e("[ZONOS-WARNING] using '".concat(r,"' for loading script"),"warn");void fetch(r).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(r,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var t="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return r};var c="https://js.stripe.com/v3";var l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var f=function(){var n=document.querySelectorAll('script[src^="'.concat(c,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(!l.test(t.src)){continue}return t}return null};var v=null;var m=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var r=document.createElement("script");r.src="".concat(c).concat(e);var o=document.head||document.body;if(!o){t("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}o.appendChild(r);return r};var w=function(n){if(v!==null){return v}v=new Promise((function(e,t){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(d)}if(window.Stripe){e(window.Stripe);return}try{var r=f();if(r&&n){console.warn(d)}else if(!r){r=m(n)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(n){t(n);return}}));return v};var p=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var h=function(n,e,t){if(n===null){return null}var r=n.apply(undefined,e);p(r,t);return r};var y=Promise.resolve().then((function(){return w(null)}));var z=false;y.catch((function(n){if(!z){console.warn(n)}}));var j=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(t){z=true;e=Date.now();return[2,y.then((function(t){return h(t,n,e)}))]}))}))};var g;var b=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=o({loadScriptSrc:n===null||n===void 0?void 0:n.src}),t=e.currentLoadScriptUrl,r=e.isWhiteListed;if(r){return t}return null}();var k="https://v1.3.32.js.zonos.com";var S=b||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.32";var O="https://unpkg.com/@zonos/elements@1.3.32";var _="jsdelivr";var L="https://rsms.me";var N="https://fonts.googleapis.com";var A=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;var R=function(){function n(){}return n}();n("Zonos",R);g=R;R.doneInit=false;R.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);R.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);R.isBigCommerce=false;R.isNpm=true;R.zonosQaUrl=null;R.version="v".concat("1.3.32");R.modeAlerted=false;R.tempCartData=null;R.getCurrentTimestamp=function(){return(new Date).getTime()};R.zonosController=null;R.init=function(n){return __awaiter(r,[n],void 0,(function(n){var r=n.appearance,o=n.checkoutSettings,i=n.currencyConverter,u=n.helloSettings,s=n.onCountryChange,a=n.overrideCurrencyFormat,c=n.storeId,l=n.zonosApiKey;return __generator(this,(function(n){if(g.doneInit){return[2]}e("====== ZONOS DEBUG MODE: on (".concat(g.version,") ======"));if(!l){t("Missing Zonos API key");return[2]}g.zonosApiKey=l;g.storeId=c;e("init zonos");g.injectZonosCdn();g.injectZonosCss();g.injectFonts();g.injectController({config:{appearance:r,checkoutSettings:o,currencyConverter:i,helloSettings:u,onCountryChange:s,overrideCurrencyFormat:a},zonosApiKey:l});g.doneInit=true;return[2]}))}))};R.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};R.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};R.showNotification=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.showNotification(n))};R.updateOrganizationName=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};R.disablePlaceOrderButtons=function(n){var e=n.autoEnable,t=e===void 0?true:e,r=n.disable,o=n.placeOrderButtonSelector;if(o){var i=document.querySelectorAll(o);var u=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};i.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(r){n.setAttribute("disabled","true");n.addEventListener("click",u)}else{n.removeAttribute("disabled");n.removeEventListener("click",u)}}));if(t&&r){setTimeout((function(){i.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",u)}))}),5e3)}}};R.injectController=function(n){var o=n.config,i=n.zonosApiKey;var u;if(document.querySelector("zonos-controller")){return}if((u=o.checkoutSettings)===null||u===void 0?void 0:u.placeOrderButtonSelector){var s=o.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({disable:true,placeOrderButtonSelector:s});var a=new MutationObserver((function(){g.disablePlaceOrderButtons({disable:true,placeOrderButtonSelector:s})}));a.observe(document.body,{childList:true,subtree:true})}var c=document.createElement("zonos-controller");c.config=o;c.zonosApiKey=i;c.addEventListener("stripeInitEvent",(function(n){return __awaiter(r,void 0,void 0,(function(){var r,o;return __generator(this,(function(i){switch(i.label){case 0:r=n.detail;e("loading Stripe");return[4,j(r.publishableKey)];case 1:o=i.sent();if(!o){t("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;void c.initCheckoutElement(o);return[2]}}))}))}));document.body.appendChild(c);g.zonosController=c;e("Zonos controller injected!")};R.injectScript=function(n){var r=n.cdnType,o=n.isModule,i=n.theRestUrl;var s=g.getZonosUrl(r);var a="".concat(s,"/").concat(i);var c=function(){var n=document.querySelector('script[src="'.concat(a,'"]'));return!!n};if(c()){e('Zonos script "'.concat(a,'" already exists in the document'),"warn");return}var l=document.head||document.body;var d=document.createElement("script");if(!!o){d.type="module"}else{d.noModule=true}d.src=a;d.crossOrigin="anonymous";d.onerror=function(){t("Failed to load ".concat(d.src));var n=u(r);if(!n){return}g.injectScript({cdnType:n,isModule:o,theRestUrl:i})};l.appendChild(d)};R.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return S;case"unpkg":return O;default:return k}};if(g.isNpm){var t=a();return t||e()}return e()};R.injectZonosCdn=function(){g.injectScript({cdnType:_,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});g.injectScript({cdnType:_,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});e("Zonos cdn script injected!")};R.injectStylesheet=function(n){var e=n.cdnType,r=n.theRestUrl;var o=g.getZonosUrl(e);var i=document.head||document.body;var s=document.createElement("link");s.rel="preconnect";s.href="".concat(k,"/");i.appendChild(s);var a=document.createElement("link");a.rel="stylesheet";a.href="".concat(o,"/").concat(r);a.onerror=function(){t("Failed to load ".concat(a.href));var n=u(e);if(!n){return}g.injectStylesheet({cdnType:n,theRestUrl:r})};i.appendChild(a)};R.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){e("Zonos style links already injected","warn");return}g.injectStylesheet({cdnType:_,theRestUrl:"dist/zonos-elements/zonos-elements.css"});e("Zonos style css injected!")};R.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(L,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(A.test(t.href)){continue}return t}return null};if(n()){e("Inter font already injected","warn");return}var t=document.head||document.body;var r=document.createElement("link");r.rel="preconnect";r.href=L;t.appendChild(r);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(L,"/inter/inter.css");t.appendChild(o);e("Zonos font injected!")};R.setupGoogleFont=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};R.injectSupportGoogleFont=function(n){var t;e("[FONT] injecting ".concat(n));var r=(t=n.match(/family=(.*?):/))===null||t===void 0?void 0:t[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(N,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=N;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){e("[FONT] ".concat(r," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);e("[FONT] ".concat(r," font injected!"))}}}}));