@zonos/elements 1.3.12-alpha.0 → 1.3.12-alpha.10

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 (167) hide show
  1. package/dist/cjs/{cart-fcddc0e6.js → cart-37e23be9.js} +739 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sendErrorLog-7b3d82e4.js +29 -0
  4. package/dist/cjs/{submitGtag-ec6ead54.js → submitGtag-d0718b63.js} +1 -20
  5. package/dist/cjs/zonos-address_4.cjs.entry.js +46 -18
  6. package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
  7. package/dist/cjs/zonos-cart-items_10.cjs.entry.js +8 -8
  8. package/dist/cjs/zonos-checkout.cjs.entry.js +7 -7
  9. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-elements.cjs.js +1 -1
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +90 -26
  14. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
  16. package/dist/collection/components/hello/zonos-hello-dialog/assets/importIcon.svg +4 -0
  17. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +85 -25
  18. package/dist/collection/components/store/translationStore/strings.arabic.js +36 -0
  19. package/dist/collection/components/store/translationStore/strings.base.js +36 -0
  20. package/dist/collection/components/store/translationStore/strings.chinese.js +36 -0
  21. package/dist/collection/components/store/translationStore/strings.danish.js +36 -0
  22. package/dist/collection/components/store/translationStore/strings.dutch.js +36 -0
  23. package/dist/collection/components/store/translationStore/strings.french.js +36 -0
  24. package/dist/collection/components/store/translationStore/strings.german.js +36 -0
  25. package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -0
  26. package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -0
  27. package/dist/collection/components/store/translationStore/strings.italian.js +36 -0
  28. package/dist/collection/components/store/translationStore/strings.japanese.js +36 -0
  29. package/dist/collection/components/store/translationStore/strings.korean.js +36 -0
  30. package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -0
  31. package/dist/collection/components/store/translationStore/strings.polish.js +36 -0
  32. package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -0
  33. package/dist/collection/components/store/translationStore/strings.russian.js +36 -0
  34. package/dist/collection/components/store/translationStore/strings.spanish.js +36 -0
  35. package/dist/collection/components/store/translationStore/strings.swedish.js +36 -0
  36. package/dist/collection/components/store/translationStore/strings.turkish.js +36 -0
  37. package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -0
  38. package/dist/collection/components/store/translationStore.js +19 -3
  39. package/dist/collection/components/stripe/zonos-address/zonos-address.js +41 -15
  40. package/dist/collection/components/utils/containsNonLatinChars.js +5 -1
  41. package/dist/collection/components/utils/logging/getNavigatorConnection.js +16 -0
  42. package/dist/collection/components/utils/logging/sendLoadScriptLog.js +16 -0
  43. package/dist/collection/types/LogLoadScriptRequestBody.js +1 -0
  44. package/dist/collection/types/generated/graphql.customer.types.js +64 -14
  45. package/dist/collection/types/generated/graphql.frontend.types.js +4 -0
  46. package/dist/components/sendErrorLog.js +21 -0
  47. package/dist/components/stripe.js +740 -4
  48. package/dist/components/trackConversionEvent.js +1 -1
  49. package/dist/components/zonos-address2.js +46 -16
  50. package/dist/components/zonos-checkout-finish2.js +3 -20
  51. package/dist/components/zonos-checkout.js +3 -2
  52. package/dist/components/zonos-controller.js +1 -1
  53. package/dist/components/zonos-hello-dialog2.js +89 -25
  54. package/dist/components/zonos-hello.js +1 -1
  55. package/dist/components/zonos-link-authentication2.js +1 -1
  56. package/dist/esm/{cart-228e1ef7.js → cart-7961927b.js} +739 -3
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/sendErrorLog-4d9581da.js +26 -0
  59. package/dist/esm/{submitGtag-c3727595.js → submitGtag-4c1f09dc.js} +2 -20
  60. package/dist/esm/zonos-address_4.entry.js +45 -17
  61. package/dist/esm/zonos-card_2.entry.js +1 -1
  62. package/dist/esm/zonos-cart-items_10.entry.js +3 -3
  63. package/dist/esm/zonos-checkout.entry.js +3 -3
  64. package/dist/esm/zonos-controller.entry.js +1 -1
  65. package/dist/esm/zonos-country-flag.entry.js +1 -1
  66. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  67. package/dist/esm/zonos-elements.js +1 -1
  68. package/dist/esm/zonos-hello-dialog.entry.js +90 -26
  69. package/dist/esm/zonos-hello.entry.js +1 -1
  70. package/dist/esm/zonos-payment.entry.js +1 -1
  71. package/dist/esm-es5/cart-7961927b.js +1 -0
  72. package/dist/esm-es5/loader.js +1 -1
  73. package/dist/esm-es5/sendErrorLog-4d9581da.js +1 -0
  74. package/dist/esm-es5/submitGtag-4c1f09dc.js +1 -0
  75. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  76. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  77. package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
  78. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  79. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  80. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  81. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  82. package/dist/esm-es5/zonos-elements.js +1 -1
  83. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  84. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  85. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  86. package/dist/scripts/loadZonos.js +1 -1
  87. package/dist/scripts/zonos.js +1 -1
  88. package/dist/scripts/zonosBase.js +1 -1
  89. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +9 -0
  90. package/dist/types/components/store/translationStore/strings.arabic.d.ts +36 -0
  91. package/dist/types/components/store/translationStore/strings.base.d.ts +36 -0
  92. package/dist/types/components/store/translationStore/strings.chinese.d.ts +36 -0
  93. package/dist/types/components/store/translationStore/strings.danish.d.ts +36 -0
  94. package/dist/types/components/store/translationStore/strings.dutch.d.ts +36 -0
  95. package/dist/types/components/store/translationStore/strings.french.d.ts +36 -0
  96. package/dist/types/components/store/translationStore/strings.german.d.ts +36 -0
  97. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +36 -0
  98. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +36 -0
  99. package/dist/types/components/store/translationStore/strings.italian.d.ts +36 -0
  100. package/dist/types/components/store/translationStore/strings.japanese.d.ts +36 -0
  101. package/dist/types/components/store/translationStore/strings.korean.d.ts +36 -0
  102. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +36 -0
  103. package/dist/types/components/store/translationStore/strings.polish.d.ts +36 -0
  104. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +36 -0
  105. package/dist/types/components/store/translationStore/strings.russian.d.ts +36 -0
  106. package/dist/types/components/store/translationStore/strings.spanish.d.ts +36 -0
  107. package/dist/types/components/store/translationStore/strings.swedish.d.ts +36 -0
  108. package/dist/types/components/store/translationStore/strings.turkish.d.ts +36 -0
  109. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +36 -0
  110. package/dist/types/components/store/translationStore.d.ts +24 -1
  111. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +7 -1
  112. package/dist/types/components/utils/api/getCountryLandedCost.d.ts +10 -1
  113. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  114. package/dist/types/components/utils/logging/getNavigatorConnection.d.ts +8 -0
  115. package/dist/types/components/utils/logging/sendLoadScriptLog.d.ts +4 -0
  116. package/dist/types/types/LogLoadScriptRequestBody.d.ts +12 -0
  117. package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
  118. package/dist/types/types/generated/graphql.customer.types.d.ts +91 -18
  119. package/dist/types/types/generated/graphql.customer.types.ts +132 -22
  120. package/dist/types/types/generated/graphql.frontend.types.d.ts +13 -3
  121. package/dist/types/types/generated/graphql.frontend.types.ts +23 -3
  122. package/dist/types/types/global.d.ts +1 -2
  123. package/dist/zonos-elements/assets/importIcon.svg +4 -0
  124. package/dist/zonos-elements/p-0bdac452.system.js +1 -0
  125. package/dist/zonos-elements/p-0c5d3595.js +1 -0
  126. package/dist/zonos-elements/{p-5d5c0fbf.entry.js → p-2191b884.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-0082c5be.system.entry.js → p-2da8e12a.system.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-67ff446b.system.entry.js → p-339c505b.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-ac5aecca.entry.js → p-33f5634a.entry.js} +1 -1
  130. package/dist/zonos-elements/{p-5f662cf2.entry.js → p-3eb402c8.entry.js} +1 -1
  131. package/dist/zonos-elements/p-431648d8.system.entry.js +1 -0
  132. package/dist/zonos-elements/p-44842b39.system.entry.js +1 -0
  133. package/dist/zonos-elements/{p-14a2824f.entry.js → p-44f4dd4b.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-35c328ba.system.entry.js → p-4b3923d2.system.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-30cd191f.entry.js → p-4eba3abe.entry.js} +1 -1
  136. package/dist/zonos-elements/p-5a3ceb49.entry.js +1 -0
  137. package/dist/zonos-elements/p-63775f6d.js +1 -0
  138. package/dist/zonos-elements/p-6e81adba.system.js +1 -1
  139. package/dist/zonos-elements/{p-5f6f0581.system.entry.js → p-7efb9c12.system.entry.js} +1 -1
  140. package/dist/zonos-elements/{p-5dbb80df.system.entry.js → p-8eb876e8.system.entry.js} +1 -1
  141. package/dist/zonos-elements/p-a6c9c505.system.js +1 -0
  142. package/dist/zonos-elements/{p-c815e8b4.system.entry.js → p-bdb72353.system.entry.js} +1 -1
  143. package/dist/zonos-elements/{p-499d7f5d.system.entry.js → p-d6aa3011.system.entry.js} +1 -1
  144. package/dist/zonos-elements/p-dd4f3724.system.js +1 -0
  145. package/dist/zonos-elements/{p-925ae524.entry.js → p-e1796e2a.entry.js} +1 -1
  146. package/dist/zonos-elements/{p-db1adc42.entry.js → p-e4919505.entry.js} +1 -1
  147. package/dist/zonos-elements/p-e4be7bd8.js +1 -0
  148. package/dist/zonos-elements/{p-7ff3a533.system.entry.js → p-e5fd850c.system.entry.js} +1 -1
  149. package/dist/zonos-elements/p-e90e2126.entry.js +1 -0
  150. package/dist/zonos-elements/{p-11f1b5fb.entry.js → p-f0b5d2fb.entry.js} +1 -1
  151. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  152. package/package.json +1 -1
  153. package/dist/cjs/isCheckoutMobile-f491ca7c.js +0 -8
  154. package/dist/esm/isCheckoutMobile-8846dccb.js +0 -6
  155. package/dist/esm-es5/cart-228e1ef7.js +0 -1
  156. package/dist/esm-es5/isCheckoutMobile-8846dccb.js +0 -1
  157. package/dist/esm-es5/submitGtag-c3727595.js +0 -1
  158. package/dist/zonos-elements/p-397d8268.entry.js +0 -1
  159. package/dist/zonos-elements/p-55940b5a.system.entry.js +0 -1
  160. package/dist/zonos-elements/p-770e5b9e.js +0 -1
  161. package/dist/zonos-elements/p-81a54668.js +0 -1
  162. package/dist/zonos-elements/p-93dafeea.system.entry.js +0 -1
  163. package/dist/zonos-elements/p-94bbf247.system.js +0 -1
  164. package/dist/zonos-elements/p-960e4021.system.js +0 -1
  165. package/dist/zonos-elements/p-aed0098c.system.js +0 -1
  166. package/dist/zonos-elements/p-d11b2449.js +0 -1
  167. package/dist/zonos-elements/p-d31e5fcc.entry.js +0 -1
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["zonos-checkout.cjs",[[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],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon.cjs",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2.cjs",[[1,"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"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3.cjs",[[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]}]]],["zonos-address_4.cjs",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"hasInvalidCharacters":[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"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10.cjs",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"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"]]],[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]}]]]], options);
11
+ return index.bootstrapLazy([["zonos-checkout.cjs",[[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],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon.cjs",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2.cjs",[[1,"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"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3.cjs",[[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]}]]],["zonos-address_4.cjs",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"reportedInvalidCharacters":[32],"invalidCharacterList":[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"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10.cjs",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"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"]]],[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]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ const cart = require('./cart-37e23be9.js');
4
+
5
+ const checkoutBreakpoint = 890;
6
+ const isCheckoutMobile = (isMobile) => {
7
+ return isMobile || window.innerWidth < checkoutBreakpoint;
8
+ };
9
+
10
+ const sendErrorLog = async ({ endpoint, errors, metadata }) => {
11
+ const userAgentData = 'userAgentData' in window.navigator
12
+ ? // userAgentData is not yet supported in all browsers
13
+ window.navigator.userAgentData
14
+ : null;
15
+ const errorObject = {
16
+ endpoint,
17
+ errors,
18
+ metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
19
+ ? userAgentData
20
+ : window.navigator.userAgent }, metadata),
21
+ };
22
+ void cart.handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
23
+ body: errorObject,
24
+ method: 'POST',
25
+ });
26
+ };
27
+
28
+ exports.isCheckoutMobile = isCheckoutMobile;
29
+ exports.sendErrorLog = sendErrorLog;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-fcddc0e6.js');
3
+ const cart = require('./cart-37e23be9.js');
4
4
  const zonosStore = require('./zonosStore-bd2a0c59.js');
5
5
 
6
6
  const trackConversionEvent = async (eventName, metadata) => {
@@ -38,24 +38,6 @@ const createCustomEvent = (eventName, detail) => {
38
38
  });
39
39
  };
40
40
 
41
- const sendErrorLog = async ({ endpoint, errors, metadata }) => {
42
- const userAgentData = 'userAgentData' in window.navigator
43
- ? // userAgentData is not yet supported in all browsers
44
- window.navigator.userAgentData
45
- : null;
46
- const errorObject = {
47
- endpoint,
48
- errors,
49
- metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
50
- ? userAgentData
51
- : window.navigator.userAgent }, metadata),
52
- };
53
- void cart.handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/log-error`, {
54
- body: errorObject,
55
- method: 'POST',
56
- });
57
- };
58
-
59
41
  /**
60
42
  * Submit a gtag event if the gtag function is available.
61
43
  */
@@ -72,6 +54,5 @@ const submitGtag = (event) => {
72
54
  };
73
55
 
74
56
  exports.createCustomEvent = createCustomEvent;
75
- exports.sendErrorLog = sendErrorLog;
76
57
  exports.submitGtag = submitGtag;
77
58
  exports.trackConversionEvent = trackConversionEvent;
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
- const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
8
+ const sendErrorLog = require('./sendErrorLog-7b3d82e4.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
11
11
  const isDarkColor = require('./isDarkColor-7faf0a82.js');
@@ -15,18 +15,31 @@ const isDarkColor = require('./isDarkColor-7faf0a82.js');
15
15
  * @returns an object with the same keys as the input object, and a boolean value indicating if the value contains non-latin characters
16
16
  */
17
17
  const containsNonLatinChars = (params) => {
18
+ const specialCharacters = /[ʼˮ՚ߴߵ']{1}/u;
18
19
  /**
19
20
  * This regex matches any character that is not a latin character, punctuation, symbol, number, separator, control, or mark
20
21
  * I limited the character found to 1 in the regex, so that we can return early if we find any non-latin character
21
22
  **/
22
23
  const nonLatinRegex = /[^\p{Script=Latin}\p{P}\p{S}\p{N}\p{Z}\p{C}\p{M}]{1}/u;
23
- const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) ? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
24
+ const nonLatinValueList = Object.entries(params).reduce((prev, [key, value]) => nonLatinRegex.test(value) &&
25
+ // allow special characters like web apostrophe and quotation mark
26
+ !specialCharacters.test(value)
27
+ ? Object.assign(Object.assign({}, prev), { [key]: true }) : prev, {});
24
28
  return nonLatinValueList;
25
29
  };
26
30
 
27
31
  const zonosAddressCss = ".sc-zonos-address-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--font-family, Inter), Inter}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:var(--amino-space-8)}";
28
32
  const ZonosAddressStyle0 = zonosAddressCss;
29
33
 
34
+ const mappedFields = {
35
+ city: 'City',
36
+ country: 'Country',
37
+ line1: 'Address line 1',
38
+ line2: 'Address line 2',
39
+ name: 'Name',
40
+ postal_code: 'Postal code',
41
+ state: 'State',
42
+ };
30
43
  const ZonosAddress = class {
31
44
  constructor(hostRef) {
32
45
  index.registerInstance(this, hostRef);
@@ -35,7 +48,8 @@ const ZonosAddress = class {
35
48
  this.titleText = undefined;
36
49
  this.defaultAddress = null;
37
50
  this.stripe = window.Zonos.stripe;
38
- this.hasInvalidCharacters = false;
51
+ this.reportedInvalidCharacters = false;
52
+ this.invalidCharacterList = null;
39
53
  this.isDirtyAddress = false;
40
54
  }
41
55
  getStripeAddressInstance() {
@@ -61,13 +75,9 @@ const ZonosAddress = class {
61
75
  cart.stripeStore.stripeAddressEventData = event;
62
76
  break;
63
77
  }
64
- const hasInvalidCharacters = this.checkInvalidCharacters(event);
65
- this.invalidCharacters.emit(hasInvalidCharacters);
66
- this.hasInvalidCharacters = hasInvalidCharacters;
67
- if (hasInvalidCharacters) {
68
- // no need to prefetch landed cost if the address contains invalid characters
69
- return;
70
- }
78
+ const invalidCharacterList = this.checkInvalidCharacters(event);
79
+ this.invalidCharacterList = invalidCharacterList;
80
+ this.invalidCharacters.emit(!!invalidCharacterList);
71
81
  }
72
82
  updateAddressElement({ stripeAddressElement, type, }) {
73
83
  if (type === 'shipping') {
@@ -80,7 +90,7 @@ const ZonosAddress = class {
80
90
  // Do nothing if the allowed character sets is ALL or the address is incomplete
81
91
  if (!address.complete ||
82
92
  zonosStore.zonosStore.checkoutSettings.allowedCharacterSets === 'ALL') {
83
- return false;
93
+ return null;
84
94
  }
85
95
  const { address: addressValue, firstName, lastName, name } = address.value;
86
96
  const { city, country, line1, line2, postal_code, state } = addressValue;
@@ -93,11 +103,29 @@ const ZonosAddress = class {
93
103
  postal_code,
94
104
  state,
95
105
  });
96
- // emit event if the address contains invalid characters
97
- if (Object.keys(invalidList).length) {
98
- return true;
106
+ if (!Object.keys(invalidList).length) {
107
+ return null;
108
+ }
109
+ // send error event only once so we know what value is invalid
110
+ if (!this.reportedInvalidCharacters) {
111
+ this.reportedInvalidCharacters = true;
112
+ void sendErrorLog.sendErrorLog({
113
+ endpoint: 'NonLatinInput',
114
+ errors: Object.keys(invalidList).map(fieldName => {
115
+ var _a;
116
+ if (fieldName !== 'name') {
117
+ // trim all number so we don't send sensitive information
118
+ const trimmedAddress = (_a = addressValue[fieldName]) === null || _a === void 0 ? void 0 : _a.replace(/[\d\w]+/g, '');
119
+ return `Invalid character found ${fieldName}: "${trimmedAddress}"`;
120
+ }
121
+ const customerName = name || `${firstName} ${lastName}`;
122
+ const trimmedName = customerName.replace(/[\d\w]+/g, '');
123
+ return `Invalid character found ${fieldName}: "${trimmedName}"`;
124
+ }),
125
+ metadata: {},
126
+ });
99
127
  }
100
- return false;
128
+ return invalidList;
101
129
  }
102
130
  async watchInitStripe() {
103
131
  var _a, _b;
@@ -152,7 +180,7 @@ const ZonosAddress = class {
152
180
  // stripe element started with just address line 1, so scroll bar is not yet available. Wait for a moment before scrolling
153
181
  setTimeout(() => {
154
182
  // scroll directly into view if it's mobile
155
- if (isCheckoutMobile.isCheckoutMobile()) {
183
+ if (sendErrorLog.isCheckoutMobile()) {
156
184
  this.el.scrollIntoView({ behavior: 'smooth', block: 'end' });
157
185
  }
158
186
  else {
@@ -196,7 +224,7 @@ const ZonosAddress = class {
196
224
  }
197
225
  render() {
198
226
  // this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
199
- return (index.h(index.Host, { key: '81b9d2e822eea4eb85a3d7d21ff645c9f0841f30', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: 'cd180e130f161233fd05365f9250913214846ced', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'b4d15f56e1215305367c071c4d9be985b09245b8', class: "zonos--address-component" }), this.hasInvalidCharacters && (index.h("zonos-banner", { bannerTitle: cart.translate('Please ensure your text uses the Latin alphabet only (A-Z, a-z).'), intent: "error" }))));
227
+ return (index.h(index.Host, { key: 'b1ad2f6c9c23e6411bf1adccdd34b3aa4f5250b1', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: '786a733a44925a670393b72bf0ae3db5ba59f9a1', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: 'b9d58cbc17abf5daf5d13ffdebc7485c3ac6457d', class: "zonos--address-component" }), this.invalidCharacterList && (index.h("zonos-banner", { bannerTitle: cart.translate('Please resolve the following errors:'), intent: "error" }, Object.keys(this.invalidCharacterList).map(fieldName => (index.h("zonos-text", null, `- ${cart.translate(mappedFields[fieldName])}: ${cart.translate('only supports Latin characters (A-Z, a-z)')}`)))))));
200
228
  }
201
229
  get el() { return index.getElement(this); }
202
230
  static get watchers() { return {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-564fe383.js');
6
6
  const zonosStore = require('./zonosStore-bd2a0c59.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-fcddc0e6.js');
8
+ const cart = require('./cart-37e23be9.js');
9
9
  const ILanguage = require('./ILanguage-d247b45b.js');
10
10
  require('./isDarkColor-7faf0a82.js');
11
11
  require('./getBorderRadius-4fa738c3.js');
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
- const submitGtag = require('./submitGtag-ec6ead54.js');
8
+ const submitGtag = require('./submitGtag-d0718b63.js');
9
9
  const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
10
- const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
10
+ const sendErrorLog = require('./sendErrorLog-7b3d82e4.js');
11
11
  const classes = require('./classes-b7918f56.js');
12
12
  const ILanguage = require('./ILanguage-d247b45b.js');
13
13
  const isDarkColor = require('./isDarkColor-7faf0a82.js');
@@ -159,7 +159,7 @@ const ZonosCheckoutFinish = class {
159
159
  this.isLoading = false;
160
160
  const baseUrl = "https://v1.route.js.zonos.com";
161
161
  const checkoutSessionId = cart.cartStore.checkoutSessionId;
162
- void submitGtag.sendErrorLog({
162
+ void sendErrorLog.sendErrorLog({
163
163
  endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}`,
164
164
  errors: ['Order not found after multiple attempts'],
165
165
  metadata: {
@@ -282,10 +282,10 @@ const ZonosCheckoutFooter = class {
282
282
  this.showLanguageDialog = !this.showLanguageDialog;
283
283
  }
284
284
  handleMobileChange() {
285
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
285
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
286
286
  }
287
287
  componentWillLoad() {
288
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
288
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
289
289
  }
290
290
  render() {
291
291
  var _a;
@@ -597,10 +597,10 @@ const ZonosReview = class {
597
597
  this.isMobile = false;
598
598
  }
599
599
  handleWindowResize() {
600
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
600
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
601
601
  }
602
602
  componentWillLoad() {
603
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
603
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
604
604
  }
605
605
  render() {
606
606
  const titleTextType = this.isMobile ? 'boldSubheader' : 'semiBoldLabel';
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
- const submitGtag = require('./submitGtag-ec6ead54.js');
9
- const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
8
+ const submitGtag = require('./submitGtag-d0718b63.js');
9
+ const sendErrorLog = require('./sendErrorLog-7b3d82e4.js');
10
10
  const classes = require('./classes-b7918f56.js');
11
11
  const getBorderRadius = require('./getBorderRadius-4fa738c3.js');
12
12
  const isDarkColor = require('./isDarkColor-7faf0a82.js');
@@ -244,7 +244,7 @@ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShi
244
244
  };
245
245
  if (Object.values(shippingAddress).some(value => value === undefined || value === null)) {
246
246
  cart.logError('One or more shipping address field is missing', Object.entries(shippingAddress));
247
- void submitGtag.sendErrorLog({
247
+ void sendErrorLog.sendErrorLog({
248
248
  endpoint: 'No endpoint, domestic checkout form missing fields',
249
249
  errors: [
250
250
  'Bigcommerce: One or more shipping address field is missing in the domestic checkout form',
@@ -654,13 +654,13 @@ const ZonosCheckout = class {
654
654
  window.location.reload();
655
655
  }
656
656
  handleWindowResize() {
657
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
657
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
658
658
  // apply theme to stripe elements
659
659
  void this.applyStripeTheme();
660
660
  cart.log(`mobile: ${this.isMobile}`);
661
661
  }
662
662
  handleMobileChange() {
663
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
663
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
664
664
  // apply theme to stripe elements
665
665
  void this.applyStripeTheme();
666
666
  cart.log(`mobile: ${this.isMobile}`);
@@ -674,7 +674,7 @@ const ZonosCheckout = class {
674
674
  }
675
675
  componentWillLoad() {
676
676
  void this.init();
677
- this.isMobile = isCheckoutMobile.isCheckoutMobile(this.mobile);
677
+ this.isMobile = sendErrorLog.isCheckoutMobile(this.mobile);
678
678
  // update theme to browser preference theme if appearance theme is system
679
679
  this.handleAppearanceSettingsOverrideChange();
680
680
  cart.log(`mobile: ${this.isMobile}`);
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
8
  require('./isDarkColor-7faf0a82.js');
9
9
  require('./getBorderRadius-4fa738c3.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./isDarkColor-7faf0a82.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-7faf0a82.js');
@@ -19,7 +19,7 @@ const patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["zonos-checkout.cjs",[[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],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon.cjs",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2.cjs",[[1,"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"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3.cjs",[[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]}]]],["zonos-address_4.cjs",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"hasInvalidCharacters":[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"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10.cjs",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"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"]]],[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]}]]]], options);
22
+ return index.bootstrapLazy([["zonos-checkout.cjs",[[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],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]}]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"content":[1],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[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"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-icon.cjs",[[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-button_2.cjs",[[1,"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"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-select_3.cjs",[[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]}]]],["zonos-address_4.cjs",[[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"reportedInvalidCharacters":[32],"invalidCharacterList":[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"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_10.cjs",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"defaultAddress":[16],"disabled":[32],"hasInvalidShippingCharacters":[32],"hasInvalidBillingCharacters":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"disabled":[32]},null,{"disabled":["watchFormComplete"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"disabled":[32],"serviceLevels":[32]},null,{"disabled":["watchFormComplete"]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"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"]]],[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]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-564fe383.js');
6
- const cart = require('./cart-fcddc0e6.js');
6
+ const cart = require('./cart-37e23be9.js');
7
7
  const zonosStore = require('./zonosStore-bd2a0c59.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
@@ -23,6 +23,12 @@ const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xml
23
23
  </svg>
24
24
  `;
25
25
 
26
+ const ImportIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
27
+ <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"/>
28
+ <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"/>
29
+ </svg>
30
+ `;
31
+
26
32
  const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">
27
33
  <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"/>
28
34
  </svg>
@@ -67,6 +73,81 @@ const ZonosHelloDialog = class {
67
73
  this.setShowLanguageSelect = async (value) => {
68
74
  this.showLanguageSelect = value;
69
75
  };
76
+ this.getDutyMessage = () => {
77
+ const { countryLandedCost } = cart.localizationStore;
78
+ // Our Robby API spells deminimis wrong here
79
+ const dutyDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.dutyDeminimus)
80
+ ? cart.currencyFormat(countryLandedCost.dutyDeminimus)
81
+ : null;
82
+ // If Canada, use 40 CAD (courier duty de minimis)
83
+ const dutyDeminimisToUse = cart.localizationStore.selectedCountryCode === 'CA'
84
+ ? cart.currencyFormat(40)
85
+ : dutyDeminimis;
86
+ // If deminimis is undefined or null, assume it's $0
87
+ return dutyDeminimisToUse
88
+ ? `${cart.translate('Spend')} ${dutyDeminimisToUse} ${cart.translate('duty free')}`
89
+ : cart.translate('Duties will apply to all orders');
90
+ };
91
+ this.getTaxMessage = () => {
92
+ const { countryLandedCost } = cart.localizationStore;
93
+ // Our Robby API spells deminimis wrong here
94
+ const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
95
+ ? cart.currencyFormat(countryLandedCost.vatTaxDeminimus)
96
+ : null;
97
+ // If Canada, use 150 CAD (courier tax de minimis)
98
+ const taxDeminimisToUse = cart.localizationStore.selectedCountryCode === 'CA'
99
+ ? cart.currencyFormat(150)
100
+ : taxDeminimis;
101
+ return taxDeminimisToUse
102
+ ? `${cart.translate('Spend')} ${taxDeminimisToUse} ${cart.translate('tax free')}`
103
+ : cart.translate('Taxes will apply to all orders');
104
+ };
105
+ this.getUkDutyTaxMessage = (landedCost) => {
106
+ if (landedCost.allowLowValueOrders) {
107
+ // show nothing if low value orders are allowed
108
+ return null;
109
+ }
110
+ const dutyDeminimis = landedCost.dutyDeminimus;
111
+ return cart.translate('Orders to ${countryName} must be over ${threshold} to ship.', {
112
+ countryName: 'United Kingdom',
113
+ threshold: cart.currencyFormat(dutyDeminimis),
114
+ });
115
+ };
116
+ this.getAustraliaDutyTaxMessage = (landedCost) => {
117
+ return cart.translate('${percentage} GST due on any order above ${threshold}.', {
118
+ percentage: `${landedCost.vatTaxRate * 100}%`,
119
+ threshold: cart.currencyFormat(landedCost.vatTaxDeminimus),
120
+ });
121
+ };
122
+ this.getNewZealandDutyTaxMessge = (landedCost) => {
123
+ return cart.translate('${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.', {
124
+ percentage: `${landedCost.vatTaxRate * 100}%`,
125
+ threshold: cart.currencyFormat(landedCost.vatTaxDeminimus),
126
+ });
127
+ };
128
+ /**
129
+ * Get additional duty tax message if selected country has tax id
130
+ */
131
+ this.getAdditionalDutyTaxMessage = () => {
132
+ if (!cart.localizationStore.countryLandedCost) {
133
+ return null;
134
+ }
135
+ // only show the message if the store has a tax id for selected country
136
+ if (!cart.localizationStore.countryLandedCost.hasTaxId) {
137
+ return null;
138
+ }
139
+ switch (cart.localizationStore.countryLandedCost.countryCode) {
140
+ case 'GB':
141
+ return this.getUkDutyTaxMessage(cart.localizationStore.countryLandedCost);
142
+ case 'AU':
143
+ return this.getAustraliaDutyTaxMessage(cart.localizationStore.countryLandedCost);
144
+ case 'NZ':
145
+ return this.getNewZealandDutyTaxMessge(cart.localizationStore.countryLandedCost);
146
+ default:
147
+ // show nothing
148
+ return null;
149
+ }
150
+ };
70
151
  this.isOpen = false;
71
152
  this.setIsOpen = () => { };
72
153
  this.mobileLocationOverride = undefined;
@@ -88,30 +169,13 @@ const ZonosHelloDialog = class {
88
169
  }
89
170
  render() {
90
171
  var _a;
91
- const { countryLandedCost, selectedCountryCode } = cart.localizationStore;
92
- // Our Robby API spells deminimis wrong here
93
- const dutyDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.dutyDeminimus)
94
- ? cart.currencyFormat(countryLandedCost.dutyDeminimus)
95
- : null;
96
- // If Canada, use 40 CAD (courier duty de minimis)
97
- const dutyDeminimisToUse = cart.localizationStore.selectedCountryCode === 'CA'
98
- ? cart.currencyFormat(40)
99
- : dutyDeminimis;
172
+ const { selectedCountryCode } = cart.localizationStore;
173
+ // If deminimis is undefined or null, assume it's $0
174
+ const dutyDeMinimisMessage = this.getDutyMessage();
100
175
  // If deminimis is undefined or null, assume it's $0
101
- const dutyDeMinimisMessage = dutyDeminimisToUse
102
- ? `${cart.translate('Spend')} ${dutyDeminimisToUse} ${cart.translate('duty free')}`
103
- : cart.translate('Duties will apply to all orders');
104
- // Our Robby API spells deminimis wrong here
105
- const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
106
- ? cart.currencyFormat(countryLandedCost.vatTaxDeminimus)
107
- : null;
108
- // If Canada, use 150 CAD (courier tax de minimis)
109
- const taxDeminimisToUse = cart.localizationStore.selectedCountryCode === 'CA'
110
- ? cart.currencyFormat(150)
111
- : taxDeminimis;
112
- const taxDeMinimisMessage = taxDeminimisToUse
113
- ? `${cart.translate('Spend')} ${taxDeminimisToUse} ${cart.translate('tax free')}`
114
- : cart.translate('Taxes will apply to all orders');
176
+ const taxDeMinimisMessage = this.getTaxMessage();
177
+ // Show additional information if selected country has tax id
178
+ const additionalInformation = this.getAdditionalDutyTaxMessage();
115
179
  const animateLeft = this.animateFromLeftOverride ||
116
180
  (this.dialogRef && getHasMoreSpaceOnRight.getHasMoreSpaceOnRight(this.dialogRef));
117
181
  const animateFromBottom = this.dialogRef && getHasMoreSpaceAbove(this.dialogRef);
@@ -122,7 +186,7 @@ const ZonosHelloDialog = class {
122
186
  const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
123
187
  const currentPage = this.getCurrentPageEnum();
124
188
  const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
125
- return (index.h(index.Host, { key: 'dcd4c055999375785e289cc273c37e50c358d594', class: "zonos--elements" }, index.h("div", { key: 'a8921afb921ee0b4c0adb31dca0da646c91bdecc', "aria-hidden": "true", class: classes.classes([
189
+ return (index.h(index.Host, { key: 'ccabd686943b009ed6bb9c0ec64a6a4e7cc917f5', class: "zonos--elements" }, index.h("div", { key: '6bfbae15f5b43413fc76d21b94d0d56a2ce48f4d', "aria-hidden": "true", class: classes.classes([
126
190
  'zonos--hello-dialog',
127
191
  animateLeft && 'zonos--hello-dialog-animate-from-left',
128
192
  animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
@@ -132,7 +196,7 @@ const ZonosHelloDialog = class {
132
196
  ]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", null, index.h("div", { class: "zonos--hello-dialog-content" }, index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { spacing: 24 }, index.h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
133
197
  var _a;
134
198
  return item && (index.h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (index.h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
135
- }), index.h("zonos-card", { spacing: "12px" }, index.h("zonos-v-stack", { spacing: 12 }, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: BagIcon }), index.h("zonos-text", null, dutyDeMinimisMessage)), index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", null, index.h("zonos-country-select", { handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", null, index.h("zonos-language-select", { handleOnClose: () => this.setShowLanguageSelect(false) }))))));
199
+ }), index.h("zonos-card", { spacing: "12px" }, index.h("zonos-v-stack", { spacing: 12 }, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), index.h("zonos-text", null, dutyDeMinimisMessage)), index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", null, taxDeMinimisMessage)), additionalInformation && (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Low value order shipping restriction", content: BagIcon }), index.h("zonos-text", null, additionalInformation))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", null, index.h("zonos-country-select", { handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", null, index.h("zonos-language-select", { handleOnClose: () => this.setShowLanguageSelect(false) }))))));
136
200
  }
137
201
  static get assetsDirs() { return ["assets"]; }
138
202
  static get watchers() { return {