@zonos/elements 1.3.262 → 1.3.264
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-d08c87e2.js → cart-d4486651.js} +4 -4
- package/dist/cjs/{debounce-3e17b4e9.js → debounce-606d1801.js} +1 -1
- package/dist/cjs/{getBorderRadius-db55a464.js → getBorderRadius-a91911e7.js} +1 -1
- package/dist/cjs/{getContrastColor-8ed1cb48.js → getContrastColor-68058615.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-c781c336.js → hasInclusivePrice-40358cb1.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-e64f97c6.js → invoice-600fa2a4.js} +3 -3
- package/dist/cjs/{isCollectMobileTablet-9675485f.js → isCollectMobileTablet-f56566ef.js} +3 -3
- package/dist/cjs/{isContrastColor-6a17f408.js → isContrastColor-a02c4889.js} +1 -1
- package/dist/cjs/{isDarkColor-bfe6d1eb.js → isDarkColor-e317bb06.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-a7fac4b4.js → localization-06cc0379.js} +16 -2
- package/dist/cjs/{paypal-e278f405.js → paypal-52c4a4d4.js} +5 -5
- package/dist/cjs/{placeTestOrder-aefd31e8.js → placeTestOrder-7c88197a.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-a374741a.js → renderCheckoutCurrency-2ebeff09.js} +2 -2
- package/dist/cjs/{submitGtag-4241212b.js → submitGtag-07a3b09e.js} +1 -1
- package/dist/cjs/{throttle-dac93461.js → throttle-8aebac7d.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-a3776bb0.js → updateCheckoutSessionAttributes-a9a97194.js} +1 -1
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +24 -24
- package/dist/cjs/zonos-address_4.cjs.entry.js +13 -13
- package/dist/cjs/zonos-badge.cjs.entry.js +4 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-card_5.cjs.entry.js +14 -14
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +25 -23
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +8 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +217 -67
- package/dist/cjs/zonos-collapse.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +9 -9
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +27 -25
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +15 -13
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +13 -11
- package/dist/cjs/zonos-hello.cjs.entry.js +46 -14
- package/dist/cjs/zonos-input.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +11 -11
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +22 -20
- package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
- 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 +3 -3
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
- package/dist/cjs/zonos-store-credit.cjs.entry.js +6 -6
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +7 -7
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +3 -3
- package/dist/cjs/{zonosStore-1c517e55.js → zonosStore-0662b95f.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +52 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +5 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +5 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +23 -15
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +45 -10
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +5 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +4 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +10 -8
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +1 -1
- package/dist/collection/components/utils/checkout/getBigCommerceCustomerAddresses.js +99 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +15 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +1 -1
- package/dist/collection/components/utils/hello/getHelloWidgetSize.js +22 -0
- package/dist/collection/types/generated/graphql.internal.types.js +67 -1
- package/dist/esm/{cart-c490d252.js → cart-41f41429.js} +4 -4
- package/dist/esm/{debounce-8faafc9f.js → debounce-ab526ca0.js} +1 -1
- package/dist/esm/{getBorderRadius-66de1b16.js → getBorderRadius-98c64be8.js} +1 -1
- package/dist/esm/{getContrastColor-e14f95a7.js → getContrastColor-2340485f.js} +2 -2
- package/dist/esm/{hasInclusivePrice-7a0ce66a.js → hasInclusivePrice-afc0dd6e.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-3ea5715b.js → invoice-e6721745.js} +3 -3
- package/dist/esm/{isCollectMobileTablet-0dcbd45a.js → isCollectMobileTablet-d02bb448.js} +3 -3
- package/dist/esm/{isContrastColor-f9e65e70.js → isContrastColor-6bad285e.js} +1 -1
- package/dist/esm/{isDarkColor-8092a9fb.js → isDarkColor-0a8453e7.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-542dbe20.js → localization-ee06df70.js} +16 -2
- package/dist/esm/{paypal-d8804da5.js → paypal-ac74241f.js} +5 -5
- package/dist/esm/{placeTestOrder-d7001709.js → placeTestOrder-0416d327.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-75f1bba3.js → renderCheckoutCurrency-99da51f5.js} +2 -2
- package/dist/esm/{submitGtag-7f5c5bb5.js → submitGtag-ae9d5d91.js} +1 -1
- package/dist/esm/{throttle-5a66b4fd.js → throttle-882b1f47.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-8f3f932e.js → updateCheckoutSessionAttributes-da7fdd37.js} +1 -1
- package/dist/esm/zonos-address-display_8.entry.js +24 -24
- package/dist/esm/zonos-address_4.entry.js +13 -13
- package/dist/esm/zonos-badge.entry.js +4 -4
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +6 -6
- package/dist/esm/zonos-card_5.entry.js +14 -14
- package/dist/esm/zonos-cart-items_12.entry.js +25 -23
- package/dist/esm/zonos-checkbox_2.entry.js +8 -8
- package/dist/esm/zonos-checkout.entry.js +218 -68
- package/dist/esm/zonos-collapse.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +9 -9
- package/dist/esm/zonos-collect-finish_6.entry.js +27 -25
- package/dist/esm/zonos-collect.entry.js +9 -9
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +15 -13
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +13 -11
- package/dist/esm/zonos-hello.entry.js +46 -14
- package/dist/esm/zonos-input.entry.js +6 -6
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +11 -11
- package/dist/esm/zonos-invoice-finish_5.entry.js +22 -20
- package/dist/esm/zonos-invoice.entry.js +9 -9
- 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 +3 -3
- package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
- package/dist/esm/zonos-store-credit.entry.js +6 -6
- package/dist/esm/zonos-stripe-input.entry.js +7 -7
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +3 -3
- package/dist/esm/{zonosStore-f1d45eac.js → zonosStore-9662b071.js} +1 -0
- package/dist/esm-es5/{cart-c490d252.js → cart-41f41429.js} +1 -1
- package/dist/esm-es5/{debounce-8faafc9f.js → debounce-ab526ca0.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-66de1b16.js → getBorderRadius-98c64be8.js} +1 -1
- package/dist/esm-es5/{getContrastColor-e14f95a7.js → getContrastColor-2340485f.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-7a0ce66a.js → hasInclusivePrice-afc0dd6e.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-3ea5715b.js → invoice-e6721745.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-0dcbd45a.js → isCollectMobileTablet-d02bb448.js} +1 -1
- package/dist/esm-es5/{isContrastColor-f9e65e70.js → isContrastColor-6bad285e.js} +1 -1
- package/dist/esm-es5/{isDarkColor-8092a9fb.js → isDarkColor-0a8453e7.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-542dbe20.js → localization-ee06df70.js} +1 -1
- package/dist/esm-es5/{paypal-d8804da5.js → paypal-ac74241f.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-d7001709.js → placeTestOrder-0416d327.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-75f1bba3.js → renderCheckoutCurrency-99da51f5.js} +1 -1
- package/dist/esm-es5/{submitGtag-7f5c5bb5.js → submitGtag-ae9d5d91.js} +1 -1
- package/dist/esm-es5/{throttle-5a66b4fd.js → throttle-882b1f47.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-8f3f932e.js → updateCheckoutSessionAttributes-da7fdd37.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-f1d45eac.js → zonosStore-9662b071.js} +1 -1
- package/dist/scripts/index.d.ts +31 -15
- 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.d.ts +9 -0
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +8 -1
- package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +22 -11
- package/dist/types/components/utils/checkout/getBigCommerceCustomerAddresses.d.ts +26 -0
- package/dist/types/components/utils/hello/getHelloWidgetSize.d.ts +15 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +8 -7
- package/dist/types/types/generated/graphql.internal.types.d.ts +100 -20
- package/dist/types/types/generated/graphql.internal.types.ts +118 -20
- package/dist/types/types/hello/HelloConfig.d.ts +5 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-53fe581b.system.js → p-0207c91e.system.js} +1 -1
- package/dist/zonos-elements/{p-9262a57c.system.entry.js → p-0529a06b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d7a9be55.system.js → p-076ca381.system.js} +1 -1
- package/dist/zonos-elements/{p-5a79e1f4.entry.js → p-07cdff18.entry.js} +1 -1
- package/dist/zonos-elements/{p-5db00bfa.system.entry.js → p-0914b8a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-155b4425.entry.js → p-0b4ba025.entry.js} +1 -1
- package/dist/zonos-elements/{p-17476a30.system.entry.js → p-0f9a04fe.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-72adb40d.js → p-14ce8e3a.js} +1 -1
- package/dist/zonos-elements/{p-7df3e44b.system.entry.js → p-15f70aae.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1c76c38.system.entry.js → p-16948eea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-43a6e469.system.js → p-1bf9a1b9.system.js} +1 -1
- package/dist/zonos-elements/{p-e749fb81.entry.js → p-1cc651e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3020bc9.entry.js → p-1ed2827f.entry.js} +1 -1
- package/dist/zonos-elements/p-20e0c24e.entry.js +1 -0
- package/dist/zonos-elements/{p-248bdea2.system.js → p-24aae506.system.js} +1 -1
- package/dist/zonos-elements/{p-f7d24382.system.entry.js → p-2555ba6b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3deb91cb.entry.js → p-258c0551.entry.js} +1 -1
- package/dist/zonos-elements/{p-f00a56be.system.entry.js → p-274a7c0e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fb87172c.entry.js → p-283ffaad.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-aa74b61a.system.entry.js → p-2c027b67.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2fc253b3.js +1 -0
- package/dist/zonos-elements/{p-00bd7e5d.entry.js → p-32ecece3.entry.js} +1 -1
- package/dist/zonos-elements/p-349bdc03.system.entry.js +1 -0
- package/dist/zonos-elements/{p-80e7cab5.entry.js → p-34dc7755.entry.js} +1 -1
- package/dist/zonos-elements/p-367a72bc.js +1 -0
- package/dist/zonos-elements/{p-15ef7644.system.js → p-3689821f.system.js} +1 -1
- package/dist/zonos-elements/{p-a75b8ad7.js → p-37f47658.js} +1 -1
- package/dist/zonos-elements/{p-4a227683.system.entry.js → p-3a23ec5f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3bc1adb7.entry.js +1 -0
- package/dist/zonos-elements/p-41f2e301.entry.js +1 -0
- package/dist/zonos-elements/{p-b5223840.js → p-4220556e.js} +1 -1
- package/dist/zonos-elements/{p-072c5e07.system.entry.js → p-42518502.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4980facb.js +1 -0
- package/dist/zonos-elements/{p-5dd78b4b.js → p-4c89d04a.js} +1 -1
- package/dist/zonos-elements/{p-27f01d76.entry.js → p-52077d7c.entry.js} +1 -1
- package/dist/zonos-elements/p-551dd2e0.js +1 -0
- package/dist/zonos-elements/{p-b2cd18b4.system.entry.js → p-5678c044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ed827ca3.entry.js → p-59aa5785.entry.js} +1 -1
- package/dist/zonos-elements/{p-e25e0b4b.system.js → p-5e6f85f0.system.js} +1 -1
- package/dist/zonos-elements/{p-cdbb50cf.entry.js → p-665bfd4f.entry.js} +1 -1
- package/dist/zonos-elements/{p-4cee62fb.entry.js → p-66edcaa4.entry.js} +1 -1
- package/dist/zonos-elements/{p-cab6bd98.system.js → p-6a195559.system.js} +1 -1
- package/dist/zonos-elements/p-6b9ad020.entry.js +1 -0
- package/dist/zonos-elements/p-6d81901a.js +1 -0
- package/dist/zonos-elements/{p-3ff736f7.system.entry.js → p-7003d093.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-196423ad.system.js → p-721069c3.system.js} +1 -1
- package/dist/zonos-elements/{p-14f156c6.system.entry.js → p-72833da8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f2909fb8.entry.js → p-7564d199.entry.js} +1 -1
- package/dist/zonos-elements/{p-e76dc266.system.entry.js → p-79f3c227.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84c7cae6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e55bc187.entry.js → p-8571f3ce.entry.js} +1 -1
- package/dist/zonos-elements/p-86ed51fd.entry.js +1 -0
- package/dist/zonos-elements/{p-d50fef06.system.entry.js → p-88596f27.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8a01157e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9e761130.entry.js → p-8a21ed2d.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf4d2299.system.entry.js → p-90a19f4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-947f5092.js → p-90d19cb6.js} +1 -1
- package/dist/zonos-elements/{p-06ef4d79.entry.js → p-9288878f.entry.js} +1 -1
- package/dist/zonos-elements/{p-ef12af4b.entry.js → p-92a14180.entry.js} +1 -1
- package/dist/zonos-elements/{p-dee6adff.system.js → p-98c53c77.system.js} +1 -1
- package/dist/zonos-elements/{p-8d0bca3a.system.entry.js → p-9da832b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a8bb461c.js → p-9eff0691.js} +1 -1
- package/dist/zonos-elements/{p-66934a78.system.entry.js → p-9f18348f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7e7148.system.js +1 -0
- package/dist/zonos-elements/{p-e36e724b.system.entry.js → p-a2e9b2aa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a661dd45.system.entry.js → p-a5f5993f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a901d002.js +1 -0
- package/dist/zonos-elements/{p-2f924331.js → p-ab0b23f2.js} +1 -1
- package/dist/zonos-elements/{p-e673a4d9.entry.js → p-ab73cbed.entry.js} +1 -1
- package/dist/zonos-elements/p-b0526805.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f0046c48.entry.js → p-b13d56b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b7beb44.system.js → p-b32cd0c5.system.js} +1 -1
- package/dist/zonos-elements/{p-ade15fd2.entry.js → p-b4b23475.entry.js} +1 -1
- package/dist/zonos-elements/{p-0699931c.system.js → p-b65bca4b.system.js} +1 -1
- package/dist/zonos-elements/p-ba7cf5e8.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c7ecef98.system.entry.js → p-ba9e2612.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9de27162.system.entry.js → p-c0fffa75.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c52bc5ad.system.entry.js +1 -0
- package/dist/zonos-elements/p-c9a1f774.js +1 -0
- package/dist/zonos-elements/{p-a1142a95.entry.js → p-cc481c69.entry.js} +1 -1
- package/dist/zonos-elements/p-ccc4f69b.entry.js +1 -0
- package/dist/zonos-elements/{p-20263609.system.js → p-ce855245.system.js} +1 -1
- package/dist/zonos-elements/{p-4d776228.entry.js → p-d1ff24f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6922df5.js → p-d28be518.js} +1 -1
- package/dist/zonos-elements/p-d6b49830.entry.js +1 -0
- package/dist/zonos-elements/{p-5beab541.js → p-db3b101a.js} +1 -1
- package/dist/zonos-elements/{p-0ec4e307.system.js → p-db607fc3.system.js} +1 -1
- package/dist/zonos-elements/{p-a98b8b68.system.js → p-dea75665.system.js} +2 -2
- package/dist/zonos-elements/p-e3292be8.system.js +1 -0
- package/dist/zonos-elements/{p-b47fcd8c.system.entry.js → p-e3bc3917.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d983d472.entry.js → p-e5582c35.entry.js} +1 -1
- package/dist/zonos-elements/p-e5dfccd8.system.js +1 -0
- package/dist/zonos-elements/{p-7dbac3ae.system.entry.js → p-e6cc5a25.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-313b87f3.system.entry.js → p-e98e4c0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-61be7d98.system.js → p-eb99a625.system.js} +1 -1
- package/dist/zonos-elements/{p-ed9385f4.js → p-f3cfd8fa.js} +1 -1
- package/dist/zonos-elements/{p-c263f95f.entry.js → p-f546bd7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-55742c52.entry.js → p-f9c715ad.entry.js} +1 -1
- package/dist/zonos-elements/{p-50a15e3d.system.entry.js → p-fb684748.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-022ddd4a.system.entry.js +0 -1
- package/dist/zonos-elements/p-09307a03.js +0 -1
- package/dist/zonos-elements/p-1916c2b0.entry.js +0 -1
- package/dist/zonos-elements/p-34fc45e5.entry.js +0 -1
- package/dist/zonos-elements/p-56c11359.system.entry.js +0 -1
- package/dist/zonos-elements/p-7158a18b.js +0 -1
- package/dist/zonos-elements/p-721fadd5.js +0 -1
- package/dist/zonos-elements/p-7237f43b.system.entry.js +0 -1
- package/dist/zonos-elements/p-72a181b5.entry.js +0 -1
- package/dist/zonos-elements/p-75a27c68.entry.js +0 -1
- package/dist/zonos-elements/p-7c5c5318.js +0 -1
- package/dist/zonos-elements/p-7d9bbdc8.js +0 -1
- package/dist/zonos-elements/p-838e335c.entry.js +0 -1
- package/dist/zonos-elements/p-8bce79f4.system.js +0 -1
- package/dist/zonos-elements/p-944bf0e7.js +0 -1
- package/dist/zonos-elements/p-a2b3c1ef.system.entry.js +0 -1
- package/dist/zonos-elements/p-b21cf539.system.entry.js +0 -1
- package/dist/zonos-elements/p-ca411d97.entry.js +0 -1
- package/dist/zonos-elements/p-cd563d65.system.js +0 -1
- package/dist/zonos-elements/p-cdf99051.entry.js +0 -1
- package/dist/zonos-elements/p-dc4e867e.system.entry.js +0 -1
- package/dist/zonos-elements/p-e6726a50.system.js +0 -1
- package/dist/zonos-elements/p-f68ce554.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,d as e,h as s,F as t,a as n,g as i}from"./p-ce75b047.js";import{b as a,c as r,t as l,L as c,C as d,M as h,d as p,r as m,D as f}from"./p-9eff0691.js";import{s as g,c as b,a as u,b as v}from"./p-90d19cb6.js";import{t as y,s as z,l as x}from"./p-37f47658.js";import{z as w}from"./p-f3cfd8fa.js";import{h as k,s as C,g as L,i as I,a as S}from"./p-41dd1cb8.js";import{c as j}from"./p-595f5dd2.js";import{g as M}from"./p-db3b101a.js";import{l as Z,b as H}from"./p-0a377722.js";import{i as P,a as _}from"./p-1f3549c6.js";import{c as U}from"./p-b4b7f705.js";import{l as V}from"./p-97aceb11.js";import{c as D}from"./p-14ce8e3a.js";import{r as B}from"./p-2fc253b3.js";import{p as $}from"./p-551dd2e0.js";import{r as F}from"./p-1b8771bb.js";import"./p-d28be518.js";import"./p-6d81901a.js";import"./p-4c89d04a.js";const R=class{constructor(s){o(this,s),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=y("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const s=z.checkoutSessionId,t=new URLSearchParams;t.set("checkoutSessionId",s||"");const{baseUrl:n,errors:i,json:a}=await k(`/api/zonos-elements/get-order?${t.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=w.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,s;0===o&&Z("=== Start to poll for order info","info");const{baseUrl:t,order:n}=await this.pullOrder(),i=!!(null===(s=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===s?void 0:s.value),a=z.checkoutSessionId,r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;Z(`=== Polling order (${o} attemps)`,"info"),n?(Z("=== InvoiceOrder info found","info"),o>10&&C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Invoice order found after ${o} attempts`],metadata:{allLogs:H,checkoutSessionId:z.checkoutSessionId||"",orderId:n.id,storeId:w.storeId}}),this.order=n):n&&i||!(o<r)?C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Invoice order not found after ${r} attempts`],metadata:{allLogs:H,checkoutSessionId:z.checkoutSessionId||"",storeId:w.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:s,status:t}=await r({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===t||e;this.notificationType=n?"error":"success",this.notificationMessages=s||[],this.notificationTitle=y(n?"Payment failed":"You're all set!"),Z("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:s,status:t});const i=new URL(window.location.href);if(i.searchParams.delete("payment_intent_client_secret"),i.searchParams.delete("payment_intent"),i.searchParams.delete("redirect_status"),i.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",i.toString()),e&&(null==s?void 0:s.length))g({event:"zonos-checkout-payment-fail"}),C({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${t} - checkout session: ${z.checkoutSessionId}`],metadata:{allLogs:H,credentialToken:window.Zonos.zonosApiKey}});else{g({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=j("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,c(),d(),z.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),c(),d(),b(),z.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(u.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=y("Payment failed"),this.notificationMessages=[u.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,u.orderIdCreated&&(g({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),c(),d(),b(),z.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),L()&&e.searchParams.set("zonosTestMode","1");const s=new URLSearchParams(window.location.search).get("zonosQaUrl");return s&&e.searchParams.set("zonosQaUrl",s),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():u.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return s(n,{key:"0e85f53a2195cb775590ca7cf815fe5ff555a5a7",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&s("div",{key:"a72982af4d9e1ccd015486185841bdfb8100de4f",class:"zonos--finish-details"},s("div",{key:"905c39d1f8d0c4db69fe69af86b5d2fd27e6c6bc",class:"zonos--group"},s("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),s("zonos-text",{key:"4b4aac452d596888d9a2a132e4909cb96985e3e1",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&s("zonos-badge",{key:"df0281e69b04b3f2ad238cbfb4a8a142e6c08447",badgeColor:"gray"},this.confirmationId),s("zonos-text",{key:"f92416cc2024dc6e58c3886f0d8990a3753c82f4",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>s(t,null,o,s("br",null))))),this.order&&o&&s("div",{key:"cbd8a00f6ee518a62cab4edb8c29167a108710c0",class:"zonos--button-container"},s("zonos-button",{key:"bcc697820cfbab42417626c2bf1d887bee67fa5f",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},y("View receipt"))))))}static get assetsDirs(){return["assets"]}};R.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:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const T=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=_(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=_(this.tablet)}render(){var o;const e=null===(o=V.find((o=>o.code===x.selectedLocale)))||void 0===o?void 0:o.label,t="gray-1000";return s(n,{key:"f1df2afbf4312c216d2b0776b08bdf18a99918fa",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"15ec928ff1686fab2644fdad65b528e16f887c3d",class:"zonos--invoice-footer"},s("div",{key:"b3a81689dca77c65837366168b4cc512e873ebe6",class:"zonos--invoice-locale-wrapper"},s("zonos-button",{key:"f599ee52720855f47f1775f16b4beb5d673bc1fa",buttonColor:t,class:"zonos--invoice-footer-language-button",icon:s("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:t}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},s("span",{key:"b5ac314d22571b01be5d7ddea7012b6431fde634",class:"zonos--invoice-locale-label"},e,s("zonos-icon",{key:"fa150a4e7d75327510e2bfc07e9911a8adb9a3ba","aria-hidden":"true",class:"zonos--invoice-locale-chevron",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:t,size:18}))),s("div",{key:"673eed561dace62416822df5e7948fdfb423e6c3",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},s("zonos-language-select",{key:"6d1a6ae828bf8701fe08605ab5952528e74ad92f",handleOnClose:()=>this.toggleLanguageDialog()}))),s("div",{key:"3b2484d4a4a0899b746a81e055cd9a4a4fcf6db9",class:"zonos--invoice-footer-icon-wrapper"},s("div",{key:"3b4a8431e9cbd3133c69356c1bba186f7cec2fdf",class:"zonos--invoice-footer-logo"},s("zonos-text",{key:"73f8f0b9978b715d611c72beded88862e27c8473",textColor:t},y("Powered by")),s("a",{key:"e9a9a63c0c042f40c76d1293c05d2c23165c7af1",href:"https://zonos.com",target:"_blank",title:"Zonos website"},s("zonos-icon",{key:"5bd7ac7cd01581ba40a258f491417b04ab71c250",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),s("div",{key:"cf86cea8570caac18fbe1532478141e64e6cfd70",class:"dot"}),s("a",{key:"12b5cfa380ae7c2fbc2d3e7501c415761a1f199a",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},s("zonos-text",{key:"9588bdc785c892a39d3c37d034d1f874c8492fa2",textColor:t},y("Privacy policy"))))))}get el(){return i(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};T.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{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";const W=class{constructor(s){o(this,s),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=I(this.mobile)}componentWillLoad(){this.handleWindowResize()}render(){return s(n,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},s("div",{class:"zonos--wrapper"},s("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},s("div",{class:"zonos--order-details-header-text"},s("zonos-text",{type:"boldSubheader"},y("Pay [organizationName]",{organizationName:w.organizationName})),(()=>s("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}))()),s("zonos-text",{type:"boldSubheader"},B({amount:D.amountTotalDue||0,isForeign:!0}))),s("div",{class:"zonos--order-details-wrapper"},s("zonos-collapse",{collapsed:this.collapseState},s("div",{class:"zonos--invoice-order-details-content"},s("zonos-invoice-cart-items",{isMobile:this.isMobile}),s("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};W.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{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,s;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(s=a.stripeElements)||void 0===s||s.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,g({event:"zonos-checkout-payment-info"}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const s=document.createElement("textarea");s.style.position="fixed",s.style.left="-1000px",s.style.top="-1000px",s.style.width="1px",s.style.height="1px",s.value=o,s.id="zonos-copy-card-number",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}window.Zonos.showNotification({message:y("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await $();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{v({currency:p.currency})}))],v({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=L(),i=p.isStagingMode||S(),r="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return s(n,{class:"zonos--checkout-payment zonos--elements"},s("div",{class:"zonos--group"},s("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},y("Payment method")),(()=>{if(i){const o=w.appearance.theme;return s(t,null,this.stagingOrderCreateErrorMessage&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),s("zonos-empty-state-payment",{emptyStateText:y("No payment method needed for staging"),theme:o}),s("div",{class:"zonos--group-btn"},s("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},y("Place test order"))))}return a.isFetchingSession||D.isFetchingPayorInfo?null:s(t,null,this.showErrorBanner&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},y("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||y("We couldn't complete your payment. Please verify the payment details and try again.")),u.paypalErrorMessage&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},u.paypalErrorMessage),s("zonos-payment",null),s("div",{class:"zonos--group-btn"},!r&&s(t,null,s("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):Z("Checkout session is not found")},size:"lg",variant:this.submitBtnType},y("Pay [orderTotal]",{orderTotal:B({amount:D.amountTotalDue||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&s("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},y("Click to pay in USD"))),s("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:r?"block":"none"}})),e&&s("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},s("zonos-v-stack",{spacing:16},s("div",null,s("zonos-text",{type:"semiBoldLabel"},y("Test cards")),s("zonos-text",{textColor:"gray-700"},y("Click to copy the card number. Use any future expiration date and three number CVC."))),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},y("Success")," (****4242)"),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},y("Failure")," (****0002)")),s("zonos-notification",null)))})()))}get ele(){return i(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";const O=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=_(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return s(n,{key:"be8d8f1688a86ccaa9431cae2885c57a08f3ee9b",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"74dce7ae0a90490d95852c789d8e27ee51846ed5",class:"zonos--title"},s("zonos-text",{key:"3539a1110abdac4b1dc909f37a4845d8a0ad8fa0",textColor:o,type:"semiBoldLabel"},y("Pay [organizationName]",{organizationName:w.organizationName}))),s("div",{key:"d6feffd7216357889bbe9fba177feb8f24ad9222",class:"zonos--total-pay"},F({content:s("zonos-text",{type:"secondaryPageHeader"},B({amount:D.amountTotalDue||0,isForeign:!0})),isLoading:D.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};O.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{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';export{R as zonos_invoice_finish,T as zonos_invoice_footer,W as zonos_invoice_order_details,N as zonos_invoice_payment,O as zonos_invoice_review}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"./p-
|
|
1
|
+
import{z as o}from"./p-f3cfd8fa.js";const p=p=>{const n=(null==p?void 0:p.customRoundRadius)||"10px",r=null==p?void 0:p.overrideBorderStyle;return r?"SHARP"===r?"0px":n:"SHARP"===o.appearance.style?"0px":n};export{p as g}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r["throw"](e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(n=0)),n)try{if(r=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;i=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-3689821f.system.js","./p-721069c3.system.js","./p-24aae506.system.js","./p-01174496.system.js","./p-d938f42f.system.js"],(function(e){"use strict";var t,n,r,i,o,a,s,u,d,c,l;return{setters:[function(e){t=e.c;n=e.z},function(e){r=e.b;i=e.G;o=e.d;a=e.H},function(e){s=e.s},function(e){u=e.h;d=e.s;c=e.l},function(e){l=e.b}],execute:function(){var f=this;var v=t((function(){return{amountTotalDue:null,isFetchingPayorInfo:true,landedCostShortId:null,partyBillingId:null,payorAddress:null}})),h=v.reset,p=v.state;e("c",p);var _=e("a",(function(e){return __awaiter(f,[e],void 0,(function(e){var t,r,i,a,s;var c=e.landedCostId,l=e.retries,f=l===void 0?5:l;return __generator(this,(function(e){switch(e.label){case 0:p.isFetchingPayorInfo=true;return[4,u("/api/zonos-elements/invoice/get-payor-info-by-lc-id",{body:{landedCostId:c},method:"POST"})];case 1:a=e.sent();if(!a.errors.length)return[3,4];if(!(f>0))return[3,3];return[4,new Promise((function(e){return setTimeout(e,1e3)}))];case 2:e.sent();return[2,_({landedCostId:c,retries:f-1})];case 3:return[2,null];case 4:p.landedCostShortId=((t=a.json)===null||t===void 0?void 0:t.landedCostShortId)||null;p.isFetchingPayorInfo=false;p.payorAddress=((r=a.json)===null||r===void 0?void 0:r.payor)||null;s=(i=o.checkoutSession)===null||i===void 0?void 0:i.subtotals;p.amountTotalDue=(s===null||s===void 0?void 0:s.items)||0;if(p.amountTotalDue===0){void d({endpoint:"INVOICE_NO_TOTAL_DUE",errors:[],metadata:{landedCostId:c,organizationId:n.organizationId}})}return[2]}}))}))}));var I=e("b",(function(){return __awaiter(f,void 0,void 0,(function(){var e,t,n,a,f,v,h,_,I,y;return __generator(this,(function(m){switch(m.label){case 0:if(!((e=r.stripeBillingAddressEventData)===null||e===void 0?void 0:e.complete)){return[2,{partiesCreated:false}]}f=(n=(t=o.checkoutSession)===null||t===void 0?void 0:t.landedCost)===null||n===void 0?void 0:n.rootId;if(!f){void d({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:l,cartId:window.Zonos.cartId,checkoutSessionId:s.checkoutSessionId}});return[2,{partiesCreated:false}]}if(!s.checkoutSessionId){void d({endpoint:"INVOICE_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:l,cartId:window.Zonos.cartId,landedCostRootId:f}});return[2,{partiesCreated:false}]}v=i({address:r.stripeBillingAddressEventData.value.address,firstName:r.stripeBillingAddressEventData.value.firstName,lastName:r.stripeBillingAddressEventData.value.lastName,name:r.stripeBillingAddressEventData.value.name,phone:r.stripeBillingAddressEventData.value.phone});h=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";return[4,u("/api/zonos-elements/create-billing-party",{body:{billingAddress:v,checkoutSessionId:s.checkoutSessionId,companyName:r.companyName,email:((a=r.stripeLinkEventData)===null||a===void 0?void 0:a.value.email)||"",isTest:h,rootId:f},method:"POST"})];case 1:_=m.sent(),I=_.errors,y=_.json;if(I.length||!y){c("Error occurs when creating billing party",JSON.stringify(I,null,2));void d({endpoint:"INVOICE_BILLING_PARTY_CREATE_FAILED",errors:["[INVOICE] Failed to create billing party"],metadata:{allLogs:l,cartId:window.Zonos.cartId,checkoutSessionId:s.checkoutSessionId,errors:I,json:y}});return[2,{partiesCreated:false}]}p.partyBillingId=y.billToPartyId;return[2,{partiesCreated:true}]}}))}))}));var y=e("i",(function(e){return __awaiter(f,void 0,void 0,(function(){var t;return __generator(this,(function(n){t=e.landedCost;if(!t){return[2,false]}o.landedCostData=[Object.assign(Object.assign({},e),{landedCost:Object.assign({},t),landedCostId:t.id})];return[2,a({applySubtotalsOnly:true,landedCostId:t.id,selectedShippingOption:t.shipmentRating})]}))}))}))}}}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,r,e,t){function o(n){return n instanceof e?n:new e((function(r){r(n)}))}return new(e||(e=Promise))((function(e,i){function a(n){try{c(t.next(n))}catch(n){i(n)}}function u(n){try{c(t["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,u)}c((t=t.apply(n,r||[])).next())}))};var __generator=this&&this.__generator||function(n,r){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(r){return c([n,r])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=r.call(n,e)}catch(n){u=[6,n];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,r,e,t){function o(n){return n instanceof e?n:new e((function(r){r(n)}))}return new(e||(e=Promise))((function(e,i){function a(n){try{c(t.next(n))}catch(n){i(n)}}function u(n){try{c(t["throw"](n))}catch(n){i(n)}}function c(n){n.done?e(n.value):o(n.value).then(a,u)}c((t=t.apply(n,r||[])).next())}))};var __generator=this&&this.__generator||function(n,r){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(r){return c([n,r])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(e=0)),e)try{if(t=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;o=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=r.call(n,e)}catch(n){u=[6,n];o=0}finally{t=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-3689821f.system.js","./p-721069c3.system.js","./p-24aae506.system.js","./p-01174496.system.js","./p-1bf9a1b9.system.js","./p-d938f42f.system.js","./p-6a195559.system.js"],(function(n){"use strict";var r,e,t,o,i,a,u,c,s,f,d,l,v,p,y,h,b,w,m,_,j,P,k,g;return{setters:[function(n){r=n.z;e=n.c},function(n){t=n.t;o=n.y;i=n.b;a=n.d;u=n.v;c=n.w;s=n.x;f=n.z;d=n.r;l=n.h;v=n.F},function(n){p=n.t;y=n.s},function(n){h=n.h;b=n.g;w=n.l;m=n.j},function(n){_=n.i},function(n){j=n.l},function(n){P=n.i;k=n.e;g=n.s}],execute:function(){
|
|
2
2
|
/*!
|
|
3
3
|
* paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
|
|
4
4
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
@@ -15,4 +15,4 @@ var __awaiter=this&&this.__awaiter||function(n,r,e,t){function o(n){return n ins
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
var E=this;function O(n,r){var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0)e[t]=n[t];if(n!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++){if(r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o]))e[t[o]]=n[t[o]]}return e}typeof SuppressedError==="function"?SuppressedError:function(n,r,e){var t=new Error(e);return t.name="SuppressedError",t.error=n,t.suppressed=r,t};function I(n,r){var e=document.querySelector('script[src="'.concat(n,'"]'));if(e===null)return null;var t=C(n,r);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(n){if(o.dataset[n]!==t.dataset[n]){i=false}}));return i?e:null}function S(n){var r=n.url,e=n.attributes,t=n.onSuccess,o=n.onError;var i=C(r,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function A(n){var r=n.sdkBaseUrl,e=n.environment,t=O(n,["sdkBaseUrl","environment"]);var o=r||T(e);var i=t;var a=Object.keys(i).filter((function(n){return typeof i[n]!=="undefined"&&i[n]!==null&&i[n]!==""})).reduce((function(n,r){var e=i[r].toString();r=x(r);if(r.substring(0,4)==="data"||r==="crossorigin"){n.attributes[r]=e}else{n.queryParams[r]=e}return n}),{queryParams:{},attributes:{}}),u=a.queryParams,c=a.attributes;if(u["merchant-id"]&&u["merchant-id"].indexOf(",")!==-1){c["data-merchant-id"]=u["merchant-id"];u["merchant-id"]="*"}return{url:"".concat(o,"?").concat(B(u)),attributes:c}}function x(n){var r=function(n,r){return(r?"-":"")+n.toLowerCase()};return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)}function B(n){var r="";Object.keys(n).forEach((function(e){if(r.length!==0)r+="&";r+=e+"="+n[e]}));return r}function T(n){return n==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function C(n,r){if(r===void 0){r={}}var e=document.createElement("script");e.src=n;Object.keys(r).forEach((function(n){e.setAttribute(n,r[n]);if(n==="data-csp-nonce"){e.setAttribute("nonce",r["data-csp-nonce"])}}));return e}function L(n,r){if(r===void 0){r=Promise}F(n,r);if(typeof document==="undefined")return r.resolve(null);var e=A(n),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=M(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(I(t,o)&&a){return r.resolve(a)}return z({url:t,attributes:o},r).then((function(){var n=M(i);if(n){return n}throw new Error("The window.".concat(i," global variable is not available."))}))}function z(n,r){if(r===void 0){r=Promise}F(n,r);var e=n.url,t=n.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new r((function(n,r){if(typeof document==="undefined")return n();S({url:e,attributes:t,onSuccess:function(){return n()},onError:function(){var n=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return r(n)}})}))}function M(n){return window[n]}function F(n,r){if(typeof n!=="object"||n===null){throw new Error("Expected an options object.")}var e=n.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof r!=="undefined"&&typeof r!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var q=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,h("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var D=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.intent;return __generator(this,(function(n){switch(n.label){case 0:return[4,h("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var N=undefined&&undefined.__rest||function(n,r){var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0)e[t]=n[t];if(n!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++){if(r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o]))e[t[o]]=n[t[o]]}return e};var R={purchase:"Purchase","zonos-checkout-payment-info":"AddPaymentInfo","zonos-checkout-start":"InitiateCheckout"};var U=function(n){var r;return(r=R[n])!==null&&r!==void 0?r:null};var Y=function(n){if(!n)return false;return Array.isArray(n.items)};var Z=function(n){if(!n)return{};if(!Y(n)){return Object.assign({},n)}var r=n.currency,e=n.items,t=n.transaction_id,o=n.value,i=N(n,["currency","items","transaction_id","value"]);var a=e.map((function(n){return{id:n.item_id,item_price:n.price,quantity:n.quantity}}));var u=e.map((function(n){return n.item_id}));var c=e.reduce((function(n,r){return n+r.quantity}),0);var s=Object.assign(Object.assign({},i),{content_ids:u,content_type:"product",contents:a,num_items:c});if(t){s.order_id=t}if(r!==undefined){s.currency=r}if(o!==undefined){s.value=o}return s};var H=function(){var n=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="FACEBOOK_PIXEL"}));return!!n&&n.status==="ENABLED"};var G=function(n,r,e){if(P()){k({event:r,fbqMode:n,payload:e,provider:"fbq"});return}if(typeof window.fbq==="function"){j("Zonos submits fbq event","log","".concat(n,":").concat(r));window.fbq(n,r,e)}};var K=function(n){var r=n.event,e=n.metadata;if(!H()){return}var t=b();var o=Z(e);var i=Object.assign(Object.assign({},o),t&&{isTestMode:true});var a=Object.fromEntries(Object.entries(i).filter((function(n){var r=n[0],e=n[1];return e!==null})));G("trackCustom",r,a);var u=U(r);if(u&&u!==r){G("track",u,a)}};var V=n("s",(function(n){g(n);K(n)}));var X=e((function(){return{intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),J=X.onChange,Q=X.reset,W=X.state;n({e:J,c:Q,a:W});var $=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t,o,i,a,u;var c=n.checkoutSessionId;return __generator(this,(function(n){switch(n.label){case 0:t=W.intent.toUpperCase();return[4,D({checkoutSessionId:c,intent:t})];case 1:o=n.sent(),i=o.errors,a=o.json;u=(r=a===null||a===void 0?void 0:a.paypalOrderCreate)===null||r===void 0?void 0:r.paypalOrderId;if(i.length||!u){throw new Error(((e=i.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,u]}}))}))};var nn=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t,o,i,a;var u=n.checkoutSessionId,c=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,q({checkoutSessionId:u,paypalMockResponse:c})];case 1:t=n.sent(),o=t.errors,i=t.json;a=(r=i===null||i===void 0?void 0:i.paypalOrderCapture.order)===null||r===void 0?void 0:r.id;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||p("An unexpected error occurred when processing PayPal order."))}return[2,a]}}))}))};var rn=function(n){var r=n.error;var e;var t=m(r.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var i=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!i){W.paypalErrorMessage=p("An unexpected error occurred when processing PayPal order.")}var a=i[2]||p("An unexpected error occurred when processing PayPal order.");W.paypalErrorMessage=a};var en=function(n){var e=n.checkoutSessionId,y=n.onPaypalFail,h=n.onPaypalSessionDone,b=n.overrideBorderRaidus,m=n.overridePrimaryColor;var j=m||r.appearance.colorPrimary;var P="#ffc33a";var k=_({backgroundColor1:P,backgroundColor2:j||""});return{createOrder:function(){return __awaiter(E,void 0,void 0,(function(){var n,r,b,m,_,j,P,k;return __generator(this,(function(g){switch(g.label){case 0:void t({checkoutSessionId:e,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});return[4,o()];case 1:n=g.sent();if(!n.valid){W.paypalErrorMessage=n.errorMessage;i.hasPaymentError=false;i.customErrorMessage=null;V({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:e}});y===null||y===void 0?void 0:y();return[2,""]}g.label=2;case 2:g.trys.push([2,12,,13]);W.paypalErrorMessage=null;a.inventoryCheckErrorMessage=null;g.label=3;case 3:g.trys.push([3,5,,6]);r=a;return[4,u()];case 4:r.inventoryCheckErrorMessage=g.sent();return[3,6];case 5:b=g.sent();a.inventoryCheckErrorMessage=p("Unable to check inventory. Please try again.");return[3,6];case 6:if(a.inventoryCheckErrorMessage){return[2,""]}m=v();if(!(m>0))return[3,8];return[4,c()];case 7:_=g.sent();if(!_.success){W.paypalErrorMessage=_.error||p("Unable to apply store credit. Please try again.");y===null||y===void 0?void 0:y();return[2,""]}g.label=8;case 8:if(!s())return[3,10];return[4,d()];case 9:j=g.sent();if(!j.success){W.paypalErrorMessage=j.error||p("Unable to place order with store credit. Please try again.");y===null||y===void 0?void 0:y();return[2,""]}h===null||h===void 0?void 0:h({orderId:j.orderId||""});f();l();return[2,""];case 10:return[4,$({checkoutSessionId:e})];case 11:P=g.sent();return[2,P];case 12:k=g.sent();w("Failed to create paypal order",k);W.paypalErrorMessage=p("Failed to create PayPal order. Please try again, or consider using an alternative method.");i.hasPaymentError=false;i.customErrorMessage=null;V({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:e}});y===null||y===void 0?void 0:y();return[2,""];case 13:return[2]}}))}))},onApprove:function(n,r){return __awaiter(E,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);W.paypalErrorMessage=null;V({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:e,paymentMethod:"paypal"}});return[4,nn({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:n=t.sent();W.orderIdCreated=n;h===null||h===void 0?void 0:h({orderId:n});f();l();return[3,3];case 2:r=t.sent();w("==== Failed to capture paypal order",r);if(r instanceof Error){return[2,rn({error:r})]}y===null||y===void 0?void 0:y();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:b==="SHARP"?0:10,color:k?"gold":"blue",shape:"rect"}}};var tn=function(){if(!W.paypalButtons.length){return}W.paypalButtons.forEach((function(n){return __awaiter(E,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,n.close()];case 1:r.sent();return[2]}}))}))}));W.paypalButtons=[]};var on=n("b",(function(n){return __awaiter(E,[n],void 0,(function(n){var e,t,o,i,a,u;var c=n.currency;return __generator(this,(function(n){switch(n.label){case 0:t=!!((e=r.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(n){return n.type==="PAYPAL"&&n.status==="ENABLED"})));if(!t){j("=== Paypal is disabled for this store","warn");return[2]}o=r.checkoutSettings.externalServiceTokens.find((function(n){return n.type==="PAYPAL_CLIENT_ID"}));if(!o){j("Failed to load paypal -- missing paypal publishable key","warn");return[2]}i=(!r.zonosMode||r.zonosMode==="production")&&r.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=r.checkoutSettings.captureDelay&&r.checkoutSettings.captureDelay>0;W.intent=a?"authorize":"capture";j("==== Paypal order intent","info",W.intent);u=window.Zonos;return[4,L({clientId:o.token,currency:c,environment:i,intent:W.intent})];case 1:u.paypal=n.sent();W.paypal=window.Zonos.paypal;j("==== Paypal script loaded");return[2]}}))}))}));var an=n("d",(function(n){var r;var e=window.Zonos.paypal;if(!e){j("Paypal is not available");return null}var t=y.checkoutSessionId;if(!t){j("Paypal is not available due to checkoutSessionId is not available");return null}j("==== Loading Paypal buttons");tn();var o=[(r=e.FUNDING)===null||r===void 0?void 0:r.PAYPAL].filter(Boolean);W.paypalButtons=o.map((function(r){var o;var i=null;try{i=((o=e.Buttons)===null||o===void 0?void 0:o.call(e,Object.assign(Object.assign({},en(Object.assign({checkoutSessionId:t,fundingSource:r},n))),{fundingSource:r})))||null}catch(n){j("===== Failed to load paypal's \"".concat(r,'" button'),"warn",n)}if(i===null||i===void 0?void 0:i.isEligible()){j("==== Paypal button ".concat(r," loaded"));return i}return null})).filter(Boolean);return W.paypalButtons}));var un=n("p",(function(){var n,e;var t=((e=(n=r.checkoutSettings.externalPaymentMethods)===null||n===void 0?void 0:n.find((function(n){return n.type==="PAYPAL"})))===null||e===void 0?void 0:e.status)==="ENABLED";return t||!!W.paypalButtons.length}))}}}));
|
|
18
|
+
var E=this;function O(n,r){var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0)e[t]=n[t];if(n!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++){if(r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o]))e[t[o]]=n[t[o]]}return e}typeof SuppressedError==="function"?SuppressedError:function(n,r,e){var t=new Error(e);return t.name="SuppressedError",t.error=n,t.suppressed=r,t};function I(n,r){var e=document.querySelector('script[src="'.concat(n,'"]'));if(e===null)return null;var t=C(n,r);var o=e.cloneNode();delete o.dataset.uidAuto;if(Object.keys(o.dataset).length!==Object.keys(t.dataset).length){return null}var i=true;Object.keys(o.dataset).forEach((function(n){if(o.dataset[n]!==t.dataset[n]){i=false}}));return i?e:null}function S(n){var r=n.url,e=n.attributes,t=n.onSuccess,o=n.onError;var i=C(r,e);i.onerror=o;i.onload=t;document.head.insertBefore(i,document.head.firstElementChild)}function A(n){var r=n.sdkBaseUrl,e=n.environment,t=O(n,["sdkBaseUrl","environment"]);var o=r||T(e);var i=t;var a=Object.keys(i).filter((function(n){return typeof i[n]!=="undefined"&&i[n]!==null&&i[n]!==""})).reduce((function(n,r){var e=i[r].toString();r=x(r);if(r.substring(0,4)==="data"||r==="crossorigin"){n.attributes[r]=e}else{n.queryParams[r]=e}return n}),{queryParams:{},attributes:{}}),u=a.queryParams,c=a.attributes;if(u["merchant-id"]&&u["merchant-id"].indexOf(",")!==-1){c["data-merchant-id"]=u["merchant-id"];u["merchant-id"]="*"}return{url:"".concat(o,"?").concat(B(u)),attributes:c}}function x(n){var r=function(n,r){return(r?"-":"")+n.toLowerCase()};return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,r)}function B(n){var r="";Object.keys(n).forEach((function(e){if(r.length!==0)r+="&";r+=e+"="+n[e]}));return r}function T(n){return n==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function C(n,r){if(r===void 0){r={}}var e=document.createElement("script");e.src=n;Object.keys(r).forEach((function(n){e.setAttribute(n,r[n]);if(n==="data-csp-nonce"){e.setAttribute("nonce",r["data-csp-nonce"])}}));return e}function L(n,r){if(r===void 0){r=Promise}F(n,r);if(typeof document==="undefined")return r.resolve(null);var e=A(n),t=e.url,o=e.attributes;var i=o["data-namespace"]||"paypal";var a=M(i);if(!o["data-js-sdk-library"]){o["data-js-sdk-library"]="paypal-js"}if(I(t,o)&&a){return r.resolve(a)}return z({url:t,attributes:o},r).then((function(){var n=M(i);if(n){return n}throw new Error("The window.".concat(i," global variable is not available."))}))}function z(n,r){if(r===void 0){r=Promise}F(n,r);var e=n.url,t=n.attributes;if(typeof e!=="string"||e.length===0){throw new Error("Invalid url.")}if(typeof t!=="undefined"&&typeof t!=="object"){throw new Error("Expected attributes to be an object.")}return new r((function(n,r){if(typeof document==="undefined")return n();S({url:e,attributes:t,onSuccess:function(){return n()},onError:function(){var n=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return r(n)}})}))}function M(n){return window[n]}function F(n,r){if(typeof n!=="object"||n===null){throw new Error("Expected an options object.")}var e=n.environment;if(e&&e!=="production"&&e!=="sandbox"){throw new Error('The `environment` option must be either "production" or "sandbox".')}if(typeof r!=="undefined"&&typeof r!=="function"){throw new Error("Expected PromisePonyfill to be a function.")}}var q=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,h("/api/zonos-elements/capture-paypal-order",{body:{checkoutSessionId:o,paypalMockResponse:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var D=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t;var o=n.checkoutSessionId,i=n.intent;return __generator(this,(function(n){switch(n.label){case 0:return[4,h("/api/zonos-elements/create-paypal-order",{body:{checkoutSessionId:o,intent:i},method:"POST"})];case 1:r=n.sent(),e=r.errors,t=r.json;return[2,{errors:e,json:t}]}}))}))};var N=undefined&&undefined.__rest||function(n,r){var e={};for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&r.indexOf(t)<0)e[t]=n[t];if(n!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++){if(r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o]))e[t[o]]=n[t[o]]}return e};var R={purchase:"Purchase","zonos-checkout-payment-info":"AddPaymentInfo","zonos-checkout-start":"InitiateCheckout"};var U=function(n){var r;return(r=R[n])!==null&&r!==void 0?r:null};var Y=function(n){if(!n)return false;return Array.isArray(n.items)};var Z=function(n){if(!n)return{};if(!Y(n)){return Object.assign({},n)}var r=n.currency,e=n.items,t=n.transaction_id,o=n.value,i=N(n,["currency","items","transaction_id","value"]);var a=e.map((function(n){return{id:n.item_id,item_price:n.price,quantity:n.quantity}}));var u=e.map((function(n){return n.item_id}));var c=e.reduce((function(n,r){return n+r.quantity}),0);var s=Object.assign(Object.assign({},i),{content_ids:u,content_type:"product",contents:a,num_items:c});if(t){s.order_id=t}if(r!==undefined){s.currency=r}if(o!==undefined){s.value=o}return s};var H=function(){var n=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="FACEBOOK_PIXEL"}));return!!n&&n.status==="ENABLED"};var G=function(n,r,e){if(P()){k({event:r,fbqMode:n,payload:e,provider:"fbq"});return}if(typeof window.fbq==="function"){j("Zonos submits fbq event","log","".concat(n,":").concat(r));window.fbq(n,r,e)}};var K=function(n){var r=n.event,e=n.metadata;if(!H()){return}var t=b();var o=Z(e);var i=Object.assign(Object.assign({},o),t&&{isTestMode:true});var a=Object.fromEntries(Object.entries(i).filter((function(n){var r=n[0],e=n[1];return e!==null})));G("trackCustom",r,a);var u=U(r);if(u&&u!==r){G("track",u,a)}};var V=n("s",(function(n){g(n);K(n)}));var X=e((function(){return{intent:"capture",orderIdCreated:null,paypal:null,paypalButtons:[],paypalClientId:"",paypalErrorMessage:null}})),J=X.onChange,Q=X.reset,W=X.state;n({e:J,c:Q,a:W});var $=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t,o,i,a,u;var c=n.checkoutSessionId;return __generator(this,(function(n){switch(n.label){case 0:t=W.intent.toUpperCase();return[4,D({checkoutSessionId:c,intent:t})];case 1:o=n.sent(),i=o.errors,a=o.json;u=(r=a===null||a===void 0?void 0:a.paypalOrderCreate)===null||r===void 0?void 0:r.paypalOrderId;if(i.length||!u){throw new Error(((e=i.find(Boolean))===null||e===void 0?void 0:e.message)||"An unexpected error occurred when creating paypal order.")}return[2,u]}}))}))};var nn=function(n){return __awaiter(E,[n],void 0,(function(n){var r,e,t,o,i,a;var u=n.checkoutSessionId,c=n.paypalMockResponse;return __generator(this,(function(n){switch(n.label){case 0:return[4,q({checkoutSessionId:u,paypalMockResponse:c})];case 1:t=n.sent(),o=t.errors,i=t.json;a=(r=i===null||i===void 0?void 0:i.paypalOrderCapture.order)===null||r===void 0?void 0:r.id;if(o.length||!a){throw new Error(((e=o.find(Boolean))===null||e===void 0?void 0:e.message)||p("An unexpected error occurred when processing PayPal order."))}return[2,a]}}))}))};var rn=function(n){var r=n.error;var e;var t=m(r.message);var o=(e=t===null||t===void 0?void 0:t.errors.find(Boolean))===null||e===void 0?void 0:e.message;var i=(o===null||o===void 0?void 0:o.match(/\[(.*?)\] (.*)/i))||[];if(!i){W.paypalErrorMessage=p("An unexpected error occurred when processing PayPal order.")}var a=i[2]||p("An unexpected error occurred when processing PayPal order.");W.paypalErrorMessage=a};var en=function(n){var e=n.checkoutSessionId,y=n.onPaypalFail,h=n.onPaypalSessionDone,b=n.overrideBorderRaidus,m=n.overridePrimaryColor;var j=m||r.appearance.colorPrimary;var P="#ffc33a";var k=_({backgroundColor1:P,backgroundColor2:j||""});return{createOrder:function(){return __awaiter(E,void 0,void 0,(function(){var n,r,b,m,_,j,P,k;return __generator(this,(function(g){switch(g.label){case 0:void t({checkoutSessionId:e,eventName:"checkout_paymentInfoCompleted",metadata:{paymentMethod:"paypal"}});return[4,o()];case 1:n=g.sent();if(!n.valid){W.paypalErrorMessage=n.errorMessage;i.hasPaymentError=false;i.customErrorMessage=null;V({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:e}});y===null||y===void 0?void 0:y();return[2,""]}g.label=2;case 2:g.trys.push([2,12,,13]);W.paypalErrorMessage=null;a.inventoryCheckErrorMessage=null;g.label=3;case 3:g.trys.push([3,5,,6]);r=a;return[4,u()];case 4:r.inventoryCheckErrorMessage=g.sent();return[3,6];case 5:b=g.sent();a.inventoryCheckErrorMessage=p("Unable to check inventory. Please try again.");return[3,6];case 6:if(a.inventoryCheckErrorMessage){return[2,""]}m=v();if(!(m>0))return[3,8];return[4,c()];case 7:_=g.sent();if(!_.success){W.paypalErrorMessage=_.error||p("Unable to apply store credit. Please try again.");y===null||y===void 0?void 0:y();return[2,""]}g.label=8;case 8:if(!s())return[3,10];return[4,f()];case 9:j=g.sent();if(!j.success){W.paypalErrorMessage=j.error||p("Unable to place order with store credit. Please try again.");y===null||y===void 0?void 0:y();return[2,""]}h===null||h===void 0?void 0:h({orderId:j.orderId||""});d();l();return[2,""];case 10:return[4,$({checkoutSessionId:e})];case 11:P=g.sent();return[2,P];case 12:k=g.sent();w("Failed to create paypal order",k);W.paypalErrorMessage=p("Failed to create PayPal order. Please try again, or consider using an alternative method.");i.hasPaymentError=false;i.customErrorMessage=null;V({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:e}});y===null||y===void 0?void 0:y();return[2,""];case 13:return[2]}}))}))},onApprove:function(n,r){return __awaiter(E,void 0,void 0,(function(){var n,r;return __generator(this,(function(t){switch(t.label){case 0:t.trys.push([0,2,,3]);W.paypalErrorMessage=null;V({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:e,paymentMethod:"paypal"}});return[4,nn({checkoutSessionId:e,paypalMockResponse:window.Zonos._paypalMockResponse})];case 1:n=t.sent();W.orderIdCreated=n;h===null||h===void 0?void 0:h({orderId:n});d();l();return[3,3];case 2:r=t.sent();w("==== Failed to capture paypal order",r);if(r instanceof Error){return[2,rn({error:r})]}y===null||y===void 0?void 0:y();return[3,3];case 3:return[2]}}))}))},style:{borderRadius:b==="SHARP"?0:10,color:k?"gold":"blue",shape:"rect"}}};var tn=function(){if(!W.paypalButtons.length){return}W.paypalButtons.forEach((function(n){return __awaiter(E,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:return[4,n.close()];case 1:r.sent();return[2]}}))}))}));W.paypalButtons=[]};var on=n("b",(function(n){return __awaiter(E,[n],void 0,(function(n){var e,t,o,i,a,u;var c=n.currency;return __generator(this,(function(n){switch(n.label){case 0:t=!!((e=r.checkoutSettings.externalPaymentMethods)===null||e===void 0?void 0:e.find((function(n){return n.type==="PAYPAL"&&n.status==="ENABLED"})));if(!t){j("=== Paypal is disabled for this store","warn");return[2]}o=r.checkoutSettings.externalServiceTokens.find((function(n){return n.type==="PAYPAL_CLIENT_ID"}));if(!o){j("Failed to load paypal -- missing paypal publishable key","warn");return[2]}i=(!r.zonosMode||r.zonosMode==="production")&&r.checkoutSettings.mode==="LIVE"?"production":"sandbox";a=r.checkoutSettings.captureDelay&&r.checkoutSettings.captureDelay>0;W.intent=a?"authorize":"capture";j("==== Paypal order intent","info",W.intent);u=window.Zonos;return[4,L({clientId:o.token,currency:c,environment:i,intent:W.intent})];case 1:u.paypal=n.sent();W.paypal=window.Zonos.paypal;j("==== Paypal script loaded");return[2]}}))}))}));var an=n("d",(function(n){var r;var e=window.Zonos.paypal;if(!e){j("Paypal is not available");return null}var t=y.checkoutSessionId;if(!t){j("Paypal is not available due to checkoutSessionId is not available");return null}j("==== Loading Paypal buttons");tn();var o=[(r=e.FUNDING)===null||r===void 0?void 0:r.PAYPAL].filter(Boolean);W.paypalButtons=o.map((function(r){var o;var i=null;try{i=((o=e.Buttons)===null||o===void 0?void 0:o.call(e,Object.assign(Object.assign({},en(Object.assign({checkoutSessionId:t,fundingSource:r},n))),{fundingSource:r})))||null}catch(n){j("===== Failed to load paypal's \"".concat(r,'" button'),"warn",n)}if(i===null||i===void 0?void 0:i.isEligible()){j("==== Paypal button ".concat(r," loaded"));return i}return null})).filter(Boolean);return W.paypalButtons}));var un=n("p",(function(){var n,e;var t=((e=(n=r.checkoutSettings.externalPaymentMethods)===null||n===void 0?void 0:n.find((function(n){return n.type==="PAYPAL"})))===null||e===void 0?void 0:e.status)==="ENABLED";return t||!!W.paypalButtons.length}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-5e6f85f0.system.js","./p-3689821f.system.js"],(function(t){"use strict";var n,e;return{setters:[function(t){n=t.d},function(t){e=t.d}],execute:function(){var i=n,r=e;var f="Expected a function";function u(t,n,e){var u=true,a=true;if(typeof t!="function"){throw new TypeError(f)}if(r(e)){u="leading"in e?!!e.leading:u;a="trailing"in e?!!e.trailing:a}return i(t,n,{leading:u,maxWait:n,trailing:a})}var a=t("t",u)}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
System.register(["./p-7261e245.system.js","./p-721069c3.system.js","./p-24aae506.system.js","./p-076ca381.system.js","./p-23e7c655.system.js","./p-db607fc3.system.js","./p-45bd8072.system.js","./p-3689821f.system.js","./p-d938f42f.system.js","./p-01174496.system.js","./p-eb99a625.system.js","./p-e5dfccd8.system.js"],(function(o){"use strict";var t,e,s,n,i,a,l,c,r;return{setters:[function(o){t=o.r;e=o.h;s=o.a},function(o){n=o.d},function(o){i=o.t},function(o){a=o.r},function(o){l=o.c},function(o){c=o.c},function(o){r=o.r},function(){},function(){},function(){},function(){},function(){}],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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";var f=h;var d=o("zonos_invoice_cart_items",function(){function o(o){t(this,o);this.isMobile=false;this.errorImages=[];this.locale=null}o.prototype.componentWillLoad=function(){var o=navigator.language;this.locale=o};o.prototype.render=function(){var o=this;var t=n.items.filter((function(o){return!o.isRestricted}));return e(s,{key:"a79106d8930a18d9806ca7f82dbfada663f46964",class:l(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},e("table",{key:"89496bfdd77e168ee388d94e83981b3657fea40b",class:"zonos--cart-table"},e("tbody",{key:"fa5a7a17018942300f8168e2d1ac0ea349f02da5"},t.map((function(t){var s,n,l,c;var r=(n=(s=t.attributes)===null||s===void 0?void 0:s.find((function(o){return o.key==="invoiceId"||o.key==="INVOICE_ID"})))===null||n===void 0?void 0:n.value;var h=(c=(l=t.attributes)===null||l===void 0?void 0:l.find((function(o){return o.key==="invoiceCreatedAt"})))===null||c===void 0?void 0:c.value;var f=h&&o.locale?new Date(h).toLocaleDateString(o.locale,{day:"numeric",month:"long",year:"numeric"}):null;var d=r?"https://dashboard.zonos.com/billing/invoices/".concat(r):null;return e("tr",{class:"zonos--invoice-cart-item"},e("td",{class:"zonos--column zonos--cart-item-title"},e("zonos-text",{type:"semiBoldLabel"},i("Invoice:"))),e("td",{class:"zonos--column zonos--cart-item-link"},d&&r&&e("zonos-link",{href:d},r),o.isMobile&&e("zonos-text",{type:"caption"},f)),e("td",{class:"zonos--column zonos--cart-item-created-at"},!o.isMobile&&e("zonos-text",{type:"label"},f)),e("td",{class:"zonos--column zonos--cart-item-price"},e("zonos-text",{type:"label"},a({amount:t.amount,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());d.style=f;var b=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";var m=b;var u=o("zonos_invoice_subtotal",function(){function o(o){t(this,o);this.isMobile=false}o.prototype.render=function(){return e(s,{key:"4b2a1e8fe3d6b6c4bafa16bbcd596c10fc19267d",class:l(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},e("table",{key:"34b2b3019193b694d3a38560aeec57289f1ef284",class:"zonos--invoice-table"},e("tr",{key:"76ba9947536d494fe651da0a94b8e66a702f5728",class:"zonos--row zonos--invoice-total"},e("td",{key:"1510c0eb1f4db6bd3f4295b0eba6c1b845f86043",class:"zonos--column"}),e("td",{key:"5d3a1fde0d9bac22ee32f961da18f749e01b2038",class:"zonos--column zonos--invoice-subtotal-title"},e("zonos-text",{key:"0e61607f2795cea761e6082749ac9e85ec5a502a",type:"semiBoldLabel"},i("Payment total"))),e("td",{key:"5b5bf8f17e8850b4b6428454adfb05f85a0a9f63",class:"zonos--column zonos--invoice-subtotal-price"},r({content:e("zonos-text",{type:"semiBoldLabel"},a({amount:c.amountTotalDue||0,isForeign:true})),isLoading:c.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());u.style=m}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as s,e as t,a as e}from"./p-ce75b047.js";import{f as a}from"./p-
|
|
1
|
+
import{r as o,h as s,e as t,a as e}from"./p-ce75b047.js";import{f as a}from"./p-f3cfd8fa.js";import{c as r}from"./p-b4b7f705.js";import"./p-0a377722.js";const i=class{constructor(s){o(this,s),this.theme="LIGHT",this.width="auto"}render(){const o="DARK"===this.theme?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return s(e,{key:"93f6a3dab000ca09fcd5c669406cdd44a06b5f25",class:r(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":a(),"--zonos--width":this.width}},s("img",{key:"f2343614678d331ea63210d01e3be9f3c49ce7a6",alt:"Zonos Logo",src:t("./assets/ZonosLogo.png")}))}static get assetsDirs(){return["assets"]}};i.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:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";export{i as zonos_logo}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-3689821f.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.z}],execute:function(){var r=t("g",(function(t){var r=(t===null||t===void 0?void 0:t.customRoundRadius)||"10px";var e=t===null||t===void 0?void 0:t.overrideBorderStyle;if(e){return e==="SHARP"?"0px":r}return n.appearance.style==="SHARP"?"0px":r}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js"],(function(o){"use strict";var t,e,s;return{setters:[function(o){t=o.r;e=o.h;s=o.a}],execute:function(){var
|
|
1
|
+
System.register(["./p-7261e245.system.js"],(function(o){"use strict";var t,e,s;return{setters:[function(o){t=o.r;e=o.h;s=o.a}],execute:function(){var n=":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 a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";var a=n;var r=o("zonos_link",function(){function o(o){t(this,o);this.href=""}o.prototype.render=function(){return e(s,{key:"87f948b23f9166f04a9ff478c3a10cac68acd749",class:"zonos--elements"},e("a",{key:"54ef1e907c92be92a395326808977e97b92b4121",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},e("slot",{key:"9a40d6624eb6e42d54efd40f5e6827713d51197c"})))};return o}());r.style=a}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-7261e245.system.js","./p-
|
|
1
|
+
System.register(["./p-7261e245.system.js","./p-3689821f.system.js","./p-23e7c655.system.js","./p-e5dfccd8.system.js","./p-9f7e7148.system.js","./p-c5d1217f.system.js","./p-d938f42f.system.js","./p-eb99a625.system.js","./p-1bf9a1b9.system.js"],(function(o){"use strict";var s,e,t,i,n,r,a,l,d,h,c;return{setters:[function(o){s=o.r;e=o.d;t=o.h;i=o.a;n=o.g},function(o){r=o.f;a=o.z},function(o){l=o.c},function(o){d=o.g},function(o){h=o.g},function(o){c=o.i},function(){},function(){},function(){}],execute:function(){var p=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{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 f=p;var u=o("zonos_shipping_rich_radio",function(){function o(o){var t=this;s(this,o);this.radioSelected=e(this,"radioSelected",7);this.selectedItem=null;this.handleRichRadioSelect=function(o){var s;(s=t.radioSelected)===null||s===void 0?void 0:s.emit(o)};this.getRadioItemStyleVariables=function(){var o=t.borderColor||a.appearance.colorSecondary;var s=!t.isMobile?a.appearance.colorPrimary:"--zonos-elements-gray-0";var e=s&&o?h({backgroundColor:c(s)?window.getComputedStyle(t.ele).getPropertyValue("--zonos-elements-".concat(s.replace("--zonos-elements-",""))):s,color:o}):o;return{"--zonos--border-radius":d({overrideBorderStyle:t.borderStyle}),"--zonos--selected-border-color":e||"unset"}}}o.prototype.render=function(){var o=this;var s;return t(i,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":r()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var i=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return t("div",{"aria-hidden":"true",class:l(["zonos--shipping-rich-radio-item",i&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},t("input",{checked:i,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),t("div",{class:"zonos--shipping-info"},t("div",{class:"zonos--shipping-detail"},t("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&t("div",{class:"zonos--sub-detail"},s.sublabel&&t("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&t("zonos-text",{textColor:"gray-600"},s.caption))),t("zonos-text",{type:"semiBoldLabel"},s.price)))})))};Object.defineProperty(o.prototype,"ele",{get:function(){return n(this)},enumerable:false,configurable:true});return o}());u.style=f}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-15ef7644.system.js"],(function(t){"use strict";var r;return{setters:[function(t){r=t.a}],execute:function(){var e={exports:{}};(function(t,e){(function(r,e){t.exports=e()})(r,(function(){function t(r){"@babel/helpers - typeof";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(r)}var r=/^\s+/;var e=/\s+$/;function a(t,r){t=t?t:"";r=r||{};if(t instanceof a){return t}if(!(this instanceof a)){return new a(t,r)}var e=n(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format;this._gradientType=r.gradientType;if(this._r<1)this._r=Math.round(this._r);if(this._g<1)this._g=Math.round(this._g);if(this._b<1)this._b=Math.round(this._b);this._ok=e.ok}a.prototype={isDark:function t(){return this.getBrightness()<128},isLight:function t(){return!this.isDark()},isValid:function t(){return this._ok},getOriginalInput:function t(){return this._originalInput},getFormat:function t(){return this._format},getAlpha:function t(){return this._a},getBrightness:function t(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function t(){var r=this.toRgb();var e,a,n,i,f,s;e=r.r/255;a=r.g/255;n=r.b/255;if(e<=.03928)i=e/12.92;else i=Math.pow((e+.055)/1.055,2.4);if(a<=.03928)f=a/12.92;else f=Math.pow((a+.055)/1.055,2.4);if(n<=.03928)s=n/12.92;else s=Math.pow((n+.055)/1.055,2.4);return.2126*i+.7152*f+.0722*s},setAlpha:function t(r){this._a=q(r);this._roundA=Math.round(100*this._a)/100;return this},toHsv:function t(){var r=h(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function t(){var r=h(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.v*100);return this._a==1?"hsv("+e+", "+a+"%, "+n+"%)":"hsva("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHsl:function t(){var r=f(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function t(){var r=f(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.l*100);return this._a==1?"hsl("+e+", "+a+"%, "+n+"%)":"hsla("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHex:function t(r){return o(this._r,this._g,this._b,r)},toHexString:function t(r){return"#"+this.toHex(r)},toHex8:function t(r){return l(this._r,this._g,this._b,this._a,r)},toHex8String:function t(r){return"#"+this.toHex8(r)},toRgb:function t(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function t(){return this._a==1?"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 t(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function t(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function t(){if(this._a===0){return"transparent"}if(this._a<1){return false}return S[o(this._r,this._g,this._b,true)]||false},toFilter:function t(r){var e="#"+c(this._r,this._g,this._b,this._a);var n=e;var i=this._gradientType?"GradientType = 1, ":"";if(r){var f=a(r);n="#"+c(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function t(r){var e=!!r;r=r||this._format;var a=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");if(i){if(r==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(r==="rgb"){a=this.toRgbString()}if(r==="prgb"){a=this.toPercentageRgbString()}if(r==="hex"||r==="hex6"){a=this.toHexString()}if(r==="hex3"){a=this.toHexString(true)}if(r==="hex4"){a=this.toHex8String(true)}if(r==="hex8"){a=this.toHex8String()}if(r==="name"){a=this.toName()}if(r==="hsl"){a=this.toHslString()}if(r==="hsv"){a=this.toHsvString()}return a||this.toHexString()},clone:function t(){return a(this.toString())},_applyModification:function t(r,e){var a=r.apply(null,[this].concat([].slice.call(e)));this._r=a._r;this._g=a._g;this._b=a._b;this.setAlpha(a._a);return this},lighten:function t(){return this._applyModification(v,arguments)},brighten:function t(){return this._applyModification(m,arguments)},darken:function t(){return this._applyModification(M,arguments)},desaturate:function t(){return this._applyModification(d,arguments)},saturate:function t(){return this._applyModification(b,arguments)},greyscale:function t(){return this._applyModification(g,arguments)},spin:function t(){return this._applyModification(p,arguments)},_applyCombination:function t(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function t(){return this._applyCombination(w,arguments)},complement:function t(){return this._applyCombination(y,arguments)},monochromatic:function t(){return this._applyCombination(x,arguments)},splitcomplement:function t(){return this._applyCombination(A,arguments)},triad:function t(){return this._applyCombination(k,[3])},tetrad:function t(){return this._applyCombination(k,[4])}};a.fromRatio=function(r,e){if(t(r)=="object"){var n={};for(var i in r){if(r.hasOwnProperty(i)){if(i==="a"){n[i]=r[i]}else{n[i]=z(r[i])}}}r=n}return a(r,e)};function n(r){var e={r:0,g:0,b:0};var a=1;var n=null;var f=null;var h=null;var o=false;var l=false;if(typeof r=="string"){r=L(r)}if(t(r)=="object"){if(D(r.r)&&D(r.g)&&D(r.b)){e=i(r.r,r.g,r.b);o=true;l=String(r.r).substr(-1)==="%"?"prgb":"rgb"}else if(D(r.h)&&D(r.s)&&D(r.v)){n=z(r.s);f=z(r.v);e=u(r.h,n,f);o=true;l="hsv"}else if(D(r.h)&&D(r.s)&&D(r.l)){n=z(r.s);h=z(r.l);e=s(r.h,n,h);o=true;l="hsl"}if(r.hasOwnProperty("a")){a=r.a}}a=q(a);return{ok:o,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:a}}function i(t,r,e){return{r:E(t,255)*255,g:E(r,255)*255,b:E(e,255)*255}}function f(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=(a+n)/2;if(a==n){i=f=0}else{var h=a-n;f=s>.5?h/(2-a-n):h/(a+n);switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,l:s}}function s(t,r,e){var a,n,i;t=E(t,360);r=E(r,100);e=E(e,100);function f(t,r,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(r-t)*6*e;if(e<1/2)return r;if(e<2/3)return t+(r-t)*(2/3-e)*6;return t}if(r===0){a=n=i=e}else{var s=e<.5?e*(1+r):e+r-e*r;var h=2*e-s;a=f(h,s,t+1/3);n=f(h,s,t);i=f(h,s,t-1/3)}return{r:a*255,g:n*255,b:i*255}}function h(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=a;var h=a-n;f=a===0?0:h/a;if(a==n){i=0}else{switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,v:s}}function u(t,r,e){t=E(t,360)*6;r=E(r,100);e=E(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),f=e*(1-n*r),s=e*(1-(1-n)*r),h=a%6,u=[e,f,i,i,s,e][h],o=[s,e,e,f,i,i][h],l=[i,i,s,e,e,f][h];return{r:u*255,g:o*255,b:l*255}}function o(t,r,e,a){var n=[j(Math.round(t).toString(16)),j(Math.round(r).toString(16)),j(Math.round(e).toString(16))];if(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)){return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)}return n.join("")}function l(t,r,e,a,n){var i=[j(Math.round(t).toString(16)),j(Math.round(r).toString(16)),j(Math.round(e).toString(16)),j(C(a))];if(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)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0)}return i.join("")}function c(t,r,e,a){var n=[j(C(a)),j(Math.round(t).toString(16)),j(Math.round(r).toString(16)),j(Math.round(e).toString(16))];return n.join("")}a.equals=function(t,r){if(!t||!r)return false;return a(t).toRgbString()==a(r).toRgbString()};a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s-=r/100;e.s=H(e.s);return a(e)}function b(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s+=r/100;e.s=H(e.s);return a(e)}function g(t){return a(t).desaturate(100)}function v(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l+=r/100;e.l=H(e.l);return a(e)}function m(t,r){r=r===0?0:r||10;var e=a(t).toRgb();e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(r/100))));e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(r/100))));e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(r/100))));return a(e)}function M(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l-=r/100;e.l=H(e.l);return a(e)}function p(t,r){var e=a(t).toHsl();var n=(e.h+r)%360;e.h=n<0?360+n:n;return a(e)}function y(t){var r=a(t).toHsl();r.h=(r.h+180)%360;return a(r)}function k(t,r){if(isNaN(r)||r<=0){throw new Error("Argument to polyad must be a positive number")}var e=a(t).toHsl();var n=[a(t)];var i=360/r;for(var f=1;f<r;f++){n.push(a({h:(e.h+f*i)%360,s:e.s,l:e.l}))}return n}function A(t){var r=a(t).toHsl();var e=r.h;return[a(t),a({h:(e+72)%360,s:r.s,l:r.l}),a({h:(e+216)%360,s:r.s,l:r.l})]}function w(t,r,e){r=r||6;e=e||30;var n=a(t).toHsl();var i=360/e;var f=[a(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;){n.h=(n.h+i)%360;f.push(a(n))}return f}function x(t,r){r=r||6;var e=a(t).toHsv();var n=e.h,i=e.s,f=e.v;var s=[];var h=1/r;while(r--){s.push(a({h:n,s:i,v:f}));f=(f+h)%1}return s}a.mix=function(t,r,e){e=e===0?0:e||50;var n=a(t).toRgb();var i=a(r).toRgb();var f=e/100;var s={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};return a(s)};a.readability=function(t,r){var e=a(t);var n=a(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)};a.isReadable=function(t,r,e){var n=a.readability(t,r);var i,f;f=false;i=P(e);switch(i.level+i.size){case"AAsmall":case"AAAlarge":f=n>=4.5;break;case"AAlarge":f=n>=3;break;case"AAAsmall":f=n>=7;break}return f};a.mostReadable=function(t,r,e){var n=null;var i=0;var f;var s,h,u;e=e||{};s=e.includeFallbackColors;h=e.level;u=e.size;for(var o=0;o<r.length;o++){f=a.readability(t,r[o]);if(f>i){i=f;n=a(r[o])}}if(a.isReadable(t,n,{level:h,size:u})||!s){return n}else{e.includeFallbackColors=false;return a.mostReadable(t,["#fff","#000"],e)}};var F=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"};var S=a.hexNames=R(F);function R(t){var r={};for(var e in t){if(t.hasOwnProperty(e)){r[t[e]]=e}}return r}function q(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function E(t,r){if(I(t))t="100%";var e=$(t);t=Math.min(r,Math.max(0,parseFloat(t)));if(e){t=parseInt(t*r,10)/100}if(Math.abs(t-r)<1e-6){return 1}return t%r/parseFloat(r)}function H(t){return Math.min(1,Math.max(0,t))}function N(t){return parseInt(t,16)}function I(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function $(t){return typeof t==="string"&&t.indexOf("%")!=-1}function j(t){return t.length==1?"0"+t:""+t}function z(t){if(t<=1){t=t*100+"%"}return t}function C(t){return Math.round(parseFloat(t)*255).toString(16)}function T(t){return N(t)/255}var _=function(){var t="[-\\+]?\\d+%?";var r="[-\\+]?\\d*\\.\\d+%?";var e="(?:"+r+")|(?:"+t+")";var a="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";var n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+n),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 D(t){return!!_.CSS_UNIT.exec(t)}function L(t){t=t.replace(r,"").replace(e,"").toLowerCase();var a=false;if(F[t]){t=F[t];a=true}else if(t=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var n;if(n=_.rgb.exec(t)){return{r:n[1],g:n[2],b:n[3]}}if(n=_.rgba.exec(t)){return{r:n[1],g:n[2],b:n[3],a:n[4]}}if(n=_.hsl.exec(t)){return{h:n[1],s:n[2],l:n[3]}}if(n=_.hsla.exec(t)){return{h:n[1],s:n[2],l:n[3],a:n[4]}}if(n=_.hsv.exec(t)){return{h:n[1],s:n[2],v:n[3]}}if(n=_.hsva.exec(t)){return{h:n[1],s:n[2],v:n[3],a:n[4]}}if(n=_.hex8.exec(t)){return{r:N(n[1]),g:N(n[2]),b:N(n[3]),a:T(n[4]),format:a?"name":"hex8"}}if(n=_.hex6.exec(t)){return{r:N(n[1]),g:N(n[2]),b:N(n[3]),format:a?"name":"hex"}}if(n=_.hex4.exec(t)){return{r:N(n[1]+""+n[1]),g:N(n[2]+""+n[2]),b:N(n[3]+""+n[3]),a:T(n[4]+""+n[4]),format:a?"name":"hex8"}}if(n=_.hex3.exec(t)){return{r:N(n[1]+""+n[1]),g:N(n[2]+""+n[2]),b:N(n[3]+""+n[3]),format:a?"name":"hex"}}return false}function P(t){var r,e;t=t||{level:"AA",size:"small"};r=(t.level||"AA").toUpperCase();e=(t.size||"small").toLowerCase();if(r!=="AA"&&r!=="AAA"){r="AA"}if(e!=="small"&&e!=="large"){e="small"}return{level:r,size:e}}return a}))})(e);var a=t("t",e.exports);var n=t("i",(function(t){return a(t).isDark()}))}}}));
|
|
1
|
+
System.register(["./p-3689821f.system.js"],(function(t){"use strict";var r;return{setters:[function(t){r=t.a}],execute:function(){var e={exports:{}};(function(t,e){(function(r,e){t.exports=e()})(r,(function(){function t(r){"@babel/helpers - typeof";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(r)}var r=/^\s+/;var e=/\s+$/;function a(t,r){t=t?t:"";r=r||{};if(t instanceof a){return t}if(!(this instanceof a)){return new a(t,r)}var e=n(t);this._originalInput=t,this._r=e.r,this._g=e.g,this._b=e.b,this._a=e.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||e.format;this._gradientType=r.gradientType;if(this._r<1)this._r=Math.round(this._r);if(this._g<1)this._g=Math.round(this._g);if(this._b<1)this._b=Math.round(this._b);this._ok=e.ok}a.prototype={isDark:function t(){return this.getBrightness()<128},isLight:function t(){return!this.isDark()},isValid:function t(){return this._ok},getOriginalInput:function t(){return this._originalInput},getFormat:function t(){return this._format},getAlpha:function t(){return this._a},getBrightness:function t(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function t(){var r=this.toRgb();var e,a,n,i,f,s;e=r.r/255;a=r.g/255;n=r.b/255;if(e<=.03928)i=e/12.92;else i=Math.pow((e+.055)/1.055,2.4);if(a<=.03928)f=a/12.92;else f=Math.pow((a+.055)/1.055,2.4);if(n<=.03928)s=n/12.92;else s=Math.pow((n+.055)/1.055,2.4);return.2126*i+.7152*f+.0722*s},setAlpha:function t(r){this._a=q(r);this._roundA=Math.round(100*this._a)/100;return this},toHsv:function t(){var r=h(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function t(){var r=h(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.v*100);return this._a==1?"hsv("+e+", "+a+"%, "+n+"%)":"hsva("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHsl:function t(){var r=f(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function t(){var r=f(this._r,this._g,this._b);var e=Math.round(r.h*360),a=Math.round(r.s*100),n=Math.round(r.l*100);return this._a==1?"hsl("+e+", "+a+"%, "+n+"%)":"hsla("+e+", "+a+"%, "+n+"%, "+this._roundA+")"},toHex:function t(r){return o(this._r,this._g,this._b,r)},toHexString:function t(r){return"#"+this.toHex(r)},toHex8:function t(r){return l(this._r,this._g,this._b,this._a,r)},toHex8String:function t(r){return"#"+this.toHex8(r)},toRgb:function t(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function t(){return this._a==1?"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 t(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function t(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function t(){if(this._a===0){return"transparent"}if(this._a<1){return false}return S[o(this._r,this._g,this._b,true)]||false},toFilter:function t(r){var e="#"+c(this._r,this._g,this._b,this._a);var n=e;var i=this._gradientType?"GradientType = 1, ":"";if(r){var f=a(r);n="#"+c(f._r,f._g,f._b,f._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function t(r){var e=!!r;r=r||this._format;var a=false;var n=this._a<1&&this._a>=0;var i=!e&&n&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");if(i){if(r==="name"&&this._a===0){return this.toName()}return this.toRgbString()}if(r==="rgb"){a=this.toRgbString()}if(r==="prgb"){a=this.toPercentageRgbString()}if(r==="hex"||r==="hex6"){a=this.toHexString()}if(r==="hex3"){a=this.toHexString(true)}if(r==="hex4"){a=this.toHex8String(true)}if(r==="hex8"){a=this.toHex8String()}if(r==="name"){a=this.toName()}if(r==="hsl"){a=this.toHslString()}if(r==="hsv"){a=this.toHsvString()}return a||this.toHexString()},clone:function t(){return a(this.toString())},_applyModification:function t(r,e){var a=r.apply(null,[this].concat([].slice.call(e)));this._r=a._r;this._g=a._g;this._b=a._b;this.setAlpha(a._a);return this},lighten:function t(){return this._applyModification(v,arguments)},brighten:function t(){return this._applyModification(m,arguments)},darken:function t(){return this._applyModification(M,arguments)},desaturate:function t(){return this._applyModification(d,arguments)},saturate:function t(){return this._applyModification(b,arguments)},greyscale:function t(){return this._applyModification(g,arguments)},spin:function t(){return this._applyModification(p,arguments)},_applyCombination:function t(r,e){return r.apply(null,[this].concat([].slice.call(e)))},analogous:function t(){return this._applyCombination(w,arguments)},complement:function t(){return this._applyCombination(y,arguments)},monochromatic:function t(){return this._applyCombination(x,arguments)},splitcomplement:function t(){return this._applyCombination(A,arguments)},triad:function t(){return this._applyCombination(k,[3])},tetrad:function t(){return this._applyCombination(k,[4])}};a.fromRatio=function(r,e){if(t(r)=="object"){var n={};for(var i in r){if(r.hasOwnProperty(i)){if(i==="a"){n[i]=r[i]}else{n[i]=z(r[i])}}}r=n}return a(r,e)};function n(r){var e={r:0,g:0,b:0};var a=1;var n=null;var f=null;var h=null;var o=false;var l=false;if(typeof r=="string"){r=L(r)}if(t(r)=="object"){if(D(r.r)&&D(r.g)&&D(r.b)){e=i(r.r,r.g,r.b);o=true;l=String(r.r).substr(-1)==="%"?"prgb":"rgb"}else if(D(r.h)&&D(r.s)&&D(r.v)){n=z(r.s);f=z(r.v);e=u(r.h,n,f);o=true;l="hsv"}else if(D(r.h)&&D(r.s)&&D(r.l)){n=z(r.s);h=z(r.l);e=s(r.h,n,h);o=true;l="hsl"}if(r.hasOwnProperty("a")){a=r.a}}a=q(a);return{ok:o,format:r.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:a}}function i(t,r,e){return{r:E(t,255)*255,g:E(r,255)*255,b:E(e,255)*255}}function f(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=(a+n)/2;if(a==n){i=f=0}else{var h=a-n;f=s>.5?h/(2-a-n):h/(a+n);switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,l:s}}function s(t,r,e){var a,n,i;t=E(t,360);r=E(r,100);e=E(e,100);function f(t,r,e){if(e<0)e+=1;if(e>1)e-=1;if(e<1/6)return t+(r-t)*6*e;if(e<1/2)return r;if(e<2/3)return t+(r-t)*(2/3-e)*6;return t}if(r===0){a=n=i=e}else{var s=e<.5?e*(1+r):e+r-e*r;var h=2*e-s;a=f(h,s,t+1/3);n=f(h,s,t);i=f(h,s,t-1/3)}return{r:a*255,g:n*255,b:i*255}}function h(t,r,e){t=E(t,255);r=E(r,255);e=E(e,255);var a=Math.max(t,r,e),n=Math.min(t,r,e);var i,f,s=a;var h=a-n;f=a===0?0:h/a;if(a==n){i=0}else{switch(a){case t:i=(r-e)/h+(r<e?6:0);break;case r:i=(e-t)/h+2;break;case e:i=(t-r)/h+4;break}i/=6}return{h:i,s:f,v:s}}function u(t,r,e){t=E(t,360)*6;r=E(r,100);e=E(e,100);var a=Math.floor(t),n=t-a,i=e*(1-r),f=e*(1-n*r),s=e*(1-(1-n)*r),h=a%6,u=[e,f,i,i,s,e][h],o=[s,e,e,f,i,i][h],l=[i,i,s,e,e,f][h];return{r:u*255,g:o*255,b:l*255}}function o(t,r,e,a){var n=[j(Math.round(t).toString(16)),j(Math.round(r).toString(16)),j(Math.round(e).toString(16))];if(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)){return n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)}return n.join("")}function l(t,r,e,a,n){var i=[j(Math.round(t).toString(16)),j(Math.round(r).toString(16)),j(Math.round(e).toString(16)),j(C(a))];if(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)){return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0)}return i.join("")}function c(t,r,e,a){var n=[j(C(a)),j(Math.round(t).toString(16)),j(Math.round(r).toString(16)),j(Math.round(e).toString(16))];return n.join("")}a.equals=function(t,r){if(!t||!r)return false;return a(t).toRgbString()==a(r).toRgbString()};a.random=function(){return a.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function d(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s-=r/100;e.s=H(e.s);return a(e)}function b(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.s+=r/100;e.s=H(e.s);return a(e)}function g(t){return a(t).desaturate(100)}function v(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l+=r/100;e.l=H(e.l);return a(e)}function m(t,r){r=r===0?0:r||10;var e=a(t).toRgb();e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(r/100))));e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(r/100))));e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(r/100))));return a(e)}function M(t,r){r=r===0?0:r||10;var e=a(t).toHsl();e.l-=r/100;e.l=H(e.l);return a(e)}function p(t,r){var e=a(t).toHsl();var n=(e.h+r)%360;e.h=n<0?360+n:n;return a(e)}function y(t){var r=a(t).toHsl();r.h=(r.h+180)%360;return a(r)}function k(t,r){if(isNaN(r)||r<=0){throw new Error("Argument to polyad must be a positive number")}var e=a(t).toHsl();var n=[a(t)];var i=360/r;for(var f=1;f<r;f++){n.push(a({h:(e.h+f*i)%360,s:e.s,l:e.l}))}return n}function A(t){var r=a(t).toHsl();var e=r.h;return[a(t),a({h:(e+72)%360,s:r.s,l:r.l}),a({h:(e+216)%360,s:r.s,l:r.l})]}function w(t,r,e){r=r||6;e=e||30;var n=a(t).toHsl();var i=360/e;var f=[a(t)];for(n.h=(n.h-(i*r>>1)+720)%360;--r;){n.h=(n.h+i)%360;f.push(a(n))}return f}function x(t,r){r=r||6;var e=a(t).toHsv();var n=e.h,i=e.s,f=e.v;var s=[];var h=1/r;while(r--){s.push(a({h:n,s:i,v:f}));f=(f+h)%1}return s}a.mix=function(t,r,e){e=e===0?0:e||50;var n=a(t).toRgb();var i=a(r).toRgb();var f=e/100;var s={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};return a(s)};a.readability=function(t,r){var e=a(t);var n=a(r);return(Math.max(e.getLuminance(),n.getLuminance())+.05)/(Math.min(e.getLuminance(),n.getLuminance())+.05)};a.isReadable=function(t,r,e){var n=a.readability(t,r);var i,f;f=false;i=P(e);switch(i.level+i.size){case"AAsmall":case"AAAlarge":f=n>=4.5;break;case"AAlarge":f=n>=3;break;case"AAAsmall":f=n>=7;break}return f};a.mostReadable=function(t,r,e){var n=null;var i=0;var f;var s,h,u;e=e||{};s=e.includeFallbackColors;h=e.level;u=e.size;for(var o=0;o<r.length;o++){f=a.readability(t,r[o]);if(f>i){i=f;n=a(r[o])}}if(a.isReadable(t,n,{level:h,size:u})||!s){return n}else{e.includeFallbackColors=false;return a.mostReadable(t,["#fff","#000"],e)}};var F=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"};var S=a.hexNames=R(F);function R(t){var r={};for(var e in t){if(t.hasOwnProperty(e)){r[t[e]]=e}}return r}function q(t){t=parseFloat(t);if(isNaN(t)||t<0||t>1){t=1}return t}function E(t,r){if(I(t))t="100%";var e=$(t);t=Math.min(r,Math.max(0,parseFloat(t)));if(e){t=parseInt(t*r,10)/100}if(Math.abs(t-r)<1e-6){return 1}return t%r/parseFloat(r)}function H(t){return Math.min(1,Math.max(0,t))}function N(t){return parseInt(t,16)}function I(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function $(t){return typeof t==="string"&&t.indexOf("%")!=-1}function j(t){return t.length==1?"0"+t:""+t}function z(t){if(t<=1){t=t*100+"%"}return t}function C(t){return Math.round(parseFloat(t)*255).toString(16)}function T(t){return N(t)/255}var _=function(){var t="[-\\+]?\\d+%?";var r="[-\\+]?\\d*\\.\\d+%?";var e="(?:"+r+")|(?:"+t+")";var a="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";var n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+n),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 D(t){return!!_.CSS_UNIT.exec(t)}function L(t){t=t.replace(r,"").replace(e,"").toLowerCase();var a=false;if(F[t]){t=F[t];a=true}else if(t=="transparent"){return{r:0,g:0,b:0,a:0,format:"name"}}var n;if(n=_.rgb.exec(t)){return{r:n[1],g:n[2],b:n[3]}}if(n=_.rgba.exec(t)){return{r:n[1],g:n[2],b:n[3],a:n[4]}}if(n=_.hsl.exec(t)){return{h:n[1],s:n[2],l:n[3]}}if(n=_.hsla.exec(t)){return{h:n[1],s:n[2],l:n[3],a:n[4]}}if(n=_.hsv.exec(t)){return{h:n[1],s:n[2],v:n[3]}}if(n=_.hsva.exec(t)){return{h:n[1],s:n[2],v:n[3],a:n[4]}}if(n=_.hex8.exec(t)){return{r:N(n[1]),g:N(n[2]),b:N(n[3]),a:T(n[4]),format:a?"name":"hex8"}}if(n=_.hex6.exec(t)){return{r:N(n[1]),g:N(n[2]),b:N(n[3]),format:a?"name":"hex"}}if(n=_.hex4.exec(t)){return{r:N(n[1]+""+n[1]),g:N(n[2]+""+n[2]),b:N(n[3]+""+n[3]),a:T(n[4]+""+n[4]),format:a?"name":"hex8"}}if(n=_.hex3.exec(t)){return{r:N(n[1]+""+n[1]),g:N(n[2]+""+n[2]),b:N(n[3]+""+n[3]),format:a?"name":"hex"}}return false}function P(t){var r,e;t=t||{level:"AA",size:"small"};r=(t.level||"AA").toUpperCase();e=(t.size||"small").toLowerCase();if(r!=="AA"&&r!=="AAA"){r="AA"}if(e!=="small"&&e!=="large"){e="small"}return{level:r,size:e}}return a}))})(e);var a=t("t",e.exports);var n=t("i",(function(t){return a(t).isDark()}))}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as n}from"./p-ce75b047.js";import{a as t,l as e}from"./p-0a377722.js";const r=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys()){const e=n.get(t).filter((n=>{const t=n.deref();return t&&(!("isConnected"in(e=t))||e.isConnected);var e}));n.set(t,e)}})(...t)}),2e3)}})(),o=n.forceUpdate,i=n.getRenderingRef,u=(n,t)=>{const e=n.indexOf(t);e>=0&&(n[e]=n[n.length-1],n.length--)},c=(n,t)=>{const e=((n,t=((n,t)=>n!==t))=>{const e=()=>{return("function"==typeof(t=n)?t():t)??{};var t},r=e();let o=new Map(Object.entries(r));const i="undefined"!=typeof Proxy,c=i?null:{},a={dispose:[],get:[],set:[],reset:[]},s=new Map,l=()=>{o=new Map(Object.entries(e())),i||p(),a.reset.forEach((n=>n()))},f=n=>(a.get.forEach((t=>t(n))),o.get(n)),v=(n,e)=>{const r=o.get(n);t(e,r,n)&&(o.set(n,e),i||b(n),a.set.forEach((t=>t(n,e,r))))},d=i?new Proxy(r,{get:(n,t)=>f(t),ownKeys:()=>Array.from(o.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>o.has(t),set:(n,t,e)=>(v(t,e),!0)}):(p(),c),h=(n,t)=>(a[n].push(t),()=>{u(a[n],t)});function b(n){!i&&c&&(Object.prototype.hasOwnProperty.call(c,n)||Object.defineProperty(c,n,{configurable:!0,enumerable:!0,get:()=>f(n),set(t){v(n,t)}}))}function p(){if(i||!c)return;const n=new Set(o.keys());for(const t of Object.keys(c))n.has(t)||delete c[t];for(const t of n)b(t)}return{state:d,get:f,set:v,on:h,onChange:(n,t)=>{const r=(e,r)=>{e===n&&t(r)},o=()=>{const r=e();t(r[n])},i=h("set",r),u=h("reset",o);return s.set(t,{setHandler:r,resetHandler:o,propName:n}),()=>{i(),u(),s.delete(t)}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(h("set",t.set)),t.get&&n.push(h("get",t.get)),t.reset&&n.push(h("reset",t.reset)),t.dispose&&n.push(h("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{a.dispose.forEach((n=>n())),l()},reset:l,forceUpdate:n=>{const t=o.get(n);a.set.forEach((e=>e(n,t,t)))},removeListener:(n,t)=>{const e=s.get(t);e&&e.propName===n&&(u(a.set,e.setHandler),u(a.reset,e.resetHandler),s.delete(t))}}})(n,t);return e.use((()=>{if("function"!=typeof i||"function"!=typeof o)return{};const n=o,t=i,e=new Map;return{dispose:()=>e.clear(),get:n=>{const r=t();r&&((n,t,e)=>{let r=n.get(t);r||(r=[],n.set(t,r)),r.some((n=>n.deref()===e))||r.push(new WeakRef(e))})(e,n,r)},set:t=>{const o=e.get(t);if(o){const r=o.filter((t=>{const e=t.deref();return!!e&&n(e)}));e.set(t,r)}r(e)},reset:()=>{e.forEach((t=>{t.forEach((t=>{const e=t.deref();e&&n(e)}))})),r(e)}}})()),e};var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=function(n,t){return n===t||n!=n&&t!=t},l=s,f=function(n,t){for(var e=n.length;e--;)if(l(n[e][0],t))return e;return-1},v=f,d=Array.prototype.splice,h=f,b=f,p=f;function y(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}y.prototype.clear=function(){this.__data__=[],this.size=0},y.prototype.delete=function(n){var t=this.__data__,e=v(t,n);return!(e<0||(e==t.length-1?t.pop():d.call(t,e,1),--this.size,0))},y.prototype.get=function(n){var t=this.__data__,e=h(t,n);return e<0?void 0:t[e][1]},y.prototype.has=function(n){return b(this.__data__,n)>-1},y.prototype.set=function(n,t){var e=this.__data__,r=p(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this};var S,g=y,j=g,m="object"==typeof a&&a&&a.Object===Object&&a,w="object"==typeof self&&self&&self.Object===Object&&self,O=m||w||Function("return this")(),E=O.Symbol,A=Object.prototype,_=A.hasOwnProperty,D=A.toString,T=E?E.toStringTag:void 0,C=Object.prototype.toString,L=E?E.toStringTag:void 0,B=function(n){return null==n?void 0===n?"[object Undefined]":"[object Null]":L&&L in Object(n)?function(n){var t=_.call(n,T),e=n[T];try{n[T]=void 0;var r=!0}catch(n){}var o=D.call(n);return r&&(t?n[T]=e:delete n[T]),o}(n):function(n){return C.call(n)}(n)},I=function(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)},P=B,M=I,U=function(n){if(!M(n))return!1;var t=P(n);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},x=O["__core-js_shared__"],R=(S=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",F=Function.prototype.toString,k=U,z=I,N=/^\[object .+?Constructor\]$/,H=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=function(n){return!(!z(n)||(t=n,R&&R in t))&&(k(n)?H:N).test(function(n){if(null!=n){try{return F.call(n)}catch(n){}try{return n+""}catch(n){}}return""}(n));var t},G=function(n,t){var e=function(n,t){return null==n?void 0:n[t]}(n,t);return $(e)?e:void 0},K=G(O,"Map"),V=G(Object,"create"),Y=V,W=V,q=Object.prototype.hasOwnProperty,J=V,Q=Object.prototype.hasOwnProperty,X=V;function Z(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}Z.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},Z.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},Z.prototype.get=function(n){var t=this.__data__;if(W){var e=t[n];return"__lodash_hash_undefined__"===e?void 0:e}return q.call(t,n)?t[n]:void 0},Z.prototype.has=function(n){var t=this.__data__;return J?void 0!==t[n]:Q.call(t,n)},Z.prototype.set=function(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=X&&void 0===t?"__lodash_hash_undefined__":t,this};var nn=Z,tn=g,en=K,rn=function(n,t){var e,r,o=n.__data__;return("string"==(r=typeof(e=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?o["string"==typeof t?"string":"hash"]:o.map},on=rn,un=rn,cn=rn,an=rn;function sn(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}sn.prototype.clear=function(){this.size=0,this.__data__={hash:new nn,map:new(en||tn),string:new nn}},sn.prototype.delete=function(n){var t=on(this,n).delete(n);return this.size-=t?1:0,t},sn.prototype.get=function(n){return un(this,n).get(n)},sn.prototype.has=function(n){return cn(this,n).has(n)},sn.prototype.set=function(n,t){var e=an(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this};var ln=g,fn=K,vn=sn,dn=g,hn=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},bn=function(n){return this.__data__.get(n)},pn=function(n){return this.__data__.has(n)};function yn(n){var t=this.__data__=new dn(n);this.size=t.size}yn.prototype.clear=function(){this.__data__=new j,this.size=0},yn.prototype.delete=hn,yn.prototype.get=bn,yn.prototype.has=pn,yn.prototype.set=function(n,t){var e=this.__data__;if(e instanceof ln){var r=e.__data__;if(!fn||r.length<199)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new vn(r)}return e.set(n,t),this.size=e.size,this};var Sn,gn,jn,mn,wn,On=yn,En=G,An=function(){try{var n=En(Object,"defineProperty");return n({},"",{}),n}catch(n){}}(),_n=An,Dn=function(n,t,e){"__proto__"==t&&_n?_n(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e},Tn=Dn,Cn=s,Ln=function(n,t,e){(void 0!==e&&!Cn(n[t],e)||void 0===e&&!(t in n))&&Tn(n,t,e)},Bn=function(n,t,e){for(var r=-1,o=Object(n),i=e(n),u=i.length;u--;){var c=i[++r];if(!1===t(o[c],c,o))break}return n},In={exports:{}};wn=(mn=(jn=(gn=(Sn=In.exports)&&!Sn.nodeType&&Sn)&&In&&!In.nodeType&&In)&&jn.exports===gn?O.Buffer:void 0)?mn.allocUnsafe:void 0,In.exports=function(n,t){if(t)return n.slice();var e=n.length,r=wn?wn(e):new n.constructor(e);return n.copy(r),r};var Pn,Mn,Un=O.Uint8Array,xn=I,Rn=Object.create,Fn=function(){function n(){}return function(t){if(!xn(t))return{};if(Rn)return Rn(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}}(),kn=(Pn=Object.getPrototypeOf,Mn=Object,function(n){return Pn(Mn(n))}),zn=Object.prototype,Nn=function(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||zn)},Hn=Fn,$n=kn,Gn=Nn,Kn=function(n){return null!=n&&"object"==typeof n},Vn=B,Yn=Kn,Wn=function(n){return Yn(n)&&"[object Arguments]"==Vn(n)},qn=Kn,Jn=Object.prototype,Qn=Jn.hasOwnProperty,Xn=Jn.propertyIsEnumerable,Zn=Wn(function(){return arguments}())?Wn:function(n){return qn(n)&&Qn.call(n,"callee")&&!Xn.call(n,"callee")},nt=Array.isArray,tt=function(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=9007199254740991},et=U,rt=tt,ot=function(n){return null!=n&&rt(n.length)&&!et(n)},it=ot,ut=Kn,ct={exports:{}},at=function(){return!1};!function(n,t){var e=t&&!t.nodeType&&t,r=e&&ct&&!ct.nodeType&&ct,o=r&&r.exports===e?O.Buffer:void 0;ct.exports=(o?o.isBuffer:void 0)||at}(0,ct.exports);var st=B,lt=kn,ft=Kn,vt=Function.prototype.toString,dt=Object.prototype.hasOwnProperty,ht=vt.call(Object),bt=B,pt=tt,yt=Kn,St={};St["[object Float32Array]"]=St["[object Float64Array]"]=St["[object Int8Array]"]=St["[object Int16Array]"]=St["[object Int32Array]"]=St["[object Uint8Array]"]=St["[object Uint8ClampedArray]"]=St["[object Uint16Array]"]=St["[object Uint32Array]"]=!0,St["[object Arguments]"]=St["[object Array]"]=St["[object ArrayBuffer]"]=St["[object Boolean]"]=St["[object DataView]"]=St["[object Date]"]=St["[object Error]"]=St["[object Function]"]=St["[object Map]"]=St["[object Number]"]=St["[object Object]"]=St["[object RegExp]"]=St["[object Set]"]=St["[object String]"]=St["[object WeakMap]"]=!1;var gt={exports:{}};!function(n,t){var e=t&&!t.nodeType&&t,r=e&&n&&!n.nodeType&&n,o=r&&r.exports===e&&m.process,i=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(n){}}();n.exports=i}(gt,gt.exports);var jt,mt=function(n){return yt(n)&&pt(n.length)&&!!St[bt(n)]},wt=gt.exports,Ot=wt&&wt.isTypedArray,Et=Ot?function(n){return function(t){return n(t)}}(Ot):mt,At=function(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]},_t=Dn,Dt=s,Tt=Object.prototype.hasOwnProperty,Ct=function(n,t,e){var r=n[t];Tt.call(n,t)&&Dt(r,e)&&(void 0!==e||t in n)||_t(n,t,e)},Lt=Dn,Bt=/^(?:0|[1-9]\d*)$/,It=function(n,t){var e=typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==e||"symbol"!=e&&Bt.test(n))&&n>-1&&n%1==0&&n<t},Pt=Zn,Mt=nt,Ut=ct.exports,xt=It,Rt=Et,Ft=Object.prototype.hasOwnProperty,kt=I,zt=Nn,Nt=Object.prototype.hasOwnProperty,Ht=function(n,t){var e=Mt(n),r=!e&&Pt(n),o=!e&&!r&&Ut(n),i=!e&&!r&&!o&&Rt(n),u=e||r||o||i,c=u?function(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}(n.length,String):[],a=c.length;for(var s in n)!t&&!Ft.call(n,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||xt(s,a))||c.push(s);return c},$t=function(n){if(!kt(n))return function(n){var t=[];if(null!=n)for(var e in Object(n))t.push(e);return t}(n);var t=zt(n),e=[];for(var r in n)("constructor"!=r||!t&&Nt.call(n,r))&&e.push(r);return e},Gt=ot,Kt=function(n){return Gt(n)?Ht(n,!0):$t(n)},Vt=Kt,Yt=Ln,Wt=In.exports,qt=function(n,t){var e,r,o=t?(r=new(e=n.buffer).constructor(e.byteLength),new Un(r).set(new Un(e)),r):n.buffer;return new n.constructor(o,n.byteOffset,n.length)},Jt=function(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t},Qt=function(n){return"function"!=typeof n.constructor||Gn(n)?{}:Hn($n(n))},Xt=Zn,Zt=nt,ne=function(n){return ut(n)&&it(n)},te=ct.exports,ee=U,re=I,oe=function(n){if(!ft(n)||"[object Object]"!=st(n))return!1;var t=lt(n);if(null===t)return!0;var e=dt.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&vt.call(e)==ht},ie=Et,ue=At,ce=function(n){return function(n,t,e,r){var o=!e;e||(e={});for(var i=-1,u=t.length;++i<u;){var c=t[i],a=r?r(e[c],n[c],c,e,n):void 0;void 0===a&&(a=n[c]),o?Lt(e,c,a):Ct(e,c,a)}return e}(n,Vt(n))},ae=On,se=Ln,le=Bn,fe=I,ve=Kt,de=At,he=function(n){return n},be=Math.max,pe=An,ye=Date.now,Se=function(n){var t=0,e=0;return function(){var r=ye(),o=16-(r-e);if(e=r,o>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}(pe?function(n,t){return pe(n,"toString",{configurable:!0,enumerable:!1,value:(e=t,function(){return e}),writable:!0});var e}:he),ge=he,je=function(n,t,e){return t=be(void 0===t?n.length-1:t,0),function(){for(var r=arguments,o=-1,i=be(r.length-t,0),u=Array(i);++o<i;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=e(u),function(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}(n,this,c)}},me=Se,we=s,Oe=ot,Ee=It,Ae=I,_e=function n(t,e,r,o,i){t!==e&&le(e,(function(u,c){if(i||(i=new ae),fe(u))!function(n,t,e,r,o,i,u){var c=ue(n,e),a=ue(t,e),s=u.get(a);if(s)Yt(n,e,s);else{var l=i?i(c,a,e+"",n,t,u):void 0,f=void 0===l;if(f){var v=Zt(a),d=!v&&te(a),h=!v&&!d&&ie(a);l=a,v||d||h?Zt(c)?l=c:ne(c)?l=Jt(c):d?(f=!1,l=Wt(a,!0)):h?(f=!1,l=qt(a,!0)):l=[]:oe(a)||Xt(a)?(l=c,Xt(c)?l=ce(c):re(c)&&!ee(c)||(l=Qt(a))):f=!1}f&&(u.set(a,l),o(l,a,r,i,u),u.delete(a)),Yt(n,e,l)}}(t,e,c,r,n,o,i);else{var a=o?o(de(t,c),u,c+"",t,e,i):void 0;void 0===a&&(a=u),se(t,c,a)}}),ve)},De=(jt=function(n,t,e){_e(n,t,e)},function(n,t){return me(je(n,t,ge),n+"")}((function(n,t){var e=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=jt.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(n,t,e){if(!Ae(e))return!1;var r=typeof t;return!!("number"==r?Oe(e)&&Ee(t,e.length):"string"==r&&t in e)&&we(e[t],n)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),n=Object(n);++e<r;){var u=t[e];u&&jt(n,u,e)}return n})));const Te=(n,t,...e)=>{const r=[n,t,...e].filter(Boolean);return De.apply(null,r)},{onChange:Ce,reset:Le,state:Be}=c((()=>({appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutAddressService:null,checkoutSettings:{allowedCharacterSets:"ALL",allowedSettlementCurrencies:"LOCAL",analyticsProviders:[],companyFieldsStatus:"DISABLED",defaultCartExpiration:3600,externalPaymentMethods:[],externalServiceTokens:[],mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",disabledCountries:[],enabledVariantTestKeys:[],helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",desktopLocation:"BOTTOM_RIGHT",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",notFoundElementFallback:null,organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",visibilityStatus:"ENABLED"},loadedConfig:!1,onlineStoreSettings:{allowedDomains:[],url:""},organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null})));let Ie=null;const Pe=n=>"SYSTEM"===n?window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT":n,Me=({overrideSettings:n,zonosSettings:r})=>{var o,i,u,c,a,s,l,f;Le(),r&&(Ie=r);const v=Te(Be.appearance,(null==Ie?void 0:Ie.appearanceSettings)||(null==r?void 0:r.appearanceSettings)||null,null==n?void 0:n.appearance);"SYSTEM"===v.theme&&(v.theme=Pe(v.theme)),Be.onlineStoreSettings=Te(Be.onlineStoreSettings,(null==r?void 0:r.onlineStoreSettings)||null),Be.disabledCountries=(null===(o=null==r?void 0:r.checkoutSettings)||void 0===o?void 0:o.disabledCountries)||[],Be.appearance=v,Be.checkoutSettings=Te(Be.checkoutSettings,(null==Ie?void 0:Ie.checkoutSettings)||(null==r?void 0:r.checkoutSettings)||null,null==n?void 0:n.checkoutSettings),Be.helloSettings=Te(Be.helloSettings,(null==Ie?void 0:Ie.helloSettings)||(null==r?void 0:r.helloSettings)||null,null==n?void 0:n.helloSettings),Be.genericSettings=Te(Be.genericSettings,(null==Ie?void 0:Ie.genericSettings)||(null==r?void 0:r.genericSettings)||null),Be.loadedConfig=!0,Be.enabledVariantTestKeys=(null===(u=null===(i=null==r?void 0:r.checkoutSettings)||void 0===i?void 0:i.varianceTestRegistrations)||void 0===u?void 0:u.flatMap((({testKey:n})=>(n=>n in t)(n)?n:[])))||[],Be.organizationId=(null===(c=null==r?void 0:r.organization)||void 0===c?void 0:c.id)||"",Be.organizationName=(null===(a=null==r?void 0:r.organization)||void 0===a?void 0:a.name)||"",Be.storeId=(null===(l=null===(s=null==r?void 0:r.organization)||void 0===s?void 0:s.references)||void 0===l?void 0:l.storeId)||null,Be.currencyConverter=null==n?void 0:n.currencyConverter,Be.onCountryChange=null==n?void 0:n.onCountryChange,Be.overrideCurrencyFormat=null==n?void 0:n.overrideCurrencyFormat,Be.sourceCurrency=new URLSearchParams(window.location.search).get("zonosSourceCurrencyCode")||(null===(f=null==r?void 0:r.landedCostSettings)||void 0===f?void 0:f.defaultNativeCurrency)||"USD",e("Store base currency","info",Be.sourceCurrency),Be.storeId&&(window.Zonos.storeId=Be.storeId)},Ue=()=>Be.appearance.fontFamily||"Inter";export{O as _,a,B as b,c,I as d,Me as e,Ue as f,Pe as g,Ce as h,Kn as i,Te as m,Be as z}
|
|
1
|
+
import{S as n}from"./p-ce75b047.js";import{a as t,l as e}from"./p-0a377722.js";const r=(()=>{let n;return(...t)=>{n&&clearTimeout(n),n=setTimeout((()=>{n=0,(n=>{for(let t of n.keys()){const e=n.get(t).filter((n=>{const t=n.deref();return t&&(!("isConnected"in(e=t))||e.isConnected);var e}));n.set(t,e)}})(...t)}),2e3)}})(),o=n.forceUpdate,i=n.getRenderingRef,u=(n,t)=>{const e=n.indexOf(t);e>=0&&(n[e]=n[n.length-1],n.length--)},c=(n,t)=>{const e=((n,t=((n,t)=>n!==t))=>{const e=()=>{return("function"==typeof(t=n)?t():t)??{};var t},r=e();let o=new Map(Object.entries(r));const i="undefined"!=typeof Proxy,c=i?null:{},a={dispose:[],get:[],set:[],reset:[]},s=new Map,l=()=>{o=new Map(Object.entries(e())),i||p(),a.reset.forEach((n=>n()))},f=n=>(a.get.forEach((t=>t(n))),o.get(n)),v=(n,e)=>{const r=o.get(n);t(e,r,n)&&(o.set(n,e),i||b(n),a.set.forEach((t=>t(n,e,r))))},d=i?new Proxy(r,{get:(n,t)=>f(t),ownKeys:()=>Array.from(o.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(n,t)=>o.has(t),set:(n,t,e)=>(v(t,e),!0)}):(p(),c),h=(n,t)=>(a[n].push(t),()=>{u(a[n],t)});function b(n){!i&&c&&(Object.prototype.hasOwnProperty.call(c,n)||Object.defineProperty(c,n,{configurable:!0,enumerable:!0,get:()=>f(n),set(t){v(n,t)}}))}function p(){if(i||!c)return;const n=new Set(o.keys());for(const t of Object.keys(c))n.has(t)||delete c[t];for(const t of n)b(t)}return{state:d,get:f,set:v,on:h,onChange:(n,t)=>{const r=(e,r)=>{e===n&&t(r)},o=()=>{const r=e();t(r[n])},i=h("set",r),u=h("reset",o);return s.set(t,{setHandler:r,resetHandler:o,propName:n}),()=>{i(),u(),s.delete(t)}},use:(...n)=>{const t=n.reduce(((n,t)=>(t.set&&n.push(h("set",t.set)),t.get&&n.push(h("get",t.get)),t.reset&&n.push(h("reset",t.reset)),t.dispose&&n.push(h("dispose",t.dispose)),n)),[]);return()=>t.forEach((n=>n()))},dispose:()=>{a.dispose.forEach((n=>n())),l()},reset:l,forceUpdate:n=>{const t=o.get(n);a.set.forEach((e=>e(n,t,t)))},removeListener:(n,t)=>{const e=s.get(t);e&&e.propName===n&&(u(a.set,e.setHandler),u(a.reset,e.resetHandler),s.delete(t))}}})(n,t);return e.use((()=>{if("function"!=typeof i||"function"!=typeof o)return{};const n=o,t=i,e=new Map;return{dispose:()=>e.clear(),get:n=>{const r=t();r&&((n,t,e)=>{let r=n.get(t);r||(r=[],n.set(t,r)),r.some((n=>n.deref()===e))||r.push(new WeakRef(e))})(e,n,r)},set:t=>{const o=e.get(t);if(o){const r=o.filter((t=>{const e=t.deref();return!!e&&n(e)}));e.set(t,r)}r(e)},reset:()=>{e.forEach((t=>{t.forEach((t=>{const e=t.deref();e&&n(e)}))})),r(e)}}})()),e};var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},s=function(n,t){return n===t||n!=n&&t!=t},l=s,f=function(n,t){for(var e=n.length;e--;)if(l(n[e][0],t))return e;return-1},v=f,d=Array.prototype.splice,h=f,b=f,p=f;function y(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}y.prototype.clear=function(){this.__data__=[],this.size=0},y.prototype.delete=function(n){var t=this.__data__,e=v(t,n);return!(e<0||(e==t.length-1?t.pop():d.call(t,e,1),--this.size,0))},y.prototype.get=function(n){var t=this.__data__,e=h(t,n);return e<0?void 0:t[e][1]},y.prototype.has=function(n){return b(this.__data__,n)>-1},y.prototype.set=function(n,t){var e=this.__data__,r=p(e,n);return r<0?(++this.size,e.push([n,t])):e[r][1]=t,this};var S,g=y,j=g,m="object"==typeof a&&a&&a.Object===Object&&a,w="object"==typeof self&&self&&self.Object===Object&&self,O=m||w||Function("return this")(),E=O.Symbol,A=Object.prototype,_=A.hasOwnProperty,D=A.toString,T=E?E.toStringTag:void 0,C=Object.prototype.toString,L=E?E.toStringTag:void 0,B=function(n){return null==n?void 0===n?"[object Undefined]":"[object Null]":L&&L in Object(n)?function(n){var t=_.call(n,T),e=n[T];try{n[T]=void 0;var r=!0}catch(n){}var o=D.call(n);return r&&(t?n[T]=e:delete n[T]),o}(n):function(n){return C.call(n)}(n)},I=function(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)},P=B,M=I,U=function(n){if(!M(n))return!1;var t=P(n);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},x=O["__core-js_shared__"],R=(S=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+S:"",z=Function.prototype.toString,F=U,k=I,N=/^\[object .+?Constructor\]$/,H=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=function(n){return!(!k(n)||(t=n,R&&R in t))&&(F(n)?H:N).test(function(n){if(null!=n){try{return z.call(n)}catch(n){}try{return n+""}catch(n){}}return""}(n));var t},G=function(n,t){var e=function(n,t){return null==n?void 0:n[t]}(n,t);return $(e)?e:void 0},K=G(O,"Map"),V=G(Object,"create"),Y=V,W=V,q=Object.prototype.hasOwnProperty,J=V,Q=Object.prototype.hasOwnProperty,X=V;function Z(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}Z.prototype.clear=function(){this.__data__=Y?Y(null):{},this.size=0},Z.prototype.delete=function(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t},Z.prototype.get=function(n){var t=this.__data__;if(W){var e=t[n];return"__lodash_hash_undefined__"===e?void 0:e}return q.call(t,n)?t[n]:void 0},Z.prototype.has=function(n){var t=this.__data__;return J?void 0!==t[n]:Q.call(t,n)},Z.prototype.set=function(n,t){var e=this.__data__;return this.size+=this.has(n)?0:1,e[n]=X&&void 0===t?"__lodash_hash_undefined__":t,this};var nn=Z,tn=g,en=K,rn=function(n,t){var e,r,o=n.__data__;return("string"==(r=typeof(e=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?o["string"==typeof t?"string":"hash"]:o.map},on=rn,un=rn,cn=rn,an=rn;function sn(n){var t=-1,e=null==n?0:n.length;for(this.clear();++t<e;){var r=n[t];this.set(r[0],r[1])}}sn.prototype.clear=function(){this.size=0,this.__data__={hash:new nn,map:new(en||tn),string:new nn}},sn.prototype.delete=function(n){var t=on(this,n).delete(n);return this.size-=t?1:0,t},sn.prototype.get=function(n){return un(this,n).get(n)},sn.prototype.has=function(n){return cn(this,n).has(n)},sn.prototype.set=function(n,t){var e=an(this,n),r=e.size;return e.set(n,t),this.size+=e.size==r?0:1,this};var ln=g,fn=K,vn=sn,dn=g,hn=function(n){var t=this.__data__,e=t.delete(n);return this.size=t.size,e},bn=function(n){return this.__data__.get(n)},pn=function(n){return this.__data__.has(n)};function yn(n){var t=this.__data__=new dn(n);this.size=t.size}yn.prototype.clear=function(){this.__data__=new j,this.size=0},yn.prototype.delete=hn,yn.prototype.get=bn,yn.prototype.has=pn,yn.prototype.set=function(n,t){var e=this.__data__;if(e instanceof ln){var r=e.__data__;if(!fn||r.length<199)return r.push([n,t]),this.size=++e.size,this;e=this.__data__=new vn(r)}return e.set(n,t),this.size=e.size,this};var Sn,gn,jn,mn,wn,On=yn,En=G,An=function(){try{var n=En(Object,"defineProperty");return n({},"",{}),n}catch(n){}}(),_n=An,Dn=function(n,t,e){"__proto__"==t&&_n?_n(n,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):n[t]=e},Tn=Dn,Cn=s,Ln=function(n,t,e){(void 0!==e&&!Cn(n[t],e)||void 0===e&&!(t in n))&&Tn(n,t,e)},Bn=function(n,t,e){for(var r=-1,o=Object(n),i=e(n),u=i.length;u--;){var c=i[++r];if(!1===t(o[c],c,o))break}return n},In={exports:{}};wn=(mn=(jn=(gn=(Sn=In.exports)&&!Sn.nodeType&&Sn)&&In&&!In.nodeType&&In)&&jn.exports===gn?O.Buffer:void 0)?mn.allocUnsafe:void 0,In.exports=function(n,t){if(t)return n.slice();var e=n.length,r=wn?wn(e):new n.constructor(e);return n.copy(r),r};var Pn,Mn,Un=O.Uint8Array,xn=I,Rn=Object.create,zn=function(){function n(){}return function(t){if(!xn(t))return{};if(Rn)return Rn(t);n.prototype=t;var e=new n;return n.prototype=void 0,e}}(),Fn=(Pn=Object.getPrototypeOf,Mn=Object,function(n){return Pn(Mn(n))}),kn=Object.prototype,Nn=function(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||kn)},Hn=zn,$n=Fn,Gn=Nn,Kn=function(n){return null!=n&&"object"==typeof n},Vn=B,Yn=Kn,Wn=function(n){return Yn(n)&&"[object Arguments]"==Vn(n)},qn=Kn,Jn=Object.prototype,Qn=Jn.hasOwnProperty,Xn=Jn.propertyIsEnumerable,Zn=Wn(function(){return arguments}())?Wn:function(n){return qn(n)&&Qn.call(n,"callee")&&!Xn.call(n,"callee")},nt=Array.isArray,tt=function(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=9007199254740991},et=U,rt=tt,ot=function(n){return null!=n&&rt(n.length)&&!et(n)},it=ot,ut=Kn,ct={exports:{}},at=function(){return!1};!function(n,t){var e=t&&!t.nodeType&&t,r=e&&ct&&!ct.nodeType&&ct,o=r&&r.exports===e?O.Buffer:void 0;ct.exports=(o?o.isBuffer:void 0)||at}(0,ct.exports);var st=B,lt=Fn,ft=Kn,vt=Function.prototype.toString,dt=Object.prototype.hasOwnProperty,ht=vt.call(Object),bt=B,pt=tt,yt=Kn,St={};St["[object Float32Array]"]=St["[object Float64Array]"]=St["[object Int8Array]"]=St["[object Int16Array]"]=St["[object Int32Array]"]=St["[object Uint8Array]"]=St["[object Uint8ClampedArray]"]=St["[object Uint16Array]"]=St["[object Uint32Array]"]=!0,St["[object Arguments]"]=St["[object Array]"]=St["[object ArrayBuffer]"]=St["[object Boolean]"]=St["[object DataView]"]=St["[object Date]"]=St["[object Error]"]=St["[object Function]"]=St["[object Map]"]=St["[object Number]"]=St["[object Object]"]=St["[object RegExp]"]=St["[object Set]"]=St["[object String]"]=St["[object WeakMap]"]=!1;var gt={exports:{}};!function(n,t){var e=t&&!t.nodeType&&t,r=e&&n&&!n.nodeType&&n,o=r&&r.exports===e&&m.process,i=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(n){}}();n.exports=i}(gt,gt.exports);var jt,mt=function(n){return yt(n)&&pt(n.length)&&!!St[bt(n)]},wt=gt.exports,Ot=wt&&wt.isTypedArray,Et=Ot?function(n){return function(t){return n(t)}}(Ot):mt,At=function(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]},_t=Dn,Dt=s,Tt=Object.prototype.hasOwnProperty,Ct=function(n,t,e){var r=n[t];Tt.call(n,t)&&Dt(r,e)&&(void 0!==e||t in n)||_t(n,t,e)},Lt=Dn,Bt=/^(?:0|[1-9]\d*)$/,It=function(n,t){var e=typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==e||"symbol"!=e&&Bt.test(n))&&n>-1&&n%1==0&&n<t},Pt=Zn,Mt=nt,Ut=ct.exports,xt=It,Rt=Et,zt=Object.prototype.hasOwnProperty,Ft=I,kt=Nn,Nt=Object.prototype.hasOwnProperty,Ht=function(n,t){var e=Mt(n),r=!e&&Pt(n),o=!e&&!r&&Ut(n),i=!e&&!r&&!o&&Rt(n),u=e||r||o||i,c=u?function(n,t){for(var e=-1,r=Array(n);++e<n;)r[e]=t(e);return r}(n.length,String):[],a=c.length;for(var s in n)!t&&!zt.call(n,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||xt(s,a))||c.push(s);return c},$t=function(n){if(!Ft(n))return function(n){var t=[];if(null!=n)for(var e in Object(n))t.push(e);return t}(n);var t=kt(n),e=[];for(var r in n)("constructor"!=r||!t&&Nt.call(n,r))&&e.push(r);return e},Gt=ot,Kt=function(n){return Gt(n)?Ht(n,!0):$t(n)},Vt=Kt,Yt=Ln,Wt=In.exports,qt=function(n,t){var e,r,o=t?(r=new(e=n.buffer).constructor(e.byteLength),new Un(r).set(new Un(e)),r):n.buffer;return new n.constructor(o,n.byteOffset,n.length)},Jt=function(n,t){var e=-1,r=n.length;for(t||(t=Array(r));++e<r;)t[e]=n[e];return t},Qt=function(n){return"function"!=typeof n.constructor||Gn(n)?{}:Hn($n(n))},Xt=Zn,Zt=nt,ne=function(n){return ut(n)&&it(n)},te=ct.exports,ee=U,re=I,oe=function(n){if(!ft(n)||"[object Object]"!=st(n))return!1;var t=lt(n);if(null===t)return!0;var e=dt.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&vt.call(e)==ht},ie=Et,ue=At,ce=function(n){return function(n,t,e,r){var o=!e;e||(e={});for(var i=-1,u=t.length;++i<u;){var c=t[i],a=r?r(e[c],n[c],c,e,n):void 0;void 0===a&&(a=n[c]),o?Lt(e,c,a):Ct(e,c,a)}return e}(n,Vt(n))},ae=On,se=Ln,le=Bn,fe=I,ve=Kt,de=At,he=function(n){return n},be=Math.max,pe=An,ye=Date.now,Se=function(n){var t=0,e=0;return function(){var r=ye(),o=16-(r-e);if(e=r,o>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}(pe?function(n,t){return pe(n,"toString",{configurable:!0,enumerable:!1,value:(e=t,function(){return e}),writable:!0});var e}:he),ge=he,je=function(n,t,e){return t=be(void 0===t?n.length-1:t,0),function(){for(var r=arguments,o=-1,i=be(r.length-t,0),u=Array(i);++o<i;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=e(u),function(n,t,e){switch(e.length){case 0:return n.call(t);case 1:return n.call(t,e[0]);case 2:return n.call(t,e[0],e[1]);case 3:return n.call(t,e[0],e[1],e[2])}return n.apply(t,e)}(n,this,c)}},me=Se,we=s,Oe=ot,Ee=It,Ae=I,_e=function n(t,e,r,o,i){t!==e&&le(e,(function(u,c){if(i||(i=new ae),fe(u))!function(n,t,e,r,o,i,u){var c=ue(n,e),a=ue(t,e),s=u.get(a);if(s)Yt(n,e,s);else{var l=i?i(c,a,e+"",n,t,u):void 0,f=void 0===l;if(f){var v=Zt(a),d=!v&&te(a),h=!v&&!d&&ie(a);l=a,v||d||h?Zt(c)?l=c:ne(c)?l=Jt(c):d?(f=!1,l=Wt(a,!0)):h?(f=!1,l=qt(a,!0)):l=[]:oe(a)||Xt(a)?(l=c,Xt(c)?l=ce(c):re(c)&&!ee(c)||(l=Qt(a))):f=!1}f&&(u.set(a,l),o(l,a,r,i,u),u.delete(a)),Yt(n,e,l)}}(t,e,c,r,n,o,i);else{var a=o?o(de(t,c),u,c+"",t,e,i):void 0;void 0===a&&(a=u),se(t,c,a)}}),ve)},De=(jt=function(n,t,e){_e(n,t,e)},function(n,t){return me(je(n,t,ge),n+"")}((function(n,t){var e=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=jt.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(n,t,e){if(!Ae(e))return!1;var r=typeof t;return!!("number"==r?Oe(e)&&Ee(t,e.length):"string"==r&&t in e)&&we(e[t],n)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),n=Object(n);++e<r;){var u=t[e];u&&jt(n,u,e)}return n})));const Te=(n,t,...e)=>{const r=[n,t,...e].filter(Boolean);return De.apply(null,r)},{onChange:Ce,reset:Le,state:Be}=c((()=>({appearance:{colorPrimary:"white",fontFamily:"Inter",logoUrl:"",style:"ROUNDED",theme:"LIGHT",zonosAttribution:"DISABLED"},checkoutAddressService:null,checkoutSettings:{allowedCharacterSets:"ALL",allowedSettlementCurrencies:"LOCAL",analyticsProviders:[],companyFieldsStatus:"DISABLED",defaultCartExpiration:3600,externalPaymentMethods:[],externalServiceTokens:[],mode:"TEST",orderNotifications:{abandonedCart:{delay:0,discountPercent:0,status:{active:"DISABLED",sendCopiesTo:[]}},orderCancelled:{active:"DISABLED",sendCopiesTo:[]},orderConfirmation:{active:"DISABLED",sendCopiesTo:[]},orderShipped:{active:"DISABLED",sendCopiesTo:[]}},organization:"",placeOrderButtonSelector:null,subscriptionStatus:"INACTIVE",successBehavior:"REDIRECT_TO_SUCCESS_PAGE",successRedirectUrl:"",visibilityStatus:"ENABLED"},currentHelloPage:"",disabledCountries:[],enabledVariantTestKeys:[],helloSettings:{anchorElementSelector:"",cartUrlPattern:"",countryOverrideBehavior:"URL_PARAM",currencyBehavior:"ENABLED",currencyElementSelector:".money",desktopLocation:"BOTTOM_RIGHT",excludedUrlPatterns:[],homepageUrlPattern:"",mobileLocation:"BOTTOM_RIGHT",mode:"LIVE",notFoundElementFallback:null,organization:"",peekMessageBehavior:"ENABLED",peekMessageDelay:0,productAddToCartElementSelector:"",productDescriptionElementSelector:"",productDetailUrlPattern:"",productListUrlPattern:"",productTitleElementSelector:"",restrictionBehavior:"DISABLED",visibilityStatus:"ENABLED",widgetSize:null},loadedConfig:!1,onlineStoreSettings:{allowedDomains:[],url:""},organizationId:"",organizationName:"",sourceCurrency:"USD",storeId:null,stripeApiKey:"",zonosApiKey:"",zonosMode:null})));let Ie=null;const Pe=n=>"SYSTEM"===n?window.matchMedia("(prefers-color-scheme: dark)").matches?"DARK":"LIGHT":n,Me=({overrideSettings:n,zonosSettings:r})=>{var o,i,u,c,a,s,l,f;Le(),r&&(Ie=r);const v=Te(Be.appearance,(null==Ie?void 0:Ie.appearanceSettings)||(null==r?void 0:r.appearanceSettings)||null,null==n?void 0:n.appearance);"SYSTEM"===v.theme&&(v.theme=Pe(v.theme)),Be.onlineStoreSettings=Te(Be.onlineStoreSettings,(null==r?void 0:r.onlineStoreSettings)||null),Be.disabledCountries=(null===(o=null==r?void 0:r.checkoutSettings)||void 0===o?void 0:o.disabledCountries)||[],Be.appearance=v,Be.checkoutSettings=Te(Be.checkoutSettings,(null==Ie?void 0:Ie.checkoutSettings)||(null==r?void 0:r.checkoutSettings)||null,null==n?void 0:n.checkoutSettings),Be.helloSettings=Te(Be.helloSettings,(null==Ie?void 0:Ie.helloSettings)||(null==r?void 0:r.helloSettings)||null,null==n?void 0:n.helloSettings),Be.genericSettings=Te(Be.genericSettings,(null==Ie?void 0:Ie.genericSettings)||(null==r?void 0:r.genericSettings)||null),Be.loadedConfig=!0,Be.enabledVariantTestKeys=(null===(u=null===(i=null==r?void 0:r.checkoutSettings)||void 0===i?void 0:i.varianceTestRegistrations)||void 0===u?void 0:u.flatMap((({testKey:n})=>(n=>n in t)(n)?n:[])))||[],Be.organizationId=(null===(c=null==r?void 0:r.organization)||void 0===c?void 0:c.id)||"",Be.organizationName=(null===(a=null==r?void 0:r.organization)||void 0===a?void 0:a.name)||"",Be.storeId=(null===(l=null===(s=null==r?void 0:r.organization)||void 0===s?void 0:s.references)||void 0===l?void 0:l.storeId)||null,Be.currencyConverter=null==n?void 0:n.currencyConverter,Be.onCountryChange=null==n?void 0:n.onCountryChange,Be.overrideCurrencyFormat=null==n?void 0:n.overrideCurrencyFormat,Be.sourceCurrency=new URLSearchParams(window.location.search).get("zonosSourceCurrencyCode")||(null===(f=null==r?void 0:r.landedCostSettings)||void 0===f?void 0:f.defaultNativeCurrency)||"USD",e("Store base currency","info",Be.sourceCurrency),Be.storeId&&(window.Zonos.storeId=Be.storeId)},Ue=()=>Be.appearance.fontFamily||"Inter";export{O as _,a,B as b,c,I as d,Me as e,Ue as f,Pe as g,Ce as h,Kn as i,Te as m,Be as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as t,a as s}from"./p-ce75b047.js";import{d as e}from"./p-
|
|
1
|
+
import{r as o,h as t,a as s}from"./p-ce75b047.js";import{d as e}from"./p-9eff0691.js";import{t as n}from"./p-37f47658.js";import{r as i}from"./p-2fc253b3.js";import{c as a}from"./p-b4b7f705.js";import{c as l}from"./p-14ce8e3a.js";import{r as c}from"./p-1b8771bb.js";import"./p-f3cfd8fa.js";import"./p-0a377722.js";import"./p-41dd1cb8.js";import"./p-d28be518.js";import"./p-db3b101a.js";const r=class{constructor(t){o(this,t),this.isMobile=!1,this.errorImages=[],this.locale=null}componentWillLoad(){const o=navigator.language;this.locale=o}render(){const o=e.items.filter((o=>!o.isRestricted));return t(s,{key:"a79106d8930a18d9806ca7f82dbfada663f46964",class:a(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"89496bfdd77e168ee388d94e83981b3657fea40b",class:"zonos--cart-table"},t("tbody",{key:"fa5a7a17018942300f8168e2d1ac0ea349f02da5"},o.map((o=>{var s,e,a,l;const c=null===(e=null===(s=o.attributes)||void 0===s?void 0:s.find((o=>"invoiceId"===o.key||"INVOICE_ID"===o.key)))||void 0===e?void 0:e.value,r=null===(l=null===(a=o.attributes)||void 0===a?void 0:a.find((o=>"invoiceCreatedAt"===o.key)))||void 0===l?void 0:l.value,h=r&&this.locale?new Date(r).toLocaleDateString(this.locale,{day:"numeric",month:"long",year:"numeric"}):null,d=c?`https://dashboard.zonos.com/billing/invoices/${c}`:null;return t("tr",{class:"zonos--invoice-cart-item"},t("td",{class:"zonos--column zonos--cart-item-title"},t("zonos-text",{type:"semiBoldLabel"},n("Invoice:"))),t("td",{class:"zonos--column zonos--cart-item-link"},d&&c&&t("zonos-link",{href:d},c),this.isMobile&&t("zonos-text",{type:"caption"},h)),t("td",{class:"zonos--column zonos--cart-item-created-at"},!this.isMobile&&t("zonos-text",{type:"label"},h)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"label"},i({amount:o.amount,isForeign:!1}))))})))))}static get assetsDirs(){return["assets"]}};r.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--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";const h=class{constructor(t){o(this,t),this.isMobile=!1}render(){return t(s,{key:"4b2a1e8fe3d6b6c4bafa16bbcd596c10fc19267d",class:a(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},t("table",{key:"34b2b3019193b694d3a38560aeec57289f1ef284",class:"zonos--invoice-table"},t("tr",{key:"76ba9947536d494fe651da0a94b8e66a702f5728",class:"zonos--row zonos--invoice-total"},t("td",{key:"1510c0eb1f4db6bd3f4295b0eba6c1b845f86043",class:"zonos--column"}),t("td",{key:"5d3a1fde0d9bac22ee32f961da18f749e01b2038",class:"zonos--column zonos--invoice-subtotal-title"},t("zonos-text",{key:"0e61607f2795cea761e6082749ac9e85ec5a502a",type:"semiBoldLabel"},n("Payment total"))),t("td",{key:"5b5bf8f17e8850b4b6428454adfb05f85a0a9f63",class:"zonos--column zonos--invoice-subtotal-price"},c({content:t("zonos-text",{type:"semiBoldLabel"},i({amount:l.amountTotalDue||0,isForeign:!0})),isLoading:l.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))}static get assetsDirs(){return["assets"]}};h.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{position:-webkit-sticky;position:sticky;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";export{r as zonos_invoice_cart_items,h as zonos_invoice_subtotal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,d as s,h as e,a as t}from"./p-ce75b047.js";import{f as a}from"./p-
|
|
1
|
+
import{r as o,d as s,h as e,a as t}from"./p-ce75b047.js";import{f as a}from"./p-f3cfd8fa.js";import{c as n}from"./p-b4b7f705.js";import{g as i}from"./p-db3b101a.js";import{i as r}from"./p-d28be518.js";import"./p-0a377722.js";const l=["blue","cyan","green","orange","purple","red","gray","glass"];let h=0;const d=class{constructor(e){o(this,e),this.checkboxSelected=s(this,"checkboxSelected",7),this.inputId="zonos--checkbox-"+ ++h,this.backgroundColor="blue",this.isChecked=!1,this.isDisabled=!1,this.size=12,this.fontSize="base"}onClick(){this.isDisabled||this.checkboxSelected.emit(!this.isChecked)}render(){const o=l.includes(this.backgroundColor),s=o?`var(--zonos-elements-${this.backgroundColor}-600)`:this.backgroundColor,h=o?`var(--zonos-elements-${this.backgroundColor}-200)`:r(s)?"var(--zonos-elements-gray-0)":"var(--zonos-elements-gray-800)",d=i({customRoundRadius:"4px",overrideBorderStyle:this.borderStyle});return e(t,{key:"b72500a3ead1362eebf6cd90fc60fddbade0bccf",class:n(["zonos--elements zonos--checkbox"]),style:{"--zonos--background-color":s,"--zonos--border-radius":d,"--zonos--font-family":a(),"--zonos--size":`${this.size}px`}},e("label",{key:"3a5104fa8f2b3874108f27732df0aee9d4bebbd6",class:n([this.isDisabled&&"disabled"]),htmlFor:this.inputId},e("input",{key:"aea12725ffa80d01c7fe1753d637f6e94e1d0fad",checked:this.isChecked,disabled:this.isDisabled,hidden:!0,id:this.inputId,onChange:o=>{this.checkboxSelected.emit(o.target.checked)},type:"checkbox"}),e("span",{key:"807f1b1b8acf88793abe74d329c8ffd81a450d9b",class:"checkmark-container"},e("svg",{key:"18bec57b0554f70704f5c53e57a5929a48165f44",class:"checkmark",color:h,fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"d98ba6681c05d63e242518b332b7d3292e19d39e","clip-rule":"evenodd",d:"M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z",fill:"currentColor","fill-rule":"evenodd"}))),this.label&&e("zonos-text",{key:"f540e55464dd67bf513cf6a77b078c7492945b50",size:this.fontSize},this.label)))}};d.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:-ms-inline-flexbox;display:inline-flex;cursor:pointer}:host label{display:-ms-inline-flexbox;display:inline-flex;position:relative;gap:8px;-ms-flex-align:center;align-items:center}:host label.disabled{cursor:not-allowed;opacity:0.6}:host input[type=checkbox]{opacity:0;position:absolute;left:0;width:0;height:0;top:0;z-index:-99999}:host svg{opacity:0}:host .checkmark-container{height:var(--zonos--size);width:var(--zonos--size);background-color:transparent;border:1.5px solid var(--zonos-elements-gray-400);position:relative;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host .checkmark{opacity:0;position:absolute;top:-1.5px;left:-1.5px;right:-1.5px;bottom:-1.5px;width:calc(100% + 3px);-webkit-transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);transition:0.3s all cubic-bezier(0.175, 0.885, 0.32, 1.275);-webkit-transform:scale(0.4);transform:scale(0.4);background-color:var(--zonos--background-color);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-4))}:host input[type=checkbox]:checked~.checkmark-container .checkmark{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";const c=class{constructor(e){o(this,e),this.toggleChanged=s(this,"toggleChanged",7),this.options=[]}render(){return e(t,{key:"a69d1282e442b2cc5b24df68ee41c452b02fb022",class:n(["zonos--elements zonos--toggle"]),style:{"--zonos--font-family":a()}},e("div",{key:"a0fff3107e8d9a98d3ff323379c6e39bee294eca",class:"wrapper"},this.options.map((o=>e("button",{class:n(["zonos--option",o.value===this.value&&"selected"]),key:o.value,onClick:()=>{this.toggleChanged.emit(o.value)}},o.label)))))}};c.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:-ms-inline-flexbox;display:inline-flex}:host .wrapper{position:relative;border-radius:6px;background-color:var(--zonos-elements-gray-50);display:-ms-flexbox;display:flex}:host .zonos--toggle-selected-slider{z-index:1;position:absolute;background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}:host .zonos--option{background:transparent;border:0;z-index:2;cursor:pointer;padding:4px 12px;border-radius:6px;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);font-size:var(--zonos-elements-font-size-base);font-weight:500;color:var(--zonos-elements-text-color-secondary)}:host .zonos--option:focus{outline:none}:host .zonos--option:hover:not(.selected){color:var(--zonos-elements-text-color)}:host .zonos--option.selected{color:var(--zonos-elements-text-color);background-color:var(--zonos-elements-raised-surface-color);height:100%;-webkit-box-shadow:var(--zonos-elements-shadow-button-standard);box-shadow:var(--zonos-elements-shadow-button-standard);border-radius:6px;-webkit-animation:translate 0.3s ease-in-out;animation:translate 0.3s ease-in-out}";export{d as zonos_checkbox,c as zonos_toggle}
|