@zonos/elements 1.3.283 → 1.3.284
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-a1c00090.js → cart-94908542.js} +4 -4
- package/dist/cjs/{collect-e61eafca.js → collect-0c05e2b4.js} +3 -3
- package/dist/cjs/{debounce-9a712c79.js → debounce-7ca3c878.js} +1 -1
- package/dist/cjs/{getBorderRadius-4da24d7c.js → getBorderRadius-97fd5e02.js} +1 -1
- package/dist/cjs/{getContrastColor-2fb235b8.js → getContrastColor-956dfaf7.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-a6c4f625.js → getMissingRequiredShippingFields-124b3f20.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-e7b57e02.js → hasInclusivePrice-d0cd2007.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-ead45797.js → invoice-205fb5bc.js} +3 -3
- package/dist/cjs/{isContrastColor-ef24b7aa.js → isContrastColor-30f84a91.js} +1 -1
- package/dist/cjs/{isDarkColor-ebc74b4d.js → isDarkColor-a6e6fd5e.js} +1 -1
- package/dist/cjs/{localization-783849c8.js → localization-fb2ece37.js} +61 -2
- package/dist/cjs/{paypal-e1548f40.js → paypal-45ca5301.js} +5 -5
- package/dist/cjs/{placeTestOrder-d99b1fe2.js → placeTestOrder-302b6862.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-c942fcba.js → renderCheckoutCurrency-1b0cd5f2.js} +2 -2
- package/dist/cjs/shouldShowLanguageSelect-82985128.js +13 -0
- package/dist/cjs/{submitGtag-74762255.js → submitGtag-8a25f001.js} +1 -1
- package/dist/cjs/{throttle-34f7abf1.js → throttle-366c204b.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-f595319d.js → updateCheckoutSessionAttributes-de7b1466.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +17 -17
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-address_4.cjs.entry.js +13 -13
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +6 -6
- package/dist/cjs/zonos-badge.cjs.entry.js +4 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-card_5.cjs.entry.js +14 -14
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +29 -26
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
- package/dist/cjs/zonos-collapse.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +9 -9
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +28 -26
- package/dist/cjs/zonos-collect.cjs.entry.js +10 -11
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +16 -14
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +7 -7
- package/dist/cjs/zonos-hello.cjs.entry.js +3 -3
- package/dist/cjs/zonos-input.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +11 -11
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +23 -21
- package/dist/cjs/zonos-invoice.cjs.entry.js +10 -11
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -7
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +3 -3
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +7 -7
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +3 -3
- package/dist/cjs/{zonosStore-fee716c9.js → zonosStore-0af0b937.js} +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +8 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +7 -4
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +7 -4
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +3 -3
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +6 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -5
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/hello/localization.js +20 -1
- package/dist/collection/components/store/zonosStore.js +3 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/getSupportedLanguages.js +17 -0
- package/dist/collection/components/utils/shouldShowLanguageSelect.js +8 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +4 -0
- package/dist/collection/types/generated/graphql.internal.types.js +302 -15
- package/dist/esm/{cart-93c36159.js → cart-2e407f7b.js} +4 -4
- package/dist/esm/{collect-42d4757a.js → collect-19428e18.js} +3 -3
- package/dist/esm/{debounce-c8d67b17.js → debounce-84ade9c2.js} +1 -1
- package/dist/esm/{getBorderRadius-dc982fe6.js → getBorderRadius-1f7be586.js} +1 -1
- package/dist/esm/{getContrastColor-af895b60.js → getContrastColor-4c0ae8c1.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-ebdccdcf.js → getMissingRequiredShippingFields-719b206f.js} +1 -1
- package/dist/esm/{hasInclusivePrice-4c12548f.js → hasInclusivePrice-d801be22.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-71471339.js → invoice-67a47785.js} +3 -3
- package/dist/esm/{isContrastColor-089de6ac.js → isContrastColor-9fa0d013.js} +1 -1
- package/dist/esm/{isDarkColor-039ef212.js → isDarkColor-939d8e9c.js} +1 -1
- package/dist/esm/{localization-754e7e8b.js → localization-36a4dc22.js} +60 -3
- package/dist/esm/{paypal-b1410e02.js → paypal-6dca6567.js} +5 -5
- package/dist/esm/{placeTestOrder-4267cafd.js → placeTestOrder-9563c89a.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-9a81e41c.js → renderCheckoutCurrency-282384f0.js} +2 -2
- package/dist/esm/shouldShowLanguageSelect-328f50e2.js +11 -0
- package/dist/esm/{submitGtag-dc54f5b9.js → submitGtag-71c450b6.js} +1 -1
- package/dist/esm/{throttle-44bfb6b5.js → throttle-c4c24e86.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-e0a282d9.js → updateCheckoutSessionAttributes-23b222de.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +17 -17
- package/dist/esm/zonos-address-display_2.entry.js +6 -6
- package/dist/esm/zonos-address_4.entry.js +13 -13
- package/dist/esm/zonos-airwallex-payment.entry.js +6 -6
- package/dist/esm/zonos-badge.entry.js +4 -4
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +6 -6
- package/dist/esm/zonos-card_5.entry.js +14 -14
- package/dist/esm/zonos-cart-items_12.entry.js +28 -25
- package/dist/esm/zonos-checkbox_2.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +10 -10
- package/dist/esm/zonos-collapse.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +9 -9
- package/dist/esm/zonos-collect-finish_6.entry.js +27 -25
- package/dist/esm/zonos-collect.entry.js +9 -10
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +15 -13
- package/dist/esm/zonos-hello-dialog.entry.js +7 -7
- package/dist/esm/zonos-hello.entry.js +3 -3
- package/dist/esm/zonos-input.entry.js +6 -6
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +11 -11
- package/dist/esm/zonos-invoice-finish_5.entry.js +22 -20
- package/dist/esm/zonos-invoice.entry.js +9 -10
- package/dist/esm/zonos-language-select_2.entry.js +6 -7
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +3 -3
- package/dist/esm/zonos-policy-consent_2.entry.js +6 -6
- package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
- package/dist/esm/zonos-stripe-input.entry.js +7 -7
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +3 -3
- package/dist/esm/{zonosStore-b7d3f9b0.js → zonosStore-eca1e364.js} +3 -0
- package/dist/esm-es5/{cart-93c36159.js → cart-2e407f7b.js} +1 -1
- package/dist/esm-es5/{collect-42d4757a.js → collect-19428e18.js} +1 -1
- package/dist/esm-es5/{debounce-c8d67b17.js → debounce-84ade9c2.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-dc982fe6.js → getBorderRadius-1f7be586.js} +1 -1
- package/dist/esm-es5/{getContrastColor-af895b60.js → getContrastColor-4c0ae8c1.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-ebdccdcf.js → getMissingRequiredShippingFields-719b206f.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-4c12548f.js → hasInclusivePrice-d801be22.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-71471339.js → invoice-67a47785.js} +1 -1
- package/dist/esm-es5/{isContrastColor-089de6ac.js → isContrastColor-9fa0d013.js} +1 -1
- package/dist/esm-es5/{isDarkColor-039ef212.js → isDarkColor-939d8e9c.js} +1 -1
- package/dist/esm-es5/{localization-754e7e8b.js → localization-36a4dc22.js} +1 -1
- package/dist/esm-es5/{paypal-b1410e02.js → paypal-6dca6567.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-4267cafd.js → placeTestOrder-9563c89a.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-9a81e41c.js → renderCheckoutCurrency-282384f0.js} +1 -1
- package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +1 -0
- package/dist/esm-es5/{submitGtag-dc54f5b9.js → submitGtag-71c450b6.js} +1 -1
- package/dist/esm-es5/throttle-c4c24e86.js +1 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-e0a282d9.js → updateCheckoutSessionAttributes-23b222de.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-b7d3f9b0.js → zonosStore-eca1e364.js} +1 -1
- package/dist/scripts/index.d.ts +54 -34
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/store/hello/localization.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/getSupportedLanguages.d.ts +167 -0
- package/dist/types/components/utils/shouldShowLanguageSelect.d.ts +7 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +25 -24
- package/dist/types/types/generated/graphql.frontend.types.d.ts +9 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +6 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +463 -107
- package/dist/types/types/generated/graphql.internal.types.ts +601 -102
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-b93013f7.system.entry.js → p-083a11cd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0b29169b.js +1 -0
- package/dist/zonos-elements/{p-62609f19.entry.js → p-0c972ddf.entry.js} +1 -1
- package/dist/zonos-elements/{p-f9f3155b.js → p-0c9fec73.js} +1 -1
- package/dist/zonos-elements/{p-f1dbeb85.system.entry.js → p-0e199a6c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-76cdf517.js → p-0ff845ec.js} +1 -1
- package/dist/zonos-elements/p-1277abac.system.entry.js +1 -0
- package/dist/zonos-elements/p-14afffa8.system.js +1 -0
- package/dist/zonos-elements/{p-944282af.entry.js → p-171a7e1e.entry.js} +1 -1
- package/dist/zonos-elements/{p-f1aea919.js → p-1834f486.js} +1 -1
- package/dist/zonos-elements/p-1ac0c631.system.js +1 -0
- package/dist/zonos-elements/{p-fa80a973.entry.js → p-1be53c82.entry.js} +1 -1
- package/dist/zonos-elements/p-1cdd27ec.js +1 -0
- package/dist/zonos-elements/{p-c634546a.system.entry.js → p-1f8648c8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-22e10b7d.entry.js +1 -0
- package/dist/zonos-elements/p-260ad739.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9a417eeb.js → p-27660512.js} +1 -1
- package/dist/zonos-elements/{p-b567448d.system.js → p-2989da12.system.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-5fceef56.system.js → p-2b8c96e3.system.js} +1 -1
- package/dist/zonos-elements/{p-7bdce9d4.js → p-2bbe9d91.js} +1 -1
- package/dist/zonos-elements/{p-07c21940.entry.js → p-2c2afed4.entry.js} +1 -1
- package/dist/zonos-elements/{p-32b53999.entry.js → p-2c44e013.entry.js} +1 -1
- package/dist/zonos-elements/{p-e0cbc7c7.entry.js → p-2c7a425d.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e1f13ff.system.entry.js → p-2cab1746.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1180a97c.system.entry.js → p-2cdd1b49.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d1e84608.entry.js → p-2ce039e5.entry.js} +1 -1
- package/dist/zonos-elements/{p-26bf0c31.entry.js → p-3490b6d0.entry.js} +1 -1
- package/dist/zonos-elements/{p-72280783.system.js → p-3a13e58c.system.js} +1 -1
- package/dist/zonos-elements/{p-ef2c264c.entry.js → p-4671fde7.entry.js} +1 -1
- package/dist/zonos-elements/{p-e2b8936a.js → p-46cd14e5.js} +1 -1
- package/dist/zonos-elements/{p-0d183f19.system.js → p-4a20893e.system.js} +1 -1
- package/dist/zonos-elements/{p-6325ee77.system.js → p-4b159ff3.system.js} +1 -1
- package/dist/zonos-elements/{p-34d6eb83.js → p-502d6eeb.js} +1 -1
- package/dist/zonos-elements/{p-8fa3a8f8.system.entry.js → p-51e4e61a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-496accce.system.js → p-551fa762.system.js} +1 -1
- package/dist/zonos-elements/p-5a491f28.js +1 -0
- package/dist/zonos-elements/{p-d74eda59.entry.js → p-5b990c91.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7a03b08.entry.js → p-5ebb7ae6.entry.js} +1 -1
- package/dist/zonos-elements/p-60832726.system.js +1 -0
- package/dist/zonos-elements/{p-c515bc23.system.js → p-60a6b71d.system.js} +1 -1
- package/dist/zonos-elements/p-62f6a757.entry.js +1 -0
- package/dist/zonos-elements/p-65c1f51e.entry.js +1 -0
- package/dist/zonos-elements/{p-dab78981.system.js → p-6890e060.system.js} +1 -1
- package/dist/zonos-elements/{p-21f7d57b.entry.js → p-6afd5fab.entry.js} +1 -1
- package/dist/zonos-elements/{p-2837bfd2.js → p-6bdc5c96.js} +1 -1
- package/dist/zonos-elements/{p-e99654c1.system.entry.js → p-6dde1e85.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3d0d8ff.entry.js → p-6ee4e027.entry.js} +1 -1
- package/dist/zonos-elements/p-7176f582.entry.js +1 -0
- package/dist/zonos-elements/{p-333f6018.system.entry.js → p-76834a0a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f2431e47.entry.js → p-7ada039e.entry.js} +1 -1
- package/dist/zonos-elements/{p-d706852e.system.js → p-7fbbdb0f.system.js} +1 -1
- package/dist/zonos-elements/{p-9ceb3d1c.entry.js → p-8311edc7.entry.js} +1 -1
- package/dist/zonos-elements/p-8a0b8175.system.entry.js +1 -0
- package/dist/zonos-elements/p-8a6c4017.js +1 -0
- package/dist/zonos-elements/p-8b298971.system.entry.js +1 -0
- package/dist/zonos-elements/p-8be02f3a.system.js +1 -0
- package/dist/zonos-elements/{p-6be4c473.entry.js → p-8bfe5b2b.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc45b3a5.entry.js → p-8e6338b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-22f7120a.system.js → p-916228fb.system.js} +1 -1
- package/dist/zonos-elements/{p-4dba0e9b.system.entry.js → p-94722bf6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-947e4402.system.entry.js +1 -0
- package/dist/zonos-elements/p-9639a8ed.entry.js +1 -0
- package/dist/zonos-elements/{p-f2511b86.system.entry.js → p-9ad640b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-781b3345.system.entry.js → p-9ecb9afc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a37683b.system.entry.js → p-a04e2750.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d93f4837.entry.js → p-a07e5011.entry.js} +1 -1
- package/dist/zonos-elements/{p-4a73906a.system.entry.js → p-a9ad74e5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-db65c60b.system.entry.js → p-acb7dee1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3d28353a.js → p-adfbf57b.js} +1 -1
- package/dist/zonos-elements/{p-39399f67.entry.js → p-ae0de3e4.entry.js} +1 -1
- package/dist/zonos-elements/{p-59824ac6.entry.js → p-aecb5d61.entry.js} +1 -1
- package/dist/zonos-elements/{p-33dd7dab.entry.js → p-aed4ffb2.entry.js} +1 -1
- package/dist/zonos-elements/{p-e977562b.system.js → p-af19722c.system.js} +1 -1
- package/dist/zonos-elements/{p-e8bb4f3b.entry.js → p-b1e95f95.entry.js} +1 -1
- package/dist/zonos-elements/{p-59e4e0b6.system.entry.js → p-b4ae66cb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-55c5977b.entry.js → p-bb09ee50.entry.js} +1 -1
- package/dist/zonos-elements/{p-21489ff1.system.entry.js → p-bcaffb85.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bced320e.entry.js +1 -0
- package/dist/zonos-elements/p-be6cd28c.system.entry.js +1 -0
- package/dist/zonos-elements/p-c1631c9c.js +1 -0
- package/dist/zonos-elements/{p-cb376f03.entry.js → p-c77b049c.entry.js} +1 -1
- package/dist/zonos-elements/{p-6146bfaa.system.entry.js → p-ca87ada5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-69871ab6.entry.js → p-cb49dcfe.entry.js} +1 -1
- package/dist/zonos-elements/p-cb4cb5a3.system.js +1 -0
- package/dist/zonos-elements/{p-aa7589de.system.entry.js → p-d20fe2c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-76a75da9.system.entry.js → p-d42bd250.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-97f15546.system.entry.js → p-d6a73125.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-19bbf4b3.js → p-dc80cb87.js} +1 -1
- package/dist/zonos-elements/{p-4a5fa892.system.entry.js → p-dd3c00d6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-47a1d469.system.js → p-de58684b.system.js} +1 -1
- package/dist/zonos-elements/{p-1735a69b.js → p-e160b75f.js} +1 -1
- package/dist/zonos-elements/{p-2aebcfa8.system.entry.js → p-e1ef3984.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4b9c7803.entry.js → p-e27b8e18.entry.js} +1 -1
- package/dist/zonos-elements/{p-1cff471a.system.entry.js → p-e2b4c082.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-29ca1415.system.entry.js → p-e32ee011.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5b11bbca.system.entry.js → p-e4b07f7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a2fe995b.js → p-e5c76a9b.js} +2 -2
- package/dist/zonos-elements/p-e8587f9f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-cd5638b2.system.js → p-eb5f3451.system.js} +1 -1
- package/dist/zonos-elements/p-ebbda085.system.js +1 -0
- package/dist/zonos-elements/{p-daab3824.entry.js → p-f37150e8.entry.js} +1 -1
- package/dist/zonos-elements/p-f4720b0a.js +1 -0
- package/dist/zonos-elements/{p-38881097.js → p-f4acce01.js} +1 -1
- package/dist/zonos-elements/p-f59a0129.system.entry.js +1 -0
- package/dist/zonos-elements/{p-58da55e6.system.entry.js → p-f8356934.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-602de72d.system.js → p-fe5f05fc.system.js} +1 -1
- package/dist/zonos-elements/p-ff4e6811.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +3 -1
- package/dist/cjs/ILanguage-98b04442.js +0 -26
- package/dist/esm/ILanguage-cd6acb72.js +0 -24
- package/dist/esm-es5/ILanguage-cd6acb72.js +0 -1
- package/dist/esm-es5/throttle-44bfb6b5.js +0 -1
- package/dist/zonos-elements/p-007ff76a.entry.js +0 -1
- package/dist/zonos-elements/p-05cb0a0d.system.entry.js +0 -1
- package/dist/zonos-elements/p-065f3f66.system.entry.js +0 -1
- package/dist/zonos-elements/p-1af510ea.system.entry.js +0 -1
- package/dist/zonos-elements/p-30e9a6d7.system.js +0 -1
- package/dist/zonos-elements/p-342b062d.system.entry.js +0 -1
- package/dist/zonos-elements/p-35fd0fdb.js +0 -1
- package/dist/zonos-elements/p-3b479012.js +0 -1
- package/dist/zonos-elements/p-3d902845.entry.js +0 -1
- package/dist/zonos-elements/p-3dcb3794.entry.js +0 -1
- package/dist/zonos-elements/p-5c30d04b.js +0 -1
- package/dist/zonos-elements/p-67251274.system.js +0 -1
- package/dist/zonos-elements/p-73d1a554.entry.js +0 -1
- package/dist/zonos-elements/p-8eaf1316.js +0 -1
- package/dist/zonos-elements/p-97aceb11.js +0 -1
- package/dist/zonos-elements/p-a3c116d6.system.js +0 -1
- package/dist/zonos-elements/p-b0482924.entry.js +0 -1
- package/dist/zonos-elements/p-c43130a7.system.entry.js +0 -1
- package/dist/zonos-elements/p-c8a48cce.entry.js +0 -1
- package/dist/zonos-elements/p-c9e433c0.system.js +0 -1
- package/dist/zonos-elements/p-cc35d5f8.system.entry.js +0 -1
- package/dist/zonos-elements/p-d68425ad.js +0 -1
- package/dist/zonos-elements/p-dcf8ab79.entry.js +0 -1
- package/dist/zonos-elements/p-e2057ab0.system.entry.js +0 -1
- package/dist/zonos-elements/p-e8159288.system.entry.js +0 -1
- package/dist/zonos-elements/p-f29bcf8b.system.js +0 -1
- package/dist/zonos-elements/p-f61c0eef.system.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(r,n,e){if(e||arguments.length===2)for(var t=0,a=n.length,i;t<a;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return r.concat(i||Array.prototype.slice.call(n))};System.register(["./p-7261e245.system.js","./p-d938f42f.system.js"],(function(r){"use strict";var n,e,t;return{setters:[function(r){n=r.S},function(r){e=r.a;t=r.l}],execute:function(){var a=function(r,n,e){var t=r.get(n);if(!t){t=[];r.set(n,t)}if(!t.some((function(r){return r.deref()===e}))){t.push(new WeakRef(e))}};var i=function(r,n){var e;return function(){var t=[];for(var a=0;a<arguments.length;a++){t[a]=arguments[a]}if(e){clearTimeout(e)}e=setTimeout((function(){e=0;r.apply(void 0,t)}),n)}};var u=function(r){return!("isConnected"in r)||r.isConnected};var o=i((function(r){for(var n=0,e=r.keys();n<e.length;n++){var t=e[n];var a=r.get(t).filter((function(r){var n=r.deref();return n&&u(n)}));r.set(t,a)}}),2e3);var v=n;var f=v.forceUpdate;var c=v.getRenderingRef;var l=function(){if(typeof c!=="function"||typeof f!=="function"){return{}}var r=f;var n=c;var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var t=n();if(t){a(e,r,t)}},set:function(n){var t=e.get(n);if(t){var a=t.filter((function(n){var e=n.deref();if(!e)return false;return r(e)}));e.set(n,a)}o(e)},reset:function(){e.forEach((function(n){n.forEach((function(n){var e=n.deref();if(e)r(e)}))}));o(e)}}};var s=function(r){return typeof r==="function"?r():r};var d=function(r,n){if(n===void 0){n=function(r,n){return r!==n}}var e=function(){var n;return(n=s(r))!==null&&n!==void 0?n:{}};var t=e();var a=new Map(Object.entries(t));var i=typeof Proxy!=="undefined";var u=i?null:{};var o={dispose:[],get:[],set:[],reset:[]};var v=new Map;var f=function(){a=new Map(Object.entries(e()));if(!i){S()}o.reset.forEach((function(r){return r()}))};var c=function(){o.dispose.forEach((function(r){return r()}));f()};var l=function(r){o.get.forEach((function(n){return n(r)}));return a.get(r)};var d=function(r,e){var t=a.get(r);if(n(e,t,r)){a.set(r,e);if(!i){m(r)}o.set.forEach((function(n){return n(r,e,t)}))}};var h=i?new Proxy(t,{get:function(r,n){return l(n)},ownKeys:function(r){return Array.from(a.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(r,n){return a.has(n)},set:function(r,n,e){d(n,e);return true}}):function(){S();return u}();var y=function(r,n){o[r].push(n);return function(){b(o[r],n)}};var p=function(r,n){var t=function(e,t){if(e===r){n(t)}};var a=function(){var t=e();n(t[r])};var i=y("set",t);var u=y("reset",a);v.set(n,{setHandler:t,resetHandler:a,propName:r});return function(){i();u();v.delete(n)}};var j=function(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var e=r.reduce((function(r,n){if(n.set){r.push(y("set",n.set))}if(n.get){r.push(y("get",n.get))}if(n.reset){r.push(y("reset",n.reset))}if(n.dispose){r.push(y("dispose",n.dispose))}return r}),[]);return function(){return e.forEach((function(r){return r()}))}};var w=function(r){var n=a.get(r);o.set.forEach((function(e){return e(r,n,n)}))};var A=function(r,n){var e=v.get(n);if(e&&e.propName===r){b(o.set,e.setHandler);b(o.reset,e.resetHandler);v.delete(n)}};function m(r){if(i||!u){return}if(Object.prototype.hasOwnProperty.call(u,r)){return}Object.defineProperty(u,r,{configurable:true,enumerable:true,get:function(){return l(r)},set:function(n){d(r,n)}})}function S(){if(i||!u){return}var r=new Set(a.keys());for(var n=0,e=Object.keys(u);n<e.length;n++){var t=e[n];if(!r.has(t)){delete u[t]}}for(var o=0,v=r;o<v.length;o++){var t=v[o];m(t)}}return{state:h,get:l,set:d,on:y,onChange:p,use:j,dispose:c,reset:f,forceUpdate:w,removeListener:A}};var b=function(r,n){var e=r.indexOf(n);if(e>=0){r[e]=r[r.length-1];r.length--}};var h=r("c",(function(r,n){var e=d(r,n);e.use(l());return e}));var y=r("a",typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{});function p(){this.__data__=[];this.size=0}var j=p;function w(r,n){return r===n||r!==r&&n!==n}var A=w;var m=A;function S(r,n){var e=r.length;while(e--){if(m(r[e][0],n)){return e}}return-1}var g=S;var O=g;var _=Array.prototype;var E=_.splice;function D(r){var n=this.__data__,e=O(n,r);if(e<0){return false}var t=n.length-1;if(e==t){n.pop()}else{E.call(n,e,1)}--this.size;return true}var T=D;var L=g;function C(r){var n=this.__data__,e=L(n,r);return e<0?undefined:n[e][1]}var B=C;var I=g;function P(r){return I(this.__data__,r)>-1}var U=P;var M=g;function F(r,n){var e=this.__data__,t=M(e,r);if(t<0){++this.size;e.push([r,n])}else{e[t][1]=n}return this}var x=F;var R=j,k=T,N=B,z=U,H=x;function $(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}$.prototype.clear=R;$.prototype["delete"]=k;$.prototype.get=N;$.prototype.has=z;$.prototype.set=H;var G=$;var K=G;function V(){this.__data__=new K;this.size=0}var W=V;function Y(r){var n=this.__data__,e=n["delete"](r);this.size=n.size;return e}var q=Y;function J(r){return this.__data__.get(r)}var Q=J;function X(r){return this.__data__.has(r)}var Z=X;var rr=typeof y=="object"&&y&&y.Object===Object&&y;var nr=rr;var er=nr;var tr=typeof self=="object"&&self&&self.Object===Object&&self;var ar=er||tr||Function("return this")();var ir=r("_",ar);var ur=ir;var or=ur.Symbol;var vr=or;var fr=vr;var cr=Object.prototype;var lr=cr.hasOwnProperty;var sr=cr.toString;var dr=fr?fr.toStringTag:undefined;function br(r){var n=lr.call(r,dr),e=r[dr];try{r[dr]=undefined;var t=true}catch(r){}var a=sr.call(r);if(t){if(n){r[dr]=e}else{delete r[dr]}}return a}var hr=br;var yr=Object.prototype;var pr=yr.toString;function jr(r){return pr.call(r)}var wr=jr;var Ar=vr,mr=hr,Sr=wr;var gr="[object Null]",Or="[object Undefined]";var _r=Ar?Ar.toStringTag:undefined;function Er(r){if(r==null){return r===undefined?Or:gr}return _r&&_r in Object(r)?mr(r):Sr(r)}var Dr=r("b",Er);function Tr(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}var Lr=r("d",Tr);var Cr=Dr,Br=Lr;var Ir="[object AsyncFunction]",Pr="[object Function]",Ur="[object GeneratorFunction]",Mr="[object Proxy]";function Fr(r){if(!Br(r)){return false}var n=Cr(r);return n==Pr||n==Ur||n==Ir||n==Mr}var xr=Fr;var Rr=ir;var kr=Rr["__core-js_shared__"];var Nr=kr;var zr=Nr;var Hr=function(){var r=/[^.]+$/.exec(zr&&zr.keys&&zr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function $r(r){return!!Hr&&Hr in r}var Gr=$r;var Kr=Function.prototype;var Vr=Kr.toString;function Wr(r){if(r!=null){try{return Vr.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var Yr=Wr;var qr=xr,Jr=Gr,Qr=Lr,Xr=Yr;var Zr=/[\\^$.*+?()[\]{}|]/g;var rn=/^\[object .+?Constructor\]$/;var nn=Function.prototype,en=Object.prototype;var tn=nn.toString;var an=en.hasOwnProperty;var un=RegExp("^"+tn.call(an).replace(Zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function on(r){if(!Qr(r)||Jr(r)){return false}var n=qr(r)?un:rn;return n.test(Xr(r))}var vn=on;function fn(r,n){return r==null?undefined:r[n]}var cn=fn;var ln=vn,sn=cn;function dn(r,n){var e=sn(r,n);return ln(e)?e:undefined}var bn=dn;var hn=bn,yn=ir;var pn=hn(yn,"Map");var jn=pn;var wn=bn;var An=wn(Object,"create");var mn=An;var Sn=mn;function gn(){this.__data__=Sn?Sn(null):{};this.size=0}var On=gn;function _n(r){var n=this.has(r)&&delete this.__data__[r];this.size-=n?1:0;return n}var En=_n;var Dn=mn;var Tn="__lodash_hash_undefined__";var Ln=Object.prototype;var Cn=Ln.hasOwnProperty;function Bn(r){var n=this.__data__;if(Dn){var e=n[r];return e===Tn?undefined:e}return Cn.call(n,r)?n[r]:undefined}var In=Bn;var Pn=mn;var Un=Object.prototype;var Mn=Un.hasOwnProperty;function Fn(r){var n=this.__data__;return Pn?n[r]!==undefined:Mn.call(n,r)}var xn=Fn;var Rn=mn;var kn="__lodash_hash_undefined__";function Nn(r,n){var e=this.__data__;this.size+=this.has(r)?0:1;e[r]=Rn&&n===undefined?kn:n;return this}var zn=Nn;var Hn=On,$n=En,Gn=In,Kn=xn,Vn=zn;function Wn(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}Wn.prototype.clear=Hn;Wn.prototype["delete"]=$n;Wn.prototype.get=Gn;Wn.prototype.has=Kn;Wn.prototype.set=Vn;var Yn=Wn;var qn=Yn,Jn=G,Qn=jn;function Xn(){this.size=0;this.__data__={hash:new qn,map:new(Qn||Jn),string:new qn}}var Zn=Xn;function re(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}var ne=re;var ee=ne;function te(r,n){var e=r.__data__;return ee(n)?e[typeof n=="string"?"string":"hash"]:e.map}var ae=te;var ie=ae;function ue(r){var n=ie(this,r)["delete"](r);this.size-=n?1:0;return n}var oe=ue;var ve=ae;function fe(r){return ve(this,r).get(r)}var ce=fe;var le=ae;function se(r){return le(this,r).has(r)}var de=se;var be=ae;function he(r,n){var e=be(this,r),t=e.size;e.set(r,n);this.size+=e.size==t?0:1;return this}var ye=he;var pe=Zn,je=oe,we=ce,Ae=de,me=ye;function Se(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}Se.prototype.clear=pe;Se.prototype["delete"]=je;Se.prototype.get=we;Se.prototype.has=Ae;Se.prototype.set=me;var ge=Se;var Oe=G,_e=jn,Ee=ge;var De=200;function Te(r,n){var e=this.__data__;if(e instanceof Oe){var t=e.__data__;if(!_e||t.length<De-1){t.push([r,n]);this.size=++e.size;return this}e=this.__data__=new Ee(t)}e.set(r,n);this.size=e.size;return this}var Le=Te;var Ce=G,Be=W,Ie=q,Pe=Q,Ue=Z,Me=Le;function Fe(r){var n=this.__data__=new Ce(r);this.size=n.size}Fe.prototype.clear=Be;Fe.prototype["delete"]=Ie;Fe.prototype.get=Pe;Fe.prototype.has=Ue;Fe.prototype.set=Me;var xe=Fe;var Re=bn;var ke=function(){try{var r=Re(Object,"defineProperty");r({},"",{});return r}catch(r){}}();var Ne=ke;var ze=Ne;function He(r,n,e){if(n=="__proto__"&&ze){ze(r,n,{configurable:true,enumerable:true,value:e,writable:true})}else{r[n]=e}}var $e=He;var Ge=$e,Ke=A;function Ve(r,n,e){if(e!==undefined&&!Ke(r[n],e)||e===undefined&&!(n in r)){Ge(r,n,e)}}var We=Ve;function Ye(r){return function(n,e,t){var a=-1,i=Object(n),u=t(n),o=u.length;while(o--){var v=u[r?o:++a];if(e(i[v],v,i)===false){break}}return n}}var qe=Ye;var Je=qe;var Qe=Je();var Xe=Qe;var Ze={exports:{}};(function(r,n){var e=ir;var t=n&&!n.nodeType&&n;var a=t&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===t;var u=i?e.Buffer:undefined,o=u?u.allocUnsafe:undefined;function v(r,n){if(n){return r.slice()}var e=r.length,t=o?o(e):new r.constructor(e);r.copy(t);return t}r.exports=v})(Ze,Ze.exports);var rt=ir;var nt=rt.Uint8Array;var et=nt;var tt=et;function at(r){var n=new r.constructor(r.byteLength);new tt(n).set(new tt(r));return n}var it=at;var ut=it;function ot(r,n){var e=n?ut(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var vt=ot;function ft(r,n){var e=-1,t=r.length;n||(n=Array(t));while(++e<t){n[e]=r[e]}return n}var ct=ft;var lt=Lr;var st=Object.create;var dt=function(){function r(){}return function(n){if(!lt(n)){return{}}if(st){return st(n)}r.prototype=n;var e=new r;r.prototype=undefined;return e}}();var bt=dt;function ht(r,n){return function(e){return r(n(e))}}var yt=ht;var pt=yt;var jt=pt(Object.getPrototypeOf,Object);var wt=jt;var At=Object.prototype;function mt(r){var n=r&&r.constructor,e=typeof n=="function"&&n.prototype||At;return r===e}var St=mt;var gt=bt,Ot=wt,_t=St;function Et(r){return typeof r.constructor=="function"&&!_t(r)?gt(Ot(r)):{}}var Dt=Et;function Tt(r){return r!=null&&typeof r=="object"}var Lt=r("i",Tt);var Ct=Dr,Bt=Lt;var It="[object Arguments]";function Pt(r){return Bt(r)&&Ct(r)==It}var Ut=Pt;var Mt=Ut,Ft=Lt;var xt=Object.prototype;var Rt=xt.hasOwnProperty;var kt=xt.propertyIsEnumerable;var Nt=Mt(function(){return arguments}())?Mt:function(r){return Ft(r)&&Rt.call(r,"callee")&&!kt.call(r,"callee")};var zt=Nt;var Ht=Array.isArray;var $t=Ht;var Gt=9007199254740991;function Kt(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Gt}var Vt=Kt;var Wt=xr,Yt=Vt;function qt(r){return r!=null&&Yt(r.length)&&!Wt(r)}var Jt=qt;var Qt=Jt,Xt=Lt;function Zt(r){return Xt(r)&&Qt(r)}var ra=Zt;var na={exports:{}};function ea(){return false}var ta=ea;(function(r,n){var e=ir,t=ta;var a=n&&!n.nodeType&&n;var i=a&&"object"=="object"&&r&&!r.nodeType&&r;var u=i&&i.exports===a;var o=u?e.Buffer:undefined;var v=o?o.isBuffer:undefined;var f=v||t;r.exports=f})(na,na.exports);var aa=Dr,ia=wt,ua=Lt;var oa="[object Object]";var va=Function.prototype,fa=Object.prototype;var ca=va.toString;var la=fa.hasOwnProperty;var sa=ca.call(Object);function da(r){if(!ua(r)||aa(r)!=oa){return false}var n=ia(r);if(n===null){return true}var e=la.call(n,"constructor")&&n.constructor;return typeof e=="function"&&e instanceof e&&ca.call(e)==sa}var ba=da;var ha=Dr,ya=Vt,pa=Lt;var ja="[object Arguments]",wa="[object Array]",Aa="[object Boolean]",ma="[object Date]",Sa="[object Error]",ga="[object Function]",Oa="[object Map]",_a="[object Number]",Ea="[object Object]",Da="[object RegExp]",Ta="[object Set]",La="[object String]",Ca="[object WeakMap]";var Ba="[object ArrayBuffer]",Ia="[object DataView]",Pa="[object Float32Array]",Ua="[object Float64Array]",Ma="[object Int8Array]",Fa="[object Int16Array]",xa="[object Int32Array]",Ra="[object Uint8Array]",ka="[object Uint8ClampedArray]",Na="[object Uint16Array]",za="[object Uint32Array]";var Ha={};Ha[Pa]=Ha[Ua]=Ha[Ma]=Ha[Fa]=Ha[xa]=Ha[Ra]=Ha[ka]=Ha[Na]=Ha[za]=true;Ha[ja]=Ha[wa]=Ha[Ba]=Ha[Aa]=Ha[Ia]=Ha[ma]=Ha[Sa]=Ha[ga]=Ha[Oa]=Ha[_a]=Ha[Ea]=Ha[Da]=Ha[Ta]=Ha[La]=Ha[Ca]=false;function $a(r){return pa(r)&&ya(r.length)&&!!Ha[ha(r)]}var Ga=$a;function Ka(r){return function(n){return r(n)}}var Va=Ka;var Wa={exports:{}};(function(r,n){var e=nr;var t=n&&!n.nodeType&&n;var a=t&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===t;var u=i&&e.process;var o=function(){try{var r=a&&a.require&&a.require("util").types;if(r){return r}return u&&u.binding&&u.binding("util")}catch(r){}}();r.exports=o})(Wa,Wa.exports);var Ya=Ga,qa=Va,Ja=Wa.exports;var Qa=Ja&&Ja.isTypedArray;var Xa=Qa?qa(Qa):Ya;var Za=Xa;function ri(r,n){if(n==="constructor"&&typeof r[n]==="function"){return}if(n=="__proto__"){return}return r[n]}var ni=ri;var ei=$e,ti=A;var ai=Object.prototype;var ii=ai.hasOwnProperty;function ui(r,n,e){var t=r[n];if(!(ii.call(r,n)&&ti(t,e))||e===undefined&&!(n in r)){ei(r,n,e)}}var oi=ui;var vi=oi,fi=$e;function ci(r,n,e,t){var a=!e;e||(e={});var i=-1,u=n.length;while(++i<u){var o=n[i];var v=t?t(e[o],r[o],o,e,r):undefined;if(v===undefined){v=r[o]}if(a){fi(e,o,v)}else{vi(e,o,v)}}return e}var li=ci;function si(r,n){var e=-1,t=Array(r);while(++e<r){t[e]=n(e)}return t}var di=si;var bi=9007199254740991;var hi=/^(?:0|[1-9]\d*)$/;function yi(r,n){var e=typeof r;n=n==null?bi:n;return!!n&&(e=="number"||e!="symbol"&&hi.test(r))&&(r>-1&&r%1==0&&r<n)}var pi=yi;var ji=di,wi=zt,Ai=$t,mi=na.exports,Si=pi,gi=Za;var Oi=Object.prototype;var _i=Oi.hasOwnProperty;function Ei(r,n){var e=Ai(r),t=!e&&wi(r),a=!e&&!t&&mi(r),i=!e&&!t&&!a&&gi(r),u=e||t||a||i,o=u?ji(r.length,String):[],v=o.length;for(var f in r){if((n||_i.call(r,f))&&!(u&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Si(f,v)))){o.push(f)}}return o}var Di=Ei;function Ti(r){var n=[];if(r!=null){for(var e in Object(r)){n.push(e)}}return n}var Li=Ti;var Ci=Lr,Bi=St,Ii=Li;var Pi=Object.prototype;var Ui=Pi.hasOwnProperty;function Mi(r){if(!Ci(r)){return Ii(r)}var n=Bi(r),e=[];for(var t in r){if(!(t=="constructor"&&(n||!Ui.call(r,t)))){e.push(t)}}return e}var Fi=Mi;var xi=Di,Ri=Fi,ki=Jt;function Ni(r){return ki(r)?xi(r,true):Ri(r)}var zi=Ni;var Hi=li,$i=zi;function Gi(r){return Hi(r,$i(r))}var Ki=Gi;var Vi=We,Wi=Ze.exports,Yi=vt,qi=ct,Ji=Dt,Qi=zt,Xi=$t,Zi=ra,ru=na.exports,nu=xr,eu=Lr,tu=ba,au=Za,iu=ni,uu=Ki;function ou(r,n,e,t,a,i,u){var o=iu(r,e),v=iu(n,e),f=u.get(v);if(f){Vi(r,e,f);return}var c=i?i(o,v,e+"",r,n,u):undefined;var l=c===undefined;if(l){var s=Xi(v),d=!s&&ru(v),b=!s&&!d&&au(v);c=v;if(s||d||b){if(Xi(o)){c=o}else if(Zi(o)){c=qi(o)}else if(d){l=false;c=Wi(v,true)}else if(b){l=false;c=Yi(v,true)}else{c=[]}}else if(tu(v)||Qi(v)){c=o;if(Qi(o)){c=uu(o)}else if(!eu(o)||nu(o)){c=Ji(v)}}else{l=false}}if(l){u.set(v,c);a(c,v,t,i,u);u["delete"](v)}Vi(r,e,c)}var vu=ou;var fu=xe,cu=We,lu=Xe,su=vu,du=Lr,bu=zi,hu=ni;function yu(r,n,e,t,a){if(r===n){return}lu(n,(function(i,u){a||(a=new fu);if(du(i)){su(r,n,u,e,yu,t,a)}else{var o=t?t(hu(r,u),i,u+"",r,n,a):undefined;if(o===undefined){o=i}cu(r,u,o)}}),bu)}var pu=yu;function ju(r){return r}var wu=ju;function Au(r,n,e){switch(e.length){case 0:return r.call(n);case 1:return r.call(n,e[0]);case 2:return r.call(n,e[0],e[1]);case 3:return r.call(n,e[0],e[1],e[2])}return r.apply(n,e)}var mu=Au;var Su=mu;var gu=Math.max;function Ou(r,n,e){n=gu(n===undefined?r.length-1:n,0);return function(){var t=arguments,a=-1,i=gu(t.length-n,0),u=Array(i);while(++a<i){u[a]=t[n+a]}a=-1;var o=Array(n+1);while(++a<n){o[a]=t[a]}o[n]=e(u);return Su(r,this,o)}}var _u=Ou;function Eu(r){return function(){return r}}var Du=Eu;var Tu=Du,Lu=Ne,Cu=wu;var Bu=!Lu?Cu:function(r,n){return Lu(r,"toString",{configurable:true,enumerable:false,value:Tu(n),writable:true})};var Iu=Bu;var Pu=800,Uu=16;var Mu=Date.now;function Fu(r){var n=0,e=0;return function(){var t=Mu(),a=Uu-(t-e);e=t;if(a>0){if(++n>=Pu){return arguments[0]}}else{n=0}return r.apply(undefined,arguments)}}var xu=Fu;var Ru=Iu,ku=xu;var Nu=ku(Ru);var zu=Nu;var Hu=wu,$u=_u,Gu=zu;function Ku(r,n){return Gu($u(r,n,Hu),r+"")}var Vu=Ku;var Wu=A,Yu=Jt,qu=pi,Ju=Lr;function Qu(r,n,e){if(!Ju(e)){return false}var t=typeof n;if(t=="number"?Yu(e)&&qu(n,e.length):t=="string"&&n in e){return Wu(e[n],r)}return false}var Xu=Qu;var Zu=Vu,ro=Xu;function no(r){return Zu((function(n,e){var t=-1,a=e.length,i=a>1?e[a-1]:undefined,u=a>2?e[2]:undefined;i=r.length>3&&typeof i=="function"?(a--,i):undefined;if(u&&ro(e[0],e[1],u)){i=a<3?undefined:i;a=1}n=Object(n);while(++t<a){var o=e[t];if(o){r(n,o,t,i)}}return n}))}var eo=no;var to=pu,ao=eo;var io=ao((function(r,n,e){to(r,n,e)}));var uo=io;var oo=r("m",(function(r,n){var e=[];for(var t=2;t<arguments.length;t++){e[t-2]=arguments[t]}var a=__spreadArray([r,n],e,true).filter(Boolean);return uo.apply(null,a)}));var vo=function(r){return r in e};var fo=h((function(){return{appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutAddressService:null,checkoutSettings:{allowedCharacterSets:"ALL",allowedSettlementCurrencies:"LOCAL",analyticsProviders:[],companyFieldsStatus:"DISABLED",defaultCartExpiration:3600,externalPaymentMethods:[],externalServiceTokens:[],merchantPolicyLinks:null,mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",disabledCountries:[],enabledVariantTestKeys:[],helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",desktopLocation:"BOTTOM_RIGHT",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",notFoundElementFallback:null,organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",visibilityStatus:"ENABLED",widgetSize:null},loadedConfig:false,onlineStoreSettings:{allowedDomains:[],url:""},organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null}})),co=fo.dispose,lo=fo.onChange,so=fo.reset,bo=fo.state;r({h:lo,z:bo});var ho=null;var yo=r("g",(function(r){if(r==="SYSTEM"){return window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT"}return r}));var po=r("e",(function(r){var n=r.overrideSettings,e=r.zonosSettings;var a,i,u,o,v,f,c,l;so();if(e){ho=e}var s=oo(bo.appearance,(ho===null||ho===void 0?void 0:ho.appearanceSettings)||(e===null||e===void 0?void 0:e.appearanceSettings)||null,n===null||n===void 0?void 0:n.appearance);if(s.theme==="SYSTEM"){s.theme=yo(s.theme)}bo.onlineStoreSettings=oo(bo.onlineStoreSettings,(e===null||e===void 0?void 0:e.onlineStoreSettings)||null);bo.disabledCountries=((a=e===null||e===void 0?void 0:e.checkoutSettings)===null||a===void 0?void 0:a.disabledCountries)||[];bo.appearance=s;bo.checkoutSettings=oo(bo.checkoutSettings,(ho===null||ho===void 0?void 0:ho.checkoutSettings)||(e===null||e===void 0?void 0:e.checkoutSettings)||null,n===null||n===void 0?void 0:n.checkoutSettings);bo.helloSettings=oo(bo.helloSettings,(ho===null||ho===void 0?void 0:ho.helloSettings)||(e===null||e===void 0?void 0:e.helloSettings)||null,n===null||n===void 0?void 0:n.helloSettings);bo.genericSettings=oo(bo.genericSettings,(ho===null||ho===void 0?void 0:ho.genericSettings)||(e===null||e===void 0?void 0:e.genericSettings)||null);bo.loadedConfig=true;bo.enabledVariantTestKeys=((u=(i=e===null||e===void 0?void 0:e.checkoutSettings)===null||i===void 0?void 0:i.varianceTestRegistrations)===null||u===void 0?void 0:u.flatMap((function(r){var n=r.testKey;return vo(n)?n:[]})))||[];bo.organizationId=((o=e===null||e===void 0?void 0:e.organization)===null||o===void 0?void 0:o.id)||"";bo.organizationName=((v=e===null||e===void 0?void 0:e.organization)===null||v===void 0?void 0:v.name)||"";bo.storeId=((c=(f=e===null||e===void 0?void 0:e.organization)===null||f===void 0?void 0:f.references)===null||c===void 0?void 0:c.storeId)||null;bo.currencyConverter=n===null||n===void 0?void 0:n.currencyConverter;bo.onCountryChange=n===null||n===void 0?void 0:n.onCountryChange;bo.overrideCurrencyFormat=n===null||n===void 0?void 0:n.overrideCurrencyFormat;bo.sourceCurrency=new URLSearchParams(window.location.search).get("zonosSourceCurrencyCode")||((l=e===null||e===void 0?void 0:e.landedCostSettings)===null||l===void 0?void 0:l.defaultNativeCurrency)||"USD";t("Store base currency","info",bo.sourceCurrency);if(bo.storeId){window.Zonos.storeId=bo.storeId}}));var jo=r("f",(function(){var r=bo.appearance.fontFamily||"Inter";return r}))}}}));
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(r,n,e){if(e||arguments.length===2)for(var t=0,a=n.length,i;t<a;t++){if(i||!(t in n)){if(!i)i=Array.prototype.slice.call(n,0,t);i[t]=n[t]}}return r.concat(i||Array.prototype.slice.call(n))};System.register(["./p-7261e245.system.js","./p-d938f42f.system.js"],(function(r){"use strict";var n,e,t;return{setters:[function(r){n=r.S},function(r){e=r.a;t=r.l}],execute:function(){var a=function(r,n,e){var t=r.get(n);if(!t){t=[];r.set(n,t)}if(!t.some((function(r){return r.deref()===e}))){t.push(new WeakRef(e))}};var i=function(r,n){var e;return function(){var t=[];for(var a=0;a<arguments.length;a++){t[a]=arguments[a]}if(e){clearTimeout(e)}e=setTimeout((function(){e=0;r.apply(void 0,t)}),n)}};var u=function(r){return!("isConnected"in r)||r.isConnected};var o=i((function(r){for(var n=0,e=r.keys();n<e.length;n++){var t=e[n];var a=r.get(t).filter((function(r){var n=r.deref();return n&&u(n)}));r.set(t,a)}}),2e3);var v=n;var f=v.forceUpdate;var c=v.getRenderingRef;var l=function(){if(typeof c!=="function"||typeof f!=="function"){return{}}var r=f;var n=c;var e=new Map;return{dispose:function(){return e.clear()},get:function(r){var t=n();if(t){a(e,r,t)}},set:function(n){var t=e.get(n);if(t){var a=t.filter((function(n){var e=n.deref();if(!e)return false;return r(e)}));e.set(n,a)}o(e)},reset:function(){e.forEach((function(n){n.forEach((function(n){var e=n.deref();if(e)r(e)}))}));o(e)}}};var s=function(r){return typeof r==="function"?r():r};var d=function(r,n){if(n===void 0){n=function(r,n){return r!==n}}var e=function(){var n;return(n=s(r))!==null&&n!==void 0?n:{}};var t=e();var a=new Map(Object.entries(t));var i=typeof Proxy!=="undefined";var u=i?null:{};var o={dispose:[],get:[],set:[],reset:[]};var v=new Map;var f=function(){a=new Map(Object.entries(e()));if(!i){S()}o.reset.forEach((function(r){return r()}))};var c=function(){o.dispose.forEach((function(r){return r()}));f()};var l=function(r){o.get.forEach((function(n){return n(r)}));return a.get(r)};var d=function(r,e){var t=a.get(r);if(n(e,t,r)){a.set(r,e);if(!i){m(r)}o.set.forEach((function(n){return n(r,e,t)}))}};var h=i?new Proxy(t,{get:function(r,n){return l(n)},ownKeys:function(r){return Array.from(a.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(r,n){return a.has(n)},set:function(r,n,e){d(n,e);return true}}):function(){S();return u}();var y=function(r,n){o[r].push(n);return function(){b(o[r],n)}};var p=function(r,n){var t=function(e,t){if(e===r){n(t)}};var a=function(){var t=e();n(t[r])};var i=y("set",t);var u=y("reset",a);v.set(n,{setHandler:t,resetHandler:a,propName:r});return function(){i();u();v.delete(n)}};var j=function(){var r=[];for(var n=0;n<arguments.length;n++){r[n]=arguments[n]}var e=r.reduce((function(r,n){if(n.set){r.push(y("set",n.set))}if(n.get){r.push(y("get",n.get))}if(n.reset){r.push(y("reset",n.reset))}if(n.dispose){r.push(y("dispose",n.dispose))}return r}),[]);return function(){return e.forEach((function(r){return r()}))}};var w=function(r){var n=a.get(r);o.set.forEach((function(e){return e(r,n,n)}))};var A=function(r,n){var e=v.get(n);if(e&&e.propName===r){b(o.set,e.setHandler);b(o.reset,e.resetHandler);v.delete(n)}};function m(r){if(i||!u){return}if(Object.prototype.hasOwnProperty.call(u,r)){return}Object.defineProperty(u,r,{configurable:true,enumerable:true,get:function(){return l(r)},set:function(n){d(r,n)}})}function S(){if(i||!u){return}var r=new Set(a.keys());for(var n=0,e=Object.keys(u);n<e.length;n++){var t=e[n];if(!r.has(t)){delete u[t]}}for(var o=0,v=r;o<v.length;o++){var t=v[o];m(t)}}return{state:h,get:l,set:d,on:y,onChange:p,use:j,dispose:c,reset:f,forceUpdate:w,removeListener:A}};var b=function(r,n){var e=r.indexOf(n);if(e>=0){r[e]=r[r.length-1];r.length--}};var h=r("c",(function(r,n){var e=d(r,n);e.use(l());return e}));var y=r("a",typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{});function p(){this.__data__=[];this.size=0}var j=p;function w(r,n){return r===n||r!==r&&n!==n}var A=w;var m=A;function S(r,n){var e=r.length;while(e--){if(m(r[e][0],n)){return e}}return-1}var g=S;var O=g;var _=Array.prototype;var E=_.splice;function D(r){var n=this.__data__,e=O(n,r);if(e<0){return false}var t=n.length-1;if(e==t){n.pop()}else{E.call(n,e,1)}--this.size;return true}var L=D;var T=g;function C(r){var n=this.__data__,e=T(n,r);return e<0?undefined:n[e][1]}var B=C;var I=g;function P(r){return I(this.__data__,r)>-1}var U=P;var M=g;function F(r,n){var e=this.__data__,t=M(e,r);if(t<0){++this.size;e.push([r,n])}else{e[t][1]=n}return this}var x=F;var R=j,k=L,N=B,z=U,H=x;function $(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}$.prototype.clear=R;$.prototype["delete"]=k;$.prototype.get=N;$.prototype.has=z;$.prototype.set=H;var G=$;var K=G;function V(){this.__data__=new K;this.size=0}var W=V;function Y(r){var n=this.__data__,e=n["delete"](r);this.size=n.size;return e}var q=Y;function J(r){return this.__data__.get(r)}var Q=J;function X(r){return this.__data__.has(r)}var Z=X;var rr=typeof y=="object"&&y&&y.Object===Object&&y;var nr=rr;var er=nr;var tr=typeof self=="object"&&self&&self.Object===Object&&self;var ar=er||tr||Function("return this")();var ir=r("_",ar);var ur=ir;var or=ur.Symbol;var vr=or;var fr=vr;var cr=Object.prototype;var lr=cr.hasOwnProperty;var sr=cr.toString;var dr=fr?fr.toStringTag:undefined;function br(r){var n=lr.call(r,dr),e=r[dr];try{r[dr]=undefined;var t=true}catch(r){}var a=sr.call(r);if(t){if(n){r[dr]=e}else{delete r[dr]}}return a}var hr=br;var yr=Object.prototype;var pr=yr.toString;function jr(r){return pr.call(r)}var wr=jr;var Ar=vr,mr=hr,Sr=wr;var gr="[object Null]",Or="[object Undefined]";var _r=Ar?Ar.toStringTag:undefined;function Er(r){if(r==null){return r===undefined?Or:gr}return _r&&_r in Object(r)?mr(r):Sr(r)}var Dr=r("b",Er);function Lr(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}var Tr=r("d",Lr);var Cr=Dr,Br=Tr;var Ir="[object AsyncFunction]",Pr="[object Function]",Ur="[object GeneratorFunction]",Mr="[object Proxy]";function Fr(r){if(!Br(r)){return false}var n=Cr(r);return n==Pr||n==Ur||n==Ir||n==Mr}var xr=Fr;var Rr=ir;var kr=Rr["__core-js_shared__"];var Nr=kr;var zr=Nr;var Hr=function(){var r=/[^.]+$/.exec(zr&&zr.keys&&zr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function $r(r){return!!Hr&&Hr in r}var Gr=$r;var Kr=Function.prototype;var Vr=Kr.toString;function Wr(r){if(r!=null){try{return Vr.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var Yr=Wr;var qr=xr,Jr=Gr,Qr=Tr,Xr=Yr;var Zr=/[\\^$.*+?()[\]{}|]/g;var rn=/^\[object .+?Constructor\]$/;var nn=Function.prototype,en=Object.prototype;var tn=nn.toString;var an=en.hasOwnProperty;var un=RegExp("^"+tn.call(an).replace(Zr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function on(r){if(!Qr(r)||Jr(r)){return false}var n=qr(r)?un:rn;return n.test(Xr(r))}var vn=on;function fn(r,n){return r==null?undefined:r[n]}var cn=fn;var ln=vn,sn=cn;function dn(r,n){var e=sn(r,n);return ln(e)?e:undefined}var bn=dn;var hn=bn,yn=ir;var pn=hn(yn,"Map");var jn=pn;var wn=bn;var An=wn(Object,"create");var mn=An;var Sn=mn;function gn(){this.__data__=Sn?Sn(null):{};this.size=0}var On=gn;function _n(r){var n=this.has(r)&&delete this.__data__[r];this.size-=n?1:0;return n}var En=_n;var Dn=mn;var Ln="__lodash_hash_undefined__";var Tn=Object.prototype;var Cn=Tn.hasOwnProperty;function Bn(r){var n=this.__data__;if(Dn){var e=n[r];return e===Ln?undefined:e}return Cn.call(n,r)?n[r]:undefined}var In=Bn;var Pn=mn;var Un=Object.prototype;var Mn=Un.hasOwnProperty;function Fn(r){var n=this.__data__;return Pn?n[r]!==undefined:Mn.call(n,r)}var xn=Fn;var Rn=mn;var kn="__lodash_hash_undefined__";function Nn(r,n){var e=this.__data__;this.size+=this.has(r)?0:1;e[r]=Rn&&n===undefined?kn:n;return this}var zn=Nn;var Hn=On,$n=En,Gn=In,Kn=xn,Vn=zn;function Wn(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}Wn.prototype.clear=Hn;Wn.prototype["delete"]=$n;Wn.prototype.get=Gn;Wn.prototype.has=Kn;Wn.prototype.set=Vn;var Yn=Wn;var qn=Yn,Jn=G,Qn=jn;function Xn(){this.size=0;this.__data__={hash:new qn,map:new(Qn||Jn),string:new qn}}var Zn=Xn;function re(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}var ne=re;var ee=ne;function te(r,n){var e=r.__data__;return ee(n)?e[typeof n=="string"?"string":"hash"]:e.map}var ae=te;var ie=ae;function ue(r){var n=ie(this,r)["delete"](r);this.size-=n?1:0;return n}var oe=ue;var ve=ae;function fe(r){return ve(this,r).get(r)}var ce=fe;var le=ae;function se(r){return le(this,r).has(r)}var de=se;var be=ae;function he(r,n){var e=be(this,r),t=e.size;e.set(r,n);this.size+=e.size==t?0:1;return this}var ye=he;var pe=Zn,je=oe,we=ce,Ae=de,me=ye;function Se(r){var n=-1,e=r==null?0:r.length;this.clear();while(++n<e){var t=r[n];this.set(t[0],t[1])}}Se.prototype.clear=pe;Se.prototype["delete"]=je;Se.prototype.get=we;Se.prototype.has=Ae;Se.prototype.set=me;var ge=Se;var Oe=G,_e=jn,Ee=ge;var De=200;function Le(r,n){var e=this.__data__;if(e instanceof Oe){var t=e.__data__;if(!_e||t.length<De-1){t.push([r,n]);this.size=++e.size;return this}e=this.__data__=new Ee(t)}e.set(r,n);this.size=e.size;return this}var Te=Le;var Ce=G,Be=W,Ie=q,Pe=Q,Ue=Z,Me=Te;function Fe(r){var n=this.__data__=new Ce(r);this.size=n.size}Fe.prototype.clear=Be;Fe.prototype["delete"]=Ie;Fe.prototype.get=Pe;Fe.prototype.has=Ue;Fe.prototype.set=Me;var xe=Fe;var Re=bn;var ke=function(){try{var r=Re(Object,"defineProperty");r({},"",{});return r}catch(r){}}();var Ne=ke;var ze=Ne;function He(r,n,e){if(n=="__proto__"&&ze){ze(r,n,{configurable:true,enumerable:true,value:e,writable:true})}else{r[n]=e}}var $e=He;var Ge=$e,Ke=A;function Ve(r,n,e){if(e!==undefined&&!Ke(r[n],e)||e===undefined&&!(n in r)){Ge(r,n,e)}}var We=Ve;function Ye(r){return function(n,e,t){var a=-1,i=Object(n),u=t(n),o=u.length;while(o--){var v=u[r?o:++a];if(e(i[v],v,i)===false){break}}return n}}var qe=Ye;var Je=qe;var Qe=Je();var Xe=Qe;var Ze={exports:{}};(function(r,n){var e=ir;var t=n&&!n.nodeType&&n;var a=t&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===t;var u=i?e.Buffer:undefined,o=u?u.allocUnsafe:undefined;function v(r,n){if(n){return r.slice()}var e=r.length,t=o?o(e):new r.constructor(e);r.copy(t);return t}r.exports=v})(Ze,Ze.exports);var rt=ir;var nt=rt.Uint8Array;var et=nt;var tt=et;function at(r){var n=new r.constructor(r.byteLength);new tt(n).set(new tt(r));return n}var it=at;var ut=it;function ot(r,n){var e=n?ut(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var vt=ot;function ft(r,n){var e=-1,t=r.length;n||(n=Array(t));while(++e<t){n[e]=r[e]}return n}var ct=ft;var lt=Tr;var st=Object.create;var dt=function(){function r(){}return function(n){if(!lt(n)){return{}}if(st){return st(n)}r.prototype=n;var e=new r;r.prototype=undefined;return e}}();var bt=dt;function ht(r,n){return function(e){return r(n(e))}}var yt=ht;var pt=yt;var jt=pt(Object.getPrototypeOf,Object);var wt=jt;var At=Object.prototype;function mt(r){var n=r&&r.constructor,e=typeof n=="function"&&n.prototype||At;return r===e}var St=mt;var gt=bt,Ot=wt,_t=St;function Et(r){return typeof r.constructor=="function"&&!_t(r)?gt(Ot(r)):{}}var Dt=Et;function Lt(r){return r!=null&&typeof r=="object"}var Tt=r("i",Lt);var Ct=Dr,Bt=Tt;var It="[object Arguments]";function Pt(r){return Bt(r)&&Ct(r)==It}var Ut=Pt;var Mt=Ut,Ft=Tt;var xt=Object.prototype;var Rt=xt.hasOwnProperty;var kt=xt.propertyIsEnumerable;var Nt=Mt(function(){return arguments}())?Mt:function(r){return Ft(r)&&Rt.call(r,"callee")&&!kt.call(r,"callee")};var zt=Nt;var Ht=Array.isArray;var $t=Ht;var Gt=9007199254740991;function Kt(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Gt}var Vt=Kt;var Wt=xr,Yt=Vt;function qt(r){return r!=null&&Yt(r.length)&&!Wt(r)}var Jt=qt;var Qt=Jt,Xt=Tt;function Zt(r){return Xt(r)&&Qt(r)}var ra=Zt;var na={exports:{}};function ea(){return false}var ta=ea;(function(r,n){var e=ir,t=ta;var a=n&&!n.nodeType&&n;var i=a&&"object"=="object"&&r&&!r.nodeType&&r;var u=i&&i.exports===a;var o=u?e.Buffer:undefined;var v=o?o.isBuffer:undefined;var f=v||t;r.exports=f})(na,na.exports);var aa=Dr,ia=wt,ua=Tt;var oa="[object Object]";var va=Function.prototype,fa=Object.prototype;var ca=va.toString;var la=fa.hasOwnProperty;var sa=ca.call(Object);function da(r){if(!ua(r)||aa(r)!=oa){return false}var n=ia(r);if(n===null){return true}var e=la.call(n,"constructor")&&n.constructor;return typeof e=="function"&&e instanceof e&&ca.call(e)==sa}var ba=da;var ha=Dr,ya=Vt,pa=Tt;var ja="[object Arguments]",wa="[object Array]",Aa="[object Boolean]",ma="[object Date]",Sa="[object Error]",ga="[object Function]",Oa="[object Map]",_a="[object Number]",Ea="[object Object]",Da="[object RegExp]",La="[object Set]",Ta="[object String]",Ca="[object WeakMap]";var Ba="[object ArrayBuffer]",Ia="[object DataView]",Pa="[object Float32Array]",Ua="[object Float64Array]",Ma="[object Int8Array]",Fa="[object Int16Array]",xa="[object Int32Array]",Ra="[object Uint8Array]",ka="[object Uint8ClampedArray]",Na="[object Uint16Array]",za="[object Uint32Array]";var Ha={};Ha[Pa]=Ha[Ua]=Ha[Ma]=Ha[Fa]=Ha[xa]=Ha[Ra]=Ha[ka]=Ha[Na]=Ha[za]=true;Ha[ja]=Ha[wa]=Ha[Ba]=Ha[Aa]=Ha[Ia]=Ha[ma]=Ha[Sa]=Ha[ga]=Ha[Oa]=Ha[_a]=Ha[Ea]=Ha[Da]=Ha[La]=Ha[Ta]=Ha[Ca]=false;function $a(r){return pa(r)&&ya(r.length)&&!!Ha[ha(r)]}var Ga=$a;function Ka(r){return function(n){return r(n)}}var Va=Ka;var Wa={exports:{}};(function(r,n){var e=nr;var t=n&&!n.nodeType&&n;var a=t&&"object"=="object"&&r&&!r.nodeType&&r;var i=a&&a.exports===t;var u=i&&e.process;var o=function(){try{var r=a&&a.require&&a.require("util").types;if(r){return r}return u&&u.binding&&u.binding("util")}catch(r){}}();r.exports=o})(Wa,Wa.exports);var Ya=Ga,qa=Va,Ja=Wa.exports;var Qa=Ja&&Ja.isTypedArray;var Xa=Qa?qa(Qa):Ya;var Za=Xa;function ri(r,n){if(n==="constructor"&&typeof r[n]==="function"){return}if(n=="__proto__"){return}return r[n]}var ni=ri;var ei=$e,ti=A;var ai=Object.prototype;var ii=ai.hasOwnProperty;function ui(r,n,e){var t=r[n];if(!(ii.call(r,n)&&ti(t,e))||e===undefined&&!(n in r)){ei(r,n,e)}}var oi=ui;var vi=oi,fi=$e;function ci(r,n,e,t){var a=!e;e||(e={});var i=-1,u=n.length;while(++i<u){var o=n[i];var v=t?t(e[o],r[o],o,e,r):undefined;if(v===undefined){v=r[o]}if(a){fi(e,o,v)}else{vi(e,o,v)}}return e}var li=ci;function si(r,n){var e=-1,t=Array(r);while(++e<r){t[e]=n(e)}return t}var di=si;var bi=9007199254740991;var hi=/^(?:0|[1-9]\d*)$/;function yi(r,n){var e=typeof r;n=n==null?bi:n;return!!n&&(e=="number"||e!="symbol"&&hi.test(r))&&(r>-1&&r%1==0&&r<n)}var pi=yi;var ji=di,wi=zt,Ai=$t,mi=na.exports,Si=pi,gi=Za;var Oi=Object.prototype;var _i=Oi.hasOwnProperty;function Ei(r,n){var e=Ai(r),t=!e&&wi(r),a=!e&&!t&&mi(r),i=!e&&!t&&!a&&gi(r),u=e||t||a||i,o=u?ji(r.length,String):[],v=o.length;for(var f in r){if((n||_i.call(r,f))&&!(u&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Si(f,v)))){o.push(f)}}return o}var Di=Ei;function Li(r){var n=[];if(r!=null){for(var e in Object(r)){n.push(e)}}return n}var Ti=Li;var Ci=Tr,Bi=St,Ii=Ti;var Pi=Object.prototype;var Ui=Pi.hasOwnProperty;function Mi(r){if(!Ci(r)){return Ii(r)}var n=Bi(r),e=[];for(var t in r){if(!(t=="constructor"&&(n||!Ui.call(r,t)))){e.push(t)}}return e}var Fi=Mi;var xi=Di,Ri=Fi,ki=Jt;function Ni(r){return ki(r)?xi(r,true):Ri(r)}var zi=Ni;var Hi=li,$i=zi;function Gi(r){return Hi(r,$i(r))}var Ki=Gi;var Vi=We,Wi=Ze.exports,Yi=vt,qi=ct,Ji=Dt,Qi=zt,Xi=$t,Zi=ra,ru=na.exports,nu=xr,eu=Tr,tu=ba,au=Za,iu=ni,uu=Ki;function ou(r,n,e,t,a,i,u){var o=iu(r,e),v=iu(n,e),f=u.get(v);if(f){Vi(r,e,f);return}var c=i?i(o,v,e+"",r,n,u):undefined;var l=c===undefined;if(l){var s=Xi(v),d=!s&&ru(v),b=!s&&!d&&au(v);c=v;if(s||d||b){if(Xi(o)){c=o}else if(Zi(o)){c=qi(o)}else if(d){l=false;c=Wi(v,true)}else if(b){l=false;c=Yi(v,true)}else{c=[]}}else if(tu(v)||Qi(v)){c=o;if(Qi(o)){c=uu(o)}else if(!eu(o)||nu(o)){c=Ji(v)}}else{l=false}}if(l){u.set(v,c);a(c,v,t,i,u);u["delete"](v)}Vi(r,e,c)}var vu=ou;var fu=xe,cu=We,lu=Xe,su=vu,du=Tr,bu=zi,hu=ni;function yu(r,n,e,t,a){if(r===n){return}lu(n,(function(i,u){a||(a=new fu);if(du(i)){su(r,n,u,e,yu,t,a)}else{var o=t?t(hu(r,u),i,u+"",r,n,a):undefined;if(o===undefined){o=i}cu(r,u,o)}}),bu)}var pu=yu;function ju(r){return r}var wu=ju;function Au(r,n,e){switch(e.length){case 0:return r.call(n);case 1:return r.call(n,e[0]);case 2:return r.call(n,e[0],e[1]);case 3:return r.call(n,e[0],e[1],e[2])}return r.apply(n,e)}var mu=Au;var Su=mu;var gu=Math.max;function Ou(r,n,e){n=gu(n===undefined?r.length-1:n,0);return function(){var t=arguments,a=-1,i=gu(t.length-n,0),u=Array(i);while(++a<i){u[a]=t[n+a]}a=-1;var o=Array(n+1);while(++a<n){o[a]=t[a]}o[n]=e(u);return Su(r,this,o)}}var _u=Ou;function Eu(r){return function(){return r}}var Du=Eu;var Lu=Du,Tu=Ne,Cu=wu;var Bu=!Tu?Cu:function(r,n){return Tu(r,"toString",{configurable:true,enumerable:false,value:Lu(n),writable:true})};var Iu=Bu;var Pu=800,Uu=16;var Mu=Date.now;function Fu(r){var n=0,e=0;return function(){var t=Mu(),a=Uu-(t-e);e=t;if(a>0){if(++n>=Pu){return arguments[0]}}else{n=0}return r.apply(undefined,arguments)}}var xu=Fu;var Ru=Iu,ku=xu;var Nu=ku(Ru);var zu=Nu;var Hu=wu,$u=_u,Gu=zu;function Ku(r,n){return Gu($u(r,n,Hu),r+"")}var Vu=Ku;var Wu=A,Yu=Jt,qu=pi,Ju=Tr;function Qu(r,n,e){if(!Ju(e)){return false}var t=typeof n;if(t=="number"?Yu(e)&&qu(n,e.length):t=="string"&&n in e){return Wu(e[n],r)}return false}var Xu=Qu;var Zu=Vu,ro=Xu;function no(r){return Zu((function(n,e){var t=-1,a=e.length,i=a>1?e[a-1]:undefined,u=a>2?e[2]:undefined;i=r.length>3&&typeof i=="function"?(a--,i):undefined;if(u&&ro(e[0],e[1],u)){i=a<3?undefined:i;a=1}n=Object(n);while(++t<a){var o=e[t];if(o){r(n,o,t,i)}}return n}))}var eo=no;var to=pu,ao=eo;var io=ao((function(r,n,e){to(r,n,e)}));var uo=io;var oo=r("m",(function(r,n){var e=[];for(var t=2;t<arguments.length;t++){e[t-2]=arguments[t]}var a=__spreadArray([r,n],e,true).filter(Boolean);return uo.apply(null,a)}));var vo=function(r){return r in e};var fo=h((function(){return{appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",supportedLocales:null,theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutAddressService:null,checkoutSettings:{allowedCharacterSets:"ALL",allowedSettlementCurrencies:"LOCAL",analyticsProviders:[],companyFieldsStatus:"DISABLED",defaultCartExpiration:3600,externalPaymentMethods:[],externalServiceTokens:[],merchantPolicyLinks:null,mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",disabledCountries:[],enabledVariantTestKeys:[],helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",desktopLocation:"BOTTOM_RIGHT",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",notFoundElementFallback:null,organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",visibilityStatus:"ENABLED",widgetSize:null},loadedConfig:false,onlineStoreSettings:{allowedDomains:[],url:""},organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null}})),co=fo.dispose,lo=fo.onChange,so=fo.reset,bo=fo.state;r({h:lo,z:bo});var ho=null;var yo=r("g",(function(r){if(r==="SYSTEM"){return window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT"}return r}));var po=r("e",(function(r){var n=r.overrideSettings,e=r.zonosSettings;var a,i,u,o,v,f,c,l;so();if(e){ho=e}var s=oo(bo.appearance,(ho===null||ho===void 0?void 0:ho.appearanceSettings)||(e===null||e===void 0?void 0:e.appearanceSettings)||null,n===null||n===void 0?void 0:n.appearance);if(s.theme==="SYSTEM"){s.theme=yo(s.theme)}bo.onlineStoreSettings=oo(bo.onlineStoreSettings,(e===null||e===void 0?void 0:e.onlineStoreSettings)||null);bo.disabledCountries=((a=e===null||e===void 0?void 0:e.checkoutSettings)===null||a===void 0?void 0:a.disabledCountries)||[];bo.appearance=s;bo.checkoutSettings=oo(bo.checkoutSettings,(ho===null||ho===void 0?void 0:ho.checkoutSettings)||(e===null||e===void 0?void 0:e.checkoutSettings)||null,n===null||n===void 0?void 0:n.checkoutSettings);bo.helloSettings=oo(bo.helloSettings,(ho===null||ho===void 0?void 0:ho.helloSettings)||(e===null||e===void 0?void 0:e.helloSettings)||null,n===null||n===void 0?void 0:n.helloSettings);bo.genericSettings=oo(bo.genericSettings,(ho===null||ho===void 0?void 0:ho.genericSettings)||(e===null||e===void 0?void 0:e.genericSettings)||null);bo.loadedConfig=true;bo.enabledVariantTestKeys=((u=(i=e===null||e===void 0?void 0:e.checkoutSettings)===null||i===void 0?void 0:i.varianceTestRegistrations)===null||u===void 0?void 0:u.flatMap((function(r){var n=r.testKey;return vo(n)?n:[]})))||[];bo.organizationId=((o=e===null||e===void 0?void 0:e.organization)===null||o===void 0?void 0:o.id)||"";bo.organizationName=((v=e===null||e===void 0?void 0:e.organization)===null||v===void 0?void 0:v.name)||"";bo.storeId=((c=(f=e===null||e===void 0?void 0:e.organization)===null||f===void 0?void 0:f.references)===null||c===void 0?void 0:c.storeId)||null;bo.currencyConverter=n===null||n===void 0?void 0:n.currencyConverter;bo.onCountryChange=n===null||n===void 0?void 0:n.onCountryChange;bo.overrideCurrencyFormat=n===null||n===void 0?void 0:n.overrideCurrencyFormat;bo.sourceCurrency=new URLSearchParams(window.location.search).get("zonosSourceCurrencyCode")||((l=e===null||e===void 0?void 0:e.landedCostSettings)===null||l===void 0?void 0:l.defaultNativeCurrency)||"USD";t("Store base currency","info",bo.sourceCurrency);if(bo.storeId){window.Zonos.storeId=bo.storeId}}));var jo=r("f",(function(){var r=bo.appearance.fontFamily||"Inter";return r}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as s}from"./p-
|
|
1
|
+
import{d as s}from"./p-2bbe9d91.js";import{h as t,l as e}from"./p-41dd1cb8.js";const o={},r={},a=async({attributes:a,checkoutSessionId:i})=>{var u;if(o[i]||(o[i]=new Map),a.forEach((s=>{var t;s.value&&(null===(t=o[i])||void 0===t||t.set(s.key,s.value))})),a.length)return r[i]||(r[i]=(u=i,s((async()=>{var s,r;const a=Array.from((null===(s=o[u])||void 0===s?void 0:s.entries())||[]).map((([s,t])=>({key:s,value:t}))),{errors:i,json:n}=await t("/api/zonos-elements/update-checkout-session-attributes",{body:{attributes:a,id:u},method:"POST"});return i.length?(e("Error updating checkout session attributes",i),{success:!1}):(null===(r=o[u])||void 0===r||r.clear(),{success:!!(null==n?void 0:n.success)})}),1e3,{maxWait:5e3}))),r[i]()};export{a as u}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
System.register(["./p-7261e245.system.js","./p-916228fb.system.js","./p-2670438c.system.js","./p-de58684b.system.js","./p-23e7c655.system.js","./p-14afffa8.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(o){"use strict";var e,s,t,n,i,a,l,d,r,h;return{setters:[function(o){e=o.r;s=o.h;t=o.a;n=o.d},function(o){i=o.t;a=o.l},function(o){l=o.i},function(o){d=o.f},function(o){r=o.c},function(o){h=o.g},function(){},function(){}],execute:function(){var c=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';var f=c;var m=o("zonos_address_display",function(){function o(o){e(this,o)}o.prototype.render=function(){var o,e;var n=this.currentAddress,d=n.city,r=n.country,h=n.email,c=n.line1,f=n.line2,m=n.name,z=n.phone,b=n.postal_code,x=n.state;var g=((o=a.allCountries)===null||o===void 0?void 0:o[r])||((e=a.shippingZoneCountries)===null||e===void 0?void 0:e[r]);var p=function(o){var e=o.bold,t=o.content;var n=l(t)?"red-600":"gray-1000";return s("zonos-text",{textColor:n,type:e?"boldLabel":"body"},t)};return s(t,{class:"zonos--address-form zonos--elements"},s("div",{class:"zonos--title"},s("zonos-text",{textColor:"gray-700",type:"smallHeader"},this.addressType==="shipping"?i("Shipping"):i("Billing"))),s("div",{class:"zonos--address-group"},m&&s("div",{class:"zonos--address-line"},p({bold:true,content:m})),h&&s("div",{class:"zonos--address-line"},p({content:h})),z&&s("div",{class:"zonos--address-line"},p({content:z})),c&&s("div",{class:"zonos--address-line"},p({content:c})),f&&s("div",{class:"zonos--address-line"},p({content:f})),s("div",{class:"zonos--address-line"},d&&p({content:d}),x&&p({content:x}),b&&p({content:b})),g&&s("div",{class:"zonos--address-line"},s("zonos-country-flag",{class:"zonos--country-flag",countryCode:g.code})," ",p({content:g.displayName}))))};return o}());m.style=f;var z='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var b=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:4px;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--loading-text,:host .zonos--loading-title{max-width:100%;padding:0 32px;text-align:center}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{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;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";var x=b;var g=o("zonos_dialog",function(){function o(o){var s=this;e(this,o);this.closeDialog=n(this,"closeDialog",3);this.open=false;this.headerText="";this.width="460px";this.noHeader=false;this.noBodyPadding=false;this.noBorder=false;this.noCloseButton=false;this.noClickOutside=false;this.mobile=false;this.isLoading=true;this.isMobile=false;this.isMobileMode=function(){return s.mobile||window.innerWidth<=768};this.closeButtonHandler=function(){if(!s.open){return}s.closeDialog.emit()};this.clickOutsideDialogHandler=function(o){if(o.target===o.currentTarget&&!s.noClickOutside){s.closeDialog.emit()}}}o.prototype.handleWindowResize=function(){this.isMobile=this.isMobileMode()};o.prototype.handleKeyDown=function(o){if(o.key==="Escape"){this.closeButtonHandler()}};o.prototype.componentDidLoad=function(){this.isMobile=this.isMobileMode()};o.prototype.render=function(){var o=h({overrideBorderStyle:this.borderStyle});return s(t,{key:"73740b7d8c127367bbc2c621d036288920b3801d",class:r(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":d(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},s("div",{key:"441c6b5c503a431909f52699ee60992609dea232",class:"zonos--backdrop"}),s("div",{key:"94fb4689581ae2d781cae264740bbf9dbd42deac",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},s("div",{key:"ba788097f52ca80229d16ce910071b56647061f9",class:"zonos--dialog"},this.isLoading&&s("div",{key:"47bfe052272192a74aeed3a5ddbed802ae27bc16",class:"zonos--loading"},s("zonos-spinner",{key:"49168e9057d08233654abfa0ca36138d205ca283",size:30}),this.loadingTitle&&s("zonos-text",{key:"ed89b9b21e30b0e670b296306ed9b797f2baa75e",class:"zonos--loading-title",size:"l",weight:700},this.loadingTitle),this.loadingText&&s("zonos-text",{key:"7770dbdcf4e1fb630e0ed6c08dc4830edf00d1f0",class:"zonos--loading-text"},this.loadingText)),(this.headerText||!this.noCloseButton)&&s("div",{key:"c171e207af502ef02de35803c480d927edea3ce4",class:"zonos--header"},this.headerText&&s("h3",{key:"03999b1441d3a0dc983fed2e64680211f4a59793",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&s("zonos-button",{key:"e2954d9326195df3029c0771481881e6485fae05",class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close dialog",content:z}),noBackground:true,onClick:this.closeButtonHandler,title:"Close dialog",variant:"subtle"})),s("div",{key:"ba456d3747bd51ada021ed909a41e5768ceed4ab",class:r(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},s("slot",{key:"81e4de1e59970996607f7d0f2f2aef7937f82c43"})),s("slot",{key:"3fcd369711a347b9e2d2840fc708e928e17d5da1",name:"dialog-footer"}))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());g.style=x}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,d as o,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as n,t as a,h as l}from"./p-2837bfd2.js";import{z as r}from"./p-9a417eeb.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-2b97f7ed.js";import{h as c,T as m,D as g}from"./p-76cdf517.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-bcf5cffb.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-11206fe2.js";const p=({href:e,text:o})=>`<zonos-link href="${e}" target="_blank" rel="noopener noreferrer">${o}</zonos-link>`,b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){e(this,i),this.closeDialog=o(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=e=>{!e.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async e=>{this.showCountrySelect=e},this.setShowLanguageSelect=async e=>{this.showLanguageSelect=e},this.hasTaxId=()=>{var e;return null===(e=n.countryLandedCost)||void 0===e?void 0:e.hasTaxId},this.isDomesticCountry=()=>{var e,o;const{selectedCountryCode:t}=n;return!!t&&!!(null===(o=null===(e=r.genericSettings)||void 0===e?void 0:e.domesticCountries)||void 0===o?void 0:o.includes(t))},this.isNoThresholdCountry=e=>!(!e||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(e),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const e=n.countryLandedCost;if(!(null==e?void 0:e.allowLowValueOrders)&&"GB"===(null==e?void 0:e.countryCode))return a("Duties will apply to all orders.");const o=(null==e?void 0:e.dutyDeminimus)?l({amount:e.dutyDeminimus}):null;return o?a("Spend up to [threshold] duty free.",{threshold:o}):a("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:e}=n;if(this.isDomesticCountry())return null;if(!(null==e?void 0:e.allowLowValueOrders)&&"GB"===(null==e?void 0:e.countryCode))return a("Taxes will apply to all orders.");const o=(null==e?void 0:e.vatTaxDeminimus)?l({amount:e.vatTaxDeminimus}):null;return o&&!this.isNoThresholdCountry(null==e?void 0:e.countryCode)?a("Spend up to [threshold] tax free.",{threshold:o}):a("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=e=>[`${a("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:a("Learn more.")})}`],this.getUkDutyTaxMessage=e=>e.allowLowValueOrders?[`${a("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:a("Learn more.")})}`]:[a("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:l({amount:e.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=e=>c()?[]:[`${a("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:a("Learn more.")})}`],this.getNewZealandDutyTaxMessge=e=>c()?null:[`${a("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:a("Learn more.")})}`],this.getNorwayDutyTaxMessage=e=>c()?null:[`${a("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:a("Learn more.")})}`],this.getSingaporeDutyTaxMessage=e=>c()?null:[`${a("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*e.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:a("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const e=n.inclusivePricingConfigurations,o=null==e?void 0:e.find(Boolean),t=null==o?void 0:o.configurations[m],s=null==o?void 0:o.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:a("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:a("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:a("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:e,inclusivePriceMessage:o,taxDeMinimisMessage:i})=>{if(c()&&o)switch(o.inclusiveType){case"DUTIES_FEES":return t(s,null,o.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},o.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,o.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},o.message)),e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:b}),t("zonos-text",{"aria-label":"Duty de minimis message"},e)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,o.message))}return t(s,null,e&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:b}),t("zonos-text",{"aria-label":"Duty de minimis message"},e)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(n.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(n.countryLandedCost);default:return f.includes(n.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(n.countryLandedCost):null}}}globalClickHandler(e){this.clickOutsideDialogHandler(e)}isOpenHandler(e){e||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var e,o;const{selectedCountryCode:s}=n,l=this.getAdditionalDutyTaxMessage(),c=null!==(e=this.animateFromLeftOverride)&&void 0!==e?e:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const e=this.dialogRef.getBoundingClientRect();return e.top>=window.innerHeight-e.bottom})(),{customMessages:g}=n,f=a("Welcome to [storeName]",{storeName:r.organizationName}),p=(null===(o=g.find((e=>"hello_default"===e.pageName)))||void 0===o?void 0:o.message)||a("Know about duties and taxes before you buy. Shop with confidence!"),b=h(p),v=this.getCurrentPageEnum(),z=g.filter((e=>e.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"d24794b42581ff92ea7ff4fed8a7feeadd68ec87",class:"zonos--elements"},t("div",{key:"84e539b7e7eb384ec9de8c60f26f33b7de8b4c2c",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:e=>e&&(this.dialogRef=e)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"50d05d3fdb5f5b2769a368c69d307f93ca162725"},t("div",{key:"d08c9c79fd69e1e5ab43a53bfd3d1ca5050fc336",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"7a6e76b1d891ee255b4fff4589714b67eea25dc5",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:"fb3c7ad6df4608f470d3126a2791040cc6a2912c",spacing:24},t("zonos-country-flag",{key:"98e8aedda730cf55a11031ef34191d7a0e92ebfa",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"eb073f09379cf41486da6a355535775e3022ff57",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"23d0aed3f10ea1d5d46f841f34ae240a393fe582",type:"boldSubheader"},f),t("zonos-text",{key:"eda291fcc35c2d874ae16d35218e7d61414e0d48",innerHTML:b,textColor:"gray-800"})),t("zonos-v-stack",{key:"14c81958db7911bca665c13e95249d8886524190",spacing:8},this.restrictedItems.map((e=>{var o;return e&&t("zonos-banner",{bannerTitle:e.name,intent:"error"},null===(o=e.itemRestrictions)||void 0===o?void 0:o.map((e=>t("zonos-text",{textColor:"red-800"},null==e?void 0:e.note))))})),(x||w||C||!!(null==l?void 0:l.length))&&t("zonos-card",{key:"debf6a45b077b636d568a63abc1e6e628b117556",spacing:"12px"},t("zonos-v-stack",{key:"7077e41a083eee4cd34604fa20c97f6e6e6e5ea4",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==l?void 0:l.map((e=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:e})))))),z.map((e=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:e.message})))))),t("zonos-hello-dialog-footer",{key:"6a545ced019871fb0b6254b6ad8d61d21d855127",appearanceSettings:this.appearanceSettings,setShowCountrySelect:e=>this.setShowCountrySelect(e),setShowLanguageSelect:e=>this.setShowLanguageSelect(e)})),this.showCountrySelect&&t("div",{key:"e951aa4125477220462fab0332d9badd05901875"},t("zonos-country-select",{key:"e949e265136e827272db29d7d09af5ea2da0a415",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"eaebd5ba3bdaf0f3d335b99f807ae432d9330db3"},t("zonos-language-select",{key:"2900f41ecd69c84d59505b2f2771eef709e419e3",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
1
|
+
import{r as o,d as e,h as t,F as s,a as i}from"./p-ce75b047.js";import{l as n,t as l,h as a}from"./p-6bdc5c96.js";import{z as r}from"./p-27660512.js";import{c as d}from"./p-b4b7f705.js";import{f as h}from"./p-2b97f7ed.js";import{h as c,T as m,D as g}from"./p-0ff845ec.js";import{g as u}from"./p-5883217a.js";import{e as f}from"./p-bcf5cffb.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";import"./p-11206fe2.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`,p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n',x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=n.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isDomesticCountry=()=>{var o,e;const{selectedCountryCode:t}=n;return!!t&&!!(null===(e=null===(o=r.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===e?void 0:e.includes(t))},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const o=n.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return l("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?a({amount:o.dutyDeminimus}):null;return e?l("Spend up to [threshold] duty free.",{threshold:e}):l("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n;if(this.isDomesticCountry())return null;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return l("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?a({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?l("Spend up to [threshold] tax free.",{threshold:e}):l("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${l("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:l("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${l("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:l("Learn more.")})}`]:[l("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:a({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${l("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:l("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${l("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:l("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${l("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:l("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${l("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:l("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=n.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:l("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:l("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:l("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:o,inclusivePriceMessage:e,taxDeMinimisMessage:i})=>{if(c()&&e)switch(e.inclusiveType){case"DUTIES_FEES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},e.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},e.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,e.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(n.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(n.countryLandedCost);default:return f.includes(n.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(n.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o,e;const{selectedCountryCode:s}=n,a=this.getAdditionalDutyTaxMessage(),c=null!==(o=this.animateFromLeftOverride)&&void 0!==o?o:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=n,f=l("Welcome to [storeName]",{storeName:r.organizationName}),b=(null===(e=g.find((o=>"hello_default"===o.pageName)))||void 0===e?void 0:e.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),p=h(b),v=this.getCurrentPageEnum(),z=g.filter((o=>o.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"4e9a8cb8064ba558d21a45675c3165621e44b1fa",class:"zonos--elements"},t("div",{key:"ab9428c38706dc0e908786a1d8965db4773bc9a4",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"8cb7b88b669c208f0cb46c1e2a3c6a2c953c4f15"},t("div",{key:"9f7cb8f8146479fa2e3cad74deec1eef039dd7fc",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"cdec0506fd5f4a8fd4ab152ed79946e0af4ae05e",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:"d16e6a8caea049e7d253c9d25e86bb761af1b209",spacing:24},t("zonos-country-flag",{key:"b5f8a405697b45383e3f79787dd6c8dbc05b5c79",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"781c5dddeb71d07792727e31e9b18631792c49ea",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"43eb83b2f31824cee858edb805d7fc1d7ffe6043",type:"boldSubheader"},f),t("zonos-text",{key:"6d77de6b476ff69a8f397060f6b0cf351c116dee",innerHTML:p,textColor:"gray-800"})),t("zonos-v-stack",{key:"0bb7f48528f1890e13c12e739c93a8cd82456f7b",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),(x||w||C||!!(null==a?void 0:a.length))&&t("zonos-card",{key:"3c3b6e2b3bc79cc2d2771253df1b1e63078ab5eb",spacing:"12px"},t("zonos-v-stack",{key:"15c26e6682006159018d52fb608dfed31a6298b0",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==a?void 0:a.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"85b7a06c12465363e5c658603e197f65c9d8d64a",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"343554a61f2ce5b011ea7b896e52bec5c9c1a2fd"},t("zonos-country-select",{key:"9cea5cded20ca68c0e6ed4ca89df776acd08e1b1",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"6e6d43b3fb6961b0968355fc8cf5dd2ff7a54ca6"},t("zonos-language-select",{key:"42b784a64350f9816bf15906f73e009ac14052d9",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:["isOpenHandler"]}}};x.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,t,i,e){function o(n){return n instanceof i?n:new i((function(t){t(n)}))}return new(i||(i=Promise))((function(i,s){function a(n){try{c(e.next(n))}catch(n){s(n)}}function r(n){try{c(e["throw"](n))}catch(n){s(n)}}function c(n){n.done?i(n.value):o(n.value).then(a,r)}c((e=e.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},e,o,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(n){return function(t){return c([n,t])}}function c(r){if(e)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(i=0)),i)try{if(e=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){i.label=r[1];break}if(r[0]===6&&i.label<s[1]){i.label=s[1];s=r;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(r);break}if(s[2])i.ops.pop();i.trys.pop();continue}r=t.call(n,i)}catch(n){r=[6,n];o=0}finally{e=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,t,i){if(i||arguments.length===2)for(var e=0,o=t.length,s;e<o;e++){if(s||!(e in t)){if(!s)s=Array.prototype.slice.call(t,0,e);s[e]=t[e]}}return n.concat(s||Array.prototype.slice.call(t))};System.register(["./p-7261e245.system.js","./p-f29bcf8b.system.js","./p-0d183f19.system.js","./p-22f7120a.system.js","./p-47a1d469.system.js","./p-01174496.system.js","./p-7ac8846c.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-989cb22b.system.js","./p-30e9a6d7.system.js","./p-496accce.system.js","./p-dab78981.system.js","./p-655ec440.system.js"],(function(n){"use strict";var t,i,e,o,s,a,r,c,l,d,h,u,f,v,p,m,z,b,y,g,k,w,x,_,C,j,I,A,E,S;return{setters:[function(n){t=n.r;i=n.d;e=n.h;o=n.a;s=n.g},function(n){a=n.t},function(n){r=n.U;c=n.b;l=n.t;d=n.H;h=n.u;u=n.d},function(n){f=n.s;v=n.z;p=n.t;m=n.y;z=n.l},function(n){b=n.z;y=n.g;g=n.f},function(n){k=n.l;w=n.i;x=n.s},function(n){_=n.a;C=n.s},function(n){j=n.c},function(n){I=n.l},function(n){A=n.c;E=n.s},function(n){S=n.g},function(){},function(){},function(){}],execute:function(){var O=function(n){var t=r({firstName:n.firstName,lastName:n.lastName,name:n.name}),i=t.firstName,e=t.lastName;return{address:{city:n.address.city,country:n.address.country,line1:n.address.line1,line2:n.address.line2||undefined,postal_code:n.address.postal_code,state:n.address.state},name:(n.name||"".concat(i," ").concat(e)).trim(),phone:n.phone||undefined}};var L=function(n){var t,i,e;return[n.name,(t=n.address)===null||t===void 0?void 0:t.line1,(i=n.address)===null||i===void 0?void 0:i.postal_code,(e=n.address)===null||e===void 0?void 0:e.country].map((function(n){return(n||"").trim().toLowerCase()})).join("|")};var N=function(n){var t=n.currentEvent,i=n.defaultAddress;if(!t){return i}var e=O(t.value);var o=L(e);var s=i.some((function(n){return L(n)===o}));if(s){return i}return __spreadArray([e],i,true)};var Z=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--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:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var B=Z;var D=n("zonos_address",function(){function n(n){t(this,n);this.invalidCharacters=i(this,"invalidCharacters",7);this.taxIdChanged=i(this,"taxIdChanged",7);this.storeUnsubscribeList=[];this.isAutoCompleteAdjusted=false;this.defaultAddress=[];this.taxIdErrorMessage="";this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=f.checkoutSessionId;this.prevCountry=null;this.prevPostalCode=null;this.trackingSent=false;this.prefetchLandedCost=a(h,1e3)}n.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:c.stripeBillingAddressElement,stripeAddressEventData:c.stripeBillingAddressEventData,stripeElements:c.stripeElementsForBillingAddress}}return{stripeAddressElement:c.stripeAddressElement,stripeAddressEventData:c.stripeAddressEventData,stripeElements:c.stripeElements}};n.prototype.updateAddressEventData=function(n){var t=n.event,i=n.type;switch(i){case"billing":c.stripeBillingAddressEventData=t;break;default:{c.stripeAddressEventData=t;break}}if(i==="shipping"){if(t.value.address.line1.length){void this.prefetchLandedCost()}}};n.prototype.isAddressFilledChanged=function(){if(!f.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var n=f.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_customerInfoFilled"})}};n.prototype.updateAddressElement=function(n){var t=n.stripeAddressElement,i=n.type;if(i==="shipping"){c.stripeAddressElement=t;return}c.stripeBillingAddressElement=t};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,i,e,o,s,a,c,l,d;var h=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;n=this.getStripeAddressInstance(),t=n.stripeAddressEventData,i=n.stripeElements;if(!this.stripe||!i){k("Stripe is not initialized. Couldn't load stripe element.");return[2]}e=this.defaultAddress.map((function(n){return Object.assign(Object.assign({},n),{name:n.name,phone:n.phone||undefined})}));o=z.shippingZoneCountries;s=o?Object.values(o).map((function(n){return n.code})):[];a=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");c=this.type==="shipping"?s:[];l=(t===null||t===void 0?void 0:t.value.address.country)||v(c);I("Stripe country code: ".concat(l),"info");d=i.create("address",{allowedCountries:a?[]:c,contacts:N({currentEvent:t,defaultAddress:e}),defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:l}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));if(t===null||t===void 0?void 0:t.value.address){this.prevCountry=t.value.address.country;this.prevPostalCode=t.value.address.postal_code}d.on("change",(function(n){var t=n.value;if(!h.isDirtyAddress&&t.address.line1.length>=3){h.isDirtyAddress=true;if(!h.isAutoCompleteAdjusted){var i=h.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(i){i.style.zIndex="3"}h.isAutoCompleteAdjusted=true}setTimeout((function(){if(w()){h.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var n=h.type==="shipping"?100:600;var t=h.el.closest(".zonos--group");var i=h.el.getBoundingClientRect().top+n;t===null||t===void 0?void 0:t.scrollTo({behavior:"smooth",top:i})}}),600)}var e=r({firstName:t.firstName,lastName:t.lastName,name:t.name}),o=e.firstName,s=e.lastName;h.updateAddressEventData({event:Object.assign(Object.assign({},n),{elementMode:h.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:o,lastName:s})}),type:h.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};n.prototype.defaultAddressChanged=function(n,t){var i=JSON.stringify(t);var e=JSON.stringify(n);if(i===e){return}I("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.clear();o===null||o===void 0?void 0:o.destroy();if(this.type==="shipping"){c.stripeAddressEventData=null}else{c.stripeBillingAddressEventData=null}void this.watchInitStripe()};n.prototype.isInTaxIdCountry=function(n){return A.includes(n)};n.prototype.renderTaxIdInput=function(){var n=this;var t;if(this.type==="billing"){return null}var i=(t=c.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;if(!i){return null}if(!this.isInTaxIdCountry(i)){return null}var o=_({companyName:c.companyName,countryCode:i});if(!o){return null}var s=E[i];return e("div",{class:"zonos--tax-id-input"},e("zonos-stripe-input",{inputLabel:p(s.friendlyName),inputPlaceholder:s.placeholder,inputValue:c.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(t){c.taxId=t.detail;n.taxIdChanged.emit(t.detail)}}),this.taxIdErrorMessage&&e("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))};n.prototype.renderShortAddressCodeInput=function(){var n;if(this.type==="billing"){return null}var t=(n=c.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country;if(!t){return null}var i=C({countryCode:t});if(!i){return null}return e("div",{class:"zonos--short-address-code-input"},e("zonos-stripe-input",{inputLabel:p("Short address code"),inputPlaceholder:"RRRD2929",inputValue:c.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(n){c.shortAddressCode=n.detail}}),this.shortAddressCodeErrorMessage&&e("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};n.prototype.renderCompanyNameInput=function(){if(this.type==="billing"&&!window.Zonos.isCollect&&!window.Zonos.isInvoice){return null}var n=b.checkoutSettings.companyFieldsStatus==="ENABLED"||!!window.Zonos.isCollect||!!window.Zonos.isInvoice;if(!n){return null}return e("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:p("Company name (optional)"),inputValue:c.companyName,onInputChange:function(n){c.companyName=n.detail}})};n.prototype.disconnectedCallback=function(){var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.destroy();try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;var t=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!t&&t.value.address.line1.length>0;void this.watchInitStripe();this.checkoutSessionId=f.checkoutSessionId;this.storeUnsubscribeList=[m("checkoutSessionId",(function(){n.checkoutSessionId=f.checkoutSessionId})),d("stripeElements",(function(){if(n.type==="shipping"){void n.watchInitStripe()}})),d("stripeElementsForBillingAddress",(function(){if(n.type==="billing"){void n.watchInitStripe()}}))]};n.prototype.render=function(){var n;this.checkoutSessionId=f.checkoutSessionId;if((n=c.stripeAddressEventData)===null||n===void 0?void 0:n.complete){this.isAddressFilled=true}return e(o,{key:"195940efdd29696d99b1ab6524a53e6a03776c6a",class:j(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&e("zonos-text",{key:"968d5990fce9c1eb22cd10b58744e6d00f2e622d",class:"zonos--title",type:"semiBoldLabel"},this.titleText),e("slot",{key:"ae6dd70dcaa5ecd3465c065736e0f31fb40e72d3",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),e("div",{key:"0bf3075670d3fcd945f9ddcbe096399e2dc213ed",class:"zonos--address-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return n}());D.style=B;var M='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var V='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var T='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var P=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";var R=P;var F=n("zonos_confirm_dialog",function(){function n(n){var e=this;t(this,n);this.confirmClicked=i(this,"confirmClicked",7);this.cancelClicked=i(this,"cancelClicked",7);this.dialogTitle=p("Are you sure?");this.dialogIntent="info";this.dialogSubtitle=null;this.dialogWidth=350;this.dialogType="confirm";this.isMobile=false;this.noClickOutside=false;this.clickOutsideDialogHandler=function(n){if(n.target===n.currentTarget&&!e.noClickOutside){e.closeDialogHandler()}}}n.prototype.handleKeyDown=function(n){if(n.key==="Escape"){this.closeDialogHandler()}};n.prototype.focusDialog=function(){var n=this;if(this.dialogOpen){setTimeout((function(){var t,i;(i=(t=n.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".zonos--backdrop"))===null||i===void 0?void 0:i.focus()}),100)}};n.prototype.confirmDialogHandler=function(){if(!this.dialogOpen){return}this.confirmClicked.emit()};n.prototype.closeDialogHandler=function(){if(!this.dialogOpen){return}this.cancelClicked.emit()};n.prototype.renderIcon=function(){switch(this.dialogIntent){case"info":return e("zonos-icon",{content:V,iconColor:"blue-800"});case"danger":return e("zonos-icon",{content:M,iconColor:"red-800"});case"warn":return e("zonos-icon",{content:T,iconColor:"orange-800"})}};n.prototype.getButtonConfirmVariant=function(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}};n.prototype.render=function(){var n=this;this.focusDialog();var t=S();var i=y(b.appearance.theme);return e(o,{key:"dc074c5b88b642e06edd8942408a3aeed05e5cdb",class:j([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":i,style:{"--zonos--border-radius":t,"--zonos--dialog-width":"".concat(this.dialogWidth,"px"),"--zonos--font-family":g()}},e("div",{key:"119a9c201e44a670fb1df61f6663d96f7148ecc6",class:"zonos--backdrop",tabIndex:-1}),e("div",{key:"9534a92f69dd3d692c1a2fd86fa1cf148f68cdfa",class:j(["zonos--confirm-layout",this.dialogIntent]),onClick:function(t){return n.clickOutsideDialogHandler(t)}},e("div",{key:"e79aaf3a80b57634f78575b15a75d7b549ed20ee",class:"zonos--confirm-dialog",onBlur:function(){n.focusDialog()}},e("div",{key:"44367b178f46c66dfb236485e05f6832ae63a63b",class:"wrapper"},e("div",{key:"42d10d17180ec7364710682c27d6cd4fef0b8abe",class:"icon-wrapper"},this.renderIcon()),e("div",{key:"b5f7563fb43e1b147db669e1df71f4fafb5284df",class:"content"},e("div",{key:"38b78e383833b5e49908c8e95c35b9ad23c0f956",class:"title"},e("zonos-text",{key:"726f5308881671e7e17bd0591521485bd7142c1e",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&e("div",{key:"58d663842d51a512b3c8799a907bd1ed58e4fb31",class:"subtitle"},e("zonos-text",{key:"4411400d8906a22fd5f31652a1eeb314cae8ad68",textColor:"gray-800"},this.dialogSubtitle))),e("div",{key:"df0452b2af633dd558858db824336fd5925aef50",class:"footer"},this.dialogType==="confirm"&&e("zonos-button",{key:"50f88e85e18129ef4ee209615b951683c5ff6fa8",backgroundColor:"gray-0",class:"cancel-button",onClick:function(){return n.closeDialogHandler()},size:"lg",withBoxShadow:true},this.dialogCancelBtnText||p("Cancel")),e("zonos-button",{key:"314b8be8954241b8c261c62d5a4bbe8155cc6914",class:"confirm-button",onClick:function(){return n.confirmDialogHandler()},size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))};Object.defineProperty(n,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return n}());F.style=R;var J=function(n){var t=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return t.test(n)};var q=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var G=q;var U=51;var $=n("zonos_link_authentication",function(){function n(n){var e=this;t(this,n);this.linkAuthenticationChange=i(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];this.defaultEmail=null;this.isEmailError=false;this.stripe=c.stripe;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;this.retriesInitializeLink=0;this.setCustomEmailInputToLinkEvent=function(n){var t=J(n);var i={complete:!!t,elementType:"linkAuthentication",empty:!n,value:{email:n}};c.stripeLinkEventData=i};this.handleNormalEmailInput=function(n){var t;var i=n.detail;e.setCustomEmailInputToLinkEvent(i);(t=e.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}}n.prototype.watchIsStagingMode=function(){var n=this;setTimeout((function(){void n.watchInitStripe()}),0)};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,i,e;var o=this;return __generator(this,(function(s){switch(s.label){case 0:if(!this.stripe||!c.stripeElements){return[2]}if(u.isStagingMode||!this.clientSecret){return[2]}n=this.defaultEmail?{email:this.defaultEmail}:undefined;s.label=1;case 1:s.trys.push([1,2,,6]);t=c.stripeLinkElement||c.stripeElements.create("linkAuthentication",{defaultValues:n});i=this.el.querySelector(".zonos--link-authentication-component");if(!i){k("Cannot find container element for linkAuthenticationElement");return[2]}t.mount(i);t.on("change",(function(n){var t;c.stripeLinkEventData=n;(t=o.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}));c.stripeLinkElement=t;this.retriesInitializeLink=0;if(this.retriesInitializeLink>11){I("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe});void x({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}return[3,6];case 2:e=s.sent();if(!(e instanceof Error))return[3,5];this.retriesInitializeLink++;if(!(this.retriesInitializeLink<U))return[3,4];return[4,new Promise((function(n){return setTimeout(n,500)}))];case 3:s.sent();void this.watchInitStripe();s.label=4;case 4:if(this.retriesInitializeLink===U){void x({endpoint:"stripe-link-authentication-init-error",errors:[e.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}s.label=5;case 5:return[3,6];case 6:return[2]}}))}))};n.prototype.watchDefaultEmail=function(n,t){var i,e;I("Default email is changed","info",{newDefaultEmail:n,oldDefaultEmail:t});if(t===n){return}if(!n){c.stripeLinkEventData=null}if(u.isStagingMode){this.setCustomEmailInputToLinkEvent(n||"");return}(i=c.stripeLinkElement)===null||i===void 0?void 0:i.clear();(e=c.stripeLinkElement)===null||e===void 0?void 0:e.destroy();c.stripeLinkElement=null;c.stripeLinkEventData=null;I("Reset stripe link element when default email is changed","info",{defaultEmail:n});void this.watchInitStripe()};n.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;this.storeUnsubscribeList=[d("stripeElements",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){void this.watchInitStripe();return[2]}))}))})),d("clientSecret",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.clientSecret=c.clientSecret;return[2]}))}))})),d("stripe",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.stripe=c.stripe;return[2]}))}))}))];void this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};n.prototype.render=function(){var n=this;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;var t=function(){var t;if(u.isStagingMode){return e("zonos-stripe-input",{inputLabel:p("Email"),inputValue:n.defaultEmail||((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"",isError:n.isEmailError,onBlur:function(){var t;var i=((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"";if(!i){return}var e=J(i);n.isEmailError=!e},onInputChange:n.handleNormalEmailInput})}return e("div",{class:"zonos--link-authentication-component ".concat(n.isEmailError&&"zonos--input-invalid")})};return e(o,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":S()}},this.titleText&&e("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),t(),this.isEmailError&&e("zonos-text",{textColor:"red-600"},p("Please enter a valid email address.")))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return n}());$.style=G;var H=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";var K=H;var Q=n("zonos_loading_overlay",function(){function n(n){t(this,n);this.open=false;this.size=40}n.prototype.render=function(){return e(o,{key:"e284a5ada0945f1895dbd9b40039e9d2ef600111",class:j(["zonos--elements",this.open&&"zonos--open"])},e("div",{key:"fb68155fe133ba8cd1d923a0fbb37a382ecabc34",class:"zonos--loading-overlay"},e("zonos-spinner",{key:"50dc3d4b1f53173240d23ffeac966f7463546fde",size:this.size,spinnerColor:this.spinnerColor})))};return n}());Q.style=K}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,t,e,i){function o(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,s){function a(n){try{c(i.next(n))}catch(n){s(n)}}function r(n){try{c(i["throw"](n))}catch(n){s(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,r)}c((i=i.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(n){return function(t){return c([n,t])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(e=0)),e)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;o=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(s=e.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){e.label=r[1];break}if(r[0]===6&&e.label<s[1]){e.label=s[1];s=r;break}if(s&&e.label<s[2]){e.label=s[2];e.ops.push(r);break}if(s[2])e.ops.pop();e.trys.pop();continue}r=t.call(n,e)}catch(n){r=[6,n];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++){if(s||!(i in t)){if(!s)s=Array.prototype.slice.call(t,0,i);s[i]=t[i]}}return n.concat(s||Array.prototype.slice.call(t))};System.register(["./p-7261e245.system.js","./p-60832726.system.js","./p-4a20893e.system.js","./p-916228fb.system.js","./p-de58684b.system.js","./p-01174496.system.js","./p-7ac8846c.system.js","./p-23e7c655.system.js","./p-d938f42f.system.js","./p-989cb22b.system.js","./p-14afffa8.system.js","./p-551fa762.system.js","./p-6890e060.system.js","./p-655ec440.system.js"],(function(n){"use strict";var t,e,i,o,s,a,r,c,l,d,h,u,f,v,p,m,z,b,y,g,k,w,x,_,C,j,I,A,E,S;return{setters:[function(n){t=n.r;e=n.d;i=n.h;o=n.a;s=n.g},function(n){a=n.t},function(n){r=n.U;c=n.b;l=n.t;d=n.H;h=n.u;u=n.d},function(n){f=n.s;v=n.B;p=n.t;m=n.A;z=n.l},function(n){b=n.z;y=n.g;g=n.f},function(n){k=n.l;w=n.i;x=n.s},function(n){_=n.a;C=n.s},function(n){j=n.c},function(n){I=n.l},function(n){A=n.c;E=n.s},function(n){S=n.g},function(){},function(){},function(){}],execute:function(){var O=function(n){var t=r({firstName:n.firstName,lastName:n.lastName,name:n.name}),e=t.firstName,i=t.lastName;return{address:{city:n.address.city,country:n.address.country,line1:n.address.line1,line2:n.address.line2||undefined,postal_code:n.address.postal_code,state:n.address.state},name:(n.name||"".concat(e," ").concat(i)).trim(),phone:n.phone||undefined}};var L=function(n){var t,e,i;return[n.name,(t=n.address)===null||t===void 0?void 0:t.line1,(e=n.address)===null||e===void 0?void 0:e.postal_code,(i=n.address)===null||i===void 0?void 0:i.country].map((function(n){return(n||"").trim().toLowerCase()})).join("|")};var N=function(n){var t=n.currentEvent,e=n.defaultAddress;if(!t){return e}var i=O(t.value);var o=L(i);var s=e.some((function(n){return L(n)===o}));if(s){return e}return __spreadArray([i],e,true)};var Z=".sc-zonos-address-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-address-h *.sc-zonos-address{font-family:var(--zonos--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:16px}.sc-zonos-address-h .zonos--company-name-input.sc-zonos-address,.sc-zonos-address-h .zonos--tax-id-input.sc-zonos-address,.sc-zonos-address-h .zonos--short-address-code-input.sc-zonos-address{margin-bottom:16px}.sc-zonos-address-h zonos-banner.sc-zonos-address{margin-top:8px}";var B=Z;var D=n("zonos_address",function(){function n(n){t(this,n);this.invalidCharacters=e(this,"invalidCharacters",7);this.taxIdChanged=e(this,"taxIdChanged",7);this.storeUnsubscribeList=[];this.isAutoCompleteAdjusted=false;this.defaultAddress=[];this.taxIdErrorMessage="";this.shortAddressCodeErrorMessage="";this.stripe=window.Zonos.stripe;this.isDirtyAddress=false;this.isAddressFilled=false;this.checkoutSessionId=f.checkoutSessionId;this.prevCountry=null;this.prevPostalCode=null;this.trackingSent=false;this.prefetchLandedCost=a(h,1e3)}n.prototype.getStripeAddressInstance=function(){if(this.type==="billing"){return{stripeAddressElement:c.stripeBillingAddressElement,stripeAddressEventData:c.stripeBillingAddressEventData,stripeElements:c.stripeElementsForBillingAddress}}return{stripeAddressElement:c.stripeAddressElement,stripeAddressEventData:c.stripeAddressEventData,stripeElements:c.stripeElements}};n.prototype.updateAddressEventData=function(n){var t=n.event,e=n.type;switch(e){case"billing":c.stripeBillingAddressEventData=t;break;default:{c.stripeAddressEventData=t;break}}if(e==="shipping"){if(t.value.address.line1.length){void this.prefetchLandedCost()}}};n.prototype.isAddressFilledChanged=function(){if(!f.checkoutSessionId){return}if(this.isAddressFilled&&!this.trackingSent&&this.type==="shipping"){this.trackingSent=true;var n=f.checkoutSessionId;void l({checkoutSessionId:n,eventName:"checkout_customerInfoFilled"})}};n.prototype.updateAddressElement=function(n){var t=n.stripeAddressElement,e=n.type;if(e==="shipping"){c.stripeAddressElement=t;return}c.stripeBillingAddressElement=t};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,e,i,o,s,a,c,l,d;var h=this;return __generator(this,(function(u){this.stripe=window.Zonos.stripe;n=this.getStripeAddressInstance(),t=n.stripeAddressEventData,e=n.stripeElements;if(!this.stripe||!e){k("Stripe is not initialized. Couldn't load stripe element.");return[2]}i=this.defaultAddress.map((function(n){return Object.assign(Object.assign({},n),{name:n.name,phone:n.phone||undefined})}));o=z.shippingZoneCountries;s=o?Object.values(o).map((function(n){return n.code})):[];a=new URLSearchParams(window.location.search).has("zonosCheckoutAllCountries");c=this.type==="shipping"?s:[];l=(t===null||t===void 0?void 0:t.value.address.country)||v(c);I("Stripe country code: ".concat(l),"info");d=e.create("address",{allowedCountries:a?[]:c,contacts:N({currentEvent:t,defaultAddress:i}),defaultValues:{address:Object.assign(Object.assign({},t===null||t===void 0?void 0:t.value.address),{country:l}),firstName:t===null||t===void 0?void 0:t.value.firstName,lastName:t===null||t===void 0?void 0:t.value.lastName,phone:t===null||t===void 0?void 0:t.value.phone},display:{name:"split"},fields:{phone:"always"},mode:this.type,validation:{phone:{required:"always"}}});d.mount(this.el.querySelector(".zonos--address-component"));if(t===null||t===void 0?void 0:t.value.address){this.prevCountry=t.value.address.country;this.prevPostalCode=t.value.address.postal_code}d.on("change",(function(n){var t=n.value;if(!h.isDirtyAddress&&t.address.line1.length>=3){h.isDirtyAddress=true;if(!h.isAutoCompleteAdjusted){var e=h.el.querySelector('iframe[src*="autocomplete-suggestions"]');if(e){e.style.zIndex="3"}h.isAutoCompleteAdjusted=true}setTimeout((function(){if(w()){h.el.scrollIntoView({behavior:"smooth",block:"end"})}else{var n=h.type==="shipping"?100:600;var t=h.el.closest(".zonos--group");var e=h.el.getBoundingClientRect().top+n;t===null||t===void 0?void 0:t.scrollTo({behavior:"smooth",top:e})}}),600)}var i=r({firstName:t.firstName,lastName:t.lastName,name:t.name}),o=i.firstName,s=i.lastName;h.updateAddressEventData({event:Object.assign(Object.assign({},n),{elementMode:h.type,elementType:"address",value:Object.assign(Object.assign({},t),{firstName:o,lastName:s})}),type:h.type})}));this.updateAddressElement({stripeAddressElement:d,type:this.type});return[2]}))}))};n.prototype.defaultAddressChanged=function(n,t){var e=JSON.stringify(t);var i=JSON.stringify(n);if(e===i){return}I("Reset address element when default address property is changed","info",{defaultAddress:this.defaultAddress});var o=this.getStripeAddressInstance().stripeAddressElement;o===null||o===void 0?void 0:o.clear();o===null||o===void 0?void 0:o.destroy();if(this.type==="shipping"){c.stripeAddressEventData=null}else{c.stripeBillingAddressEventData=null}void this.watchInitStripe()};n.prototype.isInTaxIdCountry=function(n){return A.includes(n)};n.prototype.renderTaxIdInput=function(){var n=this;var t;if(this.type==="billing"){return null}var e=(t=c.stripeAddressEventData)===null||t===void 0?void 0:t.value.address.country;if(!e){return null}if(!this.isInTaxIdCountry(e)){return null}var o=_({companyName:c.companyName,countryCode:e});if(!o){return null}var s=E[e];return i("div",{class:"zonos--tax-id-input"},i("zonos-stripe-input",{inputLabel:p(s.friendlyName),inputPlaceholder:s.placeholder,inputValue:c.taxId||"",isError:!!this.taxIdErrorMessage,onInputChange:function(t){c.taxId=t.detail;n.taxIdChanged.emit(t.detail)}}),this.taxIdErrorMessage&&i("zonos-text",{textColor:"red-600",type:"caption"},this.taxIdErrorMessage))};n.prototype.renderShortAddressCodeInput=function(){var n;if(this.type==="billing"){return null}var t=(n=c.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country;if(!t){return null}var e=C({countryCode:t});if(!e){return null}return i("div",{class:"zonos--short-address-code-input"},i("zonos-stripe-input",{inputLabel:p("Short address code"),inputPlaceholder:"RRRD2929",inputValue:c.shortAddressCode||"",isError:!!this.shortAddressCodeErrorMessage,onInputChange:function(n){c.shortAddressCode=n.detail}}),this.shortAddressCodeErrorMessage&&i("zonos-text",{textColor:"red-600",type:"caption"},this.shortAddressCodeErrorMessage))};n.prototype.renderCompanyNameInput=function(){if(this.type==="billing"&&!window.Zonos.isCollect&&!window.Zonos.isInvoice){return null}var n=b.checkoutSettings.companyFieldsStatus==="ENABLED"||!!window.Zonos.isCollect||!!window.Zonos.isInvoice;if(!n){return null}return i("zonos-stripe-input",{class:"zonos--company-name-input",inputLabel:p("Company name (optional)"),inputValue:c.companyName,onInputChange:function(n){c.companyName=n.detail}})};n.prototype.disconnectedCallback=function(){var n=this.getStripeAddressInstance().stripeAddressElement;n===null||n===void 0?void 0:n.destroy();try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;var t=this.getStripeAddressInstance().stripeAddressEventData;this.isDirtyAddress=!!t&&t.value.address.line1.length>0;void this.watchInitStripe();this.checkoutSessionId=f.checkoutSessionId;this.storeUnsubscribeList=[m("checkoutSessionId",(function(){n.checkoutSessionId=f.checkoutSessionId})),d("stripeElements",(function(){if(n.type==="shipping"){void n.watchInitStripe()}})),d("stripeElementsForBillingAddress",(function(){if(n.type==="billing"){void n.watchInitStripe()}}))]};n.prototype.render=function(){var n;this.checkoutSessionId=f.checkoutSessionId;if((n=c.stripeAddressEventData)===null||n===void 0?void 0:n.complete){this.isAddressFilled=true}return i(o,{key:"9b7a5340b839d63c64da03639bdfda5a11a5c25e",class:j(["zonos--address","zonos--elements","zonos--".concat(this.type,"-address")])},this.titleText&&i("zonos-text",{key:"23739f6a48e5698372df2d53098dea6ad1c0559a",class:"zonos--title",type:"semiBoldLabel"},this.titleText),i("slot",{key:"dea4b437eedaad2af2f6bbe3a1e2ae4f0706aa13",name:"below-title"}),this.renderCompanyNameInput(),this.renderTaxIdInput(),this.renderShortAddressCodeInput(),i("div",{key:"b4be684977a632371b9b6ff4587ccdd7bacc8c67",class:"zonos--address-component"}))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{checkoutSessionId:["isAddressFilledChanged"],isAddressFilled:["isAddressFilledChanged"],stripe:["watchInitStripe"],defaultAddress:["defaultAddressChanged"]}},enumerable:false,configurable:true});return n}());D.style=B;var M='<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-400)"></path>\n <path d="M12.75 9a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V9Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var V='<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-400)"></path>\n <path d="M10.25 10.25a1.75 1.75 0 1 1 2.431 1.613c-.616.26-1.431.885-1.431 1.887a.75.75 0 0 0 1.5 0c0-.053.02-.128.108-.228.092-.104.236-.205.408-.278A3.25 3.25 0 1 0 8.75 10.25a.75.75 0 0 0 1.5 0Zm2.5 5.75a.75.75 0 0 0-1.5 0v.25a.75.75 0 0 0 1.5 0V16Z" fill="currentColor"></path>\n</svg>';var T='<svg color="var(--zonos-elements-orange-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path d="M14.46 5.492c-1.014-2.027-3.906-2.027-4.92 0L4.276 16.02c-.914 1.83.416 3.98 2.46 3.98h10.528c2.044 0 3.374-2.151 2.46-3.98L14.46 5.492Z" data-is-secondary-color="true" fill="var(--zonos-elements-orange-400)"></path>\n <path d="M12.75 10a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V10Zm0 5.5a.75.75 0 0 0-1.5 0v.5a.75.75 0 0 0 1.5 0v-.5Z" fill="currentColor"></path>\n</svg>';var P=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--confirm-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:opacity 0.3s, visibility 0.3s;transition:opacity 0.3s, visibility 0.3s}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--confirm-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color)}:host .zonos--confirm-dialog{position:relative;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;width:var(--zonos--dialog-width);border-radius:var(--zonos--border-radius, 10px);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;gap:24px}:host .icon-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:40px;width:40px;border-radius:50%;background:var(--zonos-elements-blue-100)}:host .warn .icon-wrapper{background:var(--zonos-elements-orange-100)}:host .danger .icon-wrapper{background:var(--zonos-elements-red-100)}:host .footer{display:-ms-flexbox;display:flex;width:100%;gap:8px}:host .footer zonos-button{-ms-flex:1;flex:1}:host .content{display:-ms-flexbox;display:flex;gap:8px;-ms-flex-direction:column;flex-direction:column}:host .content zonos-text{text-align:center}:host(.open) .zonos--confirm-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483009;opacity:0.65}:host(.open) .zonos--confirm-layout{opacity:1;z-index:2147483010;-webkit-transform:scale(1);transform:scale(1)}";var R=P;var F=n("zonos_confirm_dialog",function(){function n(n){var i=this;t(this,n);this.confirmClicked=e(this,"confirmClicked",7);this.cancelClicked=e(this,"cancelClicked",7);this.dialogTitle=p("Are you sure?");this.dialogIntent="info";this.dialogSubtitle=null;this.dialogWidth=350;this.dialogType="confirm";this.isMobile=false;this.noClickOutside=false;this.clickOutsideDialogHandler=function(n){if(n.target===n.currentTarget&&!i.noClickOutside){i.closeDialogHandler()}}}n.prototype.handleKeyDown=function(n){if(n.key==="Escape"){this.closeDialogHandler()}};n.prototype.focusDialog=function(){var n=this;if(this.dialogOpen){setTimeout((function(){var t,e;(e=(t=n.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(".zonos--backdrop"))===null||e===void 0?void 0:e.focus()}),100)}};n.prototype.confirmDialogHandler=function(){if(!this.dialogOpen){return}this.confirmClicked.emit()};n.prototype.closeDialogHandler=function(){if(!this.dialogOpen){return}this.cancelClicked.emit()};n.prototype.renderIcon=function(){switch(this.dialogIntent){case"info":return i("zonos-icon",{content:V,iconColor:"blue-800"});case"danger":return i("zonos-icon",{content:M,iconColor:"red-800"});case"warn":return i("zonos-icon",{content:T,iconColor:"orange-800"})}};n.prototype.getButtonConfirmVariant=function(){switch(this.dialogIntent){case"warn":return"warning";case"danger":return"danger";default:return"primary"}};n.prototype.render=function(){var n=this;this.focusDialog();var t=S();var e=y(b.appearance.theme);return i(o,{key:"9ad8aff8631692fa53ef172869d98e9fbfbdc059",class:j([this.dialogOpen&&"open","zonos--elements"]),"data-dialog-type":this.dialogType,"data-theme":e,style:{"--zonos--border-radius":t,"--zonos--dialog-width":"".concat(this.dialogWidth,"px"),"--zonos--font-family":g()}},i("div",{key:"6d7c55b90bfb05890d876a0243558eb9a2e7a772",class:"zonos--backdrop",tabIndex:-1}),i("div",{key:"abf306ddd70cefd64aa6804aeccf700506c175d7",class:j(["zonos--confirm-layout",this.dialogIntent]),onClick:function(t){return n.clickOutsideDialogHandler(t)}},i("div",{key:"dc7e9e6d501872597928603ded57d82c15c26710",class:"zonos--confirm-dialog",onBlur:function(){n.focusDialog()}},i("div",{key:"5c1fa9ec8b59cba68ccbc5dc36e66e2fdefdeae5",class:"wrapper"},i("div",{key:"0ce48c41c78e393a181fd5e9beeac90622b5c620",class:"icon-wrapper"},this.renderIcon()),i("div",{key:"b42157f8e76de8a60190e384d7d53a36d8051c67",class:"content"},i("div",{key:"bd8eb897f15a6d095df8fbd1803f62a11b9d5d7b",class:"title"},i("zonos-text",{key:"d1c06b89d4917b2366f881dda7da9e1369722126",type:"subheader"},this.dialogTitle)),this.dialogSubtitle&&i("div",{key:"4f1269aaab5ad3965d6ddfc0949341d4f202f296",class:"subtitle"},i("zonos-text",{key:"f784b5dd86ff684e790f27a586e3eeb4ac683884",textColor:"gray-800"},this.dialogSubtitle))),i("div",{key:"e0403a968aee6ff878c9e916e9ff216e2052ab0c",class:"footer"},this.dialogType==="confirm"&&i("zonos-button",{key:"66e34a9d61f677786bfe286f377854c9ebc780ed",backgroundColor:"gray-0",class:"cancel-button",onClick:function(){return n.closeDialogHandler()},size:"lg",withBoxShadow:true},this.dialogCancelBtnText||p("Cancel")),i("zonos-button",{key:"3652507591e3055856a044e191525ea36b6042ca",class:"confirm-button",onClick:function(){return n.confirmDialogHandler()},size:"lg",variant:this.getButtonConfirmVariant()},this.dialogConfirmBtnText))))))};Object.defineProperty(n,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return n}());F.style=R;var J=function(n){var t=/^[a-zA-Z0-9.%_+-]*@[a-zA-Z0-9][a-zA-Z0-9.-]*\.[a-zA-Z0-9]{2,}$/;return t.test(n)};var q=".sc-zonos-link-authentication-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:16px}.sc-zonos-link-authentication-h .zonos--input-invalid.sc-zonos-link-authentication{border:2px solid var(--zonos-elements-red-600);border-radius:var(--zonos--border-radius)}";var G=q;var U=51;var $=n("zonos_link_authentication",function(){function n(n){var i=this;t(this,n);this.linkAuthenticationChange=e(this,"linkAuthenticationChange",7);this.storeUnsubscribeList=[];this.defaultEmail=null;this.isEmailError=false;this.stripe=c.stripe;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;this.retriesInitializeLink=0;this.setCustomEmailInputToLinkEvent=function(n){var t=J(n);var e={complete:!!t,elementType:"linkAuthentication",empty:!n,value:{email:n}};c.stripeLinkEventData=e};this.handleNormalEmailInput=function(n){var t;var e=n.detail;i.setCustomEmailInputToLinkEvent(e);(t=i.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}}n.prototype.watchIsStagingMode=function(){var n=this;setTimeout((function(){void n.watchInitStripe()}),0)};n.prototype.watchInitStripe=function(){return __awaiter(this,void 0,void 0,(function(){var n,t,e,i;var o=this;return __generator(this,(function(s){switch(s.label){case 0:if(!this.stripe||!c.stripeElements){return[2]}if(u.isStagingMode||!this.clientSecret){return[2]}n=this.defaultEmail?{email:this.defaultEmail}:undefined;s.label=1;case 1:s.trys.push([1,2,,6]);t=c.stripeLinkElement||c.stripeElements.create("linkAuthentication",{defaultValues:n});e=this.el.querySelector(".zonos--link-authentication-component");if(!e){k("Cannot find container element for linkAuthenticationElement");return[2]}t.mount(e);t.on("change",(function(n){var t;c.stripeLinkEventData=n;(t=o.linkAuthenticationChange)===null||t===void 0?void 0:t.emit()}));c.stripeLinkElement=t;this.retriesInitializeLink=0;if(this.retriesInitializeLink>11){I("Stripe link element initialized","info",{retriesInitializeLink:this.retriesInitializeLink,stripe:this.stripe});void x({endpoint:"stripe-link-authentication-init-long-running",errors:["Stripe link element initialized after 20 retries - 10 seconds"],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}return[3,6];case 2:i=s.sent();if(!(i instanceof Error))return[3,5];this.retriesInitializeLink++;if(!(this.retriesInitializeLink<U))return[3,4];return[4,new Promise((function(n){return setTimeout(n,500)}))];case 3:s.sent();void this.watchInitStripe();s.label=4;case 4:if(this.retriesInitializeLink===U){void x({endpoint:"stripe-link-authentication-init-error",errors:[i.message],metadata:{retriesInitializeLink:this.retriesInitializeLink}})}s.label=5;case 5:return[3,6];case 6:return[2]}}))}))};n.prototype.watchDefaultEmail=function(n,t){var e,i;I("Default email is changed","info",{newDefaultEmail:n,oldDefaultEmail:t});if(t===n){return}if(!n){c.stripeLinkEventData=null}if(u.isStagingMode){this.setCustomEmailInputToLinkEvent(n||"");return}(e=c.stripeLinkElement)===null||e===void 0?void 0:e.clear();(i=c.stripeLinkElement)===null||i===void 0?void 0:i.destroy();c.stripeLinkElement=null;c.stripeLinkEventData=null;I("Reset stripe link element when default email is changed","info",{defaultEmail:n});void this.watchInitStripe()};n.prototype.disconnectedCallback=function(){try{this.storeUnsubscribeList.forEach((function(n){return n()}))}catch(n){}};n.prototype.componentDidLoad=function(){var n=this;this.storeUnsubscribeList=[d("stripeElements",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){void this.watchInitStripe();return[2]}))}))})),d("clientSecret",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.clientSecret=c.clientSecret;return[2]}))}))})),d("stripe",(function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(n){this.stripe=c.stripe;return[2]}))}))}))];void this.watchInitStripe();if(!this.defaultEmail){return}this.setCustomEmailInputToLinkEvent(this.defaultEmail)};n.prototype.render=function(){var n=this;this.isStagingMode=u.isStagingMode;this.clientSecret=c.clientSecret;var t=function(){var t;if(u.isStagingMode){return i("zonos-stripe-input",{inputLabel:p("Email"),inputValue:n.defaultEmail||((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"",isError:n.isEmailError,onBlur:function(){var t;var e=((t=c.stripeLinkEventData)===null||t===void 0?void 0:t.value.email)||"";if(!e){return}var i=J(e);n.isEmailError=!i},onInputChange:n.handleNormalEmailInput})}return i("div",{class:"zonos--link-authentication-component ".concat(n.isEmailError&&"zonos--input-invalid")})};return i(o,{class:"zonos--link-authentication zonos--elements",style:{"--zonos--border-radius":S()}},this.titleText&&i("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},this.titleText),t(),this.isEmailError&&i("zonos-text",{textColor:"red-600"},p("Please enter a valid email address.")))};Object.defineProperty(n.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{isStagingMode:["watchIsStagingMode"],stripe:["watchInitStripe"],clientSecret:["watchInitStripe"],defaultEmail:["watchDefaultEmail"]}},enumerable:false,configurable:true});return n}());$.style=G;var H=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:fixed;inset:0;z-index:2147483010;pointer-events:none;display:block}:host .zonos--loading-overlay{position:fixed;inset:0;width:100vw;height:100vh;background:var(--zonos-elements-backdrop-color);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;opacity:0;visibility:hidden;-webkit-transition:opacity 0.3s ease, visibility 0.3s ease;transition:opacity 0.3s ease, visibility 0.3s ease;z-index:2147483010}:host(.zonos--open){pointer-events:auto}:host(.zonos--open) .zonos--loading-overlay{opacity:0.65;visibility:visible}";var K=H;var Q=n("zonos_loading_overlay",function(){function n(n){t(this,n);this.open=false;this.size=40}n.prototype.render=function(){return i(o,{key:"8cafd99b309b04da5cf1b26b0f0804f4699c06b2",class:j(["zonos--elements",this.open&&"zonos--open"])},i("div",{key:"9ce7ac9b7e6956a5f76fc2105fa7f5d05299fd36",class:"zonos--loading-overlay"},i("zonos-spinner",{key:"4be3a8d471e3aead2e4194c4ecbf66878a7a3f17",size:this.size,spinnerColor:this.spinnerColor})))};return n}());Q.style=K}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,t,a){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{l(a.next(e))}catch(e){s(e)}}function r(e){try{l(a["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(o,r)}l((a=a.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,i,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(t=0)),t)try{if(a=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=n.call(e,t)}catch(e){r=[6,e];i=0}finally{a=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,t,a){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{l(a.next(e))}catch(e){s(e)}}function r(e){try{l(a["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):i(e.value).then(o,r)}l((a=a.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},a,i,s,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(t=0)),t)try{if(a=1,i&&(s=r[0]&2?i["return"]:r[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,r[1])).done)return s;if(i=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:t.label++;return{value:r[1],done:false};case 5:t.label++;i=r[1];r=[0];continue;case 7:r=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){t=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){t.label=r[1];break}if(r[0]===6&&t.label<s[1]){t.label=s[1];s=r;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(r);break}if(s[2])t.ops.pop();t.trys.pop();continue}r=n.call(e,t)}catch(e){r=[6,e];i=0}finally{a=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-7261e245.system.js","./p-2b8c96e3.system.js","./p-4a20893e.system.js","./p-916228fb.system.js","./p-de58684b.system.js","./p-d938f42f.system.js","./p-01174496.system.js","./p-6890e060.system.js","./p-14afffa8.system.js","./p-989cb22b.system.js"],(function(e){"use strict";var n,t,a,i,s,o,r,l,c,u,f,h,m,y,p,w,x,z;return{setters:[function(e){n=e.r;t=e.d;a=e.h;i=e.a;s=e.g},function(e){o=e.b;r=e.c;l=e.f;c=e.l;u=e.m;f=e.n},function(e){h=e.d},function(e){m=e.e;y=e.t;p=e.l},function(e){w=e.z},function(e){x=e.l},function(e){z=e.l},function(){},function(){},function(){}],execute:function(){var d=".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}";var b=d;var v=e("zonos_airwallex_payment",function(){function e(e){var a=this;n(this,e);this.airwallexPaymentSuccess=t(this,"airwallexPaymentSuccess",7);this.airwallexPaymentError=t(this,"airwallexPaymentError",7);this.element=null;this.storeUnsubscribeList=[];this.mountingClientSecret=null;this.hasError=false;this.clientSecret=o.clientSecret;this.getDropInOptions=function(e){var n;var t=w.checkoutSettings.captureDelay&&w.checkoutSettings.captureDelay>0;return{autoCapture:!t,client_secret:e,country_code:((n=r.shippingAddress)===null||n===void 0?void 0:n.location.countryCode)||undefined,currency:o.currency||h.currency,intent_id:o.paymentIntentId||undefined}};this.mountPaymentElement=function(){return __awaiter(a,void 0,void 0,(function(){var e,n,t,a,i,s;var r=this;return __generator(this,(function(u){switch(u.label){case 0:n=this.clientSecret;if(!n){return[2]}if(this.mountingClientSecret===n){return[2]}this.mountingClientSecret=n;return[4,l()];case 1:t=u.sent();if(!t){this.hasError=true;this.mountingClientSecret=null;return[2]}a=this.el.querySelector(".zonos--airwallex-payment-component");if(!a){z("Cannot find container element for Airwallex payment element");this.hasError=true;this.mountingClientSecret=null;return[2]}u.label=2;case 2:u.trys.push([2,4,,5]);(e=this.element)===null||e===void 0?void 0:e.destroy();this.element=null;return[4,c("dropIn",this.getDropInOptions(n))];case 3:i=u.sent();if(!i){z("Failed to create Airwallex payment element");this.hasError=true;this.mountingClientSecret=null;return[2]}i.mount(a);i.on("success",(function(){x("Airwallex payment succeeded");o.hasPaymentError=false;o.paymentConfirmed=true;r.airwallexPaymentSuccess.emit()}));i.on("error",(function(e){z(e);o.hasPaymentError=true;r.airwallexPaymentError.emit()}));this.element=i;this.hasError=false;return[3,5];case 4:s=u.sent();z(s);this.hasError=true;this.mountingClientSecret=null;return[3,5];case 5:return[2]}}))}))};this.localeChangeHandler=function(){if(!a.element||!a.clientSecret){return}a.element.update(a.getDropInOptions(a.clientSecret),{locale:u(p.selectedLocale)})}}e.prototype.clientSecretWatcher=function(){void this.mountPaymentElement()};e.prototype.componentWillLoad=function(){var e=this;this.storeUnsubscribeList=[f("clientSecret",(function(n){e.clientSecret=n})),m("selectedLocale",this.localeChangeHandler)]};e.prototype.componentDidLoad=function(){void this.mountPaymentElement()};e.prototype.disconnectedCallback=function(){var e;this.storeUnsubscribeList.forEach((function(e){return e()}));(e=this.element)===null||e===void 0?void 0:e.destroy();this.element=null};e.prototype.render=function(){return a(i,{key:"3d5f4aaea91533348ae6273757b8af6f17a7ab59",class:"zonos--airwallex-payment zonos--elements"},this.hasError&&a("zonos-banner",{key:"27fe7775145b9ff4f9b572ee592eb0cdc5f2ef13",class:"zonos--payment-error-banner",intent:"error"},y("We couldn't complete your payment. Please verify the payment details and try again.")),a("div",{key:"48a50ebcc6ad1e3b3cbf807ef5d466030995a171",class:"zonos--airwallex-payment-component"}))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{clientSecret:["clientSecretWatcher"]}},enumerable:false,configurable:true});return e}());v.style=b}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js"],(function(t){"use strict";var o,s;return{setters:[function(t){o=t.r;s=t.h}],execute:function(){function n(t,o,s){return(t||"")+(o?" ".concat(o):"")+(s?" ".concat(s):"")}var
|
|
1
|
+
System.register(["./p-7261e245.system.js"],(function(t){"use strict";var o,s;return{setters:[function(t){o=t.r;s=t.h}],execute:function(){function n(t,o,s){return(t||"")+(o?" ".concat(o):"")+(s?" ".concat(s):"")}var h=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}div{color:red;font-size:large}";var i=h;var r=t("zonos_component",function(){function t(t){o(this,t);this.first="";this.middle="";this.last=""}t.prototype.getText=function(){return n(this.first,this.middle,this.last)};t.prototype.render=function(){return s("div",{key:"7cc54490d65b2d6596a09f37bd0a842c66179d2c"},"Hello, World! I'm ",this.getText())};return t}());r.style=i}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{z as e,c as o}from"./p-
|
|
1
|
+
import{z as e,c as o}from"./p-27660512.js";import{t as n,w as t,E as r,A as a,b as i,d as c,l as s,y as u,J as l,z as d,B as p,v as f,h as y,I as v}from"./p-dc80cb87.js";import{t as b,s as h}from"./p-6bdc5c96.js";import{h as m,g as w,l as j,j as P}from"./p-41dd1cb8.js";import{i as k}from"./p-1cdd27ec.js";import{l as I}from"./p-0a377722.js";import{i as O,e as E,s as S}from"./p-adfbf57b.js";
|
|
2
2
|
/*!
|
|
3
3
|
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
4
4
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
@@ -14,4 +14,4 @@ import{z as e,c as o}from"./p-9a417eeb.js";import{t as n,w as t,E as r,A as a,b
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/function g(e,o){void 0===o&&(o={});var n=document.createElement("script");return n.src=e,Object.keys(o).forEach((function(e){n.setAttribute(e,o[e]),"data-csp-nonce"===e&&n.setAttribute("nonce",o["data-csp-nonce"])})),n}function A(e,o){if(void 0===o&&(o=Promise),B(e,o),"undefined"==typeof document)return o.resolve(null);var n=function(e){var o,n,t=e.sdkBaseUrl,r=e.environment,a=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(e,["sdkBaseUrl","environment"]),i=t||function(e){return"sandbox"===e?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}(r),s=a,c=Object.keys(s).filter((function(e){return null!=s[e]&&""!==s[e]})).reduce((function(e,o){var n=s[o].toString();return"data"===(o=o.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(function(e,o){return(o?"-":"")+e.toLowerCase()}))).substring(0,4)||"crossorigin"===o?e.attributes[o]=n:e.queryParams[o]=n,e}),{queryParams:{},attributes:{}}),u=c.queryParams,l=c.attributes;return u["merchant-id"]&&-1!==u["merchant-id"].indexOf(",")&&(l["data-merchant-id"]=u["merchant-id"],u["merchant-id"]="*"),{url:"".concat(i,"?").concat((o=u,n="",Object.keys(o).forEach((function(e){0!==n.length&&(n+="&"),n+=e+"="+o[e]})),n)),attributes:l}}(e),t=n.url,r=n.attributes,a=r["data-namespace"]||"paypal",i=x(a);return r["data-js-sdk-library"]||(r["data-js-sdk-library"]="paypal-js"),function(e,o){var n=document.querySelector('script[src="'.concat(e,'"]'));if(null===n)return null;var t=g(e,o),r=n.cloneNode();if(delete r.dataset.uidAuto,Object.keys(r.dataset).length!==Object.keys(t.dataset).length)return null;var a=!0;return Object.keys(r.dataset).forEach((function(e){r.dataset[e]!==t.dataset[e]&&(a=!1)})),a?n:null}(t,r)&&i?o.resolve(i):function(e,o){void 0===o&&(o=Promise),B(e,o);var n=e.url,t=e.attributes;if("string"!=typeof n||0===n.length)throw new Error("Invalid url.");if(void 0!==t&&"object"!=typeof t)throw new Error("Expected attributes to be an object.");return new o((function(e,o){if("undefined"==typeof document)return e();!function(e){var o=e.onSuccess,n=e.onError,t=g(e.url,e.attributes);t.onerror=n,t.onload=o,document.head.insertBefore(t,document.head.firstElementChild)}({url:n,attributes:t,onSuccess:function(){return e()},onError:function(){var e=new Error('The script "'.concat(n,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return o(e)}})}))}({url:t,attributes:r},o).then((function(){var e=x(a);if(e)return e;throw new Error("The window.".concat(a," global variable is not available."))}))}function x(e){return window[e]}function B(e,o){if("object"!=typeof e||null===e)throw new Error("Expected an options object.");var n=e.environment;if(n&&"production"!==n&&"sandbox"!==n)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==o&&"function"!=typeof o)throw new Error("Expected PromisePonyfill to be a function.")}"function"==typeof SuppressedError&&SuppressedError;const z={purchase:"Purchase","zonos-checkout-payment-info":"AddPaymentInfo","zonos-checkout-start":"InitiateCheckout"},C=e=>{if(!e)return{};if(!(e=>!!e&&Array.isArray(e.items))(e))return Object.assign({},e);const{currency:o,items:n,transaction_id:t,value:r}=e,a=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(e,["currency","items","transaction_id","value"]),i=n.map((e=>({id:e.item_id,item_price:e.price,quantity:e.quantity}))),s=n.map((e=>e.item_id)),c=n.reduce(((e,o)=>e+o.quantity),0),u=Object.assign(Object.assign({},a),{content_ids:s,content_type:"product",contents:i,num_items:c});return t&&(u.order_id=t),void 0!==o&&(u.currency=o),void 0!==r&&(u.value=r),u},L=(e,o,n)=>{O()?E({event:o,fbqMode:e,payload:n,provider:"fbq"}):"function"==typeof window.fbq&&(I("Zonos submits fbq event","log",`${e}:${o}`),window.fbq(e,o,n))},M=o=>{S(o),(({event:o,metadata:n})=>{if(!(()=>{const o=e.checkoutSettings.analyticsProviders.find((e=>"FACEBOOK_PIXEL"===e.type));return!!o&&"ENABLED"===o.status})())return;const t=w(),r=C(n),a=Object.assign(Object.assign({},r),t&&{isTestMode:!0}),i=Object.fromEntries(Object.entries(a).filter((([e,o])=>null!==o)));L("trackCustom",o,i);const s=(e=>{var o;return null!==(o=z[e])&&void 0!==o?o:null})(o);s&&s!==o&&L("track",s,i)})(o)},{onChange:T,reset:_,state:R}=o((()=>({intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}))),F=({checkoutSessionId:o,onPaypalFail:h,onPaypalSessionDone:w,overrideBorderRaidus:I,overridePrimaryColor:O})=>({createOrder:async()=>{var e;if(n({checkoutSessionId:o,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}}),t()&&!r.accepted)return r.showError=!0,null===(e=document.querySelector("zonos-policy-consent"))||void 0===e||e.scrollIntoView({behavior:"smooth"}),null==h||h(),"";const P=t();P&&(r.locked=!0);let k=!1;try{const e=await a();if(!e.valid)return R.paypalErrorMessage=e.errorMessage,i.hasPaymentError=!1,i.customErrorMessage=null,M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:o}}),null==h||h(),"";R.paypalErrorMessage=null,s.inventoryCheckErrorMessage=null;try{s.inventoryCheckErrorMessage=await c()}catch(e){s.inventoryCheckErrorMessage=b("Unable to check inventory. Please try again.")}if(s.inventoryCheckErrorMessage)return"";if(v()>0){const e=await u();if(!e.success)return R.paypalErrorMessage=e.error||b("Unable to apply store credit. Please try again."),null==h||h(),""}if(await l(),d()){const e=await p();return e.success?(null==w||w({orderId:e.orderId||""}),f(),y(),k=!0,""):(R.paypalErrorMessage=e.error||b("Unable to place order with store credit. Please try again."),null==h||h(),"")}const n=await(async({checkoutSessionId:e})=>{var o,n;const t=R.intent.toUpperCase(),{errors:r,json:a}=await(async({checkoutSessionId:e,intent:o})=>{const{errors:n,json:t}=await m("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:e,intent:o},method:"POST"});return{errors:n,json:t}})({checkoutSessionId:e,intent:t}),i=null===(o=null==a?void 0:a.paypalOrderCreate)||void 0===o?void 0:o.paypalOrderId;if(r.length||!i)throw new Error((null===(n=r.find(Boolean))||void 0===n?void 0:n.message)||"An unexpected error occurred when creating paypal order.");return i})({checkoutSessionId:o});return k=!!n,n}catch(e){return j("Failed to create paypal order",e),R.paypalErrorMessage=b("Failed to create PayPal order. Please try again, or consider using an alternative method."),i.hasPaymentError=!1,i.customErrorMessage=null,M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:o}}),null==h||h(),""}finally{P&&!k&&(r.locked=!1)}},onApprove:async()=>{try{R.paypalErrorMessage=null,M({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:o,paymentMethod:"paypal"}});const e=await(async({checkoutSessionId:e,paypalMockResponse:o})=>{var n,t;const{errors:r,json:a}=await(async({checkoutSessionId:e,paypalMockResponse:o})=>{const{errors:n,json:t}=await m("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:e,paypalMockResponse:o},method:"POST"});return{errors:n,json:t}})({checkoutSessionId:e,paypalMockResponse:o}),i=null===(n=null==a?void 0:a.paypalOrderCapture.order)||void 0===n?void 0:n.id;if(r.length||!i)throw new Error((null===(t=r.find(Boolean))||void 0===t?void 0:t.message)||b("An unexpected error occurred when processing PayPal order."));return i})({checkoutSessionId:o,paypalMockResponse:window.Zonos._paypalMockResponse});R.orderIdCreated=e,null==w||w({orderId:e}),f(),y()}catch(e){if(j("==== Failed to capture paypal order",e),e instanceof Error)return(({error:e})=>{var o;const n=P(e.message),t=null===(o=null==n?void 0:n.errors.find(Boolean))||void 0===o?void 0:o.message,r=(null==t?void 0:t.match(/\[(.*?)\] (.*)/i))||[];r||(R.paypalErrorMessage=b("An unexpected error occurred when processing PayPal order."));const a=r[2]||b("An unexpected error occurred when processing PayPal order.");R.paypalErrorMessage=a})({error:e});null==h||h()}},style:{borderRadius:"SHARP"===I?0:10,color:k({backgroundColor1:"#ffc33a",backgroundColor2:O||e.appearance.colorPrimary||""})?"gold":"blue",shape:"rect"}}),D=async({currency:o})=>{var n;if(!(null===(n=e.checkoutSettings.externalPaymentMethods)||void 0===n?void 0:n.find((e=>"PAYPAL"===e.type&&"ENABLED"===e.status))))return void I("=== Paypal is disabled for this store","warn");const t=e.checkoutSettings.externalServiceTokens.find((e=>"PAYPAL_CLIENT_ID"===e.type));if(!t)return void I("Failed to load paypal -- missing paypal publishable key","warn");const r=e.zonosMode&&"production"!==e.zonosMode||"LIVE"!==e.checkoutSettings.mode?"sandbox":"production";R.intent=e.checkoutSettings.captureDelay&&e.checkoutSettings.captureDelay>0?"authorize":"capture",I("==== Paypal order intent","info",R.intent),window.Zonos.paypal=await A({clientId:t.token,currency:o,environment:r,intent:R.intent}),R.paypal=window.Zonos.paypal,I("==== Paypal script loaded")},q=e=>{var o;const n=window.Zonos.paypal;if(!n)return I("Paypal is not available"),null;const t=h.checkoutSessionId;if(!t)return I("Paypal is not available due to checkoutSessionId is not available"),null;I("==== Loading Paypal buttons"),R.paypalButtons.length&&(R.paypalButtons.forEach((async e=>{await e.close()})),R.paypalButtons=[]);const r=[null===(o=n.FUNDING)||void 0===o?void 0:o.PAYPAL].filter(Boolean);return R.paypalButtons=r.map((o=>{var r;let a=null;try{a=(null===(r=n.Buttons)||void 0===r?void 0:r.call(n,Object.assign(Object.assign({},F(Object.assign({checkoutSessionId:t,fundingSource:o},e))),{fundingSource:o})))||null}catch(e){I(`===== Failed to load paypal's "${o}" button`,"warn",e)}return(null==a?void 0:a.isEligible())?(I(`==== Paypal button ${o} loaded`),a):null})).filter(Boolean),R.paypalButtons},N=()=>{var o,n;return"ENABLED"===(null===(n=null===(o=e.checkoutSettings.externalPaymentMethods)||void 0===o?void 0:o.find((e=>"PAYPAL"===e.type)))||void 0===n?void 0:n.status)||!!R.paypalButtons.length};export{R as a,D as b,_ as c,q as d,T as e,N as p,M as s}
|
|
17
|
+
*/function g(e,o){void 0===o&&(o={});var n=document.createElement("script");return n.src=e,Object.keys(o).forEach((function(e){n.setAttribute(e,o[e]),"data-csp-nonce"===e&&n.setAttribute("nonce",o["data-csp-nonce"])})),n}function A(e,o){if(void 0===o&&(o=Promise),B(e,o),"undefined"==typeof document)return o.resolve(null);var n=function(e){var o,n,t=e.sdkBaseUrl,r=e.environment,a=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(e,["sdkBaseUrl","environment"]),i=t||function(e){return"sandbox"===e?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}(r),c=a,s=Object.keys(c).filter((function(e){return null!=c[e]&&""!==c[e]})).reduce((function(e,o){var n=c[o].toString();return"data"===(o=o.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(function(e,o){return(o?"-":"")+e.toLowerCase()}))).substring(0,4)||"crossorigin"===o?e.attributes[o]=n:e.queryParams[o]=n,e}),{queryParams:{},attributes:{}}),u=s.queryParams,l=s.attributes;return u["merchant-id"]&&-1!==u["merchant-id"].indexOf(",")&&(l["data-merchant-id"]=u["merchant-id"],u["merchant-id"]="*"),{url:"".concat(i,"?").concat((o=u,n="",Object.keys(o).forEach((function(e){0!==n.length&&(n+="&"),n+=e+"="+o[e]})),n)),attributes:l}}(e),t=n.url,r=n.attributes,a=r["data-namespace"]||"paypal",i=x(a);return r["data-js-sdk-library"]||(r["data-js-sdk-library"]="paypal-js"),function(e,o){var n=document.querySelector('script[src="'.concat(e,'"]'));if(null===n)return null;var t=g(e,o),r=n.cloneNode();if(delete r.dataset.uidAuto,Object.keys(r.dataset).length!==Object.keys(t.dataset).length)return null;var a=!0;return Object.keys(r.dataset).forEach((function(e){r.dataset[e]!==t.dataset[e]&&(a=!1)})),a?n:null}(t,r)&&i?o.resolve(i):function(e,o){void 0===o&&(o=Promise),B(e,o);var n=e.url,t=e.attributes;if("string"!=typeof n||0===n.length)throw new Error("Invalid url.");if(void 0!==t&&"object"!=typeof t)throw new Error("Expected attributes to be an object.");return new o((function(e,o){if("undefined"==typeof document)return e();!function(e){var o=e.onSuccess,n=e.onError,t=g(e.url,e.attributes);t.onerror=n,t.onload=o,document.head.insertBefore(t,document.head.firstElementChild)}({url:n,attributes:t,onSuccess:function(){return e()},onError:function(){var e=new Error('The script "'.concat(n,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return o(e)}})}))}({url:t,attributes:r},o).then((function(){var e=x(a);if(e)return e;throw new Error("The window.".concat(a," global variable is not available."))}))}function x(e){return window[e]}function B(e,o){if("object"!=typeof e||null===e)throw new Error("Expected an options object.");var n=e.environment;if(n&&"production"!==n&&"sandbox"!==n)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==o&&"function"!=typeof o)throw new Error("Expected PromisePonyfill to be a function.")}"function"==typeof SuppressedError&&SuppressedError;const z={purchase:"Purchase","zonos-checkout-payment-info":"AddPaymentInfo","zonos-checkout-start":"InitiateCheckout"},C=e=>{if(!e)return{};if(!(e=>!!e&&Array.isArray(e.items))(e))return Object.assign({},e);const{currency:o,items:n,transaction_id:t,value:r}=e,a=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n}(e,["currency","items","transaction_id","value"]),i=n.map((e=>({id:e.item_id,item_price:e.price,quantity:e.quantity}))),c=n.map((e=>e.item_id)),s=n.reduce(((e,o)=>e+o.quantity),0),u=Object.assign(Object.assign({},a),{content_ids:c,content_type:"product",contents:i,num_items:s});return t&&(u.order_id=t),void 0!==o&&(u.currency=o),void 0!==r&&(u.value=r),u},L=(e,o,n)=>{O()?E({event:o,fbqMode:e,payload:n,provider:"fbq"}):"function"==typeof window.fbq&&(I("Zonos submits fbq event","log",`${e}:${o}`),window.fbq(e,o,n))},M=o=>{S(o),(({event:o,metadata:n})=>{if(!(()=>{const o=e.checkoutSettings.analyticsProviders.find((e=>"FACEBOOK_PIXEL"===e.type));return!!o&&"ENABLED"===o.status})())return;const t=w(),r=C(n),a=Object.assign(Object.assign({},r),t&&{isTestMode:!0}),i=Object.fromEntries(Object.entries(a).filter((([e,o])=>null!==o)));L("trackCustom",o,i);const c=(e=>{var o;return null!==(o=z[e])&&void 0!==o?o:null})(o);c&&c!==o&&L("track",c,i)})(o)},{onChange:T,reset:_,state:R}=o((()=>({intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}))),F=({checkoutSessionId:o,onPaypalFail:h,onPaypalSessionDone:w,overrideBorderRaidus:I,overridePrimaryColor:O})=>({createOrder:async()=>{var e;if(n({checkoutSessionId:o,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}}),t()&&!r.accepted)return r.showError=!0,null===(e=document.querySelector("zonos-policy-consent"))||void 0===e||e.scrollIntoView({behavior:"smooth"}),null==h||h(),"";const P=t();P&&(r.locked=!0);let k=!1;try{const e=await a();if(!e.valid)return R.paypalErrorMessage=e.errorMessage,i.hasPaymentError=!1,i.customErrorMessage=null,M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:o}}),null==h||h(),"";R.paypalErrorMessage=null,c.inventoryCheckErrorMessage=null;try{c.inventoryCheckErrorMessage=await s()}catch(e){c.inventoryCheckErrorMessage=b("Unable to check inventory. Please try again.")}if(c.inventoryCheckErrorMessage)return"";if(v()>0){const e=await u();if(!e.success)return R.paypalErrorMessage=e.error||b("Unable to apply store credit. Please try again."),null==h||h(),""}if(await l(),d()){const e=await p();return e.success?(null==w||w({orderId:e.orderId||""}),f(),y(),k=!0,""):(R.paypalErrorMessage=e.error||b("Unable to place order with store credit. Please try again."),null==h||h(),"")}const n=await(async({checkoutSessionId:e})=>{var o,n;const t=R.intent.toUpperCase(),{errors:r,json:a}=await(async({checkoutSessionId:e,intent:o})=>{const{errors:n,json:t}=await m("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:e,intent:o},method:"POST"});return{errors:n,json:t}})({checkoutSessionId:e,intent:t}),i=null===(o=null==a?void 0:a.paypalOrderCreate)||void 0===o?void 0:o.paypalOrderId;if(r.length||!i)throw new Error((null===(n=r.find(Boolean))||void 0===n?void 0:n.message)||"An unexpected error occurred when creating paypal order.");return i})({checkoutSessionId:o});return k=!!n,n}catch(e){return j("Failed to create paypal order",e),R.paypalErrorMessage=b("Failed to create PayPal order. Please try again, or consider using an alternative method."),i.hasPaymentError=!1,i.customErrorMessage=null,M({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:o}}),null==h||h(),""}finally{P&&!k&&(r.locked=!1)}},onApprove:async()=>{try{R.paypalErrorMessage=null,M({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:o,paymentMethod:"paypal"}});const e=await(async({checkoutSessionId:e,paypalMockResponse:o})=>{var n,t;const{errors:r,json:a}=await(async({checkoutSessionId:e,paypalMockResponse:o})=>{const{errors:n,json:t}=await m("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:e,paypalMockResponse:o},method:"POST"});return{errors:n,json:t}})({checkoutSessionId:e,paypalMockResponse:o}),i=null===(n=null==a?void 0:a.paypalOrderCapture.order)||void 0===n?void 0:n.id;if(r.length||!i)throw new Error((null===(t=r.find(Boolean))||void 0===t?void 0:t.message)||b("An unexpected error occurred when processing PayPal order."));return i})({checkoutSessionId:o,paypalMockResponse:window.Zonos._paypalMockResponse});R.orderIdCreated=e,null==w||w({orderId:e}),f(),y()}catch(e){if(j("==== Failed to capture paypal order",e),e instanceof Error)return(({error:e})=>{var o;const n=P(e.message),t=null===(o=null==n?void 0:n.errors.find(Boolean))||void 0===o?void 0:o.message,r=(null==t?void 0:t.match(/\[(.*?)\] (.*)/i))||[];r||(R.paypalErrorMessage=b("An unexpected error occurred when processing PayPal order."));const a=r[2]||b("An unexpected error occurred when processing PayPal order.");R.paypalErrorMessage=a})({error:e});null==h||h()}},style:{borderRadius:"SHARP"===I?0:10,color:k({backgroundColor1:"#ffc33a",backgroundColor2:O||e.appearance.colorPrimary||""})?"gold":"blue",shape:"rect"}}),D=async({currency:o})=>{var n;if(!(null===(n=e.checkoutSettings.externalPaymentMethods)||void 0===n?void 0:n.find((e=>"PAYPAL"===e.type&&"ENABLED"===e.status))))return void I("=== Paypal is disabled for this store","warn");const t=e.checkoutSettings.externalServiceTokens.find((e=>"PAYPAL_CLIENT_ID"===e.type));if(!t)return void I("Failed to load paypal -- missing paypal publishable key","warn");const r=e.zonosMode&&"production"!==e.zonosMode||"LIVE"!==e.checkoutSettings.mode?"sandbox":"production";R.intent=e.checkoutSettings.captureDelay&&e.checkoutSettings.captureDelay>0?"authorize":"capture",I("==== Paypal order intent","info",R.intent),window.Zonos.paypal=await A({clientId:t.token,currency:o,environment:r,intent:R.intent}),R.paypal=window.Zonos.paypal,I("==== Paypal script loaded")},q=e=>{var o;const n=window.Zonos.paypal;if(!n)return I("Paypal is not available"),null;const t=h.checkoutSessionId;if(!t)return I("Paypal is not available due to checkoutSessionId is not available"),null;I("==== Loading Paypal buttons"),R.paypalButtons.length&&(R.paypalButtons.forEach((async e=>{await e.close()})),R.paypalButtons=[]);const r=[null===(o=n.FUNDING)||void 0===o?void 0:o.PAYPAL].filter(Boolean);return R.paypalButtons=r.map((o=>{var r;let a=null;try{a=(null===(r=n.Buttons)||void 0===r?void 0:r.call(n,Object.assign(Object.assign({},F(Object.assign({checkoutSessionId:t,fundingSource:o},e))),{fundingSource:o})))||null}catch(e){I(`===== Failed to load paypal's "${o}" button`,"warn",e)}return(null==a?void 0:a.isEligible())?(I(`==== Paypal button ${o} loaded`),a):null})).filter(Boolean),R.paypalButtons},N=()=>{var o,n;return"ENABLED"===(null===(n=null===(o=e.checkoutSettings.externalPaymentMethods)||void 0===o?void 0:o.find((e=>"PAYPAL"===e.type)))||void 0===n?void 0:n.status)||!!R.paypalButtons.length};export{R as a,D as b,_ as c,q as d,T as e,N as p,M as s}
|