@zonos/elements 1.3.246 → 1.3.248
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/ShortAddressCode-bec338b0.js +7 -0
- package/dist/cjs/{cart-52cf3366.js → cart-28310848.js} +37 -6
- package/dist/cjs/getContrastColor-30848800.js +37 -0
- package/dist/cjs/{hasInclusivePrice-dbb82df8.js → hasInclusivePrice-134b0250.js} +1 -1
- package/dist/cjs/index.cjs.js +16 -7
- package/dist/cjs/{invoice-972f1ab3.js → invoice-2e8e5879.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-fd11246c.js → isCollectMobileTablet-bd0f4556.js} +2 -2
- package/dist/cjs/isContrastColor-09f5924a.js +12 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-b1075a8c.js → localization-00e73920.js} +180 -0
- package/dist/cjs/{paypal-e339cc8c.js → paypal-3019ae94.js} +24 -29
- package/dist/cjs/{placeTestOrder-3dfbe3d6.js → placeTestOrder-b0369cfd.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-55056c97.js → renderCheckoutCurrency-9e919b9f.js} +2 -2
- package/dist/cjs/{shouldRenderTaxIdInput-eda13ef8.js → shouldRenderTaxIdInput-b8abf6de.js} +18 -0
- package/dist/cjs/submitGtag-a50ab32e.js +116 -0
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +35 -5
- package/dist/cjs/zonos-address_4.cjs.entry.js +37 -7
- package/dist/cjs/zonos-card_5.cjs.entry.js +5 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +170 -57
- package/dist/cjs/zonos-checkout.cjs.entry.js +31 -9
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +14 -12
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -12
- package/dist/cjs/zonos-invoice.cjs.entry.js +6 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +18 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +88 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +9 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +26 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +16 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +31 -6
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +35 -4
- package/dist/collection/components/main/zonos-controller.js +4 -1
- package/dist/collection/components/store/checkout/paypal.js +19 -1
- package/dist/collection/components/store/checkout/stripe.js +34 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +53 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -2
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/components/utils/checkout/shouldRenderShortAddressCodeInput.js +16 -0
- package/dist/collection/components/utils/shortAddressCodeValidationResult.js +37 -0
- package/dist/collection/components/utils/submitGtag.js +90 -2
- package/dist/collection/scripts/_zonosBase.js +7 -0
- package/dist/collection/types/analyticsRelay.js +6 -0
- package/dist/collection/types/checkout/ShortAddressCode.js +3 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
- package/dist/collection/types/generated/graphql.internal.types.js +135 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/ShortAddressCode-7620e622.js +5 -0
- package/dist/esm/{cart-7f4704dc.js → cart-ba8f3890.js} +37 -6
- package/dist/esm/getContrastColor-28c18704.js +35 -0
- package/dist/esm/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm/index.js +15 -7
- package/dist/esm/{invoice-d3d256fb.js → invoice-055bb6e5.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-797cea8b.js} +2 -2
- package/dist/esm/isContrastColor-69778cea.js +10 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-401ec6d4.js → localization-853b48a9.js} +180 -0
- package/dist/esm/{paypal-61270b79.js → paypal-8d8518c0.js} +25 -28
- package/dist/esm/{placeTestOrder-c2180600.js → placeTestOrder-0a74923e.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-bd059ecf.js} +2 -2
- package/dist/esm/{shouldRenderTaxIdInput-d45ceeb4.js → shouldRenderTaxIdInput-2572bf77.js} +18 -1
- package/dist/esm/submitGtag-89d6e9cb.js +113 -0
- package/dist/esm/zonos-address-display_9.entry.js +35 -5
- package/dist/esm/zonos-address_4.entry.js +37 -7
- package/dist/esm/zonos-card_5.entry.js +5 -3
- package/dist/esm/zonos-cart-items_12.entry.js +170 -57
- package/dist/esm/zonos-checkout.entry.js +31 -9
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +14 -12
- package/dist/esm/zonos-collect.entry.js +6 -4
- package/dist/esm/zonos-controller.entry.js +6 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +14 -12
- package/dist/esm/zonos-invoice.entry.js +6 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +19 -5
- package/dist/esm-es5/ShortAddressCode-7620e622.js +1 -0
- package/dist/esm-es5/cart-ba8f3890.js +1 -0
- package/dist/esm-es5/getContrastColor-28c18704.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-3958ed11.js → hasInclusivePrice-6fcc712f.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-d3d256fb.js → invoice-055bb6e5.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-27693de5.js → isCollectMobileTablet-797cea8b.js} +1 -1
- package/dist/esm-es5/isContrastColor-69778cea.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-853b48a9.js +1 -0
- package/dist/esm-es5/paypal-8d8518c0.js +17 -0
- package/dist/esm-es5/{placeTestOrder-c2180600.js → placeTestOrder-0a74923e.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-dea06d44.js → renderCheckoutCurrency-bd059ecf.js} +1 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-2572bf77.js +1 -0
- package/dist/esm-es5/submitGtag-89d6e9cb.js +1 -0
- package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.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-checkout.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-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-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-shipping-rich-radio.entry.js +1 -1
- package/dist/scripts/analyticsRelayOnInit.js +1 -0
- package/dist/scripts/index.d.ts +61 -4
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +4 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -0
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +10 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +8 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +8 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/shouldRenderShortAddressCodeInput.d.ts +6 -0
- package/dist/types/components/utils/shortAddressCodeValidationResult.d.ts +12 -0
- package/dist/types/components/utils/submitGtag.d.ts +32 -2
- package/dist/types/components.d.ts +32 -0
- package/dist/types/scripts/_zonosBase.d.ts +11 -0
- package/dist/types/types/analyticsRelay.d.ts +12 -0
- package/dist/types/types/checkout/ShortAddressCode.d.ts +2 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/checkout/api/CreateParty.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +3 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +3 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +157 -30
- package/dist/types/types/generated/graphql.internal.types.ts +194 -37
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-002e45f9.system.js +17 -0
- package/dist/zonos-elements/p-0792688d.system.entry.js +1 -0
- package/dist/zonos-elements/p-09aabce0.js +1 -0
- package/dist/zonos-elements/p-0b7beb16.system.entry.js +1 -0
- package/dist/zonos-elements/p-0f787f5d.entry.js +1 -0
- package/dist/zonos-elements/p-0ff93ca6.entry.js +1 -0
- package/dist/zonos-elements/p-14735e9a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-367c13db.system.entry.js → p-1acf0a71.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1d42cd20.js +1 -0
- package/dist/zonos-elements/p-1dbeeab2.entry.js +1 -0
- package/dist/zonos-elements/p-291f7ccb.system.entry.js +1 -0
- package/dist/zonos-elements/{p-67820c21.system.entry.js → p-2f55895c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-37bb5f2d.entry.js +1 -0
- package/dist/zonos-elements/{p-fe699cc5.system.entry.js → p-3908f78d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3972663a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-4d7b82b5.entry.js → p-39fa55c7.entry.js} +1 -1
- package/dist/zonos-elements/p-3e85b9f5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-cee69784.entry.js → p-403b9fca.entry.js} +1 -1
- package/dist/zonos-elements/p-41299ffb.js +1 -0
- package/dist/zonos-elements/p-443e1f30.system.js +1 -0
- package/dist/zonos-elements/p-48475755.entry.js +1 -0
- package/dist/zonos-elements/p-48d55793.system.js +1 -0
- package/dist/zonos-elements/{p-3f46d83e.entry.js → p-58248f03.entry.js} +1 -1
- package/dist/zonos-elements/p-5edef7c3.system.js +1 -0
- package/dist/zonos-elements/p-63a383f4.js +1 -0
- package/dist/zonos-elements/{p-415c2a90.system.js → p-63a3d3b9.system.js} +1 -1
- package/dist/zonos-elements/p-64661dd1.js +1 -0
- package/dist/zonos-elements/p-655ec440.system.js +1 -0
- package/dist/zonos-elements/p-69212d0f.entry.js +1 -0
- package/dist/zonos-elements/{p-4bd8a16c.entry.js → p-69b9b711.entry.js} +1 -1
- package/dist/zonos-elements/p-719403e0.system.js +1 -0
- package/dist/zonos-elements/{p-133e9ce7.system.entry.js → p-71a8d971.system.entry.js} +1 -1
- package/dist/zonos-elements/p-71d855b8.system.entry.js +1 -0
- package/dist/zonos-elements/p-71f10bf0.entry.js +1 -0
- package/dist/zonos-elements/p-72ff005c.entry.js +1 -0
- package/dist/zonos-elements/p-786d1c24.js +1 -0
- package/dist/zonos-elements/{p-87206522.system.entry.js → p-7b400b5f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7dba5f23.system.js +1 -0
- package/dist/zonos-elements/{p-6b9b7cfb.system.entry.js → p-8205ae87.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a88a130.entry.js → p-83377e23.entry.js} +1 -1
- package/dist/zonos-elements/p-85e59f3a.system.entry.js +1 -0
- package/dist/zonos-elements/p-866afec1.js +1 -0
- package/dist/zonos-elements/p-942358eb.system.js +1 -0
- package/dist/zonos-elements/p-94c5fbfc.system.entry.js +1 -0
- package/dist/zonos-elements/p-a12cb7ce.entry.js +1 -0
- package/dist/zonos-elements/p-abf38ed6.js +1 -0
- package/dist/zonos-elements/{p-e0809901.system.js → p-ae16dda9.system.js} +1 -1
- package/dist/zonos-elements/p-ae26aec5.system.js +1 -0
- package/dist/zonos-elements/p-af85846e.system.js +1 -0
- package/dist/zonos-elements/{p-78c8bb58.system.entry.js → p-b54a95ea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a79f3685.js → p-bc4bfa06.js} +1 -1
- package/dist/zonos-elements/p-bf5e47e2.entry.js +1 -0
- package/dist/zonos-elements/p-c027a832.system.js +1 -0
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/p-c2f34b10.system.entry.js +1 -0
- package/dist/zonos-elements/p-c36696f9.js +1 -0
- package/dist/zonos-elements/p-c7311ce5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-faae5eca.entry.js → p-d5b7d3c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-288aab46.js → p-de8899bc.js} +1 -1
- package/dist/zonos-elements/p-e17bbcee.entry.js +1 -0
- package/dist/zonos-elements/p-eea7ac64.js +1 -0
- package/dist/zonos-elements/p-f6c2c743.entry.js +1 -0
- package/dist/zonos-elements/p-fe06c9ea.js +17 -0
- package/dist/zonos-elements/p-fe96e239.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-7f4704dc.js +0 -1
- package/dist/esm-es5/localization-401ec6d4.js +0 -1
- package/dist/esm-es5/paypal-61270b79.js +0 -17
- package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +0 -1
- package/dist/zonos-elements/p-01b0a2e2.js +0 -1
- package/dist/zonos-elements/p-095f43ec.entry.js +0 -1
- package/dist/zonos-elements/p-1d91e5d1.entry.js +0 -1
- package/dist/zonos-elements/p-21fb6b39.js +0 -1
- package/dist/zonos-elements/p-2601538e.entry.js +0 -1
- package/dist/zonos-elements/p-276faa43.js +0 -1
- package/dist/zonos-elements/p-27874c22.entry.js +0 -1
- package/dist/zonos-elements/p-2889a485.system.entry.js +0 -1
- package/dist/zonos-elements/p-291b85f7.entry.js +0 -1
- package/dist/zonos-elements/p-2d2c627a.system.js +0 -1
- package/dist/zonos-elements/p-3b1898bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-3f078bf5.system.entry.js +0 -1
- package/dist/zonos-elements/p-518b501c.system.entry.js +0 -1
- package/dist/zonos-elements/p-59ebb8c7.system.entry.js +0 -1
- package/dist/zonos-elements/p-5f956a0d.entry.js +0 -1
- package/dist/zonos-elements/p-6c29de12.entry.js +0 -1
- package/dist/zonos-elements/p-74e258ff.system.js +0 -1
- package/dist/zonos-elements/p-775c1122.system.js +0 -1
- package/dist/zonos-elements/p-7a6ab319.system.entry.js +0 -1
- package/dist/zonos-elements/p-85430ec1.js +0 -1
- package/dist/zonos-elements/p-872f9c22.system.entry.js +0 -1
- package/dist/zonos-elements/p-95524f54.js +0 -1
- package/dist/zonos-elements/p-993723c2.system.entry.js +0 -1
- package/dist/zonos-elements/p-a0a62b7e.js +0 -17
- package/dist/zonos-elements/p-a3411f20.entry.js +0 -1
- package/dist/zonos-elements/p-a556ec07.system.js +0 -17
- package/dist/zonos-elements/p-a6489088.js +0 -1
- package/dist/zonos-elements/p-acc0eee3.system.js +0 -1
- package/dist/zonos-elements/p-bd10e82a.system.entry.js +0 -1
- package/dist/zonos-elements/p-c62b6741.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6aa780e.entry.js +0 -1
- package/dist/zonos-elements/p-d1effb76.system.js +0 -1
- package/dist/zonos-elements/p-e7543082.system.js +0 -1
- package/dist/zonos-elements/p-e7df8394.entry.js +0 -1
- package/dist/zonos-elements/p-e90e9584.entry.js +0 -1
- package/dist/zonos-elements/p-eb9ee025.system.js +0 -1
- package/dist/zonos-elements/p-ebef34e3.entry.js +0 -1
- package/dist/zonos-elements/p-f6c6b6d3.system.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,o,t,n){function r(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function c(e){try{a(n["throw"](e))}catch(e){i(e)}}function a(e){e.done?t(e.value):r(e.value).then(s,c)}a((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,r,i,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(o){return a([e,o])}}function a(c){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(n=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=o.call(e,t)}catch(e){c=[6,e];r=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,r=o.length,i;n<r;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};System.register(["./p-989d3af9.system.js","./p-c027a832.system.js","./p-002e45f9.system.js","./p-ae26aec5.system.js","./p-d45285aa.system.js","./p-398d9022.system.js","./p-01174496.system.js","./p-f8d56ba9.system.js","./p-40a4c8a2.system.js","./p-d938f42f.system.js","./p-23e7c655.system.js","./p-bf37ccc7.system.js","./p-23d497e3.system.js","./p-909e2bc3.system.js","./p-1aa93d1e.system.js","./p-5edef7c3.system.js","./p-2770ba48.system.js","./p-443e1f30.system.js","./p-c6e3d747.system.js"],(function(e){"use strict";var o,t,n,r,i,s,c,a,u,d,l,h,f,v,m,p,z,g,w,k,y,b,_,C,x,S,T,I,A,O,E,N,P,j,L,D,U,R,B,F,M,Z,H,K,V,G,W,Y,q,Q,J,X,$,ee,oe,te,ne,re,ie,se,ce,ae,ue,de,le,he,fe,ve,me,pe,ze;return{setters:[function(e){o=e.r;t=e.h;n=e.F;r=e.H},function(e){i=e.s;s=e.a;c=e.b;a=e.i;u=e.c;d=e.d;l=e.e;h=e.f;f=e.g;v=e.h;m=e.j;p=e.k;z=e.l;g=e.t;w=e.m;k=e.n;y=e.o;b=e.p;_=e.q;C=e.r;x=e.u;S=e.v;T=e.w;I=e.x;A=e.y;O=e.z},function(e){E=e.p;N=e.a;P=e.b},function(e){j=e.f;L=e.l;D=e.a;U=e.g;R=e.s;B=e.V;F=e.b;M=e.t;Z=e.c;H=e.d},function(e){K=e.z;V=e.g;G=e.m},function(e){W=e.b},function(e){Y=e.h;q=e.b;Q=e.g;J=e.l;X=e.j;$=e.s;ee=e.a;oe=e.i},function(e){te=e.u},function(e){ne=e._;re=e.c;ie=e.a;se=e.d;ce=e.g},function(e){ae=e.l;ue=e.g;de=e.b},function(e){le=e.c},function(e){he=e.c},function(e){fe=e.g},function(e){ve=e.i},function(e){me=e.s},function(e){pe=e.s},function(e){ze=e.R},function(){},function(){}],execute:function(){var ge=this;var we=function(){return __awaiter(ge,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,Y("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=n.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var ke=function(e){return __awaiter(ge,[e],void 0,(function(e){var o,t,n,r;var i=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(i.length===0){return[2,null]}return[4,Y("/api/zonos-elements/select-variance-test",{body:{testKeys:i},method:"POST"})];case 1:o=e.sent(),t=o.errors,n=o.json;if(t.length||!n){return[2,null]}r=j(n);return[2,r]}}))}))};var ye=function(e){var o=e.cartId,t=e.checkoutSessionId,n=e.customerAddress1,r=e.customerAddress2,i=e.customerCity,s=e.customerCountry,c=e.customerEmail,a=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,h=e.customerZip,f=e.hostedCheckoutUrl,v=e.isTestMode,m=e.isVariantTest;var p=new URLSearchParams;p.set("tempCartUUID",o);if(a){p.set("customerFirstName",a)}if(u){p.set("customerLastName",u)}if(c){p.set("customerEmail",c)}if(d){p.set("customerPhone",d)}if(h){p.set("customerZip",h)}if(i){p.set("customerCity",i)}if(l){p.set("customerState",l)}if(s){p.set("zCountry",s)}if(n){p.set("customerAddress1",n)}if(r){p.set("customerAddress2",r)}if(v){p.set("zonosTestMode","1")}if(t){p.set("zonosCheckoutSessionId",t)}if(m){p.set("zonosVariantTest","1")}return"".concat(f,"?").concat(p.toString())};var be=function(e){if(e===void 0){e=true}if(!L.localizationLoaded){return true}if(L.isDisabledCountry){if(e){ae("Checkout: disabled country")}return true}return false};var _e=function(e,o){if(e===void 0){e=true}var t;if(!L.localizationLoaded){return false}if(o){var n=!!((t=L.shippingZoneCountries)===null||t===void 0?void 0:t[o])&&!K.disabledCountries.includes(o);if(e&&!n){ae("Checkout: ".concat(o," is not a shippable country: ").concat(n))}return n}if(!L.isShippableCountry){if(e){ae("Checkout: not shippable country")}return false}return true};var Ce='select[name="shippingAddress.countryCode"]';var xe=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onInternationalCheckoutSelected,n=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var r=function(e){return __awaiter(ge,void 0,void 0,(function(){var o,n,r,i;return __generator(this,(function(c){switch(c.label){case 0:n=document.querySelector(((o=K.genericSettings)===null||o===void 0?void 0:o.bigcommerceDomesticCheckoutCountrySelector)||Ce);r=(n===null||n===void 0?void 0:n.value)||e;if(!r){return[2,false]}if(!_e(false,r)){return[2,false]}if(!t)return[3,2];return[4,t()];case 1:c.sent();c.label=2;case 2:D({isInitializing:false,newSelectedCountryCode:r});i={address1:"",address2:"",city:"",countryCode:r,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};s({address1:i.address1,address2:i.address2,city:i.city,countryCode:i.countryCode,firstName:i.firstName,lastName:i.lastName,phone:i.phone,postalCode:i.postalCode,state:i.stateOrProvince});window.location.href="/";return[2,true]}}))}))};var c=false;var a=false;var u=new MutationObserver((function(){var e;var t=document.querySelector(o);var s=i();if(!t&&s){var d=document.createElement("button");d.style.display="none";d.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(d);n===null||n===void 0?void 0:n(s);u.disconnect();return}var l=window.location.pathname.includes("/checkout")&&window.Zonos.isBigCommerce;var h=document.querySelector(((e=K.genericSettings)===null||e===void 0?void 0:e.bigcommerceDomesticCheckoutCountrySelector)||Ce);if(!l){u.disconnect();return}if(!h){return}ae("Domestic checkout found - Listening for shipping country change","info",{value:h.value});if(a){return}a=true;u.disconnect();var f=setInterval((function(){return __awaiter(ge,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){switch(t.label){case 0:if(c){return[2]}c=true;t.label=1;case 1:t.trys.push([1,3,,4]);return[4,r()];case 2:e=t.sent();if(e){clearInterval(f);return[2]}c=false;return[3,4];case 3:o=t.sent();c=false;return[3,4];case 4:return[2]}}))}))}),1e3);var v=setInterval((function(){var e;if(!window.bcStripeElements){clearInterval(v);return}var o=(e=window.bcStripeElements)===null||e===void 0?void 0:e.getElement("address");if(!o){return}clearInterval(v);o.on("change",(function(e){var o=e.value.address.country;if(o){void r(o)}}))}),500)}));u.observe(document.body,{childList:true,subtree:true})};var Se=function(){var e=new URLSearchParams(window.location.search);ae("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=U(e)||L.selectedCountryCode||"US";var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var h=o("customerLastName");return{customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:l,customerLastName:h,customerName:c,customerPhone:a,customerState:d,customerZip:u}};var Te=0;var Ie=function(){return __awaiter(ge,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(n){switch(n.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}ae("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,Y("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=n.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);Te++;if(Te>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var Ae=function(){return __awaiter(ge,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=ue().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:de},q()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};void Y("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var Oe=function(e){return __awaiter(ge,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:de},q()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};void Y("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var Ee=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var Ne=function(e){var o;var t=(o=R.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var Pe=function(e){return K.enabledVariantTestKeys.includes(e)};var je=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var n=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(n===null||n===void 0?void 0:n.expiresAt)||Date.now()+B,selectedVariantKey:(n===null||n===void 0?void 0:n.selectedVariantKey)||null,testKey:o}}))};var Le=function(e){return __awaiter(ge,[e],void 0,(function(e){var o,t,n,r,i;var s=e.cartId,c=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=Q();return[4,Y("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:s},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),n=t.errors,r=t.json;i=!r||n.length;if(!(i&&c))return[3,3];ae("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:c});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,Le({cartId:s,retries:c-1})];case 3:if(i){return[2,null]}return[2,r]}}))}))};var De=function(e){return __awaiter(ge,void 0,void 0,(function(){var o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:o=ne(e),t=o.isDgsCartId,n=o.isLegacyCartId;if(!n&&!t){J("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,Le({cartId:e,retries:5})];case 1:r=i.sent();ae("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){J("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;return[2,{cartData:r.cartData,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var Ue='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var Re=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";var Be=Re;var Fe=90*60*1e3;var Me=6*60*60*1e3;var Ze=e("zonos_checkout",function(){function e(e){var t=this;o(this,e);this.storeUnsubscribeList=[];this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.shouldShowFedexShippingConsentDialog=false;this.detectedDomesticCheckoutDialogOpen=false;this.clientSecret=c.clientSecret;this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:r=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||K.appearance.theme;return[4,a({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(n=this.appearanceSettingsOverride)===null||n===void 0?void 0:n.colorSecondary,overrideTheme:this.isMobile?r:undefined,paypalEnabled:E()})];case 1:i.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(t,[e],void 0,(function(e){var o,t,n,r,i,s,a,d,l;var h=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=h===null||h===void 0?void 0:h.matches("#".concat(re));t=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;r=n.get("payment_intent_client_secret");i=n.get("zonosCheckoutSessionId");if(!o){ae("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}ae("Payment intent exist, checking stripe payment intent status");if(!r){ae("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,u({clientSecret:r})];case 1:s=e.sent(),a=s.error,d=s.status;l=new URLSearchParams(window.location.search).get("redirect_status");if(l){if(!a){ae("Payment intent is succeeded or in a good state to move forward, show success screen")}else{ae("Payment intent failed, show status from error")}this.open=true;R.checkoutSessionId=i;c.clientSecret=r;void this.setToFinishStep(d);return[2,{shouldAllowOrder:false}]}if(!t){ae("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}ae("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){R.enabledVariantTestKeys=Ee(R.enabledVariantTestKeys||[]);var e=K.enabledVariantTestKeys.map((function(e){var o;var t=(o=R.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+B,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));F(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof K.checkoutSettings.createCartId!=="function"){return false}var e=K.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}ae("[TEST] - Registering hosted vs native test");o=Ne("hosted_vs_native");if(o){ae("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,ke({testKeys:["hosted_vs_native"]})];case 1:t=r.sent();if(!t){ae("[TEST] - Failed to get selection for hosted vs native test");return[2]}n=je({baseTestObj:R.enabledVariantTestKeys||[],mergeTestObj:t});F(n);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(t,void 0,void 0,(function(){var e,o,t,n,r,i,s,c;return __generator(this,(function(a){switch(a.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=Ne("hosted_vs_native");ae("[TEST] - hosted_vs_native: ".concat(t));if(typeof K.checkoutSettings.createCartId!=="function"){ae("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){ae("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=K.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){ae("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}ae('"createCartId" is provided, start building cart');return[4,K.checkoutSettings.createCartId()];case 1:n=a.sent();i=null;if(typeof n==="object"){r=n.cartId;i=n.shippingData||null}else{r=n}s=Se();c=ye(Object.assign(Object.assign({cartId:r,checkoutSessionId:R.checkoutSessionId||undefined,hostedCheckoutUrl:K.genericSettings.hostedCheckoutUrl,isTestMode:Q(),isVariantTest:true},s),i));ae("[TEST] - Redirecting to: ".concat(c));window.open(c,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(d.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var e=d.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.getDefaultAddress=function(){if(t.defaultCustomerProfileAddress.length){return t.defaultCustomerProfileAddress}if(Array.isArray(t.defaultAddress)&&t.defaultAddress.length){return t.defaultAddress}if(!Array.isArray(t.defaultAddress)&&typeof t.defaultAddress==="object"){return[t.defaultAddress]}return t.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=K.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var n=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!n){return}switch(e.data.type){case"zonos-checkout-session-update":R.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){R.checkoutSessionId=t}var n=R.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var r=Ne("hosted_vs_native");if(!r){n.push({expiresAt:Date.now()+B,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});F(n)}else{F(n.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void l({adjustments:d.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;pe({event:"zonos-checkout-close",metadata:{checkoutSessionId:R.checkoutSessionId}});this.open=this.forceDialogOpen||false;if(!this.preview&&d.step==="finish"){h()}d.step="customer-info";f();v();(t=(o=K.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,c,i,s,s,a,u,i,h;return __generator(this,(function(f){switch(f.label){case 0:if(!(typeof K.checkoutSettings.createCartId==="function"))return[3,4];ae('"createCartId" is provided, start building cart');return[4,K.checkoutSettings.createCartId()];case 1:e=f.sent();o=void 0;if(typeof e==="object"){ae("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);d.customerAuthenticationToken=e.customerAuthenticationToken||null}else{o=e}window.Zonos.cartId=o;return[4,De(o)];case 2:t=f.sent();n=t===null||t===void 0?void 0:t.cartData;if(!n){J("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=n;r=W(n),i=r.adjustments,s=r.cartItems;return[4,l({adjustments:i,cartItems:s})];case 3:f.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];ae("tempCartUUID is provided, start building cart");c=W(window.Zonos.cartData),i=c.adjustments,s=c.cartItems;return[4,l({adjustments:i,cartItems:s})];case 5:f.sent();return[3,9];case 6:if(!(K.checkoutSettings.buildCartDetail&&L.selectedCountryCode))return[3,9];ae("build cart detail");return[4,K.checkoutSettings.buildCartDetail({countryCode:L.selectedCountryCode,currencyCode:L.targetCurrency})];case 7:s=f.sent();a=s.filter((function(e){return e.amount>=0}));u=s.filter((function(e){return e.amount<0}));ae("cartItems","info",{cartItems:s});i=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,l({adjustments:i,cartItems:a})];case 8:f.sent();f.label=9;case 9:if(!!R.checkoutSessionId)return[3,11];return[4,m()];case 10:h=f.sent();ae("stripeStoreInitCheckoutSession: ".concat(h));if(!h){return[2,false]}f.label=11;case 11:if(!d.isStagingMode){void p()}return[4,this.applyStripeTheme()];case 12:f.sent();this.isRedirectAfterOrder=K.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!d.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=X(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;ae("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||Me;if(o>t){ae("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;ae("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!R.checkoutSessionId){return}void te({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:R.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!R.checkoutSessionId){return}void te({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:R.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!R.checkoutSessionId){return}void te({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:R.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||K.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=K.checkoutSettings.placeOrderButtonSelector;var t=K.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;ae("attach checkout ".concat(o));ae("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData){return}var n=[o,t,"#".concat(se),"#".concat(re),"#".concat(ie)].filter(Boolean);var r=document.querySelectorAll(n.join(","));r.forEach((function(n){var r=n.getAttribute("data-zonos-checkout-attached");if(r){return}ae("attached event to button ".concat(o),"info",{button:n});n.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,r,i,s,a,u,l,h,f,v,m,p,y,b,_,C;return __generator(this,(function(x){switch(x.label){case 0:i=performance.now();s=t&&n.matches(t);a=n.matches("#".concat(ie));u=n.matches("#".concat(se))||n.matches("#".concat(re));if(!window.Zonos.isLegacyCheckout&&(!_e()||be())&&!s&&!a&&!u){return[2]}o.preventDefault();o.stopPropagation();ae("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:l=x.sent().shouldAllowOrder;if(!l){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void Ie()}),2e3)}if(!Pe("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:x.sent();return[4,this.handleHostedVsNative()];case 3:h=x.sent().redirected;this.isOverlayLoading=false;if(h){return[2]}x.label=4;case 4:c.isFetchingSession=true;this.open=true;x.label=5;case 5:x.trys.push([5,8,,9]);return[4,this.buildCartAndInit()];case 6:f=x.sent();if(!f){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:R.checkoutSessionId,type:"zonos-checkout-session-update"},"*");z({isPreview:this.preview,sessionTimeout:Fe});pe({event:"zonos-checkout-start",metadata:{checkoutSessionId:R.checkoutSessionId}});v=R.checkoutSessionId;void g({checkoutSessionId:v,eventName:"checkout_open"});return[4,we()];case 7:m=x.sent().enabled;d.shouldHideDiscountInput=!m;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void Ae()}else{p=performance.now();y=p-i;void Oe({loadTime:y})}this.recordCheckoutInfo();b=!!ce();if(b){this.markTheSessionAsAbandonedCart()}return[3,9];case 8:_=x.sent();if(_ instanceof Error){C=_.message;if(C==="Cart is expired."){this.isCartExpired=true}}c.isFetchingSession=false;J(_);if(this.isCartExpired){c.isFetchingSession=true;return[2]}void $({endpoint:"Error creating Checkout",errors:[_ instanceof Error?_.toString():"Unknown error"],metadata:{allLogs:de,cartId:window.Zonos.cartId,checkoutSessionBody:w(),href:window.location.href,storeBaseUrl:((r=window.Zonos.cartData)===null||r===void 0?void 0:r.storeBaseUrl)||K.onlineStoreSettings.url}});k({messages:[M("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:M("Error creating Checkout")});return[3,9];case 9:return[2]}}))}))}),{capture:true,passive:false});if(!K.checkoutSettings.disablePlaceOrderButtonActivation){n.removeAttribute("disabled")}n.setAttribute("data-zonos-checkout-attached","true");if(n.matches("#".concat(se))){n.dispatchEvent(he("click"));y();n.remove()}if(n.matches("#".concat(re))){n.dispatchEvent(he("click"));n.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}ae("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,n=e.customerCity,r=e.customerCountry,i=e.customerEmail,s=e.customerFirstName,c=e.customerLastName,a=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var h=new URLSearchParams(window.location.search);var f=r||U(h)||L.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:n,customerCountry:f,customerEmail:i,customerFirstName:s,customerLastName:c,customerName:a,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);ae("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=U(e)||L.selectedCountryCode;var n=o("customerCity");var r=o("customerEmail");var i=o("customerAddress1");var s=o("customerAddress2");var c=o("customerName");var a=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var h=o("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:s,customerCity:n,customerCountry:t,customerEmail:r,customerFirstName:a,customerLastName:u,customerName:c,customerPhone:d,customerState:h,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var n=e.customerAddress2||"";var r=e.customerCity||"";var i=e.customerEmail||"";var s=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var c=e.customerPhone||"";var a=e.customerZip||"";var u=e.customerState||"";if(!o||!s||!c||!t){ae("Missing required query params so it can not be prefilled","info",[!o&&"line1",!s&&"name",!c&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&L.shippingZoneCountries&&!(t in L.shippingZoneCountries)){ae('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:r||"",country:t,line1:o,line2:n,postal_code:a,state:u},email:i,name:s,phone:c}];ae("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){d.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){c.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;d.isStagingMode=ee();if(typeof this.overrideStagingMode!=="undefined"){d.isStagingMode=this.overrideStagingMode}xe({domesticRedirectedBtnSelector:se,onInternationalCheckoutSelected:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.detectedDomesticCheckoutDialogOpen=true;return[4,new Promise((function(e){return setTimeout(e,2e3)}))];case 1:e.sent();return[2]}}))}))},onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){c.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){ae("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}ae("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){d.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){b(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(ie));if(e){e.dispatchEvent(he("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r,i,s,a;var u=this;return __generator(this,(function(l){switch(l.label){case 0:pe({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:R.checkoutSessionId}});r=R.checkoutSessionId;void g({checkoutSessionId:r,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,_()];case 1:i=l.sent().isRequestNotReady;if(i&&d.addressFormRenderType==="stripe"){void $({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=c.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(n=(t=c.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||n===void 0?void 0:n.address,cartId:window.Zonos.cartId}})}s=function(e){if(d.step!=="customer-info"){clearInterval(e);return}if(!c.isFetchingLandedCost){if(d.landedCostData){void P({currency:d.currency});C()}u.submitLoading=false;if(e){clearInterval(e)}}};s();a=setInterval((function(){s(a)}),20);setTimeout((function(){clearInterval(a)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){C();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){d.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n,r;return __generator(this,(function(i){switch(i.label){case 0:e=c.checkoutSettlementCurrency==="USD";if(e&&c.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;N.paypalErrorMessage=null;c.hasPaymentError=false;this.submitLoading=true;d.inventoryCheckErrorMessage=null;return[4,x()];case 1:o=i.sent();if(!o){c.hasPaymentError=true;c.customErrorMessage=M("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:c.checkoutSettlementCurrency});this.submitLoading=false;return[2]}i.label=2;case 2:i.trys.push([2,4,,5]);t=d;return[4,S()];case 3:t.inventoryCheckErrorMessage=i.sent();return[3,5];case 4:n=i.sent();d.inventoryCheckErrorMessage=M("Unable to check inventory. Please try again.");return[3,5];case 5:if(d.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}i.label=6;case 6:i.trys.push([6,8,,9]);return[4,T()];case 7:i.sent();C();v();return[3,9];case 8:r=i.sent();J(r);pe({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:R.checkoutSessionId}});c.hasPaymentError=true;if(c.shouldInventoryRefund){void I();c.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,n;return __generator(this,(function(r){switch(r.label){case 0:A();if(!this.preview)return[3,2];d.step="customer-info";return[4,this.init()];case 1:r.sent();return[2];case 2:h();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||K.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;n=window.location.hostname.includes("dashboard.zonos.com");if(!n){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=oe(this.mobile);void this.applyStripeTheme();ae("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=oe(this.mobile);void this.applyStripeTheme();ae("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=V(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){A()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){ae("No customer profile","info");this.defaultCustomerProfileAddress=[];return}ae("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=c.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=c.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){ae("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var n=o.getAttribute(e);var r=t.getAttribute(e);if(n){o.removeAttribute(e);o.style.overflow=n}else{o.style.removeProperty("overflow")}if(r){t.removeAttribute(e);t.style.overflow=r}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=oe(this.mobile);this.isIframed=window.self!==window.top;ae("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.storeUnsubscribeList=[Z("selectedLocale",(function(){void e.applyStripeTheme()})),O("selectedShippingOption",(function(){var o,t,n,r;var i=d.selectedShippingOption;if(((o=K.genericSettings)===null||o===void 0?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&((n=(t=i===null||i===void 0?void 0:i.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.code)===null||n===void 0?void 0:n.toLowerCase().startsWith("fedex."))&&((r=c.stripeAddressEventData)===null||r===void 0?void 0:r.value.address.country)==="CA"){e.shouldShowFedexShippingConsentDialog=true}}))];this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);ae("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){A();h();this.storeUnsubscribeList.forEach((function(e){return e()}));window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,i,s,a;this.customerProfile=c.customerProfile;this.clientSecret=c.clientSecret;if(c.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret}var u=d.step!=="finish"&&d.step!=="error"&&!c.stripeElements||c.isFetchingSession;var l=G(K.appearance,this.appearanceSettingsOverride||null),h=l.colorPrimary,f=l.colorSecondary,v=l.logoUrl,m=l.style;var p=K.appearance.zonosAttribution==="ENABLED";var z=K.appearance.theme;var g=h&&ve(h)?"DARK":"LIGHT";var w=this.isMobile?z:g;var k=!this.isMobile?f:undefined;var y=L.customMessages;var b=(o=y.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var _=this.getCurrentLocalePageEnum();var C=y.filter((function(e){return e.pageName===_}));var x=this.getBaseCurrencySettlementInfo();var S=function(){var o=e.preview?"".concat(v,"?timestamp=").concat(Date.now()):v;return t("div",{class:"zonos--logo"},o&&t("img",{alt:"".concat(K.organizationName," logo"),src:o}))};var T=Q();var I=function(){var o=new URLSearchParams(window.location.search);var n=o.get("zonosQaUrl");var r=o.get("zonosDebug");var i=o.get("zonosE2ETest");var s=e.overrideStagingMode||ee();return t("zonos-v-stack",null,t("div",{class:"zonos--logo-wrapper"},S(),T&&t("zonos-badge",{badgeColor:"orange",size:"small"},M("Test mode")),s&&t("zonos-badge",{badgeColor:"red",size:"small"},M("Staging mode")),r==="1"&&t("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),n&&t("zonos-badge",{badgeColor:"purple",size:"small"},n),i&&t("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),t("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),C.map((function(e){return t("zonos-custom-message",{icon:Ue,message:e.message})})))};var A=function(){if(d.checkoutSessionTimeoutShow){return t("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:M("Your checkout session has expired. Please reload the page to continue."),restStateTitle:M("Session timed out"),restStateType:"Warning"},t("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},M("Reload")))}return t("div",{class:"zonos--content",style:{"--zonos--border-radius":fe({overrideBorderStyle:m})}},d.step!=="finish"&&d.step!=="error"&&t(n,null,t("div",{class:"zonos--left","data-theme":w,style:me({"--zonos--primary-color":!e.isMobile?h:undefined})},!e.isMobile&&I(),d.step==="customer-info"&&t("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:k}),d.step==="shipping"&&t("zonos-shipping",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:k}),d.step==="payment"&&t("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:k})),t("div",{class:"zonos--right","data-theme":z},e.isMobile&&I(),t("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&t("zonos-currency-toggle",null),!e.isLegacyCheckout&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:ze}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),t("div",{class:"flex--wrapper"},t("div",{class:"zonos--wrapper"},t("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),t("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},t("zonos-cart-items",null),e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",{submitBtnColor:k}),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Ue,message:b})))),t("zonos-cart-restricted-items",null),!e.isMobile&&t("zonos-v-stack",{spacing:16},t("zonos-cart-subtotal",null),t("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Ue,message:b}))))),(d.step==="finish"||d.step==="error")&&t("div",{class:"zonos--done","data-theme":z},t("div",{class:"zonos--header"},S(),!e.isRedirectAfterOrder&&t("zonos-button",{class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close checkout dialog",content:ze}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:z})),t("zonos-checkout-finish",{borderRadius:m,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:d.step==="error"&&!!d.error?Object.assign(Object.assign({},d.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),t("zonos-checkout-footer",{"data-theme":z,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return t(r,{class:le(["zonos--checkout zonos--elements",d.step==="payment"&&"zonos--processing-payment",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?A():t("zonos-dialog",{borderStyle:m,class:"zonos--checkout-dialog","data-theme":z,height:"980px",isLoading:u,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},A()),t("zonos-dialog",{isLoading:true,loadingText:M("You will be redirected to international checkout shortly."),loadingTitle:M("We detected that you are shipping to an international address."),noClickOutside:true,noCloseButton:true,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),t("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:M("Don't close"),dialogConfirmBtnText:M("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:M("Would you like to close checkout and return to the site?"),dialogTitle:M("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),t("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:M("Return to merchant site"),dialogConfirmBtnText:M("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((i=this.placedOrderInfo)===null||i===void 0?void 0:i.zonosOrderNumber)?M("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):M("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((s=this.placedOrderInfo)===null||s===void 0?void 0:s.time)||null),time:this.formatTime(((a=this.placedOrderInfo)===null||a===void 0?void 0:a.time)||null)}),dialogTitle:M("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),t("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:M("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:t(n,null,M("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),t("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},M("View GAA Form."))),dialogTitle:M("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:function(){return e.shouldShowFedexShippingConsentDialog=false}}),t("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:M("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:M("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),x&&t("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:M("Cancel"),dialogConfirmBtnText:M("Pay [orderTotal]",{orderTotal:H({amount:x.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:M("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:M("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),t("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:M("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:M("You are being sent back to the shop to re-add items to your cart."),dialogTitle:M("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),t("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}());Ze.style=Be}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as s,H as e,F as c}from"./p-ab41bab5.js";import{b as t,i as l,c as n,d as i,n as a,e as r,j as z,k as d,u as h,w as m,B as p,y as u,f as g}from"./p-866afec1.js";import{i as b,a as f,c as x,b as w,d as v,e as y}from"./p-de8899bc.js";import{p as k,a as C}from"./p-fe06c9ea.js";import{s as S,t as j,c as I,d as L,l as O}from"./p-09aabce0.js";import{z as T}from"./p-b2a0ab4a.js";import{b as U}from"./p-83666056.js";import{h as E,s as P,l as N,g as _}from"./p-41dd1cb8.js";import{c as A}from"./p-b4b7f705.js";import{l as D}from"./p-0a377722.js";import{r as B}from"./p-27f6930b.js";import{l as F}from"./p-97aceb11.js";import"./p-57fa64d7.js";import"./p-1f894984.js";import"./p-786d1c24.js";import"./p-c36696f9.js";const H=class{constructor(s){o(this,s),this.storeUnsubscribeList=[],this.onChangeLocaleListener=()=>{},this.mobile=!1,this.tablet=!1,this.stripe=window.Zonos.stripe,this.showLanguageDialogMobile=!1,this.submitLoading=!1,this.collapseReview=!0,this.isMobile=!1,this.isTablet=!1,this.isOverlayLoading=!0,this.isCartCollected=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.confirmationId=null,this.clientSecret=t.clientSecret,this.stripeCustomerSessionClientSecret=t.stripeCustomerSessionClientSecret,this.getBaseCurrencySettlementInfo=()=>{const o=i.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:s}}=o;return s?{settlementAmount:(s.discounts||0)+s.items+s.landedCostTotal+s.shipping}:null},this.applyStripeTheme=async()=>{const o=T.appearance.theme;await l({overrideTheme:this.isMobile?o:void 0,paypalEnabled:k()})},this.fetchCheckoutSession=async o=>{const{json:s}=await E("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"});return s},this.checkStripePaymentIntentStatus=async()=>{var o;const s=!!window.Zonos.cartData,e=new URL(window.location.href).searchParams,c=e.get("payment_intent_client_secret"),l=e.get("zonosCheckoutSessionId");if(D("Payment intent exist, checking stripe payment intent status"),!c)return D("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:s};const{error:i,status:a}=await n({clientSecret:c});if(new URLSearchParams(window.location.search).get("redirect_status")&&l){D(i?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen");const s=await this.fetchCheckoutSession(l);return this.confirmationId=(null===(o=null==s?void 0:s.checkoutSession.landedCost)||void 0===o?void 0:o.shortId)||null,S.checkoutSessionId=l,t.clientSecret=c,this.setToFinishStep(a),{shouldAllowOrder:!1}}return s?(D("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(D("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})}}resizeListener(){this.isMobile=b(this.mobile),this.isTablet=f(this.tablet)}async setToFinishStep(o){t.stripe=window.Zonos.stripe,i.step="finish",this.storybookPaymentStatusOverride=o,this.isOverlayLoading=!1}async initCollectCart(){var o,s,e,c,t,l,h,m,p,u,g;if(!window.Zonos.cartData)return;const b=null===(s=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.items[0])||void 0===s?void 0:s.currencyCode;b&&(i.currency=b);const f=null===(c=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.references)||void 0===c?void 0:c.checkoutSessionId,v=null===(l=null===(t=window.Zonos.cartData)||void 0===t?void 0:t.references)||void 0===l?void 0:l.landedCostId;if(!v)return void a({messages:[j("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:T.organizationName})],title:j("Invalid session")});f?(D("Setting checkout session id from cart reference","info",f),S.checkoutSessionId=f):(D("Clear checkout session id from storage so we start from a fresh session for the collect cart"),S.checkoutSessionId=null);const{shouldAllowOrder:y}=await this.checkStripePaymentIntentStatus();if(y){try{const{adjustments:o,cartItems:s}=U(window.Zonos.cartData);if(await r({adjustments:o,cartItems:s,landedCostId:v,shouldInitSessionOnFailure:!1}),!S.checkoutSessionId&&!f){const o=await z();if(D(`stripeStoreInitCheckoutSession: ${o}`),!o)throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential")}if((!i.checkoutSession||(null===(h=i.checkoutSession)||void 0===h?void 0:h.completedAt))&&f){const o=await this.fetchCheckoutSession(f);if(this.confirmationId=(null===(m=null==o?void 0:o.checkoutSession.landedCost)||void 0===m?void 0:m.shortId)||null,null==o?void 0:o.checkoutSession.completedAt)return void this.setToFinishStep("succeeded");if(null==o?void 0:o.checkoutSession.clientSecret){const{status:s}=await n({clientSecret:o.checkoutSession.clientSecret});if("processing"===s||"succeeded"===s)return void this.setToFinishStep(s)}throw P({endpoint:"INVALID_COLLECT_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:f,cartId:null===(p=window.Zonos.cartData)||void 0===p?void 0:p.id,cartLandedCostId:v}}),new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it")}if(!i.checkoutSession)throw P({endpoint:"FAIL_TO_UPDATE_CREATE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this collect cart"],metadata:{cartCheckoutSessionId:f||"N/A",cartId:null===(u=window.Zonos.cartData)||void 0===u?void 0:u.id,cartLandedCostId:v||"N/A"}}),new Error("Could not update/create checkout session for this collect cart");d();const e=null===(g=i.checkoutSession)||void 0===g?void 0:g.landedCost;if(!e)throw new Error("Landed cost could not be found in checkout session after creating/updating them");await x(Object.assign(Object.assign({},i.checkoutSession),{id:S.checkoutSessionId||""})),w({landedCostId:e.id}),this.applyStripeTheme()}catch(o){N(o),a({messages:[j("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:T.organizationName})],title:j("Invalid session")})}this.isOverlayLoading=!1}}toggleLanguageDialog(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile}async handleStripePaymentContinue(){var o,s,e,c;if(null===(o=t.stripeBillingAddressElement)||void 0===o||o.getValue(),null===(s=t.stripeLinkEventData)||void 0===s?void 0:s.complete)if(null===(e=t.stripeBillingAddressEventData)||void 0===e?void 0:e.complete)if("USD"!==t.checkoutSettlementCurrency||!t.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,C.paypalErrorMessage=null,t.hasPaymentError=!1,this.submitLoading=!0,i.inventoryCheckErrorMessage=null,!await h())return t.hasPaymentError=!0,t.customErrorMessage=j("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:t.checkoutSettlementCurrency}),void(this.submitLoading=!1);await v();try{return await m({noLandedCostCheck:!0}),i.step="finish",void(this.confirmationId=y.landedCostShortId||(null===(c=i.selectedLandedCost)||void 0===c?void 0:c.landedCostId)||null)}catch(o){N(o),t.hasPaymentError=!0}this.submitLoading=!1}else this.payInUsdConfirmDialogOpen=!0;else{const o=document.querySelector(".zonos--billing-address");null==o||o.scrollIntoView({behavior:"smooth"})}else{const o=document.querySelector("zonos-link-authentication");null==o||o.scrollIntoView({behavior:"smooth"})}}componentWillLoad(){t.stripe=window.Zonos.stripe,i.step="payment",this.initCollectCart(),this.resizeListener(),this.storeUnsubscribeList=[p("clientSecret",(()=>{this.applyStripeTheme()})),I("selectedLocale",(()=>{this.applyStripeTheme()}))],D(`mobile: ${this.isMobile}`)}disconnectedCallback(){u(),g(),this.onChangeLocaleListener(),this.storeUnsubscribeList.forEach((o=>o()))}render(){this.clientSecret=t.clientSecret,t.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=t.stripeCustomerSessionClientSecret);const o=this.getBaseCurrencySettlementInfo(),{logoUrl:l,theme:n}=T.appearance,a=()=>{const o=`${l}?timestamp=${Date.now()}`;return s("div",{class:"zonos--logo"},o&&s("img",{alt:`${T.organizationName} logo`,src:o}))},r=_(),z=()=>{var o;const e=new URLSearchParams(window.location.search),t=e.get("zonosQaUrl"),l=e.get("zonosDebug"),n=null===(o=F.find((o=>o.code===O.selectedLocale)))||void 0===o?void 0:o.label;return s(c,null,s("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},s("div",{class:"zonos--logo-wrapper"},a(),r&&s("zonos-badge",{badgeColor:"orange",size:"small"},j("Test mode")),"1"===l&&s("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&s("zonos-badge",{badgeColor:"purple",size:"small"},t)),s("div",{class:"zonos--header-right"},s("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:()=>this.toggleLanguageDialog(),variant:"outline"},n,s("zonos-icon",{"aria-label":"Language select",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"})),s("div",{class:A(["zonos--collect-language-dialog",this.showLanguageDialogMobile&&"zonos--collect-language-dialog-open"])},s("zonos-language-select",{handleOnClose:()=>this.toggleLanguageDialog()})))),B({content:s("zonos-text",{class:"zonos--header-title",type:"header"},y.originCompanyName?j("Customs charges for your recent purchase from [companyName] are available for payment",{companyName:y.originCompanyName}):j("Customs charges from your recent purchase are available for payment")),isLoading:y.isFetchingShippingInfo,skeletonHeight:"34px",skeletonWidth:"600px"}))};return s(e,{class:A(["zonos--collect zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":n},(()=>this.isOverlayLoading||t.isFetchingSession?null:s("div",{class:"zonos--content"},"finish"!==i.step&&"error"!==i.step&&s(c,null,(this.isMobile||this.isTablet)&&z(),s("div",{class:"zonos--left","data-theme":n},!this.isMobile&&!this.isTablet&&z(),s("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},j("Billing info")),s("zonos-v-stack",{spacing:16},s("zonos-link-authentication",{titleText:""}),s("zonos-address",{titleText:"",type:"billing"})),s("zonos-collect-payment",{class:A(["zonos--collect-container"]),continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()}})),s("div",{class:"zonos--right","data-theme":n},s("zonos-collect-review",{mobile:this.isMobile,tablet:this.isTablet}),s("div",{class:"zonos--order-details-container"},s("zonos-collect-order-details",{collapsed:this.collapseReview,mobile:this.isMobile,onCollapseClicked:()=>{this.collapseReview=!this.collapseReview}})),s("div",{class:"flex--wrapper"},s("zonos-v-stack",{spacing:16},s("zonos-collect-subtotal",null)),!this.isMobile&&!this.isTablet&&s("zonos-collect-footer",{"data-theme":n,mobile:this.isMobile,tablet:this.isTablet})))),("finish"===i.step||"error"===i.step)&&s("div",{class:"zonos--done","data-theme":n},s("div",{class:"zonos--header"},a()),s("zonos-collect-finish",{confirmationId:this.confirmationId,overrideNotification:"error"===i.step&&i.error?Object.assign(Object.assign({},i.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),(this.isMobile||this.isTablet||"finish"===i.step||"error"===i.step)&&s("zonos-collect-footer",{"data-theme":n,mobile:this.isMobile,tablet:this.isTablet})))(),o&&s("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:j("Cancel"),dialogConfirmBtnText:j("Pay [orderTotal]",{orderTotal:L({amount:o.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:j("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:j("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),s("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}};H.style=".sc-zonos-collect-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-h *.sc-zonos-collect{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-h img.sc-zonos-collect{max-width:100%}.sc-zonos-collect-h dl.sc-zonos-collect,.sc-zonos-collect-h dd.sc-zonos-collect,.sc-zonos-collect-h h1.sc-zonos-collect,.sc-zonos-collect-h h2.sc-zonos-collect,.sc-zonos-collect-h h3.sc-zonos-collect,.sc-zonos-collect-h h4.sc-zonos-collect,.sc-zonos-collect-h h5.sc-zonos-collect,.sc-zonos-collect-h h6.sc-zonos-collect,.sc-zonos-collect-h hr.sc-zonos-collect,.sc-zonos-collect-h figure.sc-zonos-collect,.sc-zonos-collect-h p.sc-zonos-collect,.sc-zonos-collect-h pre.sc-zonos-collect{margin:0}.sc-zonos-collect-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h *.sc-zonos-collect{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar{width:10px}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-h *.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{background-color:var(--zonos-elements-gray-0)}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--header.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect .zonos--logo.sc-zonos-collect{margin-bottom:0}.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect zonos-checkout-finish.sc-zonos-collect{-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{padding:0 8px 8px}.sc-zonos-collect-h .zonos--left.sc-zonos-collect .zonos--payment-error-banner.sc-zonos-collect{margin-top:24px}.sc-zonos-collect-h .zonos--right.sc-zonos-collect{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-collect-h .zonos--right.sc-zonos-collect .zonos--order-details-container.sc-zonos-collect{overflow:hidden}.sc-zonos-collect-h .zonos--wrapper.sc-zonos-collect{overflow:auto;max-height:100%;position:relative}.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%;margin-top:32px}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-collect-h .zonos--logo-wrapper.sc-zonos-collect>*.sc-zonos-collect{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-collect-h .zonos--header-right.sc-zonos-collect{display:none}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-collect-h .zonos--logo.sc-zonos-collect img.sc-zonos-collect{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-collect-h .zonos--collect-container.sc-zonos-collect{overflow:visible}.mobile.sc-zonos-collect-h,.tablet.sc-zonos-collect-h{min-width:auto}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{padding-bottom:0}}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--review.sc-zonos-collect{margin-bottom:0}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect .zonos--cart-items.sc-zonos-collect{margin-top:8px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect zonos-checkout-footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--wrapper.sc-zonos-collect{max-height:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--footer.sc-zonos-collect{-ms-flex-order:3;order:3}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--done.sc-zonos-collect{width:auto}.mobile.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--cart-subtotal.sc-zonos-collect{margin:0}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-title.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{max-width:800px;padding:0 16px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--left.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{overflow:visible;width:100%}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect,.tablet.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--right.sc-zonos-collect{gap:32px}.mobile.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect,.tablet.sc-zonos-collect-h .flex--wrapper.sc-zonos-collect{margin-top:0}.mobile.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect,.tablet.sc-zonos-collect-h zonos-collect-footer.sc-zonos-collect{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:56px;top:-56px}.mobile.sc-zonos-collect-h .zonos--content.sc-zonos-collect .zonos--header-right.sc-zonos-collect{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-collect-h .zonos--header-wrapper.sc-zonos-collect{padding-top:28px;top:-28px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;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);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);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}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar{width:10px}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.sc-zonos-collect::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-collect-h .zonos--collect-language-dialog.zonos--collect-language-dialog-open.sc-zonos-collect{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-collect-h .zonos--content.sc-zonos-collect{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{H as zonos_collect}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,d as s,h as t,H as e,F as n,c as i,a}from"./p-ab41bab5.js";import{d as r,E as l,F as c,G as d,b as h,y as p,c as u,t as m,H as f,I as z,r as g,J as b,K as y,z as x,L as v,D as w,M as k,N as C,O as L}from"./p-866afec1.js";import{t as S,l as I,s as _,c as D}from"./p-09aabce0.js";import{r as B}from"./p-abf38ed6.js";import{c as A}from"./p-0ef2a242.js";import{c as j}from"./p-b4b7f705.js";import{z as M,h as O,g as T,f as E}from"./p-b2a0ab4a.js";import{D as N,T as P,h as Z}from"./p-eea7ac64.js";import{c as $,a as F}from"./p-fe06c9ea.js";import{h as R,s as H,j as U,g as V,i as G,a as X}from"./p-41dd1cb8.js";import{c as Y}from"./p-595f5dd2.js";import{g as W}from"./p-1f894984.js";import{l as q,b as K}from"./p-0a377722.js";import{s as J}from"./p-c36696f9.js";import{l as Q}from"./p-97aceb11.js";import{p as oo}from"./p-64661dd1.js";import{i as so}from"./p-57fa64d7.js";import{g as to}from"./p-41299ffb.js";import{i as eo}from"./p-ae393255.js";import{u as no}from"./p-fc776473.js";import{c as io}from"./p-0c64dbbb.js";import{s as ao,a as ro}from"./p-63a383f4.js";import{e as lo}from"./p-6b361d2b.js";import"./p-786d1c24.js";import"./p-5762e217.js";import"./p-1d42cd20.js";const co=class{constructor(s){o(this,s),this.errorImages=[]}render(){const o=s("./assets/empty-item.jpeg"),n=r.items.filter((o=>!o.isRestricted));return t(e,{key:"52911cfab4b2da9d65c840cd692e638c9dc732c5",class:"zonos--cart-items zonos--elements"},t("table",{key:"428a62423a7fcf0721f420c9fdceac4bd928a6eb",class:"zonos--cart-table"},t("tbody",{key:"41a438eeb79635ba00a241fa9771b9c33c7fe7ff"},n.map((s=>{const e=s.imageUrl,n=A(s.name),i=s.amount*s.quantity;return t("tr",{class:"zonos--cart-item"},t("td",{class:"zonos--column zonos--cart-item-image"},e&&!this.errorImages.includes(e)?t("img",{alt:s.name,onError:()=>{this.errorImages=[...this.errorImages,e]},src:s.imageUrl,style:{"min-width":"40px"},width:40}):t("img",{alt:s.name,src:o,width:40})),t("td",{class:"zonos--column zonos--cart-item-name"},t("div",null,n.map((o=>t("zonos-text",{type:"label"},o)))),t("zonos-text",{textColor:"gray-600",type:"caption"},S("Quantity"),": ",s.quantity)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"semiBoldLabel",weight:600},B({amount:i,isForeign:!1}))))})))))}static get assetsDirs(){return["assets"]}};co.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;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--cart-table td{vertical-align:top}:host .zonos--cart-item-name{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}:host .zonos--cart-item-name .zonos--cart-item-quantity>*{display:inline-block}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px}";const ho=class{constructor(s){o(this,s),this.hide=!1,this.errorImages=[],this.internalCollapsed=!0,this.firstRender=!0}componentDidLoad(){this.firstRender=!0}render(){var o;const n=s("./assets/empty-item.jpeg"),i=(null===(o=r.exchangeRate)||void 0===o?void 0:o.rate)||1,a=r.restrictedItems.length;return this.hide||0===a?null:(this.firstRender&&(this.internalCollapsed=l(),this.firstRender=!1),t(e,{class:j(["zonos--cart-restricted-items","zonos--elements",this.internalCollapsed&&"collapsed"])},t("button",{class:j(["zonos--cart-title-collapse-trigger",this.internalCollapsed&&"collapsed"]),onClick:()=>{this.internalCollapsed=!this.internalCollapsed}},t("div",{class:"zonos--title-wrapper"},t("zonos-text",{textColor:"red-600",type:"label"},`${S(this.internalCollapsed?"Show":"Hide")} ${a} ${S("restricted items")}`),t("zonos-icon",{content:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n',iconColor:"red-600"}))),t("zonos-collapse",{collapsed:this.internalCollapsed},t("zonos-banner",{bannerTitle:S("The following items are unable to be shipped to your country and are not included in your cart total."),intent:"error"}),t("table",{class:"zonos--cart-table"},t("tbody",null,r.restrictedItems.map(((o,s)=>{var e,a;const r=o.imageUrl;return t("tr",{class:"zonos--cart-item"},t("td",{class:"zonos--column zonos--cart-item-image"},r&&!this.errorImages.includes(r)?t("img",{alt:(null===(e=o.matchedItem)||void 0===e?void 0:e.name)||o.name||`Restricted item ${s+1}`,onError:()=>{this.errorImages=[...this.errorImages,r]},src:r,style:{"min-width":"40px"},width:40}):t("img",{alt:o.name||`Restricted item ${s+1}`,src:n,width:40})),t("td",{class:"zonos--column zonos--cart-item-name"},t("zonos-text",{type:"label"},(null===(a=o.matchedItem)||void 0===a?void 0:a.name)||o.name),t("zonos-text",{type:"caption"},o.restriction.reason)),t("td",{class:"zonos--column zonos--cart-item-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:o.amount*o.quantity*i,isForeign:!1}))))})))))))}static get assetsDirs(){return["assets"]}};ho.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{overflow:auto;position:relative}:host zonos-banner{margin-bottom:12px}:host .zonos--cart-title-collapse-trigger{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-0);width:100%;border:none;cursor:pointer;margin-bottom:16px;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}:host .zonos--cart-title-collapse-trigger zonos-icon{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}:host .zonos--cart-title-collapse-trigger.collapsed{margin-bottom:0}:host .zonos--cart-title-collapse-trigger.collapsed zonos-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host .zonos--cart-title-collapse-trigger::before,:host .zonos--cart-title-collapse-trigger::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}:host .zonos--cart-title-collapse-trigger .zonos--title-wrapper{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--cart-table{opacity:0.5;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;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host img{min-width:40px}:host(.collapsed){-ms-flex-negative:0;flex-shrink:0}';const po=class{constructor(s){o(this,s),this.loading=!1,this.getInclusivePriceType=()=>{var o,s;const t=I.inclusivePricingConfigurations.find(Boolean),e="ENABLED"===(null===(o=null==t?void 0:t.configurations[N])||void 0===o?void 0:o.status),n="ENABLED"===(null===(s=null==t?void 0:t.configurations[P])||void 0===s?void 0:s.status);return e&&n?"DUTY_TAX_AND_FEE":e?"DUTY_AND_FEE":n?"TAX":null},this.getCartSubtotalSubtitle=()=>{const o=this.getInclusivePriceType();return"DUTY_AND_FEE"===o?t("zonos-text",{class:"zonos--caption",type:"caption"},S("Duties and fees included")):"TAX"===o?t("zonos-text",{class:"zonos--caption",type:"caption"},S("Taxes included")):null}}render(){var o,s,i,a,p;const u="customer-info"===r.step?r.subtotal+r.adjustmentTotal:r.total,m="payment"===r.step||"shipping"===r.step,f=l()?u:0,z=l()?r.subtotal:0,g=!r.shouldHideDiscountInput&&"customer-info"!==r.step,b=null===(p=null===(a=null===(i=null===(s=null===(o=r.landedCostData)||void 0===o?void 0:o.find(Boolean))||void 0===s?void 0:s.landedCost.appliedAdjustments)||void 0===i?void 0:i.find((o=>{var s;return"PROMO_CODE"===(null===(s=o.adjustment)||void 0===s?void 0:s.source)})))||void 0===a?void 0:a.adjustment)||void 0===p?void 0:p.name,y=async()=>{r.promoCodeApplied=!0,r.promoCodeError=!1,this.loading=!0,await c(),this.loading=!1},x=async()=>{r.promoCodeError=!1,this.loading=!0,await d(),this.loading=!1};return t(e,{class:"zonos--cart-subtotal zonos--elements"},t("table",{class:"zonos--cart-table"},t("tr",{class:"zonos--row zonos--cart-subtotal"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("zonos-text",{type:"semiBoldLabel"},S("Cart subtotal")),t("zonos-text",{class:"zonos--caption",type:"caption"},this.getCartSubtotalSubtitle())),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:z,isForeign:!0})))),t("tr",{class:"zonos--row zonos--cart-shipping"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},r.selectedShippingOption&&"customer-info"!==r.step?t(n,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},r.selectedShippingOption.displayName),r.selectedShippingOptionTransitTime&&t("zonos-text",{class:"zonos--caption",type:"caption"},r.selectedShippingOptionTransitTime)):t(n,null,t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Shipping")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("No shipping method selected")))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},r.shipping?B({amount:r.shipping,isForeign:!0}):"-")),m&&t("tr",{class:"zonos--row zonos--cart-duties"},t("td",{class:"zonos--column"}),(()=>{var o,s,e;if(Z()){const o=this.getInclusivePriceType();return o?"TAX"===o?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties and fees")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("Nothing due at the door"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees?B({amount:r.dutiesTaxesFees,isForeign:!0}):"-"))):"DUTY_AND_FEE"===o?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Taxes"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees?B({amount:r.dutiesTaxesFees,isForeign:!0}):"-"))):t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties, taxes, and fees")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("The purchase price covers duties, taxes and fees."))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},"-"))):null}return(null===(s=null===(o=M.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===s?void 0:s.includes((null===(e=h.stripeAddressEventData)||void 0===e?void 0:e.value.address.country)||"US"))?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Taxes and fees"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees||null!==r.dutiesTaxesFeesEstimate?B({amount:r.dutiesTaxesFees||r.dutiesTaxesFeesEstimate||0,isForeign:!0}):"-"))):"DAP"===r.landedCostMethod?t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties, taxes, and fees")),null!==r.dutiesTaxesFeesEstimate?`${S("Estimated [amount]",{amount:B({amount:r.dutiesTaxesFeesEstimate,isForeign:!0})})}`:"-"),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},S("Due at delivery")))):t(n,null,t("td",{class:"zonos--column zonos--cart-subtotal-title zonos--landed-cost"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Duties, taxes, and fees")),t("zonos-text",{class:"zonos--caption",type:"caption"},S("Nothing due at the door"))),t("td",{class:"zonos--column zonos--cart-subtotal-price zonos--landed-cost"},t("div",{class:"zonos--cart-duty-tax-price"},null!==r.dutiesTaxesFees?B({amount:r.dutiesTaxesFees,isForeign:!0}):"-")))})()),g&&t("tr",{class:"zonos--row zonos--cart-promo-code"},t("td",{class:"zonos--column"}),b?t(n,null,t("td",{class:"zonos--column zonos--cart-promo-code-col"},this.loading?t("zonos-spinner",{size:16}):t("zonos-badge",{dismissHandler:()=>x()},r.promoCode)),t("td",{class:"zonos--column zonos--cart-promo-code-col"})):t("td",{class:"zonos--column zonos--cart-promo-code-col",colSpan:2},t("div",{class:"zonos--cart-promo-code-input-wrapper"},t("zonos-input",{class:"zonos--cart-promo-code-input",inputLabel:S("Add promotional code"),inputValue:r.promoCode,isError:r.promoCodeError,onInputChange:o=>r.promoCode=o.detail.trim(),onKeyDown:o=>{"Enter"===o.key&&y()}}),t("zonos-button",{loading:this.loading,onClick:()=>y(),variant:"primary"},S("Apply"))))),!!r.adjustmentTotal&&t("tr",{class:"zonos--row zonos--cart-discount"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column zonos--cart-subtotal-title"},t("div",{class:"zonos--title-with-icon"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Discounts")))),t("td",{class:"zonos--column zonos--cart-subtotal-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:r.adjustmentTotal,isForeign:!0})))),t("tr",{class:"zonos--row zonos--cart-pay-total"},t("td",{class:"zonos--column"}),t("td",{class:"zonos--column"},t("zonos-text",{class:"zonos--title",type:"semiBoldLabel"},S("Order total"))),t("td",{class:"zonos--column zonos--cart-total-price"},t("zonos-text",{type:"semiBoldLabel"},B({amount:f,isForeign:!0}))))))}static get assetsDirs(){return["assets"]}};po.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:20px 8px;vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price,:host .zonos--cart-promo-code-col{border-bottom:1px solid var(--zonos-elements-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}:host .zonos--cart-subtotal-price zonos-text{white-space:nowrap}:host .zonos--cart-subtotal-price zonos-text,:host .zonos--cart-pay-total zonos-text{white-space:nowrap}:host .zonos--cart-promo-code-input-wrapper{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}:host .zonos--cart-promo-code-input{-ms-flex:1;flex:1}";const uo=class{constructor(s){o(this,s),this.closeClick=i(this,"closeClick",7),this.borderRadius="ROUNDED",this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=S("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,s;const t=_.checkoutSessionId,e=new URLSearchParams;e.set("checkoutSessionId",t||"");const{baseUrl:n,errors:i,json:a}=await R(`/api/zonos-elements/get-order?${e.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(s=(o=M.checkoutSettings).onOrderSuccess)||void 0===s?void 0:s.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.buildPurchaseMetadata=({checkoutSessionId:o,currency:s})=>{var t,e,n,i,a,l;const c=r.items.filter((o=>o.amount>=0)).map((o=>({item_id:o.sku||o.productId||o.name,item_name:o.name,price:o.amount,quantity:o.quantity}))),d=(null===(t=r.checkoutSession)||void 0===t?void 0:t.subtotals.items)||(null===(e=this.order)||void 0===e?void 0:e.amountSubtotals.items),h=(null===(n=r.checkoutSession)||void 0===n?void 0:n.subtotals.presentmentCurrencyCode)||(null===(i=this.order)||void 0===i?void 0:i.currencyCode)||(null==s?void 0:s.toUpperCase()),p=c.reduce(((o,s)=>o+s.price*s.quantity),0),u=null===(a=r.items.find(Boolean))||void 0===a?void 0:a.currencyCode,m=(null===(l=this.order)||void 0===l?void 0:l.id)||o||(new Date).getTime().toString();return h&&d?{currency:h,items:c,transaction_id:m,value:d}:u&&p?{currency:u,items:c,transaction_id:m,value:p}:{currency:void 0,items:c,transaction_id:m,value:void 0}},this.redirectToUrl=o=>{p(),_.checkoutSessionId=null,window.parent&&(window.parent.location.href=o),window.location.href=o},this.isRedirectBehavior=()=>{const{successBehavior:o}=M.checkoutSettings;return"REDIRECT_TO_SUCCESS_PAGE"===o||!!r.externalConfirmationPageURL},this.shouldRenderKeepShoppingButton=()=>!this.isRedirectBehavior()&&"success"===this.notificationType,this.shouldRenderCloseButtonForRedirectBehavior=()=>this.isRedirectBehavior()||"error"===this.notificationType,this.redirectToMerchantSuccessPage=()=>{var o,s,t,e;const n=r.externalConfirmationPageURL||M.checkoutSettings.successRedirectUrl,i=new URLSearchParams,a=null===(o=this.order)||void 0===o?void 0:o.id,l=(null===(e=null===(t=null===(s=this.order)||void 0===s?void 0:s.references)||void 0===t?void 0:t.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===e?void 0:e.value)||null;a&&i.set("zOrderNumber",a),l&&i.set("orderId",l);const c=i.toString(),d=n.includes("?");this.isWaitingToRedirect=!0,this.redirectToUrl(c?`${n}${d?"&":"?"}${c}`:n)},this.handleSuccessBehavior=async()=>{this.saveOrderIdForDuplicationIssue();const{successBehavior:o}=M.checkoutSettings;switch(!0){case"REDIRECT_TO_SUCCESS_PAGE"===o:case!!r.externalConfirmationPageURL:if(this.notificationTitle=S("Order complete!"),this.notificationMessages=[S("Your order has been successfully placed."),S("You will be redirected back to the merchant's site in a few seconds.")],this.isLoading=!1,this.isWaitingToRedirect=!0,this.useOverrideSuccessNotification(),await this.getPullOrder(),!this.order)return q("=== Order info not found, not redirecting, hide spinner for close button","error"),void(this.isWaitingToRedirect=!1);this.isWaitingToRedirect=!1,this.redirectToMerchantSuccessPage();break;default:this.useOverrideSuccessNotification(),this.isLoading=!1,"function"==typeof M.checkoutSettings.onOrderSuccess&&await this.getPullOrder()}},this.getPullOrder=async(o=0)=>{var s,t;0===o&&q("=== Start to poll for order info","info");const{baseUrl:e,order:n}=await this.pullOrder(),{isLegacyCheckout:i}=window.Zonos,a=!!(null===(t=null===(s=null==n?void 0:n.references)||void 0===s?void 0:s.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===t?void 0:t.value),r=_.checkoutSessionId,l=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;if(q(`=== Polling order (${o} attemps)`,"info"),n&&!i||n&&o>=l||a){if(q("=== Order info found","info"),i&&n&&!a)return void H({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}&orderId=${n.id}`,errors:[`Order found but legacy order number doesn't exist after ${l} attempts`],metadata:{allLogs:K,checkoutSessionId:_.checkoutSessionId||"",orderId:n.id,storeId:M.storeId}});o>10&&H({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}&orderId=${n.id}`,errors:[`Order found after ${o} attempts`],metadata:{allLogs:K,checkoutSessionId:_.checkoutSessionId||"",orderId:n.id,storeId:M.storeId}}),this.order=n}else n&&a||!(o<l)?H({endpoint:`${e}/api/zonos-elements/get-order?checkoutSessionId=${r}`,errors:[`Order not found after ${l} attempts`],metadata:{allLogs:K,checkoutSessionId:_.checkoutSessionId||"",storeId:M.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.useOverrideSuccessNotification=()=>{const{successPageSubtitleText:o,successPageTitleText:s}=M.checkoutSettings;s&&(this.notificationTitle=s),o&&(this.notificationMessages=o)},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||h.clientSecret;if(o||this.storybookForceStatus){const{currency:s,error:t,messages:e,status:n}=await u({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),i="requires_action"===n||t;this.notificationType=i?"error":"success",this.notificationMessages=e||[],this.notificationTitle=S(i?"Payment failed":"You're all set!"),q("=== Payment intent retrieve status","info",{clientSecret:o,error:t,messages:e,status:n});const a=new URL(window.location.href);if(a.searchParams.delete("payment_intent_client_secret"),a.searchParams.delete("payment_intent"),a.searchParams.delete("redirect_status"),a.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",a.toString()),t&&(null==e?void 0:e.length))J({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:_.checkoutSessionId}}),H({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]}" status: ${n} - checkout session: ${_.checkoutSessionId}`],metadata:{allLogs:K,credentialToken:window.Zonos.zonosApiKey}});else{this.saveOrderIdForDuplicationIssue();const o=_.checkoutSessionId;J({event:"zonos-checkout-success",metadata:this.buildPurchaseMetadata({checkoutSessionId:o||"",currency:null==s?void 0:s.toUpperCase()})}),J({event:"purchase",metadata:this.buildPurchaseMetadata({checkoutSessionId:o||"",currency:null==s?void 0:s.toUpperCase()})}),m({checkoutSessionId:o,eventName:"checkout_orderCompleted"});const t=Y("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(t),await this.handleSuccessBehavior()}}this.isLoading=!1,f(),p(),_.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=S("You're all set!"),this.notificationMessages=z("succeeded").messages,this.useOverrideSuccessNotification(),await this.handleSuccessBehavior(),f(),p(),$(),_.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(F.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=S("Payment failed"),this.notificationMessages=[F.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,F.orderIdCreated&&(J({event:"zonos-checkout-success",metadata:this.buildPurchaseMetadata({checkoutSessionId:_.checkoutSessionId||""})}),J({event:"purchase",metadata:this.buildPurchaseMetadata({checkoutSessionId:_.checkoutSessionId||""})}),m({checkoutSessionId:_.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=S("You're all set!"),this.notificationMessages=z("succeeded").messages,this.useOverrideSuccessNotification(),await this.handleSuccessBehavior()),f(),p(),$(),_.checkoutSessionId=null},this.closeClickHandler=()=>{this.closeClick.emit()},this.saveOrderIdForDuplicationIssue=()=>{var o,s,t,e;const n=U(localStorage.getItem("zonos--placed-order-info")),i={cartId:window.Zonos.cartId||null,checkoutSessionId:(null==n?void 0:n.checkoutSessionId)||_.checkoutSessionId||"",orderId:(null===(o=this.order)||void 0===o?void 0:o.id)||null,time:(null==n?void 0:n.time)||Date.now(),zonosOrderNumber:(null===(e=null===(t=null===(s=this.order)||void 0===s?void 0:s.references)||void 0===t?void 0:t.find((o=>"zonosOrderNumber"===o.key)))||void 0===e?void 0:e.value)||null};localStorage.setItem("zonos--placed-order-info",JSON.stringify(i))}}componentDidLoad(){if(localStorage.removeItem("zonos--placed-order-info"),this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);r.isStagingMode?this.checkStagingOrderStatus():F.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=V();return t(e,{key:"80a543fca5dbc63dde41806702b2f6dd4fa849ab",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":W({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&t("div",{key:"6cab293041902e156563f37db6f0e77caaeeaaf9",class:"zonos--finish-details"},t("div",{key:"6bf32844fa9d38eae6e9f337e56b7918e49bf793",class:"zonos--group"},t("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}),t("zonos-text",{key:"bf13e59b7bc2380609ffba879fa2b1d8c5d9a9e0",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),t("zonos-text",{key:"c246affb94a9799e0c556affb73b2ebfb69a9c7f",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>t(n,null,o,t("br",null))))),this.shouldRenderCloseButtonForRedirectBehavior()&&t("zonos-button",{key:"61fa4fa0e09c0ce2905281b2696f42172c7a2bcd",loading:this.isWaitingToRedirect&&"error"!==this.notificationType,onClick:()=>{var o;(null===(o=this.order)||void 0===o?void 0:o.id)?this.redirectToMerchantSuccessPage():this.closeClickHandler()},size:"md",variant:"primary"},S("Close")),!window.Zonos.isLegacyCheckout&&this.shouldRenderKeepShoppingButton()&&t("zonos-button",{key:"9227d7832ed477be556cb6d59c644a74c293c740",onClick:()=>this.closeClickHandler(),size:"md",variant:"primary"},this.notificationActionText)),o&&"finish"===r.step&&"success"===this.notificationType&&t("div",{key:"9107be1ef7895b0a5e3fe0a985036a11de7011d3",class:"zonos--finish-button-wrapper"},t("zonos-button",{key:"b0de8743bea8dd9ac7099bd5b77811f80d80a380",backgroundColor:"gray-0",buttonColor:"gray-1000",onClick:()=>this.closeClickHandler(),size:"lg",variant:"outline"},"New test cart"),t("zonos-button",{key:"f90749b9af4c17eac554efb6d3d12cc41ac6e3c8",onClick:()=>{const o=window.location.hostname.includes("dashboard.zonos.com");this.redirectToUrl(o?"/orders/all":"https://dashboard.zonos.com/orders/all")},size:"lg",variant:"primary"},"View order in Dashboard"))))}static get assetsDirs(){return["assets"]}};uo.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}: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:20px}:host .zonos--finish-details{max-width:536px;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--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 mo=class{constructor(s){o(this,s),this.mobile=!1,this.showLanguageDialog=!1,this.isMobile=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=G(this.mobile)}componentWillLoad(){this.isMobile=G(this.mobile)}render(){var o;const s=null===(o=Q.find((o=>o.code===I.selectedLocale)))||void 0===o?void 0:o.label,n="LIGHT"!==this.dataTheme||this.mobile?"gray-1000":"gray-0";return t(e,{key:"aa7fe5e0bb22626f590d93a6c8a52876523a2dfb",class:j(["zonos--elements",this.isMobile&&"mobile"])},t("div",{key:"5fb0fc90649a06e324935484d0c5c1dba31d792c",class:"zonos--checkout-footer"},t("div",{key:"e34ac7fda1d9a13830276313e4a36a7840497d7e",class:"zonos--checkout-locale-wrapper"},t("zonos-button",{key:"775156c9f331715768b1bf9c36970d0c7da02fd2",buttonColor:n,class:"zonos--checkout-footer-language-button",icon:t("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:n}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},s),t("div",{key:"e2cc31362529661507811b9f5aa68586b3bf9ea5",class:j(["zonos--checkout-footer-dialog",this.showLanguageDialog&&"zonos--checkout-footer-dialog-open"])},t("zonos-language-select",{key:"ad43b0a6bb947a69ea970485ee8d9afb5c8d1adb",handleOnClose:()=>this.toggleLanguageDialog()}))),t("div",{key:"c652833a9ce05beb22b9530003863ac0e5e9f8ea",class:"zonos--checkout-footer-icon-wrapper"},t("a",{key:"f2f8fb4ef070fe6a59a8b787e9e3e6237c2cc395",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},t("zonos-text",{key:"50b8962317bfc01bc7edbbe4c51f58476ca3c4ec",textColor:n},"Privacy policy")),t("div",{key:"7b4b70f7c0bd4ae5f385d6738f844a795261b9b9",class:"zonos--checkout-footer-logo"},t("zonos-text",{key:"8a4279a6584a376cb10e8da6b33d8006ac896d5b",textColor:n},"Powered by"),t("a",{key:"523a822b1c5b80bcb1d5dde2a7d9fce5fe476d20",href:"https://zonos.com",target:"_blank",title:"Zonos website"},t("zonos-icon",{key:"19753e93a7820765cf208916f53adebdcdf05cf9",autoHeight:!0,content:'<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>\n<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>\n<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>\n</svg>\n',size:108}))))))}get el(){return a(this)}static get watchers(){return{mobile:["handleMobileChange"]}}};mo.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:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);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}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-footer-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--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";const fo=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.paypalSessionFailed=i(this,"paypalSessionFailed",7),this.paypalSessionDone=i(this,"paypalSessionDone",7),this.continueLoading=!1,this.isMobile=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=h.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var s,t;if(!this.handleValidate())return this.showErrorBanner=!0,null===(s=h.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);h.checkoutSettlementCurrency=o,J({event:"zonos-checkout-payment-info",metadata:{checkoutSessionId:_.checkoutSessionId,paymentMethod:null===(t=h.stripePaymentEventData)||void 0===t?void 0:t.value.type}}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(s){const t=document.createElement("textarea");t.style.position="fixed",t.style.left="-1000px",t.style.top="-1000px",t.style.width="1px",t.style.height="1px",t.value=o,t.id="zonos-copy-card-number",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}window.Zonos.showNotification({message:S("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await oo();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,g()}}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)}render(){var o;if(this.hasStripePaymentError=h.hasPaymentError,!h.stripeElements)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const s=V(),i=r.isStagingMode||X(),a="external_paypal"===(null===(o=h.stripePaymentEventData)||void 0===o?void 0:o.value.type);return t(e,{class:"zonos--checkout-payment zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},S("Payment method")),(()=>{if(i){const{colorPrimary:o}=M.appearance,s=o&&so(o)?"DARK":"LIGHT",e=this.isMobile?M.appearance.theme:s;return t(n,null,this.stagingOrderCreateErrorMessage&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),t("zonos-empty-state-payment",{emptyStateText:S("No payment method needed for staging"),theme:e}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},S("Place test order"))))}return t(n,null,this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},S("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},h.customErrorMessage||S("We couldn't complete your payment. Please verify the payment details and try again.")),F.paypalErrorMessage&&t("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},F.paypalErrorMessage),t("zonos-payment",null),t("div",{class:"zonos--group-btn"},!a&&t(n,null,t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===h.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==h.checkoutSettlementCurrency,onClick:async()=>{r.checkoutSession?await this.continueClickHandler({currencyCode:r.checkoutSession.subtotals.presentmentCurrencyCode}):q("Checkout session is not found")},size:"lg",variant:this.submitBtnType},S("Pay [orderTotal]",{orderTotal:B({amount:r.total,isForeign:!0})})),h.shouldRenderPayInUsdButton&&t("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==h.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===h.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},S("Click to pay in USD"))),t("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:a?"block":"none"}})),s&&t("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},t("zonos-v-stack",{spacing:16},t("div",null,t("zonos-text",{type:"semiBoldLabel"},S("Test cards")),t("zonos-text",{textColor:"gray-700"},S("Click to copy the card number. Use any future expiration date and three number CVC."))),t("zonos-button",{icon:t("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")},S("Success")," (****4242)"),t("zonos-button",{icon:t("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")},S("Failure")," (****0002)")),t("zonos-notification",null)))})()))}get ele(){return a(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};fo.style=".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-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-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-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-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-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-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}";const zo=class{constructor(s){o(this,s),this.tabColor=null,this.backgroundColor=null,this.getTotalSuccessStep=()=>(Object.values(r.tabItems).filter((o=>o.isDone)).length+1)/4*100+"%",this.isTabClickable=o=>{const s=r.tabItems[o];return!!s&&(!!s.isDone||Object.values(r.tabItems).slice(0,s.index-1).every((o=>o.isDone)))}}async setTabItems(o){r.tabItems=o}async setTabSelected(o){if(this.isTabClickable(o)){r.step=o;const s=(({selectedTab:o,tabList:s})=>{const t=s[o].index,e=Object.values(s).slice(t-1,Object.keys(s).length).map((o=>o.value)),n=Object.assign({},s);return Object.values(n).forEach((o=>{e.includes(o.value)&&(o.isDone=!1)})),n})({selectedTab:o,tabList:r.tabItems});r.tabItems=s}}render(){const o=r.step,s=this.tabColor||M.appearance.colorSecondary,n=this.backgroundColor||M.appearance.colorPrimary||"",i=n&&s?to({backgroundColor:eo(n)?window.getComputedStyle(this.ele).getPropertyValue(`--zonos-elements-${n.replace("--zonos-elements-","")}`):n,color:s}):s;return t(e,{key:"3c7b6b5ecce353611856c14c70eec992a8024b3b",class:"zonos--elements",style:{"--zonos--color":i,"--zonos--progress-percent":this.getTotalSuccessStep()}},t("div",{key:"60e0e7895f1a5667c41baecba5533ecbafcfd11c",class:"zonos--tab-wrapper"},Object.values(r.tabItems).map(((s,e)=>{const n=s.value===o;return t("button",{"aria-label":`Tab ${s.label}`,class:j(["zonos--tab-item",s.value===o&&"selected",s.isDone&&"done"]),disabled:!this.isTabClickable(s.value),key:s.value,onClick:()=>this.setTabSelected(s.value)},t("div",{class:"zonos--tab-index"},t("zonos-text",{class:"zonos--tab-index-label",textColor:n?i:"gray-1000",type:"label"},e+1),t("zonos-icon",{class:"zonos--tab-index-done-icon",content:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M18.289 7.40424C18.618 7.65585 18.6808 8.12656 18.4291 8.4556L11.9291 16.9556C11.7978 17.1273 11.5988 17.234 11.383 17.2484C11.1673 17.2627 10.9559 17.1832 10.803 17.0303L6.80304 13.0303C6.51015 12.7374 6.51015 12.2626 6.80304 11.9697C7.09594 11.6768 7.57081 11.6768 7.8637 11.9697L11.258 15.3639L17.2376 7.54442C17.4892 7.21539 17.9599 7.15263 18.289 7.40424Z" fill="currentColor"/>\n</svg>\n',iconColor:n?i:"gray-1000"})),t("zonos-text",{textColor:n?i:"gray-1000",type:"label"},S(s.label)))}))),t("div",{key:"fd6cbddf4abb19bedabc12b3c79c8dcb4a3bc938",class:"zonos--tab-progress"},t("div",{key:"83d85b7bcdac39b41d6e126d764242bf1076374a",class:"zonos--progress-bar-fill"})))}static get assetsDirs(){return["assets"]}get ele(){return a(this)}};zo.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{margin-bottom:32px}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--zonos--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--zonos--color);height:100%;width:var(--zonos--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";const go=class{constructor(s){o(this,s),this.errorImages=[]}async handleToggleChanged(o){var s;const t=null===(s=r.exchangeRate)||void 0===s?void 0:s.targetCurrencyCode;r.displayBaseCurrency=t!==o}render(){const{exchangeRate:o}=r,s=o&&o.sourceCurrencyCode!==o.targetCurrencyCode?[{label:o.sourceCurrencyCode,value:o.sourceCurrencyCode},{label:o.targetCurrencyCode,value:o.targetCurrencyCode}]:[];return s.length?t(e,{class:"zonos--currency-toggle zonos--elements"},t("zonos-toggle",{onToggleChanged:o=>this.handleToggleChanged(o.detail),options:s,value:r.displayBaseCurrency?s[0].value:s[1].value})):null}static get assetsDirs(){return["assets"]}},bo=35,yo=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.testContinueClicked=i(this,"testContinueClicked",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.isMobile=!1,this.defaultAddress=[],this.shouldUseCustomAddressFormOverride=!1,this.showErrorBanner=!1,this.shippingCountry="",this.isCheckingForRestrictedItems=!1,this.isValidatingAddress=!1,this.taxIdErrorMessage="",this.shortAddressCodeErrorMessage="",this.invalidShippingCharacterList=null,this.invalidBillingCharacterList=null,this.openAddressValidationDialog=!1,this.isEmailError=!1,this.recordedFormTypeUsed=!1,this.selectedCountryCode=I.selectedCountryCode,this.genericSettings=M.genericSettings,this.addressFormRenderType=r.addressFormRenderType,this.exceededCharacterLimitErrorFieldList=[],this.handleInvalidCharacters=async()=>{if("ALL"===M.checkoutSettings.allowedCharacterSets)return{hasInvalidCharacters:!1};this.invalidShippingCharacterList=h.stripeAddressEventData?this.checkInvalidCharacters(h.stripeAddressEventData):null,this.invalidBillingCharacterList=h.stripeShippingSameAsBilling?null:this.checkInvalidCharacters(h.stripeBillingAddressEventData);const o=!!this.invalidShippingCharacterList||!!this.invalidBillingCharacterList;return o&&(this.openAddressValidationDialog=!0,this.isValidatingAddress=!0,await b({addressInvalidCharactersList:this.invalidShippingCharacterList,billingAddressInvalidCharactersList:this.invalidBillingCharacterList}),this.isValidatingAddress=!1),{hasInvalidCharacters:o}},this.transformTranslatedAddressToStripeEvent=({submitData:o,type:s})=>{const t="shippingAddress"===s?h.stripeAddressEventData:h.stripeBillingAddressEventData,e=o[s];if(!t||!e)return;const{firstName:n,lastName:i}=y({name:e.name}),a=Object.assign(Object.assign({},t),{complete:!0,value:Object.assign(Object.assign({},null==t?void 0:t.value),{address:Object.assign(Object.assign({},null==t?void 0:t.value.address),{city:e.city||(null==t?void 0:t.value.address.city)||"",line1:e.line1,line2:e.line2,postal_code:e.postal_code,state:e.state}),firstName:n,lastName:i,name:e.name})});"shippingAddress"===s?h.stripeAddressEventData=a:h.stripeBillingAddressEventData=a},this.continueClickHandler=async()=>{var o;if(null===(o=this.testContinueClicked)||void 0===o||o.emit({billingAddress:h.stripeBillingAddressEventData,sameAsBilling:h.stripeShippingSameAsBilling,shippingAddress:h.stripeAddressEventData}),!this.handleValidate())return setTimeout((()=>{var o;null===(o=this.el.querySelector("zonos-banner.zonos--error-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth",block:"center"})}),50),void(this.showErrorBanner=!0);this.showErrorBanner=!1;const{hasInvalidCharacters:s}=await this.handleInvalidCharacters();s||this.continueClicked.emit({billingAddress:h.stripeBillingAddressEventData,sameAsBilling:h.stripeShippingSameAsBilling,shippingAddress:h.stripeAddressEventData})},this.validateCustomAddressForm=o=>{const s=h.stripeShippingSameAsBilling||"shipping"===o,t=s?h.customAddressErrors:h.customBillingAddressErrors,{city:e,firstName:n,lastName:i,line1:a,phone:r,postalCode:l,state:c}=t;let d=!1;return(e||n||i||a||r||l||c)&&(d=!0),s?h.customAddressErrors=Object.assign(Object.assign({},t),{showError:d}):h.customBillingAddressErrors=Object.assign(Object.assign({},t),{showError:d}),{isValid:!d}},this.validateAddressLength=({address:o,type:s})=>{if(!o)return[];const{city:t,line1:e,postal_code:n,state:i}=o.value.address,{firstName:a,lastName:r,name:l}=o.value,{firstName:c,lastName:d}=y({firstName:a,lastName:r,name:l}),h=e.length,p=n.length,u=i.length,m=c.length,f=d.length,z="shipping"===s?"shipping":"billing",g=[];return t.length>bo&&g.push({addressType:z,fieldLabel:"City",value:t}),h>bo&&g.push({addressType:z,fieldLabel:"Address line 1",value:e}),p>bo&&g.push({addressType:z,fieldLabel:"Zip",value:n}),u>bo&&g.push({addressType:z,fieldLabel:"State/Province/Region/Prefecture",value:i}),m>bo&&g.push({addressType:z,fieldLabel:"First name",value:c}),f>bo&&g.push({addressType:z,fieldLabel:"Last name",value:d}),g},this.handleValidate=()=>{var o,s;const t=h.stripeAddressEventData,e=h.stripeBillingAddressEventData,n=h.stripeLinkEventData,i=h.stripeShippingSameAsBilling?!!(null==t?void 0:t.complete):!!(null==e?void 0:e.complete),a=!!(null==t?void 0:t.complete),r=!!(null==n?void 0:n.complete);null===(o=h.stripeAddressElement)||void 0===o||o.getValue(),null===(s=h.stripeBillingAddressElement)||void 0===s||s.getValue();const l="zonos"===this.addressFormRenderType?this.validateCustomAddressForm("billing").isValid:i,c="zonos"===this.addressFormRenderType?this.validateCustomAddressForm("shipping").isValid:a;!r&&(null==n?void 0:n.empty)&&(this.isEmailError=!0),q("==> isValidBilling","info",l,{address:h.stripeBillingAddressEventData,errors:h.customBillingAddressErrors}),q("==> isValidShipping","info",c,{address:h.stripeAddressEventData,errors:h.customAddressErrors}),q("==> isValidLink","info",r);const{error:d,valid:p}=(({companyName:o,shippingCountry:s,taxId:t})=>{if(!ro({companyName:o,countryCode:s}))return{error:null,valid:!0};return(o=>["MX","AR",...lo].includes(o))(s)?lo.includes(s)?o.trim()?t?{error:null,valid:!0}:{error:"Tax id is required",valid:!1}:{error:null,valid:!0}:t?"AR"===s?/^[0-9]{2}-?[0-9]{8}-?[0-9]$/.test(t)?{error:null,valid:!0}:{error:"Invalid CUIT/CUIL format. Must contain 11 digits, with or without dashes (XX-XXXXXXXX-X).",valid:!1}:"MX"===s?/^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(t)?{error:null,valid:!0}:{error:"Invalid RFC format. Must be 12–13 uppercase letters and numbers only.",valid:!1}:{error:null,valid:!0}:{error:"Tax id is required",valid:!1}:{error:null,valid:!0}})({companyName:h.companyName,shippingCountry:this.shippingCountry,taxId:h.taxId}),{error:u,valid:m}=(({shippingCountry:o,shortAddressCode:s})=>ao({countryCode:o})?s?"SA"!==o||/^[A-Za-z]{4}\s*[0-9]{4}$/.test(s)?{error:null,valid:!0}:{error:"Invalid short address code format. Must be 4 letters and 4 numbers.",valid:!1}:{error:"Short address code is required.",valid:!1}:{error:null,valid:!0})({shippingCountry:this.shippingCountry,shortAddressCode:h.shortAddressCode});this.taxIdErrorMessage=p?"":S(d),this.shortAddressCodeErrorMessage=m?"":S(u);const f=this.validateAddressLength({address:h.stripeAddressEventData,type:"shipping"}),z=this.validateAddressLength({address:h.stripeBillingAddressEventData,type:"billing"});return this.exceededCharacterLimitErrorFieldList=[...f,...z],!(!(l&&c&&r&&p&&m)||this.exceededCharacterLimitErrorFieldList.length>0)},this.handleEmailValidation=()=>{var o;this.isEmailError&&((null===(o=h.stripeLinkEventData)||void 0===o?void 0:o.empty)||(this.isEmailError=!1))},this.prepareAddressObject=o=>{var s;const t=o.value;return{city:t.address.city||"",country:t.address.country,email:(null===(s=h.stripeLinkEventData)||void 0===s?void 0:s.value.email)||"",line1:t.address.line1||"",line2:t.address.line2||"",name:t.name||"",phone:t.phone||"",postal_code:t.address.postal_code||"",state:t.address.state||""}},this.renderExceededCharacterLimitError=o=>{const s=this.exceededCharacterLimitErrorFieldList.filter((({addressType:s})=>s===o));return s.length?t("zonos-banner",{class:"zonos--error-banner",intent:"error",slot:"below-title"},t("ul",null,s.map((({fieldLabel:o,value:s})=>t("li",{key:o},S("Address line 1"===o?"[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.":"[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.",{currentLength:s.length,fieldLabel:o,maxLength:bo})))))):null},this.renderAddressComponent=o=>{this.selectedCountryCode||H({endpoint:"NO_COUNTRY_SELECTED_WHEN_RENDERING_ADDRESS_COMPONENT",errors:["No country selected when rendering address component"],metadata:{type:o},shouldPostReleaseErrorReporting:!0});const s="shipping"===o?this.defaultAddress:[];return"shipping"===o&&_.checkoutSessionId&&!this.recordedFormTypeUsed&&(no({attributes:[{key:"ZONOS_FORM_TYPE_USING",value:"zonos"===this.addressFormRenderType?"custom":"stripe"}],checkoutSessionId:_.checkoutSessionId}),this.recordedFormTypeUsed=!0),t("zonos"===this.addressFormRenderType?"zonos-custom-address":"zonos-address",{defaultAddress:s,shortAddressCodeErrorMessage:this.shortAddressCodeErrorMessage,taxIdErrorMessage:this.taxIdErrorMessage,titleText:S("shipping"===o?"Shipping address":"Billing address"),type:o},this.renderExceededCharacterLimitError(o))}}watchShowErrorBanner(){this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate())}checkInvalidCharacters(o){if(!o)return null;if(!o.complete||"ALL"===M.checkoutSettings.allowedCharacterSets)return null;const{address:s,firstName:t,lastName:e,name:n}=o.value,{city:i,country:a,line1:r,line2:l,postal_code:c,state:d}=s,h=io({city:i,country:a,line1:r,line2:l||"",name:n||`${t} ${e}`,postal_code:c,state:d});return Object.keys(h).length?h:null}watchShouldEnabledCustomAddress(){var o,s,t;const e=this.shouldUseCustomAddressFormOverride||!!(null===(o=this.genericSettings)||void 0===o?void 0:o.shouldEnabledCustomAddress),n=!!this.selectedCountryCode&&e&&!!(null===(t=null===(s=this.genericSettings)||void 0===s?void 0:s.countryCustomAddressEnabled)||void 0===t?void 0:t.includes(this.selectedCountryCode));r.addressFormRenderType=n?"zonos":"stripe"}disconnectedCallback(){try{this.storeUnsubscribeList.forEach((o=>o()))}catch(o){}}componentWillLoad(){this.storeUnsubscribeList=[O("genericSettings",(()=>{this.genericSettings=M.genericSettings})),D("selectedCountryCode",(()=>{this.selectedCountryCode=I.selectedCountryCode})),x("addressFormRenderType",(()=>{this.addressFormRenderType=r.addressFormRenderType}))],this.watchShouldEnabledCustomAddress()}render(){var o,s,n,i,a,r;if(!h.stripeElements)return null;!this.shippingCountry&&h.stripeAddressEventData&&(this.shippingCountry=null===(o=h.stripeAddressEventData)||void 0===o?void 0:o.value.address.country),h.stripeAddressEventData&&this.shippingCountry!==h.stripeAddressEventData.value.address.country&&(this.shippingCountry=h.stripeAddressEventData.value.address.country);const l=!h.stripeShippingSameAsBilling,c=T(M.appearance.theme),d=(null===(s=this.defaultAddress.find(Boolean))||void 0===s?void 0:s.email)||(null===(a=null===(i=null===(n=h.customerProfile)||void 0===n?void 0:n.locations)||void 0===i?void 0:i.find(Boolean))||void 0===a?void 0:a.email)||(null===(r=h.customerProfile)||void 0===r?void 0:r.email);return t(e,{class:"zonos--customer-info zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},S("Customer information")),this.showErrorBanner&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},S("Missing required fields. Make sure all fields are completed.")),t("zonos-link-authentication",{defaultEmail:d,isEmailError:this.isEmailError,onLinkAuthenticationChange:this.handleEmailValidation,titleText:S("Contact")}),this.renderAddressComponent("shipping"),t("zonos-checkbox",{class:"zonos--shipping-same-as-billing-cbx",isChecked:h.stripeShippingSameAsBilling,label:S("Shipping address same as billing"),onCheckboxSelected:o=>{h.stripeShippingSameAsBilling=o.detail}}),t("zonos-collapse",{collapsed:!l},this.renderAddressComponent("billing")),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,loading:this.continueLoading,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},S("Continue to shipping")))),h.stripeAddressEventData&&t("zonos-address-update-dialog",{billingAddress:!h.stripeShippingSameAsBilling&&h.stripeBillingAddressEventData?this.prepareAddressObject(h.stripeBillingAddressEventData):null,"data-theme":c,dialogLoading:this.isValidatingAddress,dialogOpen:this.openAddressValidationDialog,isMobile:this.isMobile,onCloseUpdateDialog:()=>this.openAddressValidationDialog=!1,onContinueClicked:o=>{const s=o.detail;this.transformTranslatedAddressToStripeEvent({submitData:s,type:"shippingAddress"}),this.transformTranslatedAddressToStripeEvent({submitData:s,type:"billingAddress"})},shippingAddress:this.prepareAddressObject(h.stripeAddressEventData),translatedBillingAddress:h.translatedAddress.billingAddress,translatedShippingAddress:h.translatedAddress.address}))}get el(){return a(this)}static get watchers(){return{showErrorBanner:["watchShowErrorBanner"],shouldUseCustomAddressFormOverride:["watchShouldEnabledCustomAddress"],genericSettings:["watchShouldEnabledCustomAddress"],selectedCountryCode:["watchShouldEnabledCustomAddress"]}}};yo.style=".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-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-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";const xo=class{constructor(t){o(this,t),this.isErrorImageLoad=!1,this.getImageRestState=()=>s(`./assets/${this.restStateType}.png`)}render(){const o=this.getImageRestState();return t(e,{key:"2d9be86849c6ff2f039ca21676cbdf912538eb1d",class:j(["zonos--elements zonos--restState"]),style:{"--zonos--font-family":E()}},t("div",{key:"f538f05fe92eca4ee05daf72ee3387bea337c20c",class:"zonos--restState-image"},t("img",{key:"cc752b1ed3e9e656810c901df9f8b19462efc978",alt:this.restStateType,onError:()=>{this.isErrorImageLoad=!0},src:o})),t("div",{key:"4729c415dbac98876fcd907437b8df21b925dec5",class:"content"},t("zonos-text",{key:"39313c8c71d228cd1076e809146ad7ac3d877a9a",class:"title",type:"boldSubheader"},this.restStateTitle),t("zonos-text",{key:"69813bd32ae3867ebebcc511655f2052b1175945",class:"subtitle"},this.restStateSubtitle)),t("div",{key:"98b085930fd76e2ff095cc971ae4699041c1a550",class:"action"},t("slot",{key:"188318643319081914ed30aad91de5f15b014953"})))}static get assetsDirs(){return["assets"]}};xo.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%;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:20px}:host .zonos--restState-image{width:124px;height:124px;margin-bottom:15px}:host .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:8px}";const vo=class{constructor(s){o(this,s),this.mobile=!1,this.collapsed=!1,this.isMobile=!1}handleWindowResize(){this.isMobile=G(this.mobile)}componentWillLoad(){this.isMobile=G(this.mobile)}render(){const o="customer-info"===r.step?r.subtotal+r.adjustmentTotal:r.total,s=l()?o:0,n=this.isMobile?"boldSubheader":"semiBoldLabel",i=this.isMobile?"boldSubheader":"secondaryPageHeader",a=this.isMobile?"gray-1000":"gray-800";return t(e,{class:j(["zonos--review zonos--elements",this.isMobile&&"mobile"])},t("div",{class:"zonos--title"},t("zonos-text",{textColor:a,type:n},S("Pay [organizationName]",{organizationName:M.organizationName})),(()=>this.isMobile?t("zonos-icon",this.collapsed?{"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"}:{"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"}):null)()),t("div",{class:"zonos--total-pay"},t("zonos-text",{type:i},B({amount:s,isForeign:!0}))))}static get assetsDirs(){return["assets"]}};vo.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}:host(.mobile){display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-pack:justify;justify-content:space-between;padding:4px 0;margin-bottom:8px;background-color:transparent}:host(.mobile) .zonos--title{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;gap:8px}:host(.mobile) .zonos--total-pay{margin:0}";const wo=class{constructor(s){o(this,s),this.continueClicked=i(this,"continueClicked",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.selectedShippingMethod=null,this.collapsedDAPOptions=!0,this.isSelecting=!1,this.showErrorBanner=!1,this.serviceLevelsDDP=[],this.serviceLevelsDAP=[],this.serviceLevelsOther=[],this.serviceLevelsAll=[],this.displayBaseCurrency=!1,this.shippingData=[],this.handleRadioSelected=async o=>{var s;if(this.selectedShippingMethod=o.detail,!this.selectedShippingMethod)return;const t=(null===(s=r.shippingData)||void 0===s?void 0:s.find((o=>{var s;return o.id===(null===(s=this.selectedShippingMethod)||void 0===s?void 0:s.shipmentRatingId)})))||null;t&&(this.isSelecting=!0,await v(),await w({applySubtotalsOnly:!1,landedCostId:o.detail.landedCostId,selectedShippingOption:t}),this.isSelecting=!1)},this.handleValidate=()=>!!this.selectedShippingMethod,this.isOutdatedShippingData=()=>{var o;return!!(null===(o=r.shippingData)||void 0===o?void 0:o.some((o=>{var s;if(!(null===(s=this.serviceLevelsAll)||void 0===s?void 0:s.find((s=>s.shipmentRatingId===o.id))))return!0})))},this.continueClickHandler=()=>{var o,s;this.handleValidate()?(J({event:"zonos-checkout-shipping-info",metadata:{checkoutSessionId:_.checkoutSessionId,serviceLevelId:null===(o=this.selectedShippingMethod)||void 0===o?void 0:o.value}}),m({checkoutSessionId:_.checkoutSessionId,eventName:"checkout_shippingInfoCompleted",metadata:{serviceLevelId:null===(s=this.selectedShippingMethod)||void 0===s?void 0:s.value}}),this.showErrorBanner=!1,this.continueClicked.emit()):this.showErrorBanner=!0},this.getLandedCostMethodLabelSuffix=o=>{var s,t,e;return 1==("DAP"===o&&!(null===(t=null===(s=M.genericSettings)||void 0===s?void 0:s.domesticCountries)||void 0===t?void 0:t.includes((null===(e=h.stripeAddressEventData)||void 0===e?void 0:e.value.address.country)||"US")))?S(" (Duties due at door)"):""},this.initServiceLevels=()=>{var o;this.collapsedDAPOptions=!0;const s=(null===(o=r.shippingData)||void 0===o?void 0:o.flatMap((o=>{var s;const t=k(o),e=t?`${t.minTransit}-${t.maxTransit} ${t.unit}`:"",n=null===(s=r.landedCostData)||void 0===s?void 0:s.filter((s=>{var t;return(null===(t=s.landedCost)||void 0===t?void 0:t.shipmentRating.id)===o.id}));return(null==n?void 0:n.map((s=>{const t=s.subtotals.shipping,n=C(s.landedCost);return{amount:t,label:`${o.displayName}${this.getLandedCostMethodLabelSuffix(n)}`,landedCostId:s.landedCostId,method:n,price:B({amount:t,isForeign:!0}),shipmentRatingId:o.id,sublabel:e,value:s.landedCostId}})))||[]})))||[],t=s.filter((o=>"DDP"===o.method)),e=s.filter((o=>"DAP"===o.method)),n=s.filter((o=>"DAP"!==o.method&&"DDP"!==o.method));this.serviceLevelsDDP=L(t),this.serviceLevelsDAP=L(e),this.serviceLevelsOther=L(n),this.serviceLevelsAll=[...this.serviceLevelsDDP,...this.serviceLevelsDAP,...this.serviceLevelsOther],[...this.serviceLevelsDDP,...this.serviceLevelsOther].length||(this.collapsedDAPOptions=!1)},this.isCurrencyToggled=()=>this.displayBaseCurrency!==r.displayBaseCurrency&&(this.displayBaseCurrency=r.displayBaseCurrency,!0),this.preselectFirstShippingMethod=async()=>{this.initServiceLevels();const o=this.serviceLevelsAll.find((o=>{var s;return o.shipmentRatingId===(null===(s=r.selectedShippingOption)||void 0===s?void 0:s.id)}))||null;if(o)return void this.handleRadioSelected({detail:o});const s=this.serviceLevelsAll.find(Boolean);s&&this.handleRadioSelected({detail:s})}}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}componentWillLoad(){this.storeUnsubscribeList=[x("shippingData",(()=>{this.isOutdatedShippingData()&&this.preselectFirstShippingMethod()})),x("landedCostData",(()=>{this.isOutdatedShippingData()&&this.preselectFirstShippingMethod()}))],this.preselectFirstShippingMethod()}render(){this.isCurrencyToggled()&&this.initServiceLevels();const o=[...this.serviceLevelsDDP,...this.serviceLevelsOther];return this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate()),t(e,{class:"zonos--shipping zonos--elements"},t("div",{class:"zonos--group"},t("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},S("Delivery options")),this.showErrorBanner&&!!this.serviceLevelsAll.length&&t("zonos-banner",{class:"zonos--error-banner",intent:"error"},S("No shipping method selected")),t("zonos-text",{class:"zonos--shipping-method-title",type:"semiBoldLabel"},S("Shipping method")),this.serviceLevelsAll.length?t("div",{class:"zonos--shipping-options-wrapper"},(()=>{var s;return"US"===(null===(s=h.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)?t("zonos-shipping-rich-radio",{isMobile:this.isMobile,items:this.serviceLevelsAll,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}):t(n,null,t("zonos-shipping-rich-radio",{isMobile:this.isMobile,items:o,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}),!!o.length&&!!this.serviceLevelsDAP.length&&t("button",{class:j(["zonos--shipping-options-collapse-trigger",this.collapsedDAPOptions&&"collapsed"]),onClick:()=>{this.collapsedDAPOptions=!this.collapsedDAPOptions}},t("div",{class:"zonos--title-wrapper"},t("zonos-text",{type:"label"},`${S(this.collapsedDAPOptions?"Show non-prepaid options":"Hide non-prepaid options")} `),t("zonos-icon",{content:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<g filter="url(#filter0_dd_2052_3658)">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M7.46967 14.5303C7.76256 14.8232 8.23744 14.8232 8.53033 14.5303L12.5 10.5607L16.4697 14.5303C16.7626 14.8232 17.2374 14.8232 17.5303 14.5303C17.8232 14.2374 17.8232 13.7626 17.5303 13.4697L13.0303 8.96967C12.7374 8.67678 12.2626 8.67678 11.9697 8.96967L7.46967 13.4697C7.17678 13.7626 7.17678 14.2374 7.46967 14.5303Z" fill="currentColor"/>\n</g>\n<defs>\n<filter id="filter0_dd_2052_3658" x="-3.5" y="-2" width="32" height="32" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="2"/>\n<feGaussianBlur stdDeviation="2"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0"/>\n<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2052_3658"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="1"/>\n<feComposite in2="hardAlpha" operator="out"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"/>\n<feBlend mode="normal" in2="effect1_dropShadow_2052_3658" result="effect2_dropShadow_2052_3658"/>\n<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_2052_3658" result="shape"/>\n</filter>\n</defs>\n</svg>\n'}))),t("zonos-collapse",{collapsed:this.collapsedDAPOptions},t("div",{class:"zonos--dap-wrapper"},t("zonos-banner",{bannerTitle:S("Duties and taxes will be charged upon delivery."),intent:"warning"},S("You may incur additional fees from the shipping carrier by not prepaying.")),t("zonos-shipping-rich-radio",{isMobile:this.isMobile,items:this.serviceLevelsDAP,onRadioSelected:o=>this.handleRadioSelected(o),selectedItem:this.selectedShippingMethod}))))})()):t("zonos-banner",{bannerTitle:r.customQuotingError?r.customQuotingError:S('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'),class:"zonos--shipping-method-error",intent:"error"}),t("div",{class:"zonos--group-btn"},t("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,loading:this.continueLoading||this.isSelecting,onClick:()=>this.continueClickHandler(),size:"lg",variant:this.submitBtnType},S("Go to payment")))))}};wo.style='.sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-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-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:"";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}';export{co as zonos_cart_items,ho as zonos_cart_restricted_items,po as zonos_cart_subtotal,uo as zonos_checkout_finish,mo as zonos_checkout_footer,fo as zonos_checkout_payment,zo as zonos_checkout_progress_tabs,go as zonos_currency_toggle,yo as zonos_customer_info,xo as zonos_rest_state,vo as zonos_review,wo as zonos_shipping}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as o}from"./p-57fa64d7.js";const r=({backgroundColor1:r,backgroundColor2:a})=>o.readability(r,a)>2.5;export{r as i}
|