@zonos/elements 1.3.143 → 1.3.144
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/{CheckoutConfig-eaaf62a1.js → CheckoutConfig-d25d548d.js} +13 -3
- package/dist/cjs/{cart-6ac8dc06.js → cart-2398abd4.js} +296 -41
- package/dist/cjs/{createCustomEvent-3e982e57.js → createCustomEvent-7b6fad95.js} +0 -3
- package/dist/cjs/{getBorderRadius-f97c99ad.js → getBorderRadius-7d0772bf.js} +1 -1
- package/dist/cjs/{handleFetch-864d3c53.js → handleFetch-3673a0c2.js} +30 -1
- package/dist/cjs/{index-b678ce0c.js → index-2f90486e.js} +209 -157
- package/dist/cjs/index.cjs.js +12 -11
- package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-ea8b4ca0.js → paypal-7ed9dfb7.js} +4 -4
- package/dist/cjs/zonos-address_8.cjs.entry.js +96 -18
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +128 -30
- package/dist/cjs/zonos-checkout.cjs.entry.js +36 -16
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +8 -8
- package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +6 -6
- package/dist/cjs/zonos-elements.cjs.js +3 -3
- package/dist/cjs/{zonos-notification_3.cjs.entry.js → zonos-empty-state-payment_4.cjs.entry.js} +86 -8
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +7 -7
- package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +34 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +109 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateDarkIcon.svg +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateLightIcon.svg +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.css +51 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +90 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +62 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +18 -2
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +30 -0
- package/dist/collection/components/common/zonos-card/zonos-card.js +20 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +14 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +4 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +22 -0
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +4 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -0
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +26 -0
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +12 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -0
- package/dist/collection/components/common/zonos-link/zonos-link.js +8 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -0
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +6 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +4 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +11 -1
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +3 -3
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +52 -8
- package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +4 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -0
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +10 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +6 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +7 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +7 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -2
- package/dist/collection/components/main/zonos-controller.js +7 -3
- package/dist/collection/components/store/checkout/cart.js +3 -0
- package/dist/collection/components/store/checkout/stripe.js +112 -39
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +6 -0
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +84 -3
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -1
- package/dist/collection/components/utils/api/getCheckoutSession.js +1 -1
- package/dist/collection/components/utils/api/placeTestOrder.js +40 -0
- package/dist/collection/components/utils/checkout/getIsStagingMode.js +1 -0
- package/dist/collection/components/utils/checkout/getIsTestMode.js +5 -1
- package/dist/collection/components/utils/handleFetch.js +22 -1
- package/dist/collection/components/utils/validateEmailValue.js +4 -0
- package/dist/collection/scripts/_getTempCartById.js +2 -2
- package/dist/collection/scripts/_getWithTestPublicCredential.js +5 -2
- package/dist/collection/scripts/cart/_getIsValidCartId.js +11 -0
- package/dist/collection/types/checkout/api/PlaceTestOrder.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +13 -1
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
- package/dist/esm/{cart-acba54d0.js → cart-3427ee25.js} +296 -41
- package/dist/esm/{createCustomEvent-31a792d3.js → createCustomEvent-58159025.js} +1 -3
- package/dist/esm/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
- package/dist/esm/{handleFetch-badf4543.js → handleFetch-b4633675.js} +29 -2
- package/dist/esm/{index-986b5ff2.js → index-d82f06f2.js} +209 -157
- package/dist/esm/index.js +13 -12
- package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-3401f757.js → paypal-4e2f9753.js} +4 -4
- package/dist/esm/zonos-address_8.entry.js +96 -18
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_13.entry.js +126 -28
- package/dist/esm/zonos-checkout.entry.js +34 -14
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +8 -8
- package/dist/esm/zonos-country-flag.entry.js +6 -6
- package/dist/esm/zonos-country-select_4.entry.js +6 -6
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +86 -9
- package/dist/esm/zonos-hello-dialog.entry.js +7 -7
- package/dist/esm/zonos-hello.entry.js +6 -6
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +6 -6
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
- package/dist/esm-es5/cart-3427ee25.js +1 -0
- package/dist/esm-es5/createCustomEvent-58159025.js +1 -0
- package/dist/esm-es5/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
- package/dist/esm-es5/handleFetch-b4633675.js +1 -0
- package/dist/esm-es5/index-d82f06f2.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-3401f757.js → paypal-4e2f9753.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.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-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-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -0
- 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-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-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.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-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/scripts/index.d.ts +61 -0
- 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/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +18 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.d.ts +13 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
- package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +7 -3
- package/dist/types/components/store/checkout/cart.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +8 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/placeTestOrder.d.ts +7 -0
- package/dist/types/components/utils/checkout/getIsStagingMode.d.ts +1 -0
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
- package/dist/types/components/utils/validateEmailValue.d.ts +1 -0
- package/dist/types/components.d.ts +61 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +8 -2
- package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +7 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +75 -2
- package/dist/types/types/generated/graphql.internal.types.ts +92 -4
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-ab6973a5.entry.js → p-00136c20.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3867033.entry.js → p-0028d158.entry.js} +1 -1
- package/dist/zonos-elements/{p-54058b57.entry.js → p-05013308.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b5c9f89.system.js → p-0e6a3cd2.system.js} +1 -1
- package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
- package/dist/zonos-elements/p-1423ebbe.js +1 -0
- package/dist/zonos-elements/p-18e5b741.system.js +1 -0
- package/dist/zonos-elements/p-2deae669.entry.js +1 -0
- package/dist/zonos-elements/{p-36dfc7ac.system.js → p-32912caf.system.js} +1 -1
- package/dist/zonos-elements/{p-fc4658a6.entry.js → p-36f97fd9.entry.js} +1 -1
- package/dist/zonos-elements/{p-8ac02349.system.entry.js → p-3a213429.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6554a6f.system.entry.js → p-3aa4841a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a13d5957.system.entry.js → p-3d221556.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0db28495.system.entry.js → p-463e44b6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
- package/dist/zonos-elements/p-485d89a4.js +17 -0
- package/dist/zonos-elements/p-48bca3d4.system.entry.js +1 -0
- package/dist/zonos-elements/p-4caffd96.system.js +2 -0
- package/dist/zonos-elements/{p-d9511c4a.entry.js → p-50896f89.entry.js} +1 -1
- package/dist/zonos-elements/{p-38d0c496.system.entry.js → p-515e3606.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5834c218.system.js +1 -0
- package/dist/zonos-elements/p-595f5dd2.js +1 -0
- package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d7a860c.entry.js → p-69f84611.entry.js} +1 -1
- package/dist/zonos-elements/{p-766dd01f.js → p-6c578d26.js} +1 -1
- package/dist/zonos-elements/{p-28295342.entry.js → p-709c7e9e.entry.js} +1 -1
- package/dist/zonos-elements/{p-0197a9bf.system.entry.js → p-7140439f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7302a081.system.entry.js +1 -0
- package/dist/zonos-elements/p-7e47f6cf.entry.js +1 -0
- package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
- package/dist/zonos-elements/{p-78e4f877.system.entry.js → p-81084be5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81a5dd5c.js +1 -0
- package/dist/zonos-elements/p-84e5fc0b.entry.js +1 -0
- package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b5f4ca7.system.entry.js → p-91fc6c24.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9951462e.entry.js +1 -0
- package/dist/zonos-elements/{p-a2bce31d.system.entry.js → p-9cf018c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2ab5e362.system.entry.js → p-9e05e259.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-df9c0bfa.system.entry.js → p-a8cf3542.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ab68ad11.js +2 -0
- package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
- package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
- package/dist/zonos-elements/{p-dba6147b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b2ea7adb.entry.js → p-b262b93e.entry.js} +1 -1
- package/dist/zonos-elements/{p-545c05ce.entry.js → p-b288c2ed.entry.js} +1 -1
- package/dist/zonos-elements/p-b3882a73.system.js +1 -0
- package/dist/zonos-elements/{p-9306a835.entry.js → p-b5c360af.entry.js} +1 -1
- package/dist/zonos-elements/{p-2cfc00b8.system.entry.js → p-b6bbdb59.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-654fc23d.system.entry.js → p-bb92882d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bf37ccc7.system.js +1 -0
- package/dist/zonos-elements/{p-21b538ea.system.js → p-c015be06.system.js} +1 -1
- package/dist/zonos-elements/p-c8b0bc02.system.entry.js +1 -0
- package/dist/zonos-elements/{p-39cac2c1.entry.js → p-cbd5d932.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c5c0a85.entry.js → p-cdfca133.entry.js} +1 -1
- package/dist/zonos-elements/{p-675f60b4.entry.js → p-d2f2c685.entry.js} +1 -1
- package/dist/zonos-elements/{p-4c7f0417.entry.js → p-d6061c79.entry.js} +1 -1
- package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3f991022.entry.js → p-db3f381d.entry.js} +1 -1
- package/dist/zonos-elements/{p-9dec2b74.entry.js → p-de221545.entry.js} +1 -1
- package/dist/zonos-elements/{p-0ab29580.entry.js → p-e01ccb27.entry.js} +1 -1
- package/dist/zonos-elements/{p-b0174a8f.js → p-e02fd9ae.js} +1 -1
- package/dist/zonos-elements/{p-f2d07062.entry.js → p-e2f1fa53.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a8862a6.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e84f647.system.entry.js → p-ea35b237.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f0c8150e.js +1 -0
- package/dist/zonos-elements/p-f3b0a097.system.js +1 -0
- package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +9 -8
- package/dist/esm-es5/CheckoutConfig-262008fe.js +0 -1
- package/dist/esm-es5/cart-acba54d0.js +0 -1
- package/dist/esm-es5/createCustomEvent-31a792d3.js +0 -1
- package/dist/esm-es5/handleFetch-badf4543.js +0 -1
- package/dist/esm-es5/index-986b5ff2.js +0 -2
- package/dist/esm-es5/zonos-notification_3.entry.js +0 -1
- package/dist/zonos-elements/p-1198c874.entry.js +0 -1
- package/dist/zonos-elements/p-1460f917.js +0 -1
- package/dist/zonos-elements/p-302f5d25.entry.js +0 -1
- package/dist/zonos-elements/p-386325ae.system.js +0 -1
- package/dist/zonos-elements/p-64372f93.system.js +0 -1
- package/dist/zonos-elements/p-680d3694.js +0 -2
- package/dist/zonos-elements/p-7b999a40.js +0 -1
- package/dist/zonos-elements/p-7c643376.system.js +0 -1
- package/dist/zonos-elements/p-8e30228d.system.entry.js +0 -1
- package/dist/zonos-elements/p-8f26cc7e.entry.js +0 -1
- package/dist/zonos-elements/p-9da2d116.entry.js +0 -1
- package/dist/zonos-elements/p-a08ea336.js +0 -1
- package/dist/zonos-elements/p-a4f045d4.js +0 -17
- package/dist/zonos-elements/p-a5b294d7.js +0 -1
- package/dist/zonos-elements/p-b50667b6.system.js +0 -2
- package/dist/zonos-elements/p-bfcfd29b.system.js +0 -1
- package/dist/zonos-elements/p-c437d76c.system.js +0 -1
- package/dist/zonos-elements/p-d1afd314.system.entry.js +0 -1
- package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
- package/dist/zonos-elements/p-f9aef1fc.system.entry.js +0 -1
- package/dist/zonos-elements/p-fa538a74.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as e,H as t}from"./p-680d3694.js";import{_ as s,e as i,i as n,f as l,z as r,g as a,m as h}from"./p-4b685549.js";import{l as d,D as c,q as m,r as f,F as p,G as g,H as u,I as w,J as z}from"./p-a08ea336.js";import{c as b}from"./p-b4b7f705.js";import{h as v,a as x,l as y}from"./p-a5b294d7.js";import{g as k}from"./p-5883217a.js";import"./p-766dd01f.js";import"./p-b0174a8f.js";var L=s,T=/\s/,C=/^\s+/,O=i,E=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},S=l,I=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,F=parseInt,H=l,X=function(){return L.Date.now()},B=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||E(o)&&"[object Symbol]"==O(o)}(o))return NaN;if(S(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=S(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=j.test(o);return t||A.test(o)?F(o.slice(2),t?2:8):I.test(o)?NaN:+o},N=Math.max,M=Math.min;const P=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},R=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=r.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const l=i&&c(i)&&document.querySelectorAll(i)||[],a=s&&c(s)&&document.querySelectorAll(s)||[];if(l.length!==a.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&c(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<l.length;t++){const s=l[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},$=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===r.currentHelloPage||"productList"===r.currentHelloPage)&&this.allRestrictedItems.length){const o=m("click to learn more");return`${m("productDetail"===r.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(r.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==r.currentHelloPage&&"productList"!==r.currentHelloPage||"DISABLED"===r.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=d;if(!e)return x("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:l}=await v("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!l?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):l.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(r.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=r.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=R();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=function(o,e,t){var s,i,n,l,r,a,h=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,h=e,l=o.apply(n,t)}function p(o){var t=o-a;return void 0===a||t>=e||t<0||c&&o-h>=n}function g(){var o=X();if(p(o))return u(o);r=setTimeout(g,function(o){var t=e-(o-a);return c?M(t,n-(o-h)):t}(o))}function u(o){return r=void 0,m&&s?f(o):(s=i=void 0,l)}function w(){var o=X(),t=p(o);if(s=arguments,i=this,a=o,t){if(void 0===r)return function(o){return h=o,r=setTimeout(g,e),d?f(o):l}(a);if(c)return clearTimeout(r),r=setTimeout(g,e),f(a)}return void 0===r&&(r=setTimeout(g,e)),l}return e=B(e)||0,H(t)&&(d=!!t.leading,n=(c="maxWait"in t)?N(B(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),w.cancel=function(){void 0!==r&&clearTimeout(r),h=0,s=a=i=r=void 0},w.flush=function(){return void 0===r?l:u(X())},w}((()=>{const{productTitleElementSelector:o}=r.helloSettings;if(o){const o=R();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==d.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,r.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=r.helloSettings;return P(o)?"cart":P(t)?"productDetail":P(s)?"productList":P(e)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void p(d.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!d.localizationLoaded)return!1;const{showForCountries:e}=r.helloSettings;return o&&(d.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?d.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(d.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=r.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1}async getCountryList(){return d.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&r.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==r.helloSettings.currencyBehavior&&(d.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return u(o)}async convert(o){return w(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||d.selectedCountryCode&&"function"==typeof r.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=r.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||r.helloSettings.mobileLocation,e=r.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!r.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=r.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=d,{isOnLeft:l,isOnTop:a,shouldFloat:c}=this.getHelloLocation(),m=h(r.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,p=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(r.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":f},g&&e("div",{class:b(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:p,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};$.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{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{$ as zonos_hello}
|
|
1
|
+
import{r as o,h as e,H as t}from"./p-ab68ad11.js";import{_ as s,e as i,i as n,f as l,z as r,g as h,m as a}from"./p-b0616716.js";import{l as d,D as c,q as m,r as f,F as p,G as g,H as u,I as w,J as z}from"./p-1423ebbe.js";import{c as b}from"./p-b4b7f705.js";import{h as v,b as x,l as y}from"./p-f0c8150e.js";import{g as k}from"./p-5883217a.js";import"./p-6c578d26.js";import"./p-e02fd9ae.js";var L=s,T=/\s/,C=/^\s+/,O=i,E=n,D=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},S=l,I=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,F=parseInt,H=l,X=function(){return L.Date.now()},B=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||E(o)&&"[object Symbol]"==O(o)}(o))return NaN;if(S(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=S(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=D(o);var t=j.test(o);return t||A.test(o)?F(o.slice(2),t?2:8):I.test(o)?NaN:+o},N=Math.max,M=Math.min;const P=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},R=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=r.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const l=i&&c(i)&&document.querySelectorAll(i)||[],h=s&&c(s)&&document.querySelectorAll(s)||[];if(l.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===n,d=a&&t&&c(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<l.length;t++){const s=l[t],i=h[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},$=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===r.currentHelloPage||"productList"===r.currentHelloPage)&&this.allRestrictedItems.length){const o=m("click to learn more");return`${m("productDetail"===r.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(r.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==r.currentHelloPage&&"productList"!==r.currentHelloPage||"DISABLED"===r.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=d;if(!e)return x("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:l}=await v("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!l?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):l.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(r.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=r.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=R();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=function(o,e,t){var s,i,n,l,r,h,a=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,a=e,l=o.apply(n,t)}function p(o){var t=o-h;return void 0===h||t>=e||t<0||c&&o-a>=n}function g(){var o=X();if(p(o))return u(o);r=setTimeout(g,function(o){var t=e-(o-h);return c?M(t,n-(o-a)):t}(o))}function u(o){return r=void 0,m&&s?f(o):(s=i=void 0,l)}function w(){var o=X(),t=p(o);if(s=arguments,i=this,h=o,t){if(void 0===r)return function(o){return a=o,r=setTimeout(g,e),d?f(o):l}(h);if(c)return clearTimeout(r),r=setTimeout(g,e),f(h)}return void 0===r&&(r=setTimeout(g,e)),l}return e=B(e)||0,H(t)&&(d=!!t.leading,n=(c="maxWait"in t)?N(B(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),w.cancel=function(){void 0!==r&&clearTimeout(r),a=0,s=h=i=r=void 0},w.flush=function(){return void 0===r?l:u(X())},w}((()=>{const{productTitleElementSelector:o}=r.helloSettings;if(o){const o=R();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==d.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,r.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=r.helloSettings;return P(o)?"cart":P(t)?"productDetail":P(s)?"productList":P(e)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void p(d.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!d.localizationLoaded)return!1;const{showForCountries:e}=r.helloSettings;return o&&(d.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?d.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(d.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=r.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1}async getCountryList(){return d.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&r.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==r.helloSettings.currencyBehavior&&(d.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return u(o)}async convert(o){return w(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||d.selectedCountryCode&&"function"==typeof r.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=r.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||r.helloSettings.mobileLocation,e=r.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!r.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=r.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=d,{isOnLeft:l,isOnTop:h,shouldFloat:c}=this.getHelloLocation(),m=a(r.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,p=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(r.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":f},g&&e("div",{class:b(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:p,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};$.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{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{$ as zonos_hello}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-b50667b6.system.js","./p-386325ae.system.js","./p-36dfc7ac.system.js","./p-bfcfd29b.system.js","./p-c0164a3c.system.js","./p-21b538ea.system.js"],(function(t){"use strict";var n,o,e,i,r,u,s,a,c,f,d,l,h,v,w;return{setters:[function(t){n=t.r;o=t.c;e=t.h;i=t.H},function(t){r=t.D;u=t.f;s=t.E;a=t.e;c=t.a},function(t){f=t.z;d=t.b;l=t.d},function(t){h=t.h;v=t.a;w=t.l},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,o,e;return __generator(this,(function(i){switch(i.label){case 0:return[4,h("/api/zonos-elements/zonos-settings")];case 1:t=i.sent(),n=t.errors,o=t.json,e=t.zonosMode;if(n.length){v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:n,json:null,zonosMode:e}]}return[2,{errors:[],json:o,zonosMode:e}]}}))}))};var b=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!r(t.placeOrderButtonSelector)){v('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}b()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var e=document.createElement("zonos-hello");n.appendChild(e);return true}return false};var y=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};var z=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var e=".zonos--hello-mobile-wrapper";var i=document.querySelector(e);if(i){return e}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return e};var O=function(t){return __awaiter(m,void 0,void 0,(function(){var n,o,e,i,u;return __generator(this,(function(s){if(window.Zonos.isLegacyCheckout){w("Hello is disabled when isLegacyCheckout","info");return[2]}n=t.anchorElementSelector;o=n;if(!t.anchorElementSelector&&t.desktopLocation){e=z({position:"bottom-right"});o=e}if(!o||!r(o)){v('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}w("Hello init complete");i=g(o);if(!i){u=new MutationObserver((function(){var t=g(o);if(t){u.disconnect()}}));u.observe(document.body,{childList:true,subtree:true});setTimeout((function(){g(o)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){w("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=z({position:y(t.notFoundElementFallback)});g(n)}}),3e3)}return[2]}))}))};var j=":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{visibility:hidden;opacity:0;height:0}";var I=j;var k=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=o(this,"paypalInitEvent",7);this.stripeInitEvent=o(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){w("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}u.stripe=t;void p(f.checkoutSettings);w("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,e,i,r,u,s,a;return __generator(this,(function(c){switch(c.label){case 0:e=t||l();if(e==="Inter"){if(!t){return[2]}w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}i=new URLSearchParams;i.set("family",e);return[4,h("/api/zonos-elements/get-font-detail?".concat(i.toString()))];case 1:r=c.sent(),u=r.errors,s=r.json;if(u.length>0){w("Failed to load font ".concat(e),"warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:"Inter"});return[2]}a=s===null||s===void 0?void 0:s.fontUrl;if(a){(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,a)}if(!t){return[2]}w("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void O(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,e,i,r,u,a,c;var l=this;return __generator(this,(function(h){switch(h.label){case 0:return[4,_()];case 1:o=h.sent(),e=o.errors,i=o.json,r=o.zonosMode;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){w("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();u=function(){var t,n,o;if(window.Zonos.isLegacyCheckout){return((t=i===null||i===void 0?void 0:i.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=l.config.appearance)===null||n===void 0?void 0:n.logoUrl)}return(o=l.config.appearance)===null||o===void 0?void 0:o.logoUrl};a=Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:u()}),checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:undefined}):undefined});d({overrideSettings:a,zonosSettings:i});f.zonosMode=r;void this.setupGoogleFont();if(f.helloSettings.visibilityStatus==="DISABLED"){w("=== Hello is disabled by store owner ===","warn")}if(f.helloSettings&&f.helloSettings.visibilityStatus==="ENABLED"){w("Initializing hello");void O(f.helloSettings)}return[4,s()];case 2:h.sent();c=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!c||!this.stripeInitEvent){w("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");w("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){w("=== Checkout is disabled by store owner ===","warn");w("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:c.token});return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(o){n=document.querySelector("zonos-notification");if(!n){w("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.checkoutSessionId=null;u.clientSecret=null;return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){w("Override country code to ".concat(t));void c(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return e(i,{key:"816d389c90fab1125a041db4b125557afa5e9372",class:"zonos--elements"})};return t}());k.style=I}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,n,o,e){function i(t){return t instanceof o?t:new o((function(n){n(t)}))}return new(o||(o=Promise))((function(o,r){function u(t){try{a(e.next(t))}catch(t){r(t)}}function s(t){try{a(e["throw"](t))}catch(t){r(t)}}function a(t){t.done?o(t.value):i(t.value).then(u,s)}a((e=e.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},e,i,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(e)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(o=0)),o)try{if(e=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;i=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t];i=0}finally{e=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-4caffd96.system.js","./p-f3b0a097.system.js","./p-32912caf.system.js","./p-18e5b741.system.js","./p-12546668.system.js","./p-c015be06.system.js"],(function(t){"use strict";var n,o,e,i,r,u,s,a,c,f,d,l,h,v,w;return{setters:[function(t){n=t.r;o=t.c;e=t.h;i=t.H},function(t){r=t.D;u=t.f;s=t.E;a=t.e;c=t.a},function(t){f=t.z;d=t.b;l=t.d},function(t){h=t.h;v=t.b;w=t.l},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,o,e;return __generator(this,(function(i){switch(i.label){case 0:return[4,h("/api/zonos-elements/zonos-settings")];case 1:t=i.sent(),n=t.errors,o=t.json,e=t.zonosMode;if(n.length){v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:n,json:null,zonosMode:e}]}return[2,{errors:[],json:o,zonosMode:e}]}}))}))};var b=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var p=function(t){if(!t.placeOrderButtonSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!r(t.placeOrderButtonSelector)){v('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}b()};var g=function(t){var n=document.querySelector(t);var o=document.querySelector("zonos-hello");if(!o&&n){var e=document.createElement("zonos-hello");n.appendChild(e);return true}return false};var y=function(t){switch(t){case"BOTTOM_RIGHT":return"bottom-right";case"BOTTOM_LEFT":return"bottom-left";case"TOP_LEFT":return"top-left";case"TOP_RIGHT":return"top-right";default:return"bottom-right"}};var z=function(t){var n=t.position,o=n===void 0?"bottom-right":n;var e=".zonos--hello-mobile-wrapper";var i=document.querySelector(e);if(i){return e}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(o==="top-right"){r.style.top="72px";r.style.right="24px"}if(o==="top-left"){r.style.top="72px";r.style.left="24px"}if(o==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(o==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return e};var O=function(t){return __awaiter(m,void 0,void 0,(function(){var n,o,e,i,u;return __generator(this,(function(s){if(window.Zonos.isLegacyCheckout){w("Hello is disabled when isLegacyCheckout","info");return[2]}n=t.anchorElementSelector;o=n;if(!t.anchorElementSelector&&t.desktopLocation){e=z({position:"bottom-right"});o=e}if(!o||!r(o)){v('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}w("Hello init complete");i=g(o);if(!i){u=new MutationObserver((function(){var t=g(o);if(t){u.disconnect()}}));u.observe(document.body,{childList:true,subtree:true});setTimeout((function(){g(o)}),1e3);setTimeout((function(){if(t.notFoundElementFallback){w("Hello anchor selector ".concat(t.anchorElementSelector," not found after 3 seconds, falling back to 'notFoundElementFallback': ").concat(t.notFoundElementFallback),"info");var n=z({position:y(t.notFoundElementFallback)});g(n)}}),3e3)}return[2]}))}))};var j=":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{visibility:hidden;opacity:0;height:0}";var I=j;var k=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=o(this,"paypalInitEvent",7);this.stripeInitEvent=o(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){w("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}u.stripe=t;void p(f.checkoutSettings);w("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,o,e,i,r,u,s,a;return __generator(this,(function(c){switch(c.label){case 0:e=t||l();if(e==="Inter"){if(!t){return[2]}w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}i=new URLSearchParams;i.set("family",e);return[4,h("/api/zonos-elements/get-font-detail?".concat(i.toString()))];case 1:r=c.sent(),u=r.errors,s=r.json;if(u.length>0){w("Failed to load font ".concat(e),"warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:"Inter"});return[2]}a=s===null||s===void 0?void 0:s.fontUrl;if(a){(o=(n=window.Zonos).injectSupportGoogleFont)===null||o===void 0?void 0:o.call(n,a)}if(!t){return[2]}w("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void O(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,o,e,i,r,u,a,c;var l=this;return __generator(this,(function(h){switch(h.label){case 0:return[4,_()];case 1:o=h.sent(),e=o.errors,i=o.json,r=o.zonosMode;if(((t=e[0])===null||t===void 0?void 0:t.type.toString())==="403"){w("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();u=function(){var t,n,o;if(window.Zonos.isLegacyCheckout){return((t=i===null||i===void 0?void 0:i.appearanceSettings)===null||t===void 0?void 0:t.logoUrl)||((n=l.config.appearance)===null||n===void 0?void 0:n.logoUrl)}return(o=l.config.appearance)===null||o===void 0?void 0:o.logoUrl};a=Object.assign(Object.assign({},this.config),{appearance:Object.assign(Object.assign({},this.config.appearance),{logoUrl:u()}),checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:undefined}):undefined});d({overrideSettings:a,zonosSettings:i});f.zonosMode=r;void this.setupGoogleFont();if(f.helloSettings.visibilityStatus==="DISABLED"){w("=== Hello is disabled by store owner ===","warn")}if(f.helloSettings&&f.helloSettings.visibilityStatus==="ENABLED"){w("Initializing hello");void O(f.helloSettings)}return[4,s()];case 2:h.sent();c=((n=i===null||i===void 0?void 0:i.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!c||!this.stripeInitEvent){w("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");w("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){w("=== Checkout is disabled by store owner ===","warn");w("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:c.token});return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(o){n=document.querySelector("zonos-notification");if(!n){w("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.checkoutSessionId=null;u.clientSecret="";return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){w("Override country code to ".concat(t));void c(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return e(i,{key:"ab190aefdb7b90e03ec8f4f2da73a05c3416c776",class:"zonos--elements"})};return t}());k.style=I}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{a(r.next(n))}catch(n){i(n)}}function s(n){try{a(r["throw"](n))}catch(n){i(n)}}function a(n){n.done?t(n.value):o(n.value).then(u,s)}a((r=r.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return a([n,e])}}function a(s){if(r)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(t=0)),t)try{if(r=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;o=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=e.call(n,t)}catch(n){s=[6,n];o=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-18e5b741.system.js","./p-b3882a73.system.js","./p-12a6b7bd.system.js"],(function(n){"use strict";var e,t,r,o,i,u,s;return{setters:[function(n){e=n.g;t=n.a;r=n.l;o=n.h;i=n.b},function(e){u=e.s;s=e.c;var t={};t.checkoutHiddenBtnSelector=e.c;t.domesticRedirectedBtnSelector=e.d;n(t)},function(e){var t={};t.countryRequireTaxId=e.c;t.shipToTaxIdLabels=e.s;n(t)}],execute:function(){var a=this;var c=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var r=["qa.js.zonos.com"];var o=new URL(e).origin;var i=t.some((function(n){return o.includes(n)}));var u=r.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var d=["jsdelivr","cdnjs","unpkg","vercel"];var l="jsdelivr";var f=function(n){var e=d.indexOf(n);var t=d[e+1];return t||null};var v=function(){return __awaiter(a,void 0,void 0,(function(){var n,u,s,a,c,d;return __generator(this,(function(l){switch(l.label){case 0:n=e();u=t();if(!n&&!u||!window.Zonos.zonosApiKey){return[2,null]}r("[ZONOS - loadZonos] Attempt test public credential","info");if(!!window.Zonos.zonosApiKey.includes("credential_test")){r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info");return[2,null]}return[4,o("/api/get-test-public-credential")];case 1:s=l.sent(),a=s.errors,c=s.json;if(a.length||!c){i("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",a);return[2,null]}d=c.publicCredential;if(!d){i("[ZONOS - loadZonos] No test public key credential. Keep using production key");return[2,null]}r("[ZONOS - loadZonos] Retrieve new test public token ".concat(d),"info");return[2,d]}}))}))};var m=function(n){if(!n){return null}var e=new URL(n).searchParams;var t=e.get("zonosQaUrl");if(!t){return null}var r=/[^a-zA-Z0-9-_]+/.test(t);if(!!r){return null}return t};var w=function(){var n=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||n){return null}var e=m(window.location.href);var t="https://v1.3.144.js.zonos.com";if(!e&&(t.includes("test.")||t.includes("test-"))){return t}if(!e&&["dev.demo.elements.zonos.com"].includes(window.location.hostname)){return"https://dev.elements.zonos.com"}if(!e){return null}if(e==="dev-elements"){return"https://dev.elements.zonos.com"}var o="preview.js.zonos.com";var i="https://".concat(e,".").concat(o);r("[ZONOS-WARNING] using '".concat(i,"' for loading elements script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var t="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",t);window.location.reload();return null}));return i};var p="https://js.stripe.com/v3";var h=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var y="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var z=function(){var n=document.querySelectorAll('script[src^="'.concat(p,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(!h.test(t.src)){continue}return t}return null};var g=null;var j=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(p).concat(e);var r=document.head||document.body;if(!r){i("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}r.appendChild(t);return t};var S=function(n){if(g!==null){return g}g=new Promise((function(e,t){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(y)}if(window.Stripe){e(window.Stripe);return}try{var r=z();if(r&&n){console.warn(y)}else if(!r){r=j(n)}r===null||r===void 0?void 0:r.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{t(new Error("Stripe.js not available"))}}));r===null||r===void 0?void 0:r.addEventListener("error",(function(){t(new Error("Failed to load Stripe.js"))}))}catch(n){t(n);return}}));return g};var b=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var k=function(n,e,t){if(n===null){return null}var r=n.apply(undefined,e);b(r,t);return r};var O=Promise.resolve().then((function(){return S(null)}));var N=false;O.catch((function(n){if(!N){console.warn(n)}}));var Z=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(a,void 0,void 0,(function(){var e;return __generator(this,(function(t){N=true;e=Date.now();return[2,O.then((function(t){return k(t,n,e)}))]}))}))};var _="tempCartUUID";var R=function(){var n=new URLSearchParams(window.location.search);var e=n.get(_);return e};var U;var I=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=c({loadScriptSrc:n===null||n===void 0?void 0:n.src}),t=e.currentLoadScriptUrl,r=e.isWhiteListed;if(r){return t}return null}();var L="https://v1.3.144.js.zonos.com";var F=I||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.144";var A="https://unpkg.com/@zonos/elements@1.3.144";var E="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.144";var T="https://fonts.googleapis.com";var P=/^https:\/\/fonts\.googleapis\.com/;var D=function(){function n(){}return n}();n("Zonos",D);U=D;D.doneInit=false;D.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);D.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);D._paypalMockResponse=null;D.isBigCommerce=false;D.releaseDate="1735934720716";D.isLegacyCheckout=false;D.domain=typeof window!=="undefined"?window.location!=window.parent.location&&document.referrer||document.location.hostname:"";D.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");D.isNpm=true;D.zonosQaUrl=null;D.zonosQaUrlApi=null;D.version="v".concat("1.3.144");D.modeAlerted=false;D.cartData=null;D.paypal=null;D.getCurrentTimestamp=function(){return(new Date).getTime()};D.zonosController=null;D.init=function(n){return __awaiter(a,void 0,void 0,(function(){var e,t,o,a,c,d,l,f,m,p,h,y,z,g,j;return __generator(this,(function(S){switch(S.label){case 0:e=n.appearance,t=n.checkoutSettings,o=n.currencyConverter,a=n.helloSettings,c=n.onCountryChange,d=n.overrideCurrencyFormat,l=n.storeId,f=n.zonosApiKey;U.cartId=R();if(U.doneInit){return[2]}r("====== ZONOS DEBUG MODE: on (".concat(U.version,") ======"));U.zonosApiKey=f;U.storeId=l;if(!U.isNpm)return[3,4];r("====== ZONOS LOADING FROM NPM ======");m=w();if(m&&!window.isZonosPreview){r('====== RE-INJECT "zonos.js" FROM PRVIEW: '.concat(m," ======"),"info");p=document.createElement("script");p.src="".concat(m,"/dist/scripts/zonos.js");document.head.appendChild(p);p.addEventListener("load",(function(){window.Zonos.isNpm=U.isNpm;window.Zonos.isBigCommerce=U.isBigCommerce;window.Zonos.isLegacyCheckout=U.isLegacyCheckout;void window.Zonos.init(n)}));p.addEventListener("error",(function(){alert('[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: '.concat(m))}));window.isZonosPreview=true;return[2]}if(!f&&!U.cartId){i("Zonos API key is required unless `tempCartUUID` is provided in url query params.");return[2]}if(!(!U.cartData&&U.cartId))return[3,2];r("Initialize cart data");return[4,u(U.cartId)];case 1:h=S.sent();if(!h){i("Failed to get cart data");return[2]}U.cartData=h.cartData;U.zonosApiKey=h.zonosApiKey;S.label=2;case 2:return[4,v()];case 3:y=S.sent();if(y){U.zonosApiKey=y}S.label=4;case 4:z=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");g=U.cartId&&U.cartData||!!z;if(g){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");j=document.createElement("button");j.style.display="none";j.id="".concat(s);document.body.appendChild(j)}r("init zonos");U.injectCustomScriptForHostedCheckout();U.injectZonosCdn();U.injectZonosCss();U.injectFonts();U.injectController({config:{appearance:e,checkoutSettings:t,currencyConverter:o,helloSettings:a,onCountryChange:c,overrideCurrencyFormat:d}});U.doneInit=true;return[2]}}))}))};D.injectCustomScriptForHostedCheckout=function(){var n=U.cartData;var e=(n===null||n===void 0?void 0:n.metadata)||[];var t=e.find((function(n){return n.key==="customHeaderScript"}));var o=e.find((function(n){return n.key==="customFooterScript"}));if(!window.Zonos.isLegacyCheckout||!t&&!o){r("Skip injecting custom script for hosted checkout","info",{footerScript:o,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout});return}if(t){r("Injecting custom header script");var i=document.createElement("script");i.textContent=t.value;document.head.appendChild(i)}if(o){r("Injecting custom footer script");var i=document.createElement("script");i.textContent=o.value;document.body.appendChild(i)}};D.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};D.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};D.showNotification=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.showNotification(n))};D.updateOrganizationName=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};D.disablePlaceOrderButtons=function(n){var e=n.autoEnable,t=e===void 0?true:e,r=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=r.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var a=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",a)}else{n.removeAttribute("disabled");n.removeEventListener("click",a)}}));if(t&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",a)}))}),5e3)}}};D.injectController=function(n){var e=n.config;var t;if(document.querySelector("zonos-controller")){return}if((t=e.checkoutSettings)===null||t===void 0?void 0:t.placeOrderButtonSelector){var o=e.checkoutSettings.placeOrderButtonSelector;U.disablePlaceOrderButtons({config:e,disable:true,placeOrderButtonSelector:o});var u=new MutationObserver((function(){U.disablePlaceOrderButtons({config:e,disable:true,placeOrderButtonSelector:o})}));u.observe(document.body,{childList:true,subtree:true})}var s=document.createElement("zonos-controller");s.config=e;s.zonosApiKey=U.zonosApiKey||"";s.addEventListener("stripeInitEvent",(function(n){return __awaiter(a,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:e=n.detail;r("loading Stripe");return[4,Z(e.publishableKey)];case 1:t=o.sent();if(!t){i("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=t;void s.initCheckoutElement(t);return[2]}}))}))}));document.body.appendChild(s);U.zonosController=s;r("Zonos controller injected!")};D.injectScript=function(n){var e=n.cdnType,t=n.isModule,o=n.theRestUrl;var u=U.getZonosUrl(e);var s="".concat(u,"/").concat(o);var a=function(){var n=document.querySelector('script[src="'.concat(s,'"]'));return!!n};if(a()){r('Zonos script "'.concat(s,'" already exists in the document'),"warn");return}var c=document.head||document.body;var d=document.createElement("script");if(!!t){d.type="module"}else{d.noModule=true}d.src=s;d.crossOrigin="anonymous";d.onerror=function(){i("Failed to load ".concat(d.src));var n=f(e);if(!n){return}U.injectScript({cdnType:n,isModule:t,theRestUrl:o})};c.appendChild(d)};D.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return F;case"unpkg":return A;case"cdnjs":return E;case"vercel":return L}};if(U.isNpm){var t=w();return t||e()}return e()};D.injectZonosCdn=function(){U.injectScript({cdnType:l,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});U.injectScript({cdnType:l,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});r("Zonos cdn script injected!")};D.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var r=U.getZonosUrl(e);var o=document.head||document.body;var u=document.createElement("link");u.rel="preconnect";u.href="".concat(L,"/");o.appendChild(u);var s=document.createElement("link");s.rel="stylesheet";s.href="".concat(r,"/").concat(t);s.onerror=function(){i("Failed to load ".concat(s.href));var n=f(e);if(!n){return}U.injectStylesheet({cdnType:n,theRestUrl:t})};o.appendChild(s)};D.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){r("Zonos style links already injected","warn");return}U.injectStylesheet({cdnType:l,theRestUrl:"dist/zonos-elements/zonos-elements.css"});r("Zonos style css injected!")};D.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(T,'"]'));for(var e=0;e<n.length;e++){var t=n[e];if(!t){continue}if(P.test(t.href)){continue}return t}return null};if(n()){r("Inter font already injected","warn");return}var e=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=T;e.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(T,"/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");e.appendChild(o);r("Zonos font injected!")};D.setupGoogleFont=function(n){var e;void((e=U.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};D.injectSupportGoogleFont=function(n){var e;r("[FONT] injecting ".concat(n));var t=(e=n.match(/family=(.*?):/))===null||e===void 0?void 0:e[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(T,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=T;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){r("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);r("[FONT] ".concat(t," font injected!"))}}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=(t,e)=>new CustomEvent(t,{detail:e});export{t as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-4caffd96.system.js","./p-32912caf.system.js","./p-23e7c655.system.js"],(function(o){"use strict";var e,s,n,r,t;return{setters:[function(o){e=o.r;s=o.h;n=o.H},function(o){r=o.d},function(o){t=o.c}],execute:function(){var a=':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{border-radius:var(--zonos-elements-radius-10);padding:16px;background:var(--zonos-elements-gray-100)}:host .zonos--container{display:grid;-ms-flex-align:center;align-items:center;grid-template-areas:"icon header" ". content";grid-template-columns:32px auto 0}:host .zonos--icon-wrapper{grid-area:icon;display:-ms-flexbox;display:flex;justify-self:start}:host .zonos--header-wrapper{margin-top:0px;grid-area:header}:host .zonos--content-wrapper{grid-area:content;margin-top:4px}:host(.info){background-color:var(--zonos-elements-blue-100);border:1px solid var(--zonos-elements-blue-200)}:host(.success){background-color:var(--zonos-elements-green-100);border:1px solid var(--zonos-elements-green-200)}:host(.error){background-color:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host(.warning){background-color:var(--zonos-elements-orange-100);border:1px solid var(--zonos-elements-orange-200)}';var l=a;var i=o("zonos_banner",function(){function o(o){var s=this;e(this,o);this.handleSlotChange=function(){s.hasContent=true};this.bannerTitle=undefined;this.intent=undefined;this.hasContent=false}o.prototype.render=function(){var o=this;var e=function(e){var n=e.color;var r="var(--zonos-elements-".concat(n,"-800)");var a="var(--zonos-elements-".concat(n,"-300)");var l=[o.bannerTitle,s("slot",{onSlotchange:o.handleSlotChange})].filter(Boolean),i=l[0],c=l[1];var d=n==="gray"?"gray-1000":"".concat(n,"-800");return s("div",{class:t(["zonos--container"])},s("div",{class:"zonos--icon-wrapper"},s("svg",{color:r,fill:"none",height:"20",viewBox:"0 0 24 24",width:"20",xmlns:"https://www.w3.org/2000/svg"},s("path",{"clip-rule":"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z","data-is-secondary-color":"true",fill:a,"fill-rule":"evenodd"}),s("path",{"clip-rule":"evenodd",d:"M12 6.99a1 1 0 0 1 1 1V8a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1ZM12 11a1 1 0 0 1 1 1v4a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1Z",fill:"currentColor","fill-rule":"evenodd"}))),s("div",{class:"zonos--header-wrapper"},s("zonos-text",{textColor:d,type:"label",weight:600},i)),c&&s("div",{class:"zonos--content-wrapper"},s("zonos-text",{textColor:d},c)))};var a=t(["zonos--elements zonos--banner",this.intent]);var l=r();switch(this.intent){case"error":return s(n,{class:a,style:{"--zonos--font-family":l}},e({color:"red"}));case"info":return s(n,{class:a,style:{"--zonos--font-family":l}},e({color:"blue"}));case"success":return s(n,{class:a,style:{"--zonos--font-family":l}},e({color:"green"}));case"warning":return s(n,{class:a,style:{"--zonos--font-family":l}},e({color:"orange"}));default:return s(n,{class:a,style:{"--zonos--font-family":l}},e({color:"gray"}))}};return o}());i.style=l}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t,H as s}from"./p-
|
|
1
|
+
import{r as o,h as t,H as s}from"./p-ab68ad11.js";import{c as e}from"./p-b4b7f705.js";const a=class{constructor(t){o(this,t),this.label="",this.subtitle="",this.showTooltip=!1}render(){return t(s,{key:"fa16c20a254958721bcc44dbe96f6588545e86f0",class:"zonos--elements"},t("div",{key:"0e57607df02b12d5df9fb84b64c8345b40b2e823",class:"zonos--tooltip",onMouseEnter:()=>this.showTooltip=!0,onMouseLeave:()=>this.showTooltip=!1},t("slot",{key:"9faf457a730046b789a5b822fb6ab89d88970d59"}),t("div",{key:"f85dbf49e172f9a1c1b57443b1ea22d819b4099c",class:e([this.showTooltip&&"zonos--show-tooltip","zonos--tooltip-content"])},t("zonos-text",{key:"6e90bfe3f346cbe5d49aab4e03c868b3138aeca7",size:"s",textColor:"gray-0",type:"boldLabel"},this.label),t("zonos-text",{key:"1c10f75f13ae427737fcf4ece41b9f7ba13fb76d",size:"xs",textColor:"gray-0"},this.subtitle))))}};a.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--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1000);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";export{a as zonos_tooltip}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./p-4b685549.js";var e={exports:{}};e.exports=function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,r=/\s+$/;function a(n,i){if(i=i||{},(n=n||"")instanceof a)return n;if(!(this instanceof a))return new a(n,i);var f=function(a){var n={r:0,g:0,b:0},i=1,f=null,h=null,s=null,o=!1,u=!1;return"string"==typeof a&&(a=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var a,n=!1;if(y[t])t=y[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(a=$.rgb.exec(t))?{r:a[1],g:a[2],b:a[3]}:(a=$.rgba.exec(t))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=$.hsl.exec(t))?{h:a[1],s:a[2],l:a[3]}:(a=$.hsla.exec(t))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=$.hsv.exec(t))?{h:a[1],s:a[2],v:a[3]}:(a=$.hsva.exec(t))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=$.hex8.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),a:E(a[4]),format:n?"name":"hex8"}:(a=$.hex6.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:n?"name":"hex"}:(a=$.hex4.exec(t))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),a:E(a[4]+""+a[4]),format:n?"name":"hex8"}:!!(a=$.hex3.exec(t))&&{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:n?"name":"hex"}}(a)),"object"==t(a)&&(j(a.r)&&j(a.g)&&j(a.b)?(l=a.r,c=a.g,d=a.b,n={r:255*w(l,255),g:255*w(c,255),b:255*w(d,255)},o=!0,u="%"===String(a.r).substr(-1)?"prgb":"rgb"):j(a.h)&&j(a.s)&&j(a.v)?(f=R(a.s),h=R(a.v),n=function(t,e,r){t=6*w(t,360),e=w(e,100),r=w(r,100);var a=Math.floor(t),n=t-a,i=r*(1-e),f=r*(1-n*e),h=r*(1-(1-n)*e),s=a%6;return{r:255*[r,f,i,i,h,r][s],g:255*[h,r,r,f,i,i][s],b:255*[i,i,h,r,r,f][s]}}(a.h,f,h),o=!0,u="hsv"):j(a.h)&&j(a.s)&&j(a.l)&&(f=R(a.s),s=R(a.l),n=function(t,e,r){var a,n,i;function f(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=w(t,360),e=w(e,100),r=w(r,100),0===e)a=n=i=r;else{var h=r<.5?r*(1+e):r+e-r*e,s=2*r-h;a=f(s,h,t+1/3),n=f(s,h,t),i=f(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(a.h,f,s),o=!0,u="hsl"),a.hasOwnProperty("a")&&(i=a.a)),i=A(i),{ok:o,format:a.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,c,d}(n);this._originalInput=n,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||f.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}function n(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=(i+f)/2;if(i==f)a=n=0;else{var s=i-f;switch(n=h>.5?s/(2-i-f):s/(i+f),i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,l:h}}function i(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=i,s=i-f;if(n=0===i?0:s/i,i==f)a=0;else{switch(i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,v:h}}function f(t,e,r,a){var n=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))];return a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function h(t,e,r,a){return[S(q(a)),S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))].join("")}function s(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s-=e/100,r.s=x(r.s),a(r)}function o(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s+=e/100,r.s=x(r.s),a(r)}function u(t){return a(t).desaturate(100)}function l(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l+=e/100,r.l=x(r.l),a(r)}function c(t,e){e=0===e?0:e||10;var r=a(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),a(r)}function d(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l-=e/100,r.l=x(r.l),a(r)}function g(t,e){var r=a(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,a(r)}function b(t){var e=a(t).toHsl();return e.h=(e.h+180)%360,a(e)}function m(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=a(t).toHsl(),n=[a(t)],i=360/e,f=1;f<e;f++)n.push(a({h:(r.h+f*i)%360,s:r.s,l:r.l}));return n}function v(t){var e=a(t).toHsl(),r=e.h;return[a(t),a({h:(r+72)%360,s:e.s,l:e.l}),a({h:(r+216)%360,s:e.s,l:e.l})]}function M(t,e,r){e=e||6,r=r||30;var n=a(t).toHsl(),i=360/r,f=[a(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,f.push(a(n));return f}function p(t,e){e=e||6;for(var r=a(t).toHsv(),n=r.h,i=r.s,f=r.v,h=[],s=1/e;e--;)h.push(a({h:n,s:i,v:f})),f=(f+s)%1;return h}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,a=this.toRgb();return e=a.g/255,r=a.b/255,.2126*((t=a.r/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+a+"%)":"hsva("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,a,n){var i=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16)),S(q(a))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*w(this._r,255))+"%",g:Math.round(100*w(this._g,255))+"%",b:Math.round(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%)":"rgba("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=a(t);r="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1;return e||!(this._a<1&&this._a>=0)||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return a(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(o,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(p,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},a.fromRatio=function(e,r){if("object"==t(e)){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:R(e[i]));e=n}return a(e,r)},a.equals=function(t,e){return!(!t||!e)&&a(t).toRgbString()==a(e).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(t,e,r){r=0===r?0:r||50;var n=a(t).toRgb(),i=a(e).toRgb(),f=r/100;return a({r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a})},a.readability=function(t,e){var r=a(t),n=a(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},a.isReadable=function(t,e,r){var n,i,f,h,s,o=a.readability(t,e);switch(i=!1,(f=r,"AA"!==(h=((f=f||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==h&&(h="AA"),"small"!==(s=(f.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:h,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},a.mostReadable=function(t,e,r){var n,i,f,h,s=null,o=0;i=(r=r||{}).includeFallbackColors,f=r.level,h=r.size;for(var u=0;u<e.length;u++)(n=a.readability(t,e[u]))>o&&(o=n,s=a(e[u]));return a.isReadable(t,s,{level:f,size:h})||!i?s:(r.includeFallbackColors=!1,a.mostReadable(t,["#fff","#000"],r))};var y=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(y);function A(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function w(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function x(t){return Math.min(1,Math.max(0,t))}function F(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function R(t){return t<=1&&(t=100*t+"%"),t}function q(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return F(t)/255}var H,N,I,$=(N="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",I="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(t){return!!$.CSS_UNIT.exec(t)}return a}();const r=e.exports,a=t=>r(t).isDark();export{a as i,r as t}
|
|
1
|
+
import{a as t}from"./p-b0616716.js";var e={exports:{}};e.exports=function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e=/^\s+/,r=/\s+$/;function a(n,i){if(i=i||{},(n=n||"")instanceof a)return n;if(!(this instanceof a))return new a(n,i);var f=function(a){var n={r:0,g:0,b:0},i=1,f=null,h=null,s=null,o=!1,u=!1;return"string"==typeof a&&(a=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var a,n=!1;if(y[t])t=y[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(a=$.rgb.exec(t))?{r:a[1],g:a[2],b:a[3]}:(a=$.rgba.exec(t))?{r:a[1],g:a[2],b:a[3],a:a[4]}:(a=$.hsl.exec(t))?{h:a[1],s:a[2],l:a[3]}:(a=$.hsla.exec(t))?{h:a[1],s:a[2],l:a[3],a:a[4]}:(a=$.hsv.exec(t))?{h:a[1],s:a[2],v:a[3]}:(a=$.hsva.exec(t))?{h:a[1],s:a[2],v:a[3],a:a[4]}:(a=$.hex8.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),a:E(a[4]),format:n?"name":"hex8"}:(a=$.hex6.exec(t))?{r:F(a[1]),g:F(a[2]),b:F(a[3]),format:n?"name":"hex"}:(a=$.hex4.exec(t))?{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),a:E(a[4]+""+a[4]),format:n?"name":"hex8"}:!!(a=$.hex3.exec(t))&&{r:F(a[1]+""+a[1]),g:F(a[2]+""+a[2]),b:F(a[3]+""+a[3]),format:n?"name":"hex"}}(a)),"object"==t(a)&&(j(a.r)&&j(a.g)&&j(a.b)?(l=a.r,c=a.g,d=a.b,n={r:255*w(l,255),g:255*w(c,255),b:255*w(d,255)},o=!0,u="%"===String(a.r).substr(-1)?"prgb":"rgb"):j(a.h)&&j(a.s)&&j(a.v)?(f=R(a.s),h=R(a.v),n=function(t,e,r){t=6*w(t,360),e=w(e,100),r=w(r,100);var a=Math.floor(t),n=t-a,i=r*(1-e),f=r*(1-n*e),h=r*(1-(1-n)*e),s=a%6;return{r:255*[r,f,i,i,h,r][s],g:255*[h,r,r,f,i,i][s],b:255*[i,i,h,r,r,f][s]}}(a.h,f,h),o=!0,u="hsv"):j(a.h)&&j(a.s)&&j(a.l)&&(f=R(a.s),s=R(a.l),n=function(t,e,r){var a,n,i;function f(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=w(t,360),e=w(e,100),r=w(r,100),0===e)a=n=i=r;else{var h=r<.5?r*(1+e):r+e-r*e,s=2*r-h;a=f(s,h,t+1/3),n=f(s,h,t),i=f(s,h,t-1/3)}return{r:255*a,g:255*n,b:255*i}}(a.h,f,s),o=!0,u="hsl"),a.hasOwnProperty("a")&&(i=a.a)),i=A(i),{ok:o,format:a.format||u,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,c,d}(n);this._originalInput=n,this._r=f.r,this._g=f.g,this._b=f.b,this._a=f.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||f.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=f.ok}function n(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=(i+f)/2;if(i==f)a=n=0;else{var s=i-f;switch(n=h>.5?s/(2-i-f):s/(i+f),i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,l:h}}function i(t,e,r){t=w(t,255),e=w(e,255),r=w(r,255);var a,n,i=Math.max(t,e,r),f=Math.min(t,e,r),h=i,s=i-f;if(n=0===i?0:s/i,i==f)a=0;else{switch(i){case t:a=(e-r)/s+(e<r?6:0);break;case e:a=(r-t)/s+2;break;case r:a=(t-e)/s+4}a/=6}return{h:a,s:n,v:h}}function f(t,e,r,a){var n=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))];return a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function h(t,e,r,a){return[S(q(a)),S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16))].join("")}function s(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s-=e/100,r.s=x(r.s),a(r)}function o(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.s+=e/100,r.s=x(r.s),a(r)}function u(t){return a(t).desaturate(100)}function l(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l+=e/100,r.l=x(r.l),a(r)}function c(t,e){e=0===e?0:e||10;var r=a(t).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-e/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-e/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-e/100*255))),a(r)}function d(t,e){e=0===e?0:e||10;var r=a(t).toHsl();return r.l-=e/100,r.l=x(r.l),a(r)}function g(t,e){var r=a(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,a(r)}function b(t){var e=a(t).toHsl();return e.h=(e.h+180)%360,a(e)}function m(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var r=a(t).toHsl(),n=[a(t)],i=360/e,f=1;f<e;f++)n.push(a({h:(r.h+f*i)%360,s:r.s,l:r.l}));return n}function v(t){var e=a(t).toHsl(),r=e.h;return[a(t),a({h:(r+72)%360,s:e.s,l:e.l}),a({h:(r+216)%360,s:e.s,l:e.l})]}function M(t,e,r){e=e||6,r=r||30;var n=a(t).toHsl(),i=360/r,f=[a(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,f.push(a(n));return f}function p(t,e){e=e||6;for(var r=a(t).toHsv(),n=r.h,i=r.s,f=r.v,h=[],s=1/e;e--;)h.push(a({h:n,s:i,v:f})),f=(f+s)%1;return h}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,a=this.toRgb();return e=a.g/255,r=a.b/255,.2126*((t=a.r/255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+a+"%)":"hsva("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),a=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+a+"%)":"hsla("+e+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,a,n){var i=[S(Math.round(t).toString(16)),S(Math.round(e).toString(16)),S(Math.round(r).toString(16)),S(q(a))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*w(this._r,255))+"%",g:Math.round(100*w(this._g,255))+"%",b:Math.round(100*w(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%)":"rgba("+Math.round(100*w(this._r,255))+"%, "+Math.round(100*w(this._g,255))+"%, "+Math.round(100*w(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+h(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=a(t);r="#"+h(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1;return e||!(this._a<1&&this._a>=0)||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return a(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(c,arguments)},darken:function(){return this._applyModification(d,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(o,arguments)},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(p,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(m,[3])},tetrad:function(){return this._applyCombination(m,[4])}},a.fromRatio=function(e,r){if("object"==t(e)){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]="a"===i?e[i]:R(e[i]));e=n}return a(e,r)},a.equals=function(t,e){return!(!t||!e)&&a(t).toRgbString()==a(e).toRgbString()},a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},a.mix=function(t,e,r){r=0===r?0:r||50;var n=a(t).toRgb(),i=a(e).toRgb(),f=r/100;return a({r:(i.r-n.r)*f+n.r,g:(i.g-n.g)*f+n.g,b:(i.b-n.b)*f+n.b,a:(i.a-n.a)*f+n.a})},a.readability=function(t,e){var r=a(t),n=a(e);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},a.isReadable=function(t,e,r){var n,i,f,h,s,o=a.readability(t,e);switch(i=!1,(f=r,"AA"!==(h=((f=f||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==h&&(h="AA"),"small"!==(s=(f.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:h,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},a.mostReadable=function(t,e,r){var n,i,f,h,s=null,o=0;i=(r=r||{}).includeFallbackColors,f=r.level,h=r.size;for(var u=0;u<e.length;u++)(n=a.readability(t,e[u]))>o&&(o=n,s=a(e[u]));return a.isReadable(t,s,{level:f,size:h})||!i?s:(r.includeFallbackColors=!1,a.mostReadable(t,["#fff","#000"],r))};var y=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(y);function A(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function w(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function x(t){return Math.min(1,Math.max(0,t))}function F(t){return parseInt(t,16)}function S(t){return 1==t.length?"0"+t:""+t}function R(t){return t<=1&&(t=100*t+"%"),t}function q(t){return Math.round(255*parseFloat(t)).toString(16)}function E(t){return F(t)/255}var H,N,I,$=(N="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",I="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+N),rgba:new RegExp("rgba"+I),hsl:new RegExp("hsl"+N),hsla:new RegExp("hsla"+I),hsv:new RegExp("hsv"+N),hsva:new RegExp("hsva"+I),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(t){return!!$.CSS_UNIT.exec(t)}return a}();const r=e.exports,a=t=>r(t).isDark();export{a as i,r as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as s,H as t}from"./p-
|
|
1
|
+
import{r as e,h as s,H as t}from"./p-ab68ad11.js";import{d as o,z as i}from"./p-b0616716.js";import{c as n}from"./p-b4b7f705.js";import{i as a}from"./p-ae393255.js";import{s as l}from"./p-96d77739.js";const h={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}},z=class{constructor(s){e(this,s),this.textColor="gray-1000",this.size=void 0,this.type="body",this.weight=void 0,this.ready=!1}componentDidRender(){setTimeout((()=>{this.ready=!0}),100)}render(){const{size:e,tag:z,weight:r}=h.body,{size:x,tag:g,weight:m}=h[this.type],d=this.size||x||e,f=this.weight||m||r,p=g||z,b=a(this.textColor)?`var(--zonos-elements-${this.textColor})`:this.textColor;return s(t,{class:n(["zonos--elements",`zonos--text-size-${d}`,`zonos--text-weight-${f}`]),style:l({"--zonos--color":b,"--zonos--font-family":o(),"--zonos--font-size-2xl":i.appearance.fontSize2XL?`${i.appearance.fontSize2XL}px`:void 0,"--zonos--font-size-3xl":i.appearance.fontSize3XL?`${i.appearance.fontSize3XL}px`:void 0,"--zonos--font-size-base":i.appearance.fontSizeBase?`${i.appearance.fontSizeBase}px`:void 0,"--zonos--font-size-l":i.appearance.fontSizeL?`${i.appearance.fontSizeL}px`:void 0,"--zonos--font-size-s":i.appearance.fontSizeS?`${i.appearance.fontSizeS}px`:void 0,"--zonos--font-size-xl":i.appearance.fontSizeXL?`${i.appearance.fontSizeXL}px`:void 0,"--zonos--font-size-xs":i.appearance.fontSizeXS?`${i.appearance.fontSizeXS}px`:void 0})},(()=>{switch(p){case"h2":return s("h2",null,s("slot",null));case"h3":return s("h3",null,s("slot",null));case"h4":return s("h4",null,s("slot",null));case"h5":return s("h5",null,s("slot",null));default:return s("span",null,s("slot",null))}})())}};z.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{color:var(--zonos--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos--font-size-3xl, var(--zonos-elements-font-size-3xl))}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos--font-size-2xl, var(--zonos-elements-font-size-2xl))}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos--font-size-xl, var(--zonos-elements-font-size-xl))}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos--font-size-l, var(--zonos-elements-font-size-l))}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos--font-size-base, var(--zonos-elements-font-size-base))}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos--font-size-s, var(--zonos-elements-font-size-s))}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos--font-size-xs, var(--zonos-elements-font-size-xs))}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";export{z as zonos_text}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-4caffd96.system.js","./p-32912caf.system.js","./p-23e7c655.system.js","./p-c015be06.system.js","./p-c5d1217f.system.js"],(function(o){"use strict";var s,e,i,t,n,r,a,l,d;return{setters:[function(o){s=o.r;e=o.c;i=o.h;t=o.H},function(o){n=o.d;r=o.z},function(o){a=o.c},function(o){l=o.g},function(o){d=o.i}],execute:function(){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{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";var c=h;var p=o("zonos_shipping_rich_radio",function(){function o(o){var i=this;s(this,o);this.radioSelected=e(this,"radioSelected",7);this.handleRichRadioSelect=function(o){var s;(s=i.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=i.borderColor||r.appearance.colorSecondary;var s=d(o)?"var(--zonos-elements-".concat(o,")"):o;return{"--zonos--border-radius":l({overrideBorderStyle:i.borderStyle}),"--zonos--selected-border-color":s||"unset"}};this.items=undefined;this.borderColor=undefined;this.borderStyle=undefined;this.theme=undefined;this.selectedItem=null}o.prototype.render=function(){var o=this;var s;return i(t,{key:"34abb7026ed7d382870f912b5e5c5631e4f06f76",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":n()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var t=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return i("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",t&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},i("input",{checked:t,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),i("div",{class:"zonos--shipping-info"},i("div",{class:"zonos--shipping-detail"},i("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&i("div",{class:"zonos--sub-detail"},s.sublabel&&i("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&i("zonos-text",{textColor:"gray-600"},s.caption))),i("zonos-text",{type:"semiBoldLabel"},s.price)))})))};return o}());p.style=c}}}));
|