@zonos/elements 1.3.231 → 1.3.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-9b519566.js → cart-bc615014.js} +5 -5
- package/dist/cjs/{debounce-2c9f3f1e.js → debounce-815d1517.js} +1 -1
- package/dist/cjs/{getBorderRadius-c7d9f676.js → getBorderRadius-2ef1170d.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-12605be9.js → hasInclusivePrice-84145546.js} +1 -1
- package/dist/cjs/{index-1c710d00.js → index-69fa8852.js} +352 -4
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-994c38e4.js → isDarkColor-878e600e.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{localization-38af974b.js → localization-39516612.js} +2 -2
- package/dist/cjs/{paypal-e8fa2302.js → paypal-1d6f1a71.js} +5 -5
- package/dist/cjs/{placeTestOrder-6388881f.js → placeTestOrder-a5469e40.js} +2 -2
- package/dist/cjs/{renderFallback-bb2c4bce.js → renderFallback-c2576fbe.js} +4 -4
- package/dist/cjs/{translationStore-f2d5eae9.js → translationStore-08d3ff9c.js} +182 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-a4899e90.js → updateCheckoutSessionAttributes-3a1db9de.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +14 -14
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +126 -18
- package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-5d489c65.js → zonosStore-37a4b4f4.js} +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +115 -6
- 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/store/translationStore.js +1 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/types/InputFieldLabel.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +488 -1
- package/dist/esm/{cart-bc0e1598.js → cart-14f305b3.js} +5 -5
- package/dist/esm/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
- package/dist/esm/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
- package/dist/esm/{hasInclusivePrice-706cc09d.js → hasInclusivePrice-0eda8ba9.js} +1 -1
- package/dist/esm/{index-55a03023.js → index-0bbe9693.js} +352 -4
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{localization-53f67640.js → localization-c5029ffc.js} +2 -2
- package/dist/esm/{paypal-3a6a048d.js → paypal-fded8844.js} +5 -5
- package/dist/esm/{placeTestOrder-917731cf.js → placeTestOrder-2250f719.js} +2 -2
- package/dist/esm/{renderFallback-cd0e40d9.js → renderFallback-dbf1e3ae.js} +4 -4
- package/dist/esm/{translationStore-d241dcf7.js → translationStore-690c4e04.js} +182 -2
- package/dist/esm/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +14 -14
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner_2.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-cart-items_13.entry.js +126 -18
- package/dist/esm/zonos-checkout.entry.js +10 -10
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
- package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
- package/dist/esm/zonos-collect.entry.js +9 -9
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +7 -7
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_4.entry.js +5 -5
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-empty-state-payment_4.entry.js +9 -9
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
- package/dist/esm-es5/{cart-bc0e1598.js → cart-14f305b3.js} +1 -1
- package/dist/esm-es5/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-706cc09d.js → hasInclusivePrice-0eda8ba9.js} +1 -1
- package/dist/esm-es5/index-0bbe9693.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-53f67640.js → localization-c5029ffc.js} +1 -1
- package/dist/esm-es5/{paypal-3a6a048d.js → paypal-fded8844.js} +1 -1
- package/dist/esm-es5/placeTestOrder-2250f719.js +1 -0
- package/dist/esm-es5/{renderFallback-cd0e40d9.js → renderFallback-dbf1e3ae.js} +1 -1
- package/dist/esm-es5/translationStore-690c4e04.js +1 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
- package/dist/scripts/index.d.ts +31 -2
- 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-customer-info/zonos-customer-info.d.ts +11 -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/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/types/InputFieldLabel.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +503 -3
- package/dist/types/types/generated/graphql.internal.types.ts +520 -3
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-b91df44b.system.entry.js → p-00ac999f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4523b982.entry.js → p-00ec22b2.entry.js} +1 -1
- package/dist/zonos-elements/{p-0bc8e55c.system.entry.js → p-03ff7b01.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5f7a9b69.system.entry.js → p-0a90dd80.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a444a82.system.entry.js → p-100f6a88.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d15cd138.entry.js → p-143d706b.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee8fcde6.js → p-14d7489d.js} +1 -1
- package/dist/zonos-elements/p-1d5aa016.system.js +1 -0
- package/dist/zonos-elements/{p-30981f80.entry.js → p-1eae4987.entry.js} +1 -1
- package/dist/zonos-elements/p-1f894984.js +1 -0
- package/dist/zonos-elements/{p-cb70de13.system.entry.js → p-23b45714.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-433d76b4.system.js → p-23d497e3.system.js} +1 -1
- package/dist/zonos-elements/{p-7c96a585.js → p-2557b96b.js} +1 -1
- package/dist/zonos-elements/{p-f912e9c3.entry.js → p-27874c22.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac26a931.entry.js → p-2ca8b037.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9486c57.entry.js → p-2dbcecf4.entry.js} +1 -1
- package/dist/zonos-elements/{p-db73c11a.entry.js → p-30e835a8.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff1722d0.system.entry.js → p-316f9052.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3eda5c2c.entry.js → p-3185968f.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa90adb8.entry.js → p-31975752.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bab9096.entry.js → p-31af91f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-38f42f10.system.entry.js → p-452fb638.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c998e4ed.entry.js → p-4592ae49.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff522088.system.entry.js → p-4e41143a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f548807d.system.entry.js → p-52b87408.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cb11d11b.system.entry.js → p-540cec7e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d2f7ea09.entry.js → p-55e2e4ed.entry.js} +1 -1
- package/dist/zonos-elements/{p-bb707dfd.system.js → p-561be3a2.system.js} +1 -1
- package/dist/zonos-elements/{p-a199bb13.js → p-5762e217.js} +1 -1
- package/dist/zonos-elements/{p-e688e493.js → p-57fa64d7.js} +1 -1
- package/dist/zonos-elements/{p-360d7101.system.entry.js → p-59ebb8c7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-abc0fb80.js → p-5c680f72.js} +1 -1
- package/dist/zonos-elements/{p-cbb01de9.entry.js → p-5f398c28.entry.js} +1 -1
- package/dist/zonos-elements/p-5f77d19e.js +1 -0
- package/dist/zonos-elements/{p-9bdad585.system.entry.js → p-60469388.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7730879e.system.js → p-652e80f0.system.js} +1 -1
- package/dist/zonos-elements/{p-4da7b6a8.system.entry.js → p-6adfb3af.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-91fa43ef.entry.js → p-74ca7739.entry.js} +1 -1
- package/dist/zonos-elements/{p-419c292c.system.js → p-767a31a8.system.js} +1 -1
- package/dist/zonos-elements/{p-2eaa5013.system.entry.js → p-770852bf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f688d7a4.system.js → p-7c705c76.system.js} +1 -1
- package/dist/zonos-elements/{p-22338b4a.system.entry.js → p-81ba2820.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2008df67.js → p-82739127.js} +2 -2
- package/dist/zonos-elements/p-88ea9f82.entry.js +1 -0
- package/dist/zonos-elements/p-8a23bbf5.js +1 -0
- package/dist/zonos-elements/{p-bc963b03.entry.js → p-905d2490.entry.js} +1 -1
- package/dist/zonos-elements/{p-24e26a2c.system.js → p-909e2bc3.system.js} +1 -1
- package/dist/zonos-elements/{p-b658c28a.entry.js → p-936b54c1.entry.js} +1 -1
- package/dist/zonos-elements/{p-304bdbc2.system.entry.js → p-93f2e1ee.system.entry.js} +1 -1
- package/dist/zonos-elements/p-989d3af9.system.js +2 -0
- package/dist/zonos-elements/{p-d96545ae.entry.js → p-9b8750f3.entry.js} +1 -1
- package/dist/zonos-elements/{p-55c6ff14.system.entry.js → p-a0a4e43d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0047fecf.system.js → p-a25428eb.system.js} +1 -1
- package/dist/zonos-elements/{p-4697f061.system.entry.js → p-a2819807.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6d423364.entry.js → p-a6e74856.entry.js} +1 -1
- package/dist/zonos-elements/p-ab41bab5.js +2 -0
- package/dist/zonos-elements/p-ae940a99.js +1 -0
- package/dist/zonos-elements/{p-dc56b469.system.entry.js → p-b1fd1ec2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7af39c98.js → p-b2a0ab4a.js} +1 -1
- package/dist/zonos-elements/{p-3f35b8b1.system.entry.js → p-b7ea5f4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c81f6387.entry.js → p-bf9d889f.entry.js} +1 -1
- package/dist/zonos-elements/p-c1ecab92.entry.js +1 -0
- package/dist/zonos-elements/{p-81b357f7.system.js → p-c2442878.system.js} +1 -1
- package/dist/zonos-elements/{p-7e5bd9af.system.entry.js → p-c288c6da.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4bf2f03.entry.js → p-c50cc926.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6ef4a5e.system.entry.js → p-c5cb2364.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-57413c34.system.js → p-c6e3d747.system.js} +1 -1
- package/dist/zonos-elements/{p-2dc38ef3.entry.js → p-c7b658cb.entry.js} +1 -1
- package/dist/zonos-elements/p-cf765af3.system.js +1 -0
- package/dist/zonos-elements/{p-89c5164b.system.js → p-d45285aa.system.js} +1 -1
- package/dist/zonos-elements/{p-bccd49d7.system.entry.js → p-d556c6d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1a67ae71.system.entry.js → p-db628e49.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c28da00e.entry.js → p-e03e1a62.entry.js} +1 -1
- package/dist/zonos-elements/{p-d852d6da.system.entry.js → p-e7874318.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c20429ea.entry.js → p-e8949e7e.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a242dfc.system.js → p-ea0b5d10.system.js} +1 -1
- package/dist/zonos-elements/{p-c9be03e0.entry.js → p-eae3462c.entry.js} +1 -1
- package/dist/zonos-elements/{p-b669050d.system.entry.js → p-eea0eb57.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f892595d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-23c46dfa.system.js → p-f8d56ba9.system.js} +1 -1
- package/dist/zonos-elements/p-fc776473.js +1 -0
- package/dist/zonos-elements/{p-cec35a21.entry.js → p-fd3b46ee.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/index-55a03023.js +0 -2
- package/dist/esm-es5/placeTestOrder-917731cf.js +0 -1
- package/dist/esm-es5/translationStore-d241dcf7.js +0 -1
- package/dist/zonos-elements/p-0ffd710e.js +0 -1
- package/dist/zonos-elements/p-3f0ca5f9.js +0 -1
- package/dist/zonos-elements/p-4f5be8f0.entry.js +0 -1
- package/dist/zonos-elements/p-516a9666.system.js +0 -1
- package/dist/zonos-elements/p-5fc34563.system.js +0 -2
- package/dist/zonos-elements/p-6d563f33.system.entry.js +0 -1
- package/dist/zonos-elements/p-7920d79c.system.js +0 -1
- package/dist/zonos-elements/p-b30c2ad9.js +0 -2
- package/dist/zonos-elements/p-bdeb20cb.js +0 -1
- package/dist/zonos-elements/p-c0e080e3.js +0 -1
- package/dist/zonos-elements/p-e27a9450.js +0 -1
- package/dist/zonos-elements/p-ede9e968.entry.js +0 -1
package/dist/scripts/zonos.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";const e=({id:e,payload:o,target:t,type:n})=>{var r;t instanceof HTMLIFrameElement?null===(r=t.contentWindow)||void 0===r||r.postMessage({id:e,payload:o,type:n},"*"):t.postMessage({id:e,payload:o,type:n},"*")};class o{constructor(o,t){this.targetElement=o,this.targetId=t,this.sendMessage=(o,t)=>{e({id:this.targetId,payload:t,target:this.targetElement,type:o})}}}o.iframeServices={GOOGLE_PLACES:"zonos--private-iframe-google-places-service-m9bmuh7g"},o.sendMessage=e,o.injectPrivateIframe=({id:e,onload:o,src:t})=>{const n=document.createElement("iframe");return n.src=t,n.id=e,n.style.display="none",n.role="presentation",n.ariaHidden="true",n.tabIndex=-1,n.style.border="none !important",n.style.margin="0px !important",n.style.padding="0px !important",n.style.width="1px !important",n.style.minWidth="100% !important",n.style.overflow="hidden !important",n.style.display="block !important",n.style.visibility="hidden !important",n.style.position="fixed !important",n.style.pointerEvents="none !important",n.style.userSelect="none !important",n.style.height="1px !important",n.onload=()=>o(n),document.body.appendChild(n),n};const t=performance.now(),n=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(o){if(e&&"function"==typeof e.toString){return e.toString()}return"Unable to stringify info"}},r=(e,o,...r)=>{var s,i;const{elapsedTimePretty:a}=(()=>{const e=performance.now()-t,o=e>1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(2)}ms`;return{elapsedTime:e,elapsedTimePretty:o}})(),l=[`(${a})`,...r];l.map(n).join(" ");if(!(!!(null===(s=window.Zonos)||void 0===s?void 0:s.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return;let d=document.querySelector("iframe#zonos---debug-logging-iframe");d||(d=document.createElement("iframe"),d.id="zonos---debug-logging-iframe",d.style.display="none",d.style.opacity="0",d.style.position="absolute",d.style.top="-9999px",d.style.left="-9999px",d.style.width="1px",d.style.height="1px",d.style.border="none",d.style.overflow="hidden",d.style.visibility="hidden",document.body.appendChild(d));const c=(null===(i=d.contentWindow)||void 0===i?void 0:i.window.console)||window.console;switch(o){case"warn":c.warn(e,...l);break;case"info":c.info(e,...l);break;case"error":c.error(e,...l);break;default:c.groupCollapsed(e,...l),c.trace(),c.groupEnd()}},s=(e,...o)=>{r(e,"error",...o)},i=["jsdelivr","cdnjs","unpkg","vercel"],a="jsdelivr",l=e=>{const o=i.indexOf(e);return i[o+1]||null},d=()=>window.location.search.includes("zonosStagingMode=1"),c=()=>{var e;return(null===(e=window.Zonos.zonosApiKey)||void 0===e?void 0:e.includes("test"))||window.location.search.includes("zonosTestMode=1")};function u(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t}"function"==typeof SuppressedError&&SuppressedError;const p=["cloudflare","vercel"],m=p[0],w={cloudflare:"https://route.elements.zonos.com",vercel:"https://route.js.zonos.com"},h=w[m],y=(e=m)=>{const o=p.indexOf(e),t=p[o+1];return t||null},g=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},f=()=>{const e="userAgentData"in window.navigator?window.navigator.userAgentData:null,o=(()=>{const e="connection"in window.navigator?window.navigator.connection:null,o="mozConnection"in window.navigator?window.navigator.mozConnection:null,t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return e||o||t})();return{connectionDownlink:null==o?void 0:o.downlink,connectionEffectiveType:null==o?void 0:o.effectiveType,connectionRtt:null==o?void 0:o.rtt,connectionSaveData:null==o?void 0:o.saveData,isHostedCheckout:window.Zonos.isLegacyCheckout,screenHeight:window.screen.height,screenWidth:window.innerWidth,userAgent:e&&e.brands.length>0?e:window.navigator.userAgent}},v=["/api/zonos-elements/log-script-load","/api/zonos-elements/log-bulk-load-data"],b=async({response:e,shouldLog:o=!0,shouldThrow:t=!1})=>{try{const o=await e.text(),t=g(o);if(!t)throw new Error(`Failed to parse content: ${o}`);return t}catch(e){if(t)throw e;return o&&console.error(e),null}},S=async({basePathType:e,options:o,path:t})=>{let n;const r=window.Zonos.zonosQaUrlApi||w[e]||m,s=new URL(r+t),i=window.Zonos.cartId?`${window.location.hostname}-${window.Zonos.cartId}`:window.location.hostname;s.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(i));try{n=await fetch(s.toString(),o)}catch(e){if(e instanceof Error)return{baseUrl:r,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null};return{baseUrl:r,errors:[{message:"Failed to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const a=n.headers.get("Zonos-Mode"),l=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&a&&l&&(window.Zonos.modeAlerted=!0),n.ok){return{baseUrl:r,errors:[],json:await b({response:n}),response:n,zonosMode:a}}const d=n.status.toString();try{const e=await b({response:n,shouldThrow:!0});if(e&&"errors"in e&&Array.isArray(e.errors)){const o=e.errors;return{baseUrl:r,errors:o.map((e=>"string"==typeof e?{message:e,type:d}:e)),json:null,response:n,zonosMode:a}}return{baseUrl:r,errors:[{message:JSON.stringify(e),type:d}],json:null,response:n,zonosMode:a}}catch(e){return{baseUrl:r,errors:[{message:`${d}: ${"Unknown error"}`,type:d}],json:null,response:null,zonosMode:a}}},C=async({basePathType:e,options:o,path:t})=>{var n,s;const i=t.startsWith("/api/bigcommerce")?"vercel":e,a=performance.now(),l=await S({basePathType:i,options:o,path:t}),{errors:d,response:c}=l,p=u(l,["errors","response"]),m=performance.now()-a;r(`${t} (${m.toFixed(2)}ms)`,"info");const b=null==c?void 0:c.headers.get("Zonos-Duration");200===(null==c?void 0:c.status)&&(({apiPath:e,apiType:o,loadTimeInternal:t,loadTimeTotal:n})=>{if(v.includes(e))return;const r=n-t;if(r<0)return;const s=e.split("?")[0]||e,i=f(),a="object"==typeof i.userAgent&&i.userAgent.mobile,l={apiType:o,connectionType:i.connectionEffectiveType,href:s,isHostedCheckout:window.Zonos.isLegacyCheckout,isMobile:(d=a,d||window.innerWidth<890),loadTimeBrowserApi:r,loadTimeInternal:t,loadTimeTotal:n,metadata:Object.assign({},i),screenHeight:i.screenHeight,screenWidth:i.screenWidth,userAgent:"string"==typeof i.userAgent?i.userAgent:i.userAgent.brands.map((e=>e.brand)).filter((e=>!/Not.*A.*Brand.*/.test(e))).join(",")};var d;window.Zonos.loadTimeApiInfoList.push(l)})({apiPath:t,apiType:i,loadTimeInternal:b?Number(b):0,loadTimeTotal:m});const z=y(i),k=d.find((({type:e})=>"unknown"===e)),Z=d.find((({message:e})=>"string"==typeof e&&(e.includes("signal is aborted")||e.includes("The operation was aborted")||e.includes("Fetch is aborted")))),j=!!k||404===(null==c?void 0:c.status)||500===(null==c?void 0:c.status),O=z&&j;return j&&!Z&&(async({endpoint:e,errors:o,metadata:t,shouldPostReleaseErrorReporting:n})=>{r("sendErrorLog","warn",e,t,o);{const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,i={endpoint:e,errors:o,href:window.location.href,metadata:Object.assign({appVersion:window.Zonos.version,domain:window.Zonos.domain,publicCredential:window.Zonos.zonosApiKey,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},t)};try{fetch(`${h}/api/zonos-elements/log-error`,{body:JSON.stringify(i),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const o=y();if(!o)return;fetch(`${w[o]}/api/zonos-elements/log-error`,{body:JSON.stringify(i),method:"POST"})}})({endpoint:w[i]+t,errors:d.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:i,nextFallbackApiType:z,requestHeaders:null==o?void 0:o.headers,requestPayload:g(null===(n=null==o?void 0:o.body)||void 0===n?void 0:n.toString())||(null===(s=null==o?void 0:o.body)||void 0===s?void 0:s.toString()),shouldCallFallback:O,status:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText},shouldPostReleaseErrorReporting:!0}),O?(r(`=== "${t}" failed to fetch, trying next fallback ${z}`),C({basePathType:z,options:o,path:t})):Object.assign({errors:d,response:c},p)},z=async(e,o)=>{const t=u(o||{},[]),n=t.body?JSON.stringify(t.body):void 0,r=t.method||"GET",s=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Staging-Mode":d()?"1":void 0,"Zonos-Test-Mode":c()?"1":void 0,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},t.headers);Object.keys(s).forEach((e=>void 0===s[e]&&delete s[e]));const i=Object.assign(Object.assign({},t),{body:"GET"===r?void 0:n,headers:s,method:r}),a=new URLSearchParams(window.location.search).get("useFallbackApi");return C({basePathType:a||m,options:i,path:e})},k=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const o=(e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrl");return o?/[^a-zA-Z0-9-_]+/.test(o)?null:o:null})(window.location.href),t="https://v1.3.231.js.zonos.com";if(!o&&(t.includes("test.")||t.includes("test-")))return t;if(!o&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const n=`https://${o}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${n}' for loading elements script`,"warn"),fetch(n).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${n}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:o}=window.location,t=`${o}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),n},Z="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;let O=null;const I=e=>(null!==O||(O=new Promise(((o,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe)o(window.Stripe);else try{let n=(()=>{const e=document.querySelectorAll(`script[src^="${Z}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&j.test(t.src))return t}return null})();n&&e?console.warn("loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used"):n||(n=(e=>{const o=document.createElement("script");o.src=`${Z}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(s("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==n||n.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):t(new Error("Stripe.js not available"))})),null==n||n.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else o(null)}))),O),A=Promise.resolve().then((()=>I(null)));let E=!1;A.catch((e=>{E||console.warn(e)}));const T=async({cartId:e,retries:o})=>{const t=c(),n=(()=>{const e=new URLSearchParams(window.location.search);return{overrideShouldEnabledCustomAddress:window.Zonos.overrideUseCustomAddressForm?"1":e.get("overrideShouldEnabledCustomAddress")}})(),s=(()=>{const e=new URLSearchParams(window.location.search).get("validityToken");if(!e||!/^[A-Za-z0-9+/]+={0,2}$/.test(e)||e.length%4!=0)return null;try{return atob(e),e}catch(e){return null}})()||void 0,i=new URLSearchParams;n.overrideShouldEnabledCustomAddress&&i.set("overrideShouldEnabledCustomAddress",n.overrideShouldEnabledCustomAddress);const{errors:a,json:l,zonosMode:d}=await z(`/api/zonos-elements/get-cart?${i.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:s,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),u=!l||a.length;return u&&o?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:o}),await new Promise((e=>setTimeout(e,500))),T({cartId:e,retries:o-1})):u?null:Object.assign(Object.assign({},l),{zonosMode:d})},L=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,$=new RegExp(`^${L.source}$`),P=new RegExp(`^cart_${L.source}$`),U=/^[a-zA-Z0-9]{2,}$/,N=/^cart_[a-zA-Z0-9]{2,}$/,D=async e=>{const{isDgsCartId:o,isLegacyCartId:t}=(e=>e?e.includes("undefined")?{isDgsCartId:!1,isLegacyCartId:!1}:N.test(e)?{isDgsCartId:!0,isLegacyCartId:!1}:U.test(e)?{isDgsCartId:!1,isLegacyCartId:!0}:P.test(e)?{isDgsCartId:!0,isLegacyCartId:!1}:$.test(e)?{isDgsCartId:!1,isLegacyCartId:!0}:{isDgsCartId:!1,isLegacyCartId:!1}:{isDgsCartId:!1,isLegacyCartId:!1})(e);if(!t&&!o)return s("[ZONOS - loadZonos] invalid cart id"),null;const n=await T({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",n),n?(window.Zonos.storeId=n.cartData.storeId,window.Zonos.zonosApiKey=n.cartData.credentialToken,window.Zonos.zonosMode=n.zonosMode,{cartData:n.cartData,settings:n.settings,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}):(s("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)},F="zonos--checkout-hidden-international-button";var M;const R=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:o,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const o=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>o.includes(e))),n=["qa.js.zonos.com"].some((e=>o.includes(e)));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?o:null})(),x=Date.now(),B="https://v1.3.231.js.zonos.com",q=R||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.231",W="https://fonts.googleapis.com",K=/^https:\/\/fonts\.googleapis\.com/;class G{}M=G,G.doneInit=!1,G.cartSettings=null,G.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),G.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),G._paypalMockResponse=null,G.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,G.isBigCommerce=!1,G.releaseDate="1754944764152",G.isLegacyCheckout=!1,G.startLoadTime=x,G.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",G.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),G.overrideUseCustomAddressForm=!1,G.isCollect=!1,G.isNpm=!0,G.zonosQaUrl=null,G.zonosQaUrlApi=null,G.trackEventLogs=[],G.version="v1.3.231",G.modeAlerted=!1,G.cartData=null,G.paypal=null,G.zonosMode=null,G.IframeService=o,G.getCurrentTimestamp=()=>(new Date).getTime(),G.zonosController=null,G.loadTimeApiInfoList=[],G.logIntervalId=null,G.init=async e=>{const{appearance:o,checkoutSettings:t,currencyConverter:n,helloSettings:i,onCountryChange:a,overrideCurrencyFormat:l,storeId:u,zonosApiKey:p}=e;if(M.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),M.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${M.version}) ======`),M.zonosApiKey=p,M.storeId=u,M.isNpm){r("====== ZONOS LOADING FROM NPM ======");const o=k();if(o&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${o} ======`,"info");const t=document.createElement("script");return t.src=`${o}/dist/scripts/zonos.js`,document.head.appendChild(t),t.addEventListener("load",(()=>{window.Zonos.isNpm=M.isNpm,window.Zonos.isBigCommerce=M.isBigCommerce,window.Zonos.isLegacyCheckout=M.isLegacyCheckout,window.Zonos.zonosMode=M.zonosMode,window.Zonos.init(e)})),t.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${o}`)})),void(window.isZonosPreview=!0)}if(!p&&!M.cartId)return void s("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!M.cartData&&M.cartId){r("Initialize cart data");const e=await D(M.cartId);if(!e)return void s("Failed to get cart data");M.cartData=e.cartData,M.zonosApiKey=e.zonosApiKey,M.cartSettings=e.settings}const t=await(async()=>{const e=c(),o=d();if(!e&&!o||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:t,json:n}=await z("/api/get-test-public-credential");if(t.length||!n)return s("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",t),null;const i=n.publicCredential;return i?(r(`[ZONOS - loadZonos] Retrieve new test public token ${i}`,"info"),i):(s("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();t&&(M.zonosApiKey=t)}const m=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(M.cartId&&M.cartData||!!m){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id="zonos--checkout-hidden-button",document.body.appendChild(e)}r("init zonos"),M.restoreNativeBrowserFunctions(),M.injectCustomScriptForHostedCheckout(),M.injectZonosCdn(),M.injectZonosCss(),M.injectFonts(),M.injectCheckoutInternationalButton(),M.injectController({config:{appearance:o,checkoutSettings:t,currencyConverter:n,helloSettings:i,onCountryChange:a,overrideCurrencyFormat:l}}),M.doneInit=!0},G.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${F}`)){const e=document.createElement("button");e.id=F,e.style.display="none",document.body.appendChild(e)}},G.injectCustomScriptForHostedCheckout=()=>{const e=M.cartData,o=(null==e?void 0:e.metadata)||[],t=o.find((e=>"customHeaderScript"===e.key)),n=o.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(t||n)){if(t){r("Injecting custom header script");const e=document.createElement("script");e.textContent=t.value,document.head.appendChild(e)}if(n){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=n.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:n,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout})},G.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},G.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${F}`);setTimeout((()=>{var o;e&&e.dispatchEvent(new CustomEvent("click",{detail:o}))}),10)},G.openHelloDialog=e=>{const o=document.querySelector("zonos-hello");o&&o.openHelloDialog(null==e||e)},G.showNotification=e=>{var o;null===(o=M.zonosController)||void 0===o||o.showNotification(e)},G.updateOrganizationName=e=>{var o;null===(o=M.zonosController)||void 0===o||o.updateOrganizationName(e)},G.disablePlaceOrderButtons=({autoEnable:e=!0,config:o,disable:t,placeOrderButtonSelector:n})=>{var r;if(!(null===(r=o.checkoutSettings)||void 0===r?void 0:r.disablePlaceOrderButtonActivation)&&n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},G.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const o="zonos---native-browser";let t=document.querySelector(`iframe#${o}`);t||(t=document.createElement("iframe"),t.id=o,t.style.display="none",t.style.opacity="0",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",t.style.width="1px",t.style.height="1px",t.style.border="none",t.style.overflow="hidden",t.style.visibility="hidden",document.body.appendChild(t));const n=(null===(e=t.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=n,document.body.removeChild(t)},G.injectController=({config:e})=>{var o,t;if(document.querySelector("zonos-controller"))return;if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.placeOrderButtonSelector){const o=e.checkoutSettings.placeOrderButtonSelector;M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o});new MutationObserver((()=>{M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(t=e.checkoutSettings)||void 0===t?void 0:t.alwaysTriggerInternationalCheckoutSelector){const o=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o});new MutationObserver((()=>{M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o})})).observe(document.body,{childList:!0,subtree:!0})}const n=document.createElement("zonos-controller");n.config=e,n.zonosApiKey=M.zonosApiKey||"",n.addEventListener("stripeInitEvent",(async e=>{const{detail:o}=e;r("loading Stripe");const t=await(async(...e)=>{E=!0;const o=Date.now();return A.then((t=>((e,o,t)=>{if(null===e)return null;const n=e.apply(void 0,o);return((e,o)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:o})})(n,t),n})(t,e,o)))})(o.publishableKey);t?(window.Zonos.stripe=t,window.Zonos.isCollect?n.initCollectElement(t):n.initCheckoutElement(t)):s("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(n),M.zonosController=n,r("Zonos controller injected!")},G.injectScript=({cdnType:e,isModule:o,theRestUrl:t})=>{const n=`${M.getZonosUrl(e)}/${t}`;if(document.querySelector(`script[src="${n}"]`))return void r(`Zonos script "${n}" already exists in the document`,"warn");const i=document.head||document.body,a=document.createElement("script");o?a.type="module":a.noModule=!0,a.src=n,a.crossOrigin="anonymous",a.onerror=()=>{s(`Failed to load ${a.src}`);const n=l(e);n&&M.injectScript({cdnType:n,isModule:o,theRestUrl:t})},i.appendChild(a)},G.getZonosUrl=e=>{const o=()=>{switch(e){case"jsdelivr":return q;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.231";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.231";case"vercel":return B}};if(M.isNpm){return k()||o()}return o()},G.injectZonosCdn=()=>{M.injectScript({cdnType:a,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),M.injectScript({cdnType:a,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},G.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const t=M.getZonosUrl(e),n=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${B}/`,n.appendChild(r);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${o}`,i.onerror=()=>{s(`Failed to load ${i.href}`);const t=l(e);t&&M.injectStylesheet({cdnType:t,theRestUrl:o})},n.appendChild(i)},G.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(M.injectStylesheet({cdnType:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},G.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${W}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&!K.test(t.href))return t}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=W,e.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${W}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(t),r("Zonos font injected!")},G.setupGoogleFont=e=>{var o;null===(o=M.zonosController)||void 0===o||o.setupGoogleFont(e)},G.injectSupportGoogleFont=e=>{var o;r(`[FONT] injecting ${e}`);const t=null===(o=e.match(/family=(.*?):/))||void 0===o?void 0:o[1],n=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${W}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=W,n.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${t} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,n.appendChild(s),r(`[FONT] ${t} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=G)})();
|
|
1
|
+
(function(){"use strict";const e=({id:e,payload:o,target:t,type:n})=>{var r;t instanceof HTMLIFrameElement?null===(r=t.contentWindow)||void 0===r||r.postMessage({id:e,payload:o,type:n},"*"):t.postMessage({id:e,payload:o,type:n},"*")};class o{constructor(o,t){this.targetElement=o,this.targetId=t,this.sendMessage=(o,t)=>{e({id:this.targetId,payload:t,target:this.targetElement,type:o})}}}o.iframeServices={GOOGLE_PLACES:"zonos--private-iframe-google-places-service-m9bmuh7g"},o.sendMessage=e,o.injectPrivateIframe=({id:e,onload:o,src:t})=>{const n=document.createElement("iframe");return n.src=t,n.id=e,n.style.display="none",n.role="presentation",n.ariaHidden="true",n.tabIndex=-1,n.style.border="none !important",n.style.margin="0px !important",n.style.padding="0px !important",n.style.width="1px !important",n.style.minWidth="100% !important",n.style.overflow="hidden !important",n.style.display="block !important",n.style.visibility="hidden !important",n.style.position="fixed !important",n.style.pointerEvents="none !important",n.style.userSelect="none !important",n.style.height="1px !important",n.onload=()=>o(n),document.body.appendChild(n),n};const t=performance.now(),n=e=>{if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(o){if(e&&"function"==typeof e.toString){return e.toString()}return"Unable to stringify info"}},r=(e,o,...r)=>{var s,i;const{elapsedTimePretty:a}=(()=>{const e=performance.now()-t,o=e>1e3?`${(e/1e3).toFixed(2)}s`:`${e.toFixed(2)}ms`;return{elapsedTime:e,elapsedTimePretty:o}})(),l=[`(${a})`,...r];l.map(n).join(" ");if(!(!!(null===(s=window.Zonos)||void 0===s?void 0:s.debug)||!!window.location.search.match(/\?.*(&*)zonosDebug=1/)))return;let d=document.querySelector("iframe#zonos---debug-logging-iframe");d||(d=document.createElement("iframe"),d.id="zonos---debug-logging-iframe",d.style.display="none",d.style.opacity="0",d.style.position="absolute",d.style.top="-9999px",d.style.left="-9999px",d.style.width="1px",d.style.height="1px",d.style.border="none",d.style.overflow="hidden",d.style.visibility="hidden",document.body.appendChild(d));const c=(null===(i=d.contentWindow)||void 0===i?void 0:i.window.console)||window.console;switch(o){case"warn":c.warn(e,...l);break;case"info":c.info(e,...l);break;case"error":c.error(e,...l);break;default:c.groupCollapsed(e,...l),c.trace(),c.groupEnd()}},s=(e,...o)=>{r(e,"error",...o)},i=["jsdelivr","cdnjs","unpkg","vercel"],a="jsdelivr",l=e=>{const o=i.indexOf(e);return i[o+1]||null},d=()=>window.location.search.includes("zonosStagingMode=1"),c=()=>{var e;return(null===(e=window.Zonos.zonosApiKey)||void 0===e?void 0:e.includes("test"))||window.location.search.includes("zonosTestMode=1")};function u(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)o.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t}"function"==typeof SuppressedError&&SuppressedError;const p=["cloudflare","vercel"],m=p[0],w={cloudflare:"https://route.elements.zonos.com",vercel:"https://route.js.zonos.com"},h=w[m],y=(e=m)=>{const o=p.indexOf(e),t=p[o+1];return t||null},g=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){return null}return null},f=()=>{const e="userAgentData"in window.navigator?window.navigator.userAgentData:null,o=(()=>{const e="connection"in window.navigator?window.navigator.connection:null,o="mozConnection"in window.navigator?window.navigator.mozConnection:null,t="webkitConnection"in window.navigator?window.navigator.webkitConnection:null;return e||o||t})();return{connectionDownlink:null==o?void 0:o.downlink,connectionEffectiveType:null==o?void 0:o.effectiveType,connectionRtt:null==o?void 0:o.rtt,connectionSaveData:null==o?void 0:o.saveData,isHostedCheckout:window.Zonos.isLegacyCheckout,screenHeight:window.screen.height,screenWidth:window.innerWidth,userAgent:e&&e.brands.length>0?e:window.navigator.userAgent}},v=["/api/zonos-elements/log-script-load","/api/zonos-elements/log-bulk-load-data"],b=async({response:e,shouldLog:o=!0,shouldThrow:t=!1})=>{try{const o=await e.text(),t=g(o);if(!t)throw new Error(`Failed to parse content: ${o}`);return t}catch(e){if(t)throw e;return o&&console.error(e),null}},S=async({basePathType:e,options:o,path:t})=>{let n;const r=window.Zonos.zonosQaUrlApi||w[e]||m,s=new URL(r+t),i=window.Zonos.cartId?`${window.location.hostname}-${window.Zonos.cartId}`:window.location.hostname;s.searchParams.set("zToken",(e=>{try{return btoa(e).replace(/=/g,"")}catch(o){return e.replace(/[^A-Za-z0-9]/g,"").split("").reverse().join("")}})(i));try{n=await fetch(s.toString(),o)}catch(e){if(e instanceof Error)return{baseUrl:r,errors:[{message:e.message,type:"unknown"}],json:null,response:null,zonosMode:null};return{baseUrl:r,errors:[{message:"Failed to fetch",type:"unknown"}],json:null,response:null,zonosMode:null}}const a=n.headers.get("Zonos-Mode"),l=window.Zonos.zonosQaUrl;if(!window.Zonos.modeAlerted&&a&&l&&(window.Zonos.modeAlerted=!0),n.ok){return{baseUrl:r,errors:[],json:await b({response:n}),response:n,zonosMode:a}}const d=n.status.toString();try{const e=await b({response:n,shouldThrow:!0});if(e&&"errors"in e&&Array.isArray(e.errors)){const o=e.errors;return{baseUrl:r,errors:o.map((e=>"string"==typeof e?{message:e,type:d}:e)),json:null,response:n,zonosMode:a}}return{baseUrl:r,errors:[{message:JSON.stringify(e),type:d}],json:null,response:n,zonosMode:a}}catch(e){return{baseUrl:r,errors:[{message:`${d}: ${"Unknown error"}`,type:d}],json:null,response:null,zonosMode:a}}},C=async({basePathType:e,options:o,path:t})=>{var n,s;const i=t.startsWith("/api/bigcommerce")?"vercel":e,a=performance.now(),l=await S({basePathType:i,options:o,path:t}),{errors:d,response:c}=l,p=u(l,["errors","response"]),m=performance.now()-a;r(`${t} (${m.toFixed(2)}ms)`,"info");const b=null==c?void 0:c.headers.get("Zonos-Duration");200===(null==c?void 0:c.status)&&(({apiPath:e,apiType:o,loadTimeInternal:t,loadTimeTotal:n})=>{if(v.includes(e))return;const r=n-t;if(r<0)return;const s=e.split("?")[0]||e,i=f(),a="object"==typeof i.userAgent&&i.userAgent.mobile,l={apiType:o,connectionType:i.connectionEffectiveType,href:s,isHostedCheckout:window.Zonos.isLegacyCheckout,isMobile:(d=a,d||window.innerWidth<890),loadTimeBrowserApi:r,loadTimeInternal:t,loadTimeTotal:n,metadata:Object.assign({},i),screenHeight:i.screenHeight,screenWidth:i.screenWidth,userAgent:"string"==typeof i.userAgent?i.userAgent:i.userAgent.brands.map((e=>e.brand)).filter((e=>!/Not.*A.*Brand.*/.test(e))).join(",")};var d;window.Zonos.loadTimeApiInfoList.push(l)})({apiPath:t,apiType:i,loadTimeInternal:b?Number(b):0,loadTimeTotal:m});const z=y(i),k=d.find((({type:e})=>"unknown"===e)),Z=d.find((({message:e})=>"string"==typeof e&&(e.includes("signal is aborted")||e.includes("The operation was aborted")||e.includes("Fetch is aborted")))),j=!!k||404===(null==c?void 0:c.status)||500===(null==c?void 0:c.status),O=z&&j;return j&&!Z&&(async({endpoint:e,errors:o,metadata:t,shouldPostReleaseErrorReporting:n})=>{r("sendErrorLog","warn",e,t,o);{const e=Number(window.Zonos.releaseDate);if((new Date).getTime()-e>36e5)return}const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,i={endpoint:e,errors:o,href:window.location.href,metadata:Object.assign({appVersion:window.Zonos.version,domain:window.Zonos.domain,publicCredential:window.Zonos.zonosApiKey,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},t)};try{fetch(`${h}/api/zonos-elements/log-error`,{body:JSON.stringify(i),headers:{"Zonos-Referer":window.location.hostname},method:"POST"})}catch(e){const o=y();if(!o)return;fetch(`${w[o]}/api/zonos-elements/log-error`,{body:JSON.stringify(i),method:"POST"})}})({endpoint:w[i]+t,errors:d.map((({message:e})=>`API: ${e}`)),metadata:{currentBasePath:i,nextFallbackApiType:z,requestHeaders:null==o?void 0:o.headers,requestPayload:g(null===(n=null==o?void 0:o.body)||void 0===n?void 0:n.toString())||(null===(s=null==o?void 0:o.body)||void 0===s?void 0:s.toString()),shouldCallFallback:O,status:null==c?void 0:c.status,statusText:null==c?void 0:c.statusText},shouldPostReleaseErrorReporting:!0}),O?(r(`=== "${t}" failed to fetch, trying next fallback ${z}`),C({basePathType:z,options:o,path:t})):Object.assign({errors:d,response:c},p)},z=async(e,o)=>{const t=u(o||{},[]),n=t.body?JSON.stringify(t.body):void 0,r=t.method||"GET",s=Object.assign({"Content-Type":"application/json","Zonos-Is-BigCommerce":window.Zonos.isBigCommerce.toString(),"Zonos-Referer":window.location.hostname,"Zonos-Staging-Mode":d()?"1":void 0,"Zonos-Test-Mode":c()?"1":void 0,"Zonos-Version":window.Zonos.version,credentialtoken:window.Zonos.zonosApiKey||"Empty credential token from zonos-elements"},t.headers);Object.keys(s).forEach((e=>void 0===s[e]&&delete s[e]));const i=Object.assign(Object.assign({},t),{body:"GET"===r?void 0:n,headers:s,method:r}),a=new URLSearchParams(window.location.search).get("useFallbackApi");return C({basePathType:a||m,options:i,path:e})},k=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const o=(e=>{if(!e)return null;const o=new URL(e).searchParams.get("zonosQaUrl");return o?/[^a-zA-Z0-9-_]+/.test(o)?null:o:null})(window.location.href),t="https://v1.3.232.js.zonos.com";if(!o&&(t.includes("test.")||t.includes("test-")))return t;if(!o&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const n=`https://${o}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${n}' for loading elements script`,"warn"),fetch(n).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${n}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:o}=window.location,t=`${o}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),n},Z="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;let O=null;const I=e=>(null!==O||(O=new Promise(((o,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe)o(window.Stripe);else try{let n=(()=>{const e=document.querySelectorAll(`script[src^="${Z}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&j.test(t.src))return t}return null})();n&&e?console.warn("loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used"):n||(n=(e=>{const o=document.createElement("script");o.src=`${Z}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(s("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})()),null==n||n.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):t(new Error("Stripe.js not available"))})),null==n||n.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else o(null)}))),O),A=Promise.resolve().then((()=>I(null)));let E=!1;A.catch((e=>{E||console.warn(e)}));const T=async({cartId:e,retries:o})=>{const t=c(),n=(()=>{const e=new URLSearchParams(window.location.search);return{overrideShouldEnabledCustomAddress:window.Zonos.overrideUseCustomAddressForm?"1":e.get("overrideShouldEnabledCustomAddress")}})(),s=(()=>{const e=new URLSearchParams(window.location.search).get("validityToken");if(!e||!/^[A-Za-z0-9+/]+={0,2}$/.test(e)||e.length%4!=0)return null;try{return atob(e),e}catch(e){return null}})()||void 0,i=new URLSearchParams;n.overrideShouldEnabledCustomAddress&&i.set("overrideShouldEnabledCustomAddress",n.overrideShouldEnabledCustomAddress);const{errors:a,json:l,zonosMode:d}=await z(`/api/zonos-elements/get-cart?${i.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:s,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),u=!l||a.length;return u&&o?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:o}),await new Promise((e=>setTimeout(e,500))),T({cartId:e,retries:o-1})):u?null:Object.assign(Object.assign({},l),{zonosMode:d})},L=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,$=new RegExp(`^${L.source}$`),P=new RegExp(`^cart_${L.source}$`),U=/^[a-zA-Z0-9]{2,}$/,N=/^cart_[a-zA-Z0-9]{2,}$/,D=async e=>{const{isDgsCartId:o,isLegacyCartId:t}=(e=>e?e.includes("undefined")?{isDgsCartId:!1,isLegacyCartId:!1}:N.test(e)?{isDgsCartId:!0,isLegacyCartId:!1}:U.test(e)?{isDgsCartId:!1,isLegacyCartId:!0}:P.test(e)?{isDgsCartId:!0,isLegacyCartId:!1}:$.test(e)?{isDgsCartId:!1,isLegacyCartId:!0}:{isDgsCartId:!1,isLegacyCartId:!1}:{isDgsCartId:!1,isLegacyCartId:!1})(e);if(!t&&!o)return s("[ZONOS - loadZonos] invalid cart id"),null;const n=await T({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",n),n?(window.Zonos.storeId=n.cartData.storeId,window.Zonos.zonosApiKey=n.cartData.credentialToken,window.Zonos.zonosMode=n.zonosMode,{cartData:n.cartData,settings:n.settings,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}):(s("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)},F="zonos--checkout-hidden-international-button";var M;const R=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:o,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const o=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>o.includes(e))),n=["qa.js.zonos.com"].some((e=>o.includes(e)));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:n,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?o:null})(),x=Date.now(),B="https://v1.3.232.js.zonos.com",q=R||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.232",W="https://fonts.googleapis.com",K=/^https:\/\/fonts\.googleapis\.com/;class G{}M=G,G.doneInit=!1,G.cartSettings=null,G.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),G.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),G._paypalMockResponse=null,G.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,G.isBigCommerce=!1,G.releaseDate="1755722269441",G.isLegacyCheckout=!1,G.startLoadTime=x,G.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",G.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),G.overrideUseCustomAddressForm=!1,G.isCollect=!1,G.isNpm=!0,G.zonosQaUrl=null,G.zonosQaUrlApi=null,G.trackEventLogs=[],G.version="v1.3.232",G.modeAlerted=!1,G.cartData=null,G.paypal=null,G.zonosMode=null,G.IframeService=o,G.getCurrentTimestamp=()=>(new Date).getTime(),G.zonosController=null,G.loadTimeApiInfoList=[],G.logIntervalId=null,G.init=async e=>{const{appearance:o,checkoutSettings:t,currencyConverter:n,helloSettings:i,onCountryChange:a,overrideCurrencyFormat:l,storeId:u,zonosApiKey:p}=e;if(M.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),M.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${M.version}) ======`),M.zonosApiKey=p,M.storeId=u,M.isNpm){r("====== ZONOS LOADING FROM NPM ======");const o=k();if(o&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${o} ======`,"info");const t=document.createElement("script");return t.src=`${o}/dist/scripts/zonos.js`,document.head.appendChild(t),t.addEventListener("load",(()=>{window.Zonos.isNpm=M.isNpm,window.Zonos.isBigCommerce=M.isBigCommerce,window.Zonos.isLegacyCheckout=M.isLegacyCheckout,window.Zonos.zonosMode=M.zonosMode,window.Zonos.init(e)})),t.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${o}`)})),void(window.isZonosPreview=!0)}if(!p&&!M.cartId)return void s("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!M.cartData&&M.cartId){r("Initialize cart data");const e=await D(M.cartId);if(!e)return void s("Failed to get cart data");M.cartData=e.cartData,M.zonosApiKey=e.zonosApiKey,M.cartSettings=e.settings}const t=await(async()=>{const e=c(),o=d();if(!e&&!o||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:t,json:n}=await z("/api/get-test-public-credential");if(t.length||!n)return s("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",t),null;const i=n.publicCredential;return i?(r(`[ZONOS - loadZonos] Retrieve new test public token ${i}`,"info"),i):(s("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();t&&(M.zonosApiKey=t)}const m=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(M.cartId&&M.cartData||!!m){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id="zonos--checkout-hidden-button",document.body.appendChild(e)}r("init zonos"),M.restoreNativeBrowserFunctions(),M.injectCustomScriptForHostedCheckout(),M.injectZonosCdn(),M.injectZonosCss(),M.injectFonts(),M.injectCheckoutInternationalButton(),M.injectController({config:{appearance:o,checkoutSettings:t,currencyConverter:n,helloSettings:i,onCountryChange:a,overrideCurrencyFormat:l}}),M.doneInit=!0},G.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${F}`)){const e=document.createElement("button");e.id=F,e.style.display="none",document.body.appendChild(e)}},G.injectCustomScriptForHostedCheckout=()=>{const e=M.cartData,o=(null==e?void 0:e.metadata)||[],t=o.find((e=>"customHeaderScript"===e.key)),n=o.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(t||n)){if(t){r("Injecting custom header script");const e=document.createElement("script");e.textContent=t.value,document.head.appendChild(e)}if(n){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=n.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:n,headerScript:t,isLegacyCheckout:window.Zonos.isLegacyCheckout})},G.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},G.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${F}`);setTimeout((()=>{var o;e&&e.dispatchEvent(new CustomEvent("click",{detail:o}))}),10)},G.openHelloDialog=e=>{const o=document.querySelector("zonos-hello");o&&o.openHelloDialog(null==e||e)},G.showNotification=e=>{var o;null===(o=M.zonosController)||void 0===o||o.showNotification(e)},G.updateOrganizationName=e=>{var o;null===(o=M.zonosController)||void 0===o||o.updateOrganizationName(e)},G.disablePlaceOrderButtons=({autoEnable:e=!0,config:o,disable:t,placeOrderButtonSelector:n})=>{var r;if(!(null===(r=o.checkoutSettings)||void 0===r?void 0:r.disablePlaceOrderButtonActivation)&&n){const o=document.querySelectorAll(n),r=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};o.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",r)):(e.removeAttribute("disabled"),e.removeEventListener("click",r)))})),e&&t&&setTimeout((()=>{o.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",r)}))}),5e3)}},G.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const o="zonos---native-browser";let t=document.querySelector(`iframe#${o}`);t||(t=document.createElement("iframe"),t.id=o,t.style.display="none",t.style.opacity="0",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",t.style.width="1px",t.style.height="1px",t.style.border="none",t.style.overflow="hidden",t.style.visibility="hidden",document.body.appendChild(t));const n=(null===(e=t.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=n,document.body.removeChild(t)},G.injectController=({config:e})=>{var o,t;if(document.querySelector("zonos-controller"))return;if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.placeOrderButtonSelector){const o=e.checkoutSettings.placeOrderButtonSelector;M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o});new MutationObserver((()=>{M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(t=e.checkoutSettings)||void 0===t?void 0:t.alwaysTriggerInternationalCheckoutSelector){const o=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o});new MutationObserver((()=>{M.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:o})})).observe(document.body,{childList:!0,subtree:!0})}const n=document.createElement("zonos-controller");n.config=e,n.zonosApiKey=M.zonosApiKey||"",n.addEventListener("stripeInitEvent",(async e=>{const{detail:o}=e;r("loading Stripe");const t=await(async(...e)=>{E=!0;const o=Date.now();return A.then((t=>((e,o,t)=>{if(null===e)return null;const n=e.apply(void 0,o);return((e,o)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:o})})(n,t),n})(t,e,o)))})(o.publishableKey);t?(window.Zonos.stripe=t,window.Zonos.isCollect?n.initCollectElement(t):n.initCheckoutElement(t)):s("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(n),M.zonosController=n,r("Zonos controller injected!")},G.injectScript=({cdnType:e,isModule:o,theRestUrl:t})=>{const n=`${M.getZonosUrl(e)}/${t}`;if(document.querySelector(`script[src="${n}"]`))return void r(`Zonos script "${n}" already exists in the document`,"warn");const i=document.head||document.body,a=document.createElement("script");o?a.type="module":a.noModule=!0,a.src=n,a.crossOrigin="anonymous",a.onerror=()=>{s(`Failed to load ${a.src}`);const n=l(e);n&&M.injectScript({cdnType:n,isModule:o,theRestUrl:t})},i.appendChild(a)},G.getZonosUrl=e=>{const o=()=>{switch(e){case"jsdelivr":return q;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.232";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.232";case"vercel":return B}};if(M.isNpm){return k()||o()}return o()},G.injectZonosCdn=()=>{M.injectScript({cdnType:a,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),M.injectScript({cdnType:a,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},G.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const t=M.getZonosUrl(e),n=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${B}/`,n.appendChild(r);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${o}`,i.onerror=()=>{s(`Failed to load ${i.href}`);const t=l(e);t&&M.injectStylesheet({cdnType:t,theRestUrl:o})},n.appendChild(i)},G.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(M.injectStylesheet({cdnType:a,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},G.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${W}"]`);for(let o=0;o<e.length;o++){const t=e[o];if(t&&!K.test(t.href))return t}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=W,e.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${W}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(t),r("Zonos font injected!")},G.setupGoogleFont=e=>{var o;null===(o=M.zonosController)||void 0===o||o.setupGoogleFont(e)},G.injectSupportGoogleFont=e=>{var o;r(`[FONT] injecting ${e}`);const t=null===(o=e.match(/family=(.*?):/))||void 0===o?void 0:o[1],n=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${W}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=W,n.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${t} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,n.appendChild(s),r(`[FONT] ${t} font injected!`)},window.Zonos&&window.Zonos.doneInit||(window.Zonos=G)})();
|
package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { StripeAddressElementChangeEvent } from '@stripe/stripe-js';
|
|
|
3
3
|
import { type StripeStoreContactOption } from "../../../store/checkout/stripe";
|
|
4
4
|
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
5
5
|
import type { CountryCode } from "../../../../types/generated/graphql.internal.types";
|
|
6
|
+
import type { InputFieldLabel } from "../../../../types/InputFieldLabel";
|
|
6
7
|
export declare class ZonosCustomerInfo {
|
|
7
8
|
private storeUnsubscribeList;
|
|
8
9
|
el: HTMLZonosCustomerInfoElement;
|
|
@@ -83,6 +84,11 @@ export declare class ZonosCustomerInfo {
|
|
|
83
84
|
selectedCountryCode: CountryCode | null;
|
|
84
85
|
genericSettings: import("../../../..").GenericZonosSettings | undefined;
|
|
85
86
|
addressFormRenderType: "stripe" | "zonos";
|
|
87
|
+
exceededCharacterLimitErrorFieldList: {
|
|
88
|
+
addressType: 'shipping' | 'billing';
|
|
89
|
+
fieldLabel: InputFieldLabel;
|
|
90
|
+
value: string;
|
|
91
|
+
}[];
|
|
86
92
|
watchShowErrorBanner(): void;
|
|
87
93
|
private checkInvalidCharacters;
|
|
88
94
|
/**
|
|
@@ -98,9 +104,14 @@ export declare class ZonosCustomerInfo {
|
|
|
98
104
|
* Validate the custom address form, turn the flag showError to false if the form is valid, or vice versa
|
|
99
105
|
*/
|
|
100
106
|
private validateCustomAddressForm;
|
|
107
|
+
/**
|
|
108
|
+
* Make sure all fields in the address are within the character limit
|
|
109
|
+
*/
|
|
110
|
+
private validateAddressLength;
|
|
101
111
|
private handleValidate;
|
|
102
112
|
private handleEmailValidation;
|
|
103
113
|
private prepareAddressObject;
|
|
114
|
+
private renderExceededCharacterLimitError;
|
|
104
115
|
private renderAddressComponent;
|
|
105
116
|
watchShouldEnabledCustomAddress(): void;
|
|
106
117
|
disconnectedCallback(): void;
|
|
@@ -542,6 +542,9 @@ export declare const stringsArabic: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsArabic: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsBase: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsBase: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsChinese: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsChinese: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsDanish: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsDanish: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsDutch: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsDutch: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsFrench: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsFrench: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsGerman: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsGerman: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsHebrew: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsHebrew: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsIndonesian: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsIndonesian: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsItalian: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsItalian: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsJapanese: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsJapanese: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsKorean: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsKorean: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsNorwegian: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsNorwegian: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsPolish: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsPolish: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsPortuguese: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsPortuguese: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsRussian: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsRussian: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsSpanish: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsSpanish: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsSwedish: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsSwedish: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsTurkish: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsTurkish: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -542,6 +542,9 @@ export declare const stringsVietnamese: {
|
|
|
542
542
|
'State/Province': {
|
|
543
543
|
value: string;
|
|
544
544
|
};
|
|
545
|
+
'State/Province/Region/Prefecture': {
|
|
546
|
+
value: string;
|
|
547
|
+
};
|
|
545
548
|
'Street address': {
|
|
546
549
|
value: string;
|
|
547
550
|
};
|
|
@@ -710,6 +713,12 @@ export declare const stringsVietnamese: {
|
|
|
710
713
|
Zip: {
|
|
711
714
|
value: string;
|
|
712
715
|
};
|
|
716
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less or move the rest to address line 2.': {
|
|
717
|
+
value: string;
|
|
718
|
+
};
|
|
719
|
+
'[fieldLabel] is [currentLength] characters. Please shorten to [maxLength] or less.': {
|
|
720
|
+
value: string;
|
|
721
|
+
};
|
|
713
722
|
'[percentage] GST due on any order above [threshold].': {
|
|
714
723
|
value: string;
|
|
715
724
|
};
|
|
@@ -22,7 +22,7 @@ type ExtractVariables<S extends string> = S extends `${infer _Start}[${infer Var
|
|
|
22
22
|
* type Params = TranslateParams<'[percentage] GST due on any order above [threshold].'>
|
|
23
23
|
* // Params = ['[percentage] GST due on any order above [threshold].', variables: { percentage: string, threshold: string }]
|
|
24
24
|
*/
|
|
25
|
-
type TranslateParams<T extends string> = ExtractVariables<T> extends never ? [T, variables?: never] : [T, variables: Record<ExtractVariables<T>, string>];
|
|
25
|
+
type TranslateParams<T extends string> = ExtractVariables<T> extends never ? [T, variables?: never] : [T, variables: Record<ExtractVariables<T>, string | number>];
|
|
26
26
|
export type ITranslationKey = keyof typeof stringsBase;
|
|
27
27
|
/**
|
|
28
28
|
* Translate a string with variables if variable pattern is present in the string
|