@zonos/elements 1.3.42 → 1.3.44
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-99a1ed87.js → cart-89b4f62d.js} +412 -59
- package/dist/cjs/index.cjs.js +6 -6
- package/dist/cjs/{paypal-5509a76f.js → paypal-1a1882c4.js} +1 -1
- package/dist/cjs/{sendErrorLog-21996939.js → sendErrorLog-a966a8c1.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +43 -9
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +42 -8
- package/dist/collection/components/store/hello/localization.js +12 -19
- package/dist/collection/components/store/translationStore/strings.arabic.js +20 -2
- package/dist/collection/components/store/translationStore/strings.base.js +20 -2
- package/dist/collection/components/store/translationStore/strings.chinese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.danish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.dutch.js +20 -2
- package/dist/collection/components/store/translationStore/strings.french.js +20 -2
- package/dist/collection/components/store/translationStore/strings.german.js +20 -2
- package/dist/collection/components/store/translationStore/strings.hebrew.js +20 -2
- package/dist/collection/components/store/translationStore/strings.indonesian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.italian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.japanese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.korean.js +20 -2
- package/dist/collection/components/store/translationStore/strings.norwegian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.polish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.portuguese.js +20 -2
- package/dist/collection/components/store/translationStore/strings.russian.js +20 -2
- package/dist/collection/components/store/translationStore/strings.spanish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.swedish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.turkish.js +20 -2
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +20 -2
- package/dist/collection/types/generated/graphql.customer.types.js +19 -10
- package/dist/esm/{cart-bc217300.js → cart-9f40efd7.js} +412 -59
- package/dist/esm/index.js +6 -6
- package/dist/esm/{paypal-fa96e7c3.js → paypal-f4bb6ce7.js} +1 -1
- package/dist/esm/{sendErrorLog-c40b553a.js → sendErrorLog-aea606c0.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +43 -9
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +2 -2
- package/dist/esm-es5/cart-9f40efd7.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-fa96e7c3.js → paypal-f4bb6ce7.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-c40b553a.js → sendErrorLog-aea606c0.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/scripts/index.d.ts +1 -18
- 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/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.base.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.danish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.french.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.german.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.italian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.korean.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.polish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.russian.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +19 -1
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +19 -1
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +2 -4
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/types/ICountryJson.d.ts +1 -19
- package/dist/types/types/generated/graphql.customer.types.d.ts +45 -13
- package/dist/types/types/generated/graphql.customer.types.ts +47 -18
- 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/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-a0581551.system.js → p-0641784b.system.js} +1 -1
- package/dist/zonos-elements/{p-a9ae78e3.entry.js → p-09988f34.entry.js} +1 -1
- package/dist/zonos-elements/{p-7d67bbb8.system.entry.js → p-0bfe455c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2cc469c3.entry.js → p-21d07dda.entry.js} +1 -1
- package/dist/zonos-elements/{p-a8a94872.system.js → p-29f4cce5.system.js} +1 -1
- package/dist/zonos-elements/{p-23748211.system.entry.js → p-2d01b8e6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-211e3529.system.entry.js → p-2e12d178.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1041cbd0.js → p-3490d40f.js} +1 -1
- package/dist/zonos-elements/{p-d27489bb.system.entry.js → p-37c9fdd2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-35679ed2.system.entry.js → p-4204ccf9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-43d3cafd.system.js +1 -0
- package/dist/zonos-elements/{p-558486eb.entry.js → p-567b457b.entry.js} +1 -1
- package/dist/zonos-elements/{p-16dd23e1.entry.js → p-578f42c1.entry.js} +1 -1
- package/dist/zonos-elements/{p-7338ea95.system.entry.js → p-5845029a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-668fb530.system.js → p-6f759c76.system.js} +1 -1
- package/dist/zonos-elements/{p-fc2676e3.entry.js → p-744180f1.entry.js} +1 -1
- package/dist/zonos-elements/{p-23fd4673.entry.js → p-76291114.entry.js} +1 -1
- package/dist/zonos-elements/p-7b8099ed.js +1 -0
- package/dist/zonos-elements/p-8618e185.entry.js +1 -0
- package/dist/zonos-elements/{p-c0aec0ca.system.entry.js → p-8630168f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5230520c.entry.js → p-8bf1af28.entry.js} +1 -1
- package/dist/zonos-elements/{p-29ed14b8.entry.js → p-9aef3a35.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b1ea7c8.system.entry.js → p-acf9a97e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-73c56565.system.entry.js → p-aee29731.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f59666e6.system.entry.js → p-c10099bd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-7a902328.entry.js → p-c7952400.entry.js} +1 -1
- package/dist/zonos-elements/{p-f97ffbfb.js → p-d99e58f2.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +9 -2
- package/dist/esm-es5/cart-bc217300.js +0 -1
- package/dist/zonos-elements/p-68bb8de4.entry.js +0 -1
- package/dist/zonos-elements/p-90f517f5.js +0 -1
- package/dist/zonos-elements/p-98a0fda1.system.js +0 -1
|
@@ -191,7 +191,25 @@ export declare const stringsVietnamese: {
|
|
|
191
191
|
'Prepay duties and taxes at checkout': {
|
|
192
192
|
value: string;
|
|
193
193
|
};
|
|
194
|
-
'Product prices already include duties
|
|
194
|
+
'Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions.': {
|
|
195
|
+
value: string;
|
|
196
|
+
};
|
|
197
|
+
'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
|
|
198
|
+
value: string;
|
|
199
|
+
};
|
|
200
|
+
'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
|
|
201
|
+
value: string;
|
|
202
|
+
};
|
|
203
|
+
'Product prices already include duties. No additional duties will be added at checkout, with rare exceptions.': {
|
|
204
|
+
value: string;
|
|
205
|
+
};
|
|
206
|
+
'Product prices already include fees. No additional fees will be added at checkout, with rare exceptions.': {
|
|
207
|
+
value: string;
|
|
208
|
+
};
|
|
209
|
+
'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
|
|
210
|
+
value: string;
|
|
211
|
+
};
|
|
212
|
+
'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
|
|
195
213
|
value: string;
|
|
196
214
|
};
|
|
197
215
|
Reload: {
|
|
@@ -30,5 +30,5 @@ type TranslateParams<T extends string> = ExtractVariables<T> extends never ? [T,
|
|
|
30
30
|
* // No variables:
|
|
31
31
|
* translate('Above de minimis threshold for')
|
|
32
32
|
*/
|
|
33
|
-
declare const translate: <T extends "Shipping" | "Email" | "Name" | "Guaranteed" | "Customer" | "Country" | "Failure" | "Success" | "Hide" | "or" | "Delivery" | "Payment" | "Above de minimis threshold for" | "Address" | "Address line 1" | "Address line 2" | "An unexpected error occurred when processing PayPal order." | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Card number copied to clipboard" | "Cart subtotal" | "City" | "Click to copy the card number. Use any future expiration date and three number CVC." | "Close" | "Contact" | "Continue to shipping" | "Couldn't place order" | "Customer information" | "Delivery options" | "Don't close" | "Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders." | "Duties and taxes will be applied to items and shipping." | "Duties will apply to all orders." | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Expected delivery" | "Failed to create PayPal order. Please try again, or consider using an alternative method." | "First name" | "Go to payment" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Learn more." | "Missing required fields. Make sure all fields are completed." | "No countries found" | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at the door" | "Order is over the de minimis threshold for both duty and tax" | "Order total" | "Orders to [countryName] must be over [threshold] to ship." | "Pay [orderTotal]" | "Pay [organizationName]" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Product prices already include duties, taxes, and fees. No additional duties or taxes will be added at checkout, with rare exceptions." | "Reload" | "Restricted item" | "Restricted items found" | "Return to cart" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Session timed out" | "Shipping address same as billing" | "Shipping method" | "Show" | "Something went wrong." | "Spend [threshold] duty free." | "Spend [threshold] tax free." | "State" | "State/Province" | "Taxes will apply to all orders." | "Test cards" | "Test mode" | "The following items are unable to be shipped to your country and are not included in your cart total." | "The low-value GST law passed July 1st, 2018 applies to this retailer." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Unable to check inventory. Please try again." | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to [storeName]" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You're all set!" | "Your checkout session has expired. Please reload the page to continue." | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy." | "[percentage] GST due on any order above [threshold]." | "business days" | "click to learn more" | "restricted items">(...[key, replacement]: TranslateParams<T>) => string;
|
|
33
|
+
declare const translate: <T extends "Shipping" | "Email" | "Name" | "Guaranteed" | "Customer" | "Country" | "Failure" | "Success" | "Hide" | "or" | "Delivery" | "Payment" | "Above de minimis threshold for" | "Address" | "Address line 1" | "Address line 2" | "An unexpected error occurred when processing PayPal order." | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Card number copied to clipboard" | "Cart subtotal" | "City" | "Click to copy the card number. Use any future expiration date and three number CVC." | "Close" | "Contact" | "Continue to shipping" | "Couldn't place order" | "Customer information" | "Delivery options" | "Don't close" | "Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders." | "Duties and taxes will be applied to items and shipping." | "Duties will apply to all orders." | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Expected delivery" | "Failed to create PayPal order. Please try again, or consider using an alternative method." | "First name" | "Go to payment" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Learn more." | "Missing required fields. Make sure all fields are completed." | "No countries found" | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at the door" | "Order is over the de minimis threshold for both duty and tax" | "Order total" | "Orders to [countryName] must be over [threshold] to ship." | "Pay [orderTotal]" | "Pay [organizationName]" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Product prices already include duties and fees. No additional duties or fees will be added at checkout, with rare exceptions." | "Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions." | "Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions." | "Product prices already include duties. No additional duties will be added at checkout, with rare exceptions." | "Product prices already include fees. No additional fees will be added at checkout, with rare exceptions." | "Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions." | "Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions." | "Reload" | "Restricted item" | "Restricted items found" | "Return to cart" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Session timed out" | "Shipping address same as billing" | "Shipping method" | "Show" | "Something went wrong." | "Spend [threshold] duty free." | "Spend [threshold] tax free." | "State" | "State/Province" | "Taxes will apply to all orders." | "Test cards" | "Test mode" | "The following items are unable to be shipped to your country and are not included in your cart total." | "The low-value GST law passed July 1st, 2018 applies to this retailer." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Unable to check inventory. Please try again." | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to [storeName]" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You're all set!" | "Your checkout session has expired. Please reload the page to continue." | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy." | "[percentage] GST due on any order above [threshold]." | "business days" | "click to learn more" | "restricted items">(...[key, replacement]: TranslateParams<T>) => string;
|
|
34
34
|
export { translate, translationStore, translationStoreUpdateLanguage };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { CountryCode } from "../../../types/index";
|
|
2
|
+
import type { InclusivePriceSettingFieldsFragment } from "../../../types/generated/graphql.customer.types";
|
|
2
3
|
export type ZonosInclusivePriceSetting = {
|
|
3
|
-
|
|
4
|
-
* Has enabled inclusive prices for this country
|
|
5
|
-
*/
|
|
6
|
-
hasEnabledInclusivePrices: boolean;
|
|
4
|
+
setting: InclusivePriceSettingFieldsFragment | null;
|
|
7
5
|
};
|
|
8
6
|
export declare const getInclusivePricing: (countryCode: CountryCode | null) => Promise<ZonosInclusivePriceSetting | null>;
|
|
@@ -37,7 +37,7 @@ import type { IDeepKeyof, IDeepPropertyType } from "../../types/utils/deep/IDeep
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
*/
|
|
40
|
-
export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends IDeepKeyof<T, Depth>, Depth extends 0 | 1 | 2 | 6 |
|
|
40
|
+
export declare const changeDeepProperty: <T extends Record<string, unknown>, P extends IDeepKeyof<T, Depth>, Depth extends 0 | 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 = 4>({ obj, propertyPath, value, }: {
|
|
41
41
|
obj: T;
|
|
42
42
|
propertyPath: P;
|
|
43
43
|
value: IDeepPropertyType<T, P, Depth>;
|
|
@@ -60,7 +60,7 @@ import type { IDeepKeyofAtIndex, IDeepPropertyTypeAtIndex } from "../../types/ut
|
|
|
60
60
|
},
|
|
61
61
|
};
|
|
62
62
|
*/
|
|
63
|
-
export declare const changeDeepPropertyAtIndex: <T extends object, P extends IDeepKeyofAtIndex<T, Depth>, Depth extends 0 | 1 | 2 | 6 |
|
|
63
|
+
export declare const changeDeepPropertyAtIndex: <T extends object, P extends IDeepKeyofAtIndex<T, Depth>, Depth extends 0 | 1 | 2 | 6 | 3 | 4 | 5 | 7 | 8 | 9 = 4>({ index, obj, propertyPath, value, }: {
|
|
64
64
|
index: number;
|
|
65
65
|
obj: T;
|
|
66
66
|
propertyPath: P;
|
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
import type { CountryCode } from "./generated/graphql.customer.types";
|
|
2
2
|
import type { Locale_ElementsSupportedLocationCode_Enum } from "./generated/graphql.frontend.types";
|
|
3
|
-
declare const regions: readonly [
|
|
4
|
-
'Africa',
|
|
5
|
-
'Americas',
|
|
6
|
-
'Asia',
|
|
7
|
-
'Central America',
|
|
8
|
-
'Europe',
|
|
9
|
-
'North America',
|
|
10
|
-
'Oceania',
|
|
11
|
-
'South America'
|
|
12
|
-
];
|
|
13
|
-
type IRegion = (typeof regions)[number];
|
|
14
3
|
export type ICountry = {
|
|
15
|
-
|
|
4
|
+
bigcommerceDisplayName?: string;
|
|
16
5
|
code: CountryCode;
|
|
17
|
-
code3: string;
|
|
18
6
|
currencyCode: string;
|
|
19
7
|
displayName: string;
|
|
20
|
-
fraudRisk: number;
|
|
21
8
|
languageCode: Locale_ElementsSupportedLocationCode_Enum;
|
|
22
|
-
numericCode: string;
|
|
23
|
-
region: IRegion;
|
|
24
|
-
upsCode: string | null;
|
|
25
|
-
zipRegex: string | null;
|
|
26
9
|
};
|
|
27
10
|
export type ICountryJson = {
|
|
28
11
|
[countryCode: string]: ICountry;
|
|
29
12
|
};
|
|
30
|
-
export {};
|
|
@@ -398,9 +398,11 @@ export declare const classificationCalculateOrigin: {
|
|
|
398
398
|
};
|
|
399
399
|
export type ClassificationCalculateOrigin = (typeof classificationCalculateOrigin)[keyof typeof classificationCalculateOrigin];
|
|
400
400
|
export declare const classificationCalculateSource: {
|
|
401
|
+
readonly Bulk: "BULK";
|
|
401
402
|
readonly External: "EXTERNAL";
|
|
402
403
|
readonly Internal: "INTERNAL";
|
|
403
404
|
readonly Legacy: "LEGACY";
|
|
405
|
+
readonly Single: "SINGLE";
|
|
404
406
|
};
|
|
405
407
|
export type ClassificationCalculateSource = (typeof classificationCalculateSource)[keyof typeof classificationCalculateSource];
|
|
406
408
|
export declare const classificationRequestField: {
|
|
@@ -453,12 +455,6 @@ export declare const collectUploadStatus: {
|
|
|
453
455
|
readonly SucceededWithErrors: "SUCCEEDED_WITH_ERRORS";
|
|
454
456
|
};
|
|
455
457
|
export type CollectUploadStatus = (typeof collectUploadStatus)[keyof typeof collectUploadStatus];
|
|
456
|
-
export declare const commercialInvoiceImageCarrier: {
|
|
457
|
-
readonly Dhl: "DHL";
|
|
458
|
-
readonly Fedex: "FEDEX";
|
|
459
|
-
readonly Ups: "UPS";
|
|
460
|
-
};
|
|
461
|
-
export type CommercialInvoiceImageCarrier = (typeof commercialInvoiceImageCarrier)[keyof typeof commercialInvoiceImageCarrier];
|
|
462
458
|
export declare const confidenceScoreDisplayStatus: {
|
|
463
459
|
readonly Disabled: "DISABLED";
|
|
464
460
|
readonly Enabled: "ENABLED";
|
|
@@ -1281,6 +1277,11 @@ export declare const dutyTaxFeeConfiguration: {
|
|
|
1281
1277
|
readonly IncludeTax: "INCLUDE_TAX";
|
|
1282
1278
|
};
|
|
1283
1279
|
export type DutyTaxFeeConfiguration = (typeof dutyTaxFeeConfiguration)[keyof typeof dutyTaxFeeConfiguration];
|
|
1280
|
+
export declare const dynamicPackagingStatus: {
|
|
1281
|
+
readonly Disabled: "DISABLED";
|
|
1282
|
+
readonly Enabled: "ENABLED";
|
|
1283
|
+
};
|
|
1284
|
+
export type DynamicPackagingStatus = (typeof dynamicPackagingStatus)[keyof typeof dynamicPackagingStatus];
|
|
1284
1285
|
export declare const elementsUiStyle: {
|
|
1285
1286
|
readonly Rounded: "ROUNDED";
|
|
1286
1287
|
readonly Sharp: "SHARP";
|
|
@@ -1723,6 +1724,7 @@ export declare const landedCostFeeType: {
|
|
|
1723
1724
|
readonly InclusivePricing: "INCLUSIVE_PRICING";
|
|
1724
1725
|
readonly Item: "ITEM";
|
|
1725
1726
|
readonly Other: "OTHER";
|
|
1727
|
+
readonly PartnerRevShare: "PARTNER_REV_SHARE";
|
|
1726
1728
|
readonly Shipping: "SHIPPING";
|
|
1727
1729
|
readonly Tax: "TAX";
|
|
1728
1730
|
readonly ZonosAccessFee: "ZONOS_ACCESS_FEE";
|
|
@@ -2185,12 +2187,14 @@ export declare const result: {
|
|
|
2185
2187
|
readonly Success: "SUCCESS";
|
|
2186
2188
|
};
|
|
2187
2189
|
export type Result = (typeof result)[keyof typeof result];
|
|
2188
|
-
export declare const
|
|
2190
|
+
export declare const roundingMethod: {
|
|
2189
2191
|
readonly Custom: "CUSTOM";
|
|
2190
|
-
readonly
|
|
2191
|
-
readonly
|
|
2192
|
+
readonly Hundredth: "HUNDREDTH";
|
|
2193
|
+
readonly Tenth: "TENTH";
|
|
2194
|
+
readonly Thousandth: "THOUSANDTH";
|
|
2195
|
+
readonly Whole: "WHOLE";
|
|
2192
2196
|
};
|
|
2193
|
-
export type
|
|
2197
|
+
export type RoundingMethod = (typeof roundingMethod)[keyof typeof roundingMethod];
|
|
2194
2198
|
export declare const searchIndex: {
|
|
2195
2199
|
readonly Catalog: "CATALOG";
|
|
2196
2200
|
readonly Orders: "ORDERS";
|
|
@@ -2380,6 +2384,11 @@ export declare const stripePriceType: {
|
|
|
2380
2384
|
readonly Recurring: "RECURRING";
|
|
2381
2385
|
};
|
|
2382
2386
|
export type StripePriceType = (typeof stripePriceType)[keyof typeof stripePriceType];
|
|
2387
|
+
export declare const stripeSubscriptionCollectionMethod: {
|
|
2388
|
+
readonly ChargeAutomatically: "CHARGE_AUTOMATICALLY";
|
|
2389
|
+
readonly SendInvoice: "SEND_INVOICE";
|
|
2390
|
+
};
|
|
2391
|
+
export type StripeSubscriptionCollectionMethod = (typeof stripeSubscriptionCollectionMethod)[keyof typeof stripeSubscriptionCollectionMethod];
|
|
2383
2392
|
export declare const stripeSubscriptionStatus: {
|
|
2384
2393
|
readonly Active: "ACTIVE";
|
|
2385
2394
|
readonly Canceled: "CANCELED";
|
|
@@ -2387,6 +2396,7 @@ export declare const stripeSubscriptionStatus: {
|
|
|
2387
2396
|
readonly Incomplete: "INCOMPLETE";
|
|
2388
2397
|
readonly IncompleteExpired: "INCOMPLETE_EXPIRED";
|
|
2389
2398
|
readonly PastDue: "PAST_DUE";
|
|
2399
|
+
readonly Paused: "PAUSED";
|
|
2390
2400
|
readonly Trialing: "TRIALING";
|
|
2391
2401
|
readonly Unpaid: "UNPAID";
|
|
2392
2402
|
};
|
|
@@ -2912,12 +2922,34 @@ export type GetCheckoutSessionQuery = {
|
|
|
2912
2922
|
} | null;
|
|
2913
2923
|
};
|
|
2914
2924
|
};
|
|
2915
|
-
export type
|
|
2925
|
+
export type InclusivePriceSettingFieldsFragment = {
|
|
2926
|
+
duty: {
|
|
2927
|
+
status: InclusivePriceSettingAdjustmentStatus;
|
|
2928
|
+
};
|
|
2929
|
+
fee: {
|
|
2930
|
+
status: InclusivePriceSettingAdjustmentStatus;
|
|
2931
|
+
};
|
|
2932
|
+
id: string;
|
|
2933
|
+
status: InclusivePriceSettingStatus;
|
|
2934
|
+
tax: {
|
|
2935
|
+
status: InclusivePriceSettingAdjustmentStatus;
|
|
2936
|
+
};
|
|
2937
|
+
};
|
|
2938
|
+
export type GetInclusivePriceSettingByCountryQuery = {
|
|
2916
2939
|
inclusivePriceSettings: {
|
|
2917
2940
|
edges: Array<{
|
|
2918
2941
|
node: {
|
|
2942
|
+
duty: {
|
|
2943
|
+
status: InclusivePriceSettingAdjustmentStatus;
|
|
2944
|
+
};
|
|
2945
|
+
fee: {
|
|
2946
|
+
status: InclusivePriceSettingAdjustmentStatus;
|
|
2947
|
+
};
|
|
2919
2948
|
id: string;
|
|
2920
2949
|
status: InclusivePriceSettingStatus;
|
|
2950
|
+
tax: {
|
|
2951
|
+
status: InclusivePriceSettingAdjustmentStatus;
|
|
2952
|
+
};
|
|
2921
2953
|
};
|
|
2922
2954
|
}>;
|
|
2923
2955
|
} | null;
|
|
@@ -3453,9 +3485,9 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
3453
3485
|
getCheckoutSession(variables?: {
|
|
3454
3486
|
[x: string]: never;
|
|
3455
3487
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetCheckoutSessionQuery>;
|
|
3456
|
-
|
|
3488
|
+
getInclusivePriceSettingByCountry(variables?: {
|
|
3457
3489
|
[x: string]: never;
|
|
3458
|
-
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<
|
|
3490
|
+
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetInclusivePriceSettingByCountryQuery>;
|
|
3459
3491
|
getOrder(variables?: {
|
|
3460
3492
|
[x: string]: never;
|
|
3461
3493
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetOrderQuery>;
|
|
@@ -498,9 +498,11 @@ export const classificationCalculateOrigin = {
|
|
|
498
498
|
export type ClassificationCalculateOrigin =
|
|
499
499
|
(typeof classificationCalculateOrigin)[keyof typeof classificationCalculateOrigin];
|
|
500
500
|
export const classificationCalculateSource = {
|
|
501
|
+
Bulk: 'BULK',
|
|
501
502
|
External: 'EXTERNAL',
|
|
502
503
|
Internal: 'INTERNAL',
|
|
503
504
|
Legacy: 'LEGACY',
|
|
505
|
+
Single: 'SINGLE',
|
|
504
506
|
} as const;
|
|
505
507
|
|
|
506
508
|
export type ClassificationCalculateSource =
|
|
@@ -574,14 +576,6 @@ export const collectUploadStatus = {
|
|
|
574
576
|
|
|
575
577
|
export type CollectUploadStatus =
|
|
576
578
|
(typeof collectUploadStatus)[keyof typeof collectUploadStatus];
|
|
577
|
-
export const commercialInvoiceImageCarrier = {
|
|
578
|
-
Dhl: 'DHL',
|
|
579
|
-
Fedex: 'FEDEX',
|
|
580
|
-
Ups: 'UPS',
|
|
581
|
-
} as const;
|
|
582
|
-
|
|
583
|
-
export type CommercialInvoiceImageCarrier =
|
|
584
|
-
(typeof commercialInvoiceImageCarrier)[keyof typeof commercialInvoiceImageCarrier];
|
|
585
579
|
|
|
586
580
|
export const confidenceScoreDisplayStatus = {
|
|
587
581
|
Disabled: 'DISABLED',
|
|
@@ -1471,6 +1465,13 @@ export const dutyTaxFeeConfiguration = {
|
|
|
1471
1465
|
|
|
1472
1466
|
export type DutyTaxFeeConfiguration =
|
|
1473
1467
|
(typeof dutyTaxFeeConfiguration)[keyof typeof dutyTaxFeeConfiguration];
|
|
1468
|
+
export const dynamicPackagingStatus = {
|
|
1469
|
+
Disabled: 'DISABLED',
|
|
1470
|
+
Enabled: 'ENABLED',
|
|
1471
|
+
} as const;
|
|
1472
|
+
|
|
1473
|
+
export type DynamicPackagingStatus =
|
|
1474
|
+
(typeof dynamicPackagingStatus)[keyof typeof dynamicPackagingStatus];
|
|
1474
1475
|
export const elementsUiStyle = {
|
|
1475
1476
|
Rounded: 'ROUNDED',
|
|
1476
1477
|
Sharp: 'SHARP',
|
|
@@ -2051,6 +2052,7 @@ export const landedCostFeeType = {
|
|
|
2051
2052
|
InclusivePricing: 'INCLUSIVE_PRICING',
|
|
2052
2053
|
Item: 'ITEM',
|
|
2053
2054
|
Other: 'OTHER',
|
|
2055
|
+
PartnerRevShare: 'PARTNER_REV_SHARE',
|
|
2054
2056
|
Shipping: 'SHIPPING',
|
|
2055
2057
|
Tax: 'TAX',
|
|
2056
2058
|
ZonosAccessFee: 'ZONOS_ACCESS_FEE',
|
|
@@ -2635,13 +2637,16 @@ export const result = {
|
|
|
2635
2637
|
|
|
2636
2638
|
export type Result = (typeof result)[keyof typeof result];
|
|
2637
2639
|
|
|
2638
|
-
export const
|
|
2640
|
+
export const roundingMethod = {
|
|
2639
2641
|
Custom: 'CUSTOM',
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
+
Hundredth: 'HUNDREDTH',
|
|
2643
|
+
Tenth: 'TENTH',
|
|
2644
|
+
Thousandth: 'THOUSANDTH',
|
|
2645
|
+
Whole: 'WHOLE',
|
|
2642
2646
|
} as const;
|
|
2643
2647
|
|
|
2644
|
-
export type
|
|
2648
|
+
export type RoundingMethod =
|
|
2649
|
+
(typeof roundingMethod)[keyof typeof roundingMethod];
|
|
2645
2650
|
|
|
2646
2651
|
export const searchIndex = {
|
|
2647
2652
|
Catalog: 'CATALOG',
|
|
@@ -2898,6 +2903,13 @@ export const stripePriceType = {
|
|
|
2898
2903
|
|
|
2899
2904
|
export type StripePriceType =
|
|
2900
2905
|
(typeof stripePriceType)[keyof typeof stripePriceType];
|
|
2906
|
+
export const stripeSubscriptionCollectionMethod = {
|
|
2907
|
+
ChargeAutomatically: 'CHARGE_AUTOMATICALLY',
|
|
2908
|
+
SendInvoice: 'SEND_INVOICE',
|
|
2909
|
+
} as const;
|
|
2910
|
+
|
|
2911
|
+
export type StripeSubscriptionCollectionMethod =
|
|
2912
|
+
(typeof stripeSubscriptionCollectionMethod)[keyof typeof stripeSubscriptionCollectionMethod];
|
|
2901
2913
|
export const stripeSubscriptionStatus = {
|
|
2902
2914
|
Active: 'ACTIVE',
|
|
2903
2915
|
Canceled: 'CANCELED',
|
|
@@ -2905,6 +2917,7 @@ export const stripeSubscriptionStatus = {
|
|
|
2905
2917
|
Incomplete: 'INCOMPLETE',
|
|
2906
2918
|
IncompleteExpired: 'INCOMPLETE_EXPIRED',
|
|
2907
2919
|
PastDue: 'PAST_DUE',
|
|
2920
|
+
Paused: 'PAUSED',
|
|
2908
2921
|
Trialing: 'TRIALING',
|
|
2909
2922
|
Unpaid: 'UNPAID',
|
|
2910
2923
|
} as const;
|
|
@@ -3428,9 +3441,25 @@ export type GetCheckoutSessionQuery = {
|
|
|
3428
3441
|
checkoutSession: { order: { id: string } | null };
|
|
3429
3442
|
};
|
|
3430
3443
|
|
|
3431
|
-
export type
|
|
3444
|
+
export type InclusivePriceSettingFieldsFragment = {
|
|
3445
|
+
duty: { status: InclusivePriceSettingAdjustmentStatus };
|
|
3446
|
+
fee: { status: InclusivePriceSettingAdjustmentStatus };
|
|
3447
|
+
id: string;
|
|
3448
|
+
status: InclusivePriceSettingStatus;
|
|
3449
|
+
tax: { status: InclusivePriceSettingAdjustmentStatus };
|
|
3450
|
+
};
|
|
3451
|
+
|
|
3452
|
+
export type GetInclusivePriceSettingByCountryQuery = {
|
|
3432
3453
|
inclusivePriceSettings: {
|
|
3433
|
-
edges: Array<{
|
|
3454
|
+
edges: Array<{
|
|
3455
|
+
node: {
|
|
3456
|
+
duty: { status: InclusivePriceSettingAdjustmentStatus };
|
|
3457
|
+
fee: { status: InclusivePriceSettingAdjustmentStatus };
|
|
3458
|
+
id: string;
|
|
3459
|
+
status: InclusivePriceSettingStatus;
|
|
3460
|
+
tax: { status: InclusivePriceSettingAdjustmentStatus };
|
|
3461
|
+
};
|
|
3462
|
+
}>;
|
|
3434
3463
|
} | null;
|
|
3435
3464
|
};
|
|
3436
3465
|
|
|
@@ -4106,18 +4135,18 @@ export function getSdk(
|
|
|
4106
4135
|
'query',
|
|
4107
4136
|
);
|
|
4108
4137
|
},
|
|
4109
|
-
|
|
4138
|
+
getInclusivePriceSettingByCountry(
|
|
4110
4139
|
variables?: { [x: string]: never },
|
|
4111
4140
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
4112
|
-
): Promise<
|
|
4141
|
+
): Promise<GetInclusivePriceSettingByCountryQuery> {
|
|
4113
4142
|
return withWrapper(
|
|
4114
4143
|
wrappedRequestHeaders =>
|
|
4115
|
-
client.request<
|
|
4144
|
+
client.request<GetInclusivePriceSettingByCountryQuery>(
|
|
4116
4145
|
'',
|
|
4117
4146
|
variables,
|
|
4118
4147
|
{ ...requestHeaders, ...wrappedRequestHeaders },
|
|
4119
4148
|
),
|
|
4120
|
-
'
|
|
4149
|
+
'getInclusivePriceSettingByCountry',
|
|
4121
4150
|
'query',
|
|
4122
4151
|
);
|
|
4123
4152
|
},
|
|
@@ -566,7 +566,7 @@ export type GetAudienceByAspectKeyQuery = {
|
|
|
566
566
|
};
|
|
567
567
|
export type LocaleCountryMessagesQuery = {
|
|
568
568
|
locale_countryCodesPage: Array<{
|
|
569
|
-
countryCodes: Array<string
|
|
569
|
+
countryCodes: Array<string> | null;
|
|
570
570
|
countryCodesPageMessageLinks: Array<{
|
|
571
571
|
id: number;
|
|
572
572
|
message: {
|
|
@@ -571,7 +571,7 @@ export type GetAudienceByAspectKeyQuery = {
|
|
|
571
571
|
|
|
572
572
|
export type LocaleCountryMessagesQuery = {
|
|
573
573
|
locale_countryCodesPage: Array<{
|
|
574
|
-
countryCodes: Array<string
|
|
574
|
+
countryCodes: Array<string> | null;
|
|
575
575
|
countryCodesPageMessageLinks: Array<{
|
|
576
576
|
id: number;
|
|
577
577
|
message: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e,a as n}from"./p-eaa335e1.js";const t=["jsdelivr","cdnjs","unpkg","vercel"],o=e=>{const n=t.indexOf(e);return t[n+1]||null},s="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let l=null;const c=Promise.resolve().then((()=>{return e=null,null!==l||(l=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${s}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&r.test(t.src))return t}return null})();l&&e?console.warn(i):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${s}${t}`;const r=document.head||document.body;return r?(r.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),l;var e}));let d=!1;var u;c.catch((e=>{d||console.warn(e)}));const a=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),m="https://v1.3.
|
|
1
|
+
import{l as e,a as n}from"./p-eaa335e1.js";const t=["jsdelivr","cdnjs","unpkg","vercel"],o=e=>{const n=t.indexOf(e);return t[n+1]||null},s="https://js.stripe.com/v3",r=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,i="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let l=null;const c=Promise.resolve().then((()=>{return e=null,null!==l||(l=new Promise(((t,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(i),window.Stripe)t(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${s}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&r.test(t.src))return t}return null})();l&&e?console.warn(i):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${s}${t}`;const r=document.head||document.body;return r?(r.appendChild(o),o):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?t(window.Stripe):o(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else t(null)}))),l;var e}));let d=!1;var u;c.catch((e=>{d||console.warn(e)}));const a=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),m="https://v1.3.44.js.zonos.com",p=a||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.44",w="jsdelivr",f="https://rsms.me",h="https://fonts.googleapis.com",v=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class y{}u=y,y.doneInit=!1,y.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),y.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),y._paypalMockResponse=null,y.isBigCommerce=!1,y.isNpm=!0,y.zonosQaUrl=null,y.version="v1.3.44",y.modeAlerted=!1,y.tempCartData=null,y.paypal=null,y.getCurrentTimestamp=()=>(new Date).getTime(),y.zonosController=null,y.init=async({appearance:t,checkoutSettings:o,currencyConverter:s,helloSettings:r,onCountryChange:i,overrideCurrencyFormat:l,storeId:c,zonosApiKey:d})=>{u.doneInit||(e(`====== ZONOS DEBUG MODE: on (${u.version}) ======`),d?(u.zonosApiKey=d,u.storeId=c,e("init zonos"),u.injectZonosCdn(),u.injectZonosCss(),u.injectFonts(),u.injectController({config:{appearance:t,checkoutSettings:o,currencyConverter:s,helloSettings:r,onCountryChange:i,overrideCurrencyFormat:l},zonosApiKey:d}),u.doneInit=!0):n("Missing Zonos API key"))},y.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},y.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},y.showNotification=e=>{var n;null===(n=u.zonosController)||void 0===n||n.showNotification(e)},y.updateOrganizationName=e=>{var n;null===(n=u.zonosController)||void 0===n||n.updateOrganizationName(e)},y.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},y.injectController=({config:t,zonosApiKey:o})=>{var s;if(document.querySelector("zonos-controller"))return;if(null===(s=t.checkoutSettings)||void 0===s?void 0:s.placeOrderButtonSelector){const e=t.checkoutSettings.placeOrderButtonSelector;u.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{u.disablePlaceOrderButtons({config:t,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const r=document.createElement("zonos-controller");r.config=t,r.zonosApiKey=o,r.addEventListener("stripeInitEvent",(async t=>{const{detail:o}=t;e("loading Stripe");const s=await(async(...e)=>{d=!0;const n=Date.now();return c.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(o.publishableKey);s?(window.Zonos.stripe=s,r.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(r),u.zonosController=r,e("Zonos controller injected!")},y.injectScript=({cdnType:t,isModule:s,theRestUrl:r})=>{const i=`${u.getZonosUrl(t)}/${r}`;if(document.querySelector(`script[src="${i}"]`))return void e(`Zonos script "${i}" already exists in the document`,"warn");const l=document.head||document.body,c=document.createElement("script");s?c.type="module":c.noModule=!0,c.src=i,c.crossOrigin="anonymous",c.onerror=()=>{n(`Failed to load ${c.src}`);const e=o(t);e&&u.injectScript({cdnType:e,isModule:s,theRestUrl:r})},l.appendChild(c)},y.getZonosUrl=n=>{const t=()=>{switch(n){case"jsdelivr":return p;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.44";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.44";case"vercel":return m}};return u.isNpm&&(()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const t=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.44.js.zonos.com";if(!t&&o.includes("test."))return o;if(!t&&"dev.demo.elements.zonos.com"===window.location.hostname)return"https://dev.elements.zonos.com";if(!t)return null;if("dev-elements"===t)return"https://dev.elements.zonos.com";const s=`https://${t}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s})()||t()},y.injectZonosCdn=()=>{u.injectScript({cdnType:w,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),u.injectScript({cdnType:w,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},y.injectStylesheet=({cdnType:e,theRestUrl:t})=>{const s=u.getZonosUrl(e),r=document.head||document.body,i=document.createElement("link");i.rel="preconnect",i.href=`${m}/`,r.appendChild(i);const l=document.createElement("link");l.rel="stylesheet",l.href=`${s}/${t}`,l.onerror=()=>{n(`Failed to load ${l.href}`);const s=o(e);s&&u.injectStylesheet({cdnType:s,theRestUrl:t})},r.appendChild(l)},y.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(u.injectStylesheet({cdnType:w,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},y.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${f}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!v.test(t.href))return t}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,t=document.createElement("link");t.rel="preconnect",t.href=f,n.appendChild(t);const o=document.createElement("link");o.rel="stylesheet",o.href=`${f}/inter/inter.css`,n.appendChild(o),e("Zonos font injected!")},y.setupGoogleFont=e=>{var n;null===(n=u.zonosController)||void 0===n||n.setupGoogleFont(e)},y.injectSupportGoogleFont=n=>{var t;e(`[FONT] injecting ${n}`);const o=null===(t=n.match(/family=(.*?):/))||void 0===t?void 0:t[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${h}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=h,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${o} font injected!`)};export{y as Zonos}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,e,r,t){function o(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,i){function u(n){try{c(t.next(n))}catch(n){i(n)}}function s(n){try{c(t["throw"](n))}catch(n){i(n)}}function c(n){n.done?r(n.value):o(n.value).then(u,s)}c((t=t.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return c([n,e])}}function c(s){if(t)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(t=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(n,r)}catch(n){s=[6,n];o=0}finally{t=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-63db40b9.system.js"],(function(n){"use strict";var e,r;return{setters:[function(n){e=n.l;r=n.a}],execute:function(){var t=this;var o=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var r=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var t=["qa.js.zonos.com"];var o=new URL(e).origin;var i=r.some((function(n){return o.includes(n)}));var u=t.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var i=["jsdelivr","cdnjs","unpkg","vercel"];var u=function(n){var e=i.indexOf(n);var r=i[e+1];return r||null};var s=function(n){if(!n){return null}var e=new URL(n).searchParams;var r=e.get("zonosQaUrl");if(!r){return null}var t=/[^a-zA-Z0-9-_]+/.test(r);if(!!t){return null}return r};var c=function(){var n=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||n){return null}var r=s(window.location.href);var t="https://v1.3.42.js.zonos.com";if(!r&&t.includes("test.")){return t}if(!r&&window.location.hostname==="dev.demo.elements.zonos.com"){return"https://dev.elements.zonos.com"}if(!r){return null}if(r==="dev-elements"){return"https://dev.elements.zonos.com"}var o="preview.js.zonos.com";var i="https://".concat(r,".").concat(o);e("[ZONOS-WARNING] using '".concat(i,"' for loading script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var r="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",r);window.location.reload();return null}));return i};var a="https://js.stripe.com/v3";var l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var f=function(){var n=document.querySelectorAll('script[src^="'.concat(a,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(!l.test(r.src)){continue}return r}return null};var v=null;var m=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(a).concat(e);var o=document.head||document.body;if(!o){r("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}o.appendChild(t);return t};var w=function(n){if(v!==null){return v}v=new Promise((function(e,r){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(d)}if(window.Stripe){e(window.Stripe);return}try{var t=f();if(t&&n){console.warn(d)}else if(!t){t=m(n)}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{r(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(n){r(n);return}}));return v};var p=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var h=function(n,e,r){if(n===null){return null}var t=n.apply(undefined,e);p(t,r);return t};var y=Promise.resolve().then((function(){return w(null)}));var z=false;y.catch((function(n){if(!z){console.warn(n)}}));var j=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(r){z=true;e=Date.now();return[2,y.then((function(r){return h(r,n,e)}))]}))}))};var g;var b=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=o({loadScriptSrc:n===null||n===void 0?void 0:n.src}),r=e.currentLoadScriptUrl,t=e.isWhiteListed;if(t){return r}return null}();var k="https://v1.3.42.js.zonos.com";var S=b||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.42";var O="https://unpkg.com/@zonos/elements@1.3.42";var _="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.42";var L="jsdelivr";var N="https://rsms.me";var A="https://fonts.googleapis.com";var R=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;var U=function(){function n(){}return n}();n("Zonos",U);g=U;U.doneInit=false;U.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);U.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);U._paypalMockResponse=null;U.isBigCommerce=false;U.isNpm=true;U.zonosQaUrl=null;U.version="v".concat("1.3.42");U.modeAlerted=false;U.tempCartData=null;U.paypal=null;U.getCurrentTimestamp=function(){return(new Date).getTime()};U.zonosController=null;U.init=function(n){return __awaiter(t,[n],void 0,(function(n){var t=n.appearance,o=n.checkoutSettings,i=n.currencyConverter,u=n.helloSettings,s=n.onCountryChange,c=n.overrideCurrencyFormat,a=n.storeId,l=n.zonosApiKey;return __generator(this,(function(n){if(g.doneInit){return[2]}e("====== ZONOS DEBUG MODE: on (".concat(g.version,") ======"));if(!l){r("Missing Zonos API key");return[2]}g.zonosApiKey=l;g.storeId=a;e("init zonos");g.injectZonosCdn();g.injectZonosCss();g.injectFonts();g.injectController({config:{appearance:t,checkoutSettings:o,currencyConverter:i,helloSettings:u,onCountryChange:s,overrideCurrencyFormat:c},zonosApiKey:l});g.doneInit=true;return[2]}))}))};U.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};U.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};U.showNotification=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.showNotification(n))};U.updateOrganizationName=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};U.disablePlaceOrderButtons=function(n){var e=n.autoEnable,r=e===void 0?true:e,t=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=t.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var c=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",c)}else{n.removeAttribute("disabled");n.removeEventListener("click",c)}}));if(r&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",c)}))}),5e3)}}};U.injectController=function(n){var o=n.config,i=n.zonosApiKey;var u;if(document.querySelector("zonos-controller")){return}if((u=o.checkoutSettings)===null||u===void 0?void 0:u.placeOrderButtonSelector){var s=o.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s});var c=new MutationObserver((function(){g.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s})}));c.observe(document.body,{childList:true,subtree:true})}var a=document.createElement("zonos-controller");a.config=o;a.zonosApiKey=i;a.addEventListener("stripeInitEvent",(function(n){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:t=n.detail;e("loading Stripe");return[4,j(t.publishableKey)];case 1:o=i.sent();if(!o){r("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;void a.initCheckoutElement(o);return[2]}}))}))}));document.body.appendChild(a);g.zonosController=a;e("Zonos controller injected!")};U.injectScript=function(n){var t=n.cdnType,o=n.isModule,i=n.theRestUrl;var s=g.getZonosUrl(t);var c="".concat(s,"/").concat(i);var a=function(){var n=document.querySelector('script[src="'.concat(c,'"]'));return!!n};if(a()){e('Zonos script "'.concat(c,'" already exists in the document'),"warn");return}var l=document.head||document.body;var d=document.createElement("script");if(!!o){d.type="module"}else{d.noModule=true}d.src=c;d.crossOrigin="anonymous";d.onerror=function(){r("Failed to load ".concat(d.src));var n=u(t);if(!n){return}g.injectScript({cdnType:n,isModule:o,theRestUrl:i})};l.appendChild(d)};U.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return S;case"unpkg":return O;case"cdnjs":return _;case"vercel":return k}};if(g.isNpm){var r=c();return r||e()}return e()};U.injectZonosCdn=function(){g.injectScript({cdnType:L,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});g.injectScript({cdnType:L,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});e("Zonos cdn script injected!")};U.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var o=g.getZonosUrl(e);var i=document.head||document.body;var s=document.createElement("link");s.rel="preconnect";s.href="".concat(k,"/");i.appendChild(s);var c=document.createElement("link");c.rel="stylesheet";c.href="".concat(o,"/").concat(t);c.onerror=function(){r("Failed to load ".concat(c.href));var n=u(e);if(!n){return}g.injectStylesheet({cdnType:n,theRestUrl:t})};i.appendChild(c)};U.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){e("Zonos style links already injected","warn");return}g.injectStylesheet({cdnType:L,theRestUrl:"dist/zonos-elements/zonos-elements.css"});e("Zonos style css injected!")};U.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(N,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(R.test(r.href)){continue}return r}return null};if(n()){e("Inter font already injected","warn");return}var r=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=N;r.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(N,"/inter/inter.css");r.appendChild(o);e("Zonos font injected!")};U.setupGoogleFont=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};U.injectSupportGoogleFont=function(n){var r;e("[FONT] injecting ".concat(n));var t=(r=n.match(/family=(.*?):/))===null||r===void 0?void 0:r[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(A,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=A;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){e("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);e("[FONT] ".concat(t," font injected!"))}}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(n,e,r,t){function o(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,i){function u(n){try{c(t.next(n))}catch(n){i(n)}}function s(n){try{c(t["throw"](n))}catch(n){i(n)}}function c(n){n.done?r(n.value):o(n.value).then(u,s)}c((t=t.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(n){return function(e){return c([n,e])}}function c(s){if(t)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(r=0)),r)try{if(t=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(n,r)}catch(n){s=[6,n];o=0}finally{t=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-63db40b9.system.js"],(function(n){"use strict";var e,r;return{setters:[function(n){e=n.l;r=n.a}],execute:function(){var t=this;var o=function(n){var e=n.loadScriptSrc;if(!e){return{currentLoadScriptUrl:"",isForceLoadVersionDomain:false,isWhiteListed:false}}var r=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"];var t=["qa.js.zonos.com"];var o=new URL(e).origin;var i=r.some((function(n){return o.includes(n)}));var u=t.some((function(n){return o.includes(n)}));return{currentLoadScriptUrl:o,isForceLoadVersionDomain:u,isWhiteListed:i}};var i=["jsdelivr","cdnjs","unpkg","vercel"];var u=function(n){var e=i.indexOf(n);var r=i[e+1];return r||null};var s=function(n){if(!n){return null}var e=new URL(n).searchParams;var r=e.get("zonosQaUrl");if(!r){return null}var t=/[^a-zA-Z0-9-_]+/.test(r);if(!!t){return null}return r};var c=function(){var n=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||n){return null}var r=s(window.location.href);var t="https://v1.3.44.js.zonos.com";if(!r&&t.includes("test.")){return t}if(!r&&window.location.hostname==="dev.demo.elements.zonos.com"){return"https://dev.elements.zonos.com"}if(!r){return null}if(r==="dev-elements"){return"https://dev.elements.zonos.com"}var o="preview.js.zonos.com";var i="https://".concat(r,".").concat(o);e("[ZONOS-WARNING] using '".concat(i,"' for loading script"),"warn");void fetch(i).then((function(){window.sessionStorage.removeItem("zonos--checkout-session-id");window.sessionStorage.removeItem("zonos--client-secret")})).catch((function(){alert("[ZONOS-WARNING] '".concat(i,"' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE"));var n=new URLSearchParams(window.location.search);n.delete("zonosQaUrl");var e=window.location.pathname;var r="".concat(e,"?").concat(n.toString());window.history.replaceState(window.history.state,"",r);window.location.reload();return null}));return i};var a="https://js.stripe.com/v3";var l=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;var d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";var f=function(){var n=document.querySelectorAll('script[src^="'.concat(a,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(!l.test(r.src)){continue}return r}return null};var v=null;var m=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"";var t=document.createElement("script");t.src="".concat(a).concat(e);var o=document.head||document.body;if(!o){r("Expected document.body not to be null. Stripe.js requires a <body> element.");return null}o.appendChild(t);return t};var w=function(n){if(v!==null){return v}v=new Promise((function(e,r){if(typeof window==="undefined"||typeof document==="undefined"){e(null);return}if(window.Stripe&&n){console.warn(d)}if(window.Stripe){e(window.Stripe);return}try{var t=f();if(t&&n){console.warn(d)}else if(!t){t=m(n)}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){e(window.Stripe)}else{r(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(n){r(n);return}}));return v};var p=function(n,e){if(!n||!n._registerWrapper){return}n._registerWrapper({name:"stripe-js",startTime:e})};var h=function(n,e,r){if(n===null){return null}var t=n.apply(undefined,e);p(t,r);return t};var y=Promise.resolve().then((function(){return w(null)}));var z=false;y.catch((function(n){if(!z){console.warn(n)}}));var j=function(){var n=[];for(var e=0;e<arguments.length;e++){n[e]=arguments[e]}return __awaiter(t,void 0,void 0,(function(){var e;return __generator(this,(function(r){z=true;e=Date.now();return[2,y.then((function(r){return h(r,n,e)}))]}))}))};var g;var b=function(){if(typeof document==="undefined"){return null}var n=document.querySelector('script[src*="/zonos.js"]');var e=o({loadScriptSrc:n===null||n===void 0?void 0:n.src}),r=e.currentLoadScriptUrl,t=e.isWhiteListed;if(t){return r}return null}();var k="https://v1.3.44.js.zonos.com";var S=b||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.44";var O="https://unpkg.com/@zonos/elements@1.3.44";var _="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.44";var L="jsdelivr";var N="https://rsms.me";var A="https://fonts.googleapis.com";var R=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;var U=function(){function n(){}return n}();n("Zonos",U);g=U;U.doneInit=false;U.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);U.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);U._paypalMockResponse=null;U.isBigCommerce=false;U.isNpm=true;U.zonosQaUrl=null;U.version="v".concat("1.3.44");U.modeAlerted=false;U.tempCartData=null;U.paypal=null;U.getCurrentTimestamp=function(){return(new Date).getTime()};U.zonosController=null;U.init=function(n){return __awaiter(t,[n],void 0,(function(n){var t=n.appearance,o=n.checkoutSettings,i=n.currencyConverter,u=n.helloSettings,s=n.onCountryChange,c=n.overrideCurrencyFormat,a=n.storeId,l=n.zonosApiKey;return __generator(this,(function(n){if(g.doneInit){return[2]}e("====== ZONOS DEBUG MODE: on (".concat(g.version,") ======"));if(!l){r("Missing Zonos API key");return[2]}g.zonosApiKey=l;g.storeId=a;e("init zonos");g.injectZonosCdn();g.injectZonosCss();g.injectFonts();g.injectController({config:{appearance:t,checkoutSettings:o,currencyConverter:i,helloSettings:u,onCountryChange:s,overrideCurrencyFormat:c},zonosApiKey:l});g.doneInit=true;return[2]}))}))};U.displayCurrency=function(){var n=document.querySelector("zonos-hello");if(n){void n.displayCurrency()}};U.openHelloDialog=function(n){var e=document.querySelector("zonos-hello");if(e){void e.openHelloDialog(n!==null&&n!==void 0?n:true)}};U.showNotification=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.showNotification(n))};U.updateOrganizationName=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.updateOrganizationName(n))};U.disablePlaceOrderButtons=function(n){var e=n.autoEnable,r=e===void 0?true:e,t=n.config,o=n.disable,i=n.placeOrderButtonSelector;var u;if((u=t.checkoutSettings)===null||u===void 0?void 0:u.disablePlaceOrderButtonActivation){return}if(i){var s=document.querySelectorAll(i);var c=function(n){var e=n.target;if(e.getAttribute("disabled")){n.preventDefault();n.stopPropagation()}};s.forEach((function(n){var e=n.getAttribute("data-zonos-checkout-attached");if(e){return}if(o){n.setAttribute("disabled","true");n.addEventListener("click",c)}else{n.removeAttribute("disabled");n.removeEventListener("click",c)}}));if(r&&o){setTimeout((function(){s.forEach((function(n){n.removeAttribute("disabled");n.removeEventListener("click",c)}))}),5e3)}}};U.injectController=function(n){var o=n.config,i=n.zonosApiKey;var u;if(document.querySelector("zonos-controller")){return}if((u=o.checkoutSettings)===null||u===void 0?void 0:u.placeOrderButtonSelector){var s=o.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s});var c=new MutationObserver((function(){g.disablePlaceOrderButtons({config:o,disable:true,placeOrderButtonSelector:s})}));c.observe(document.body,{childList:true,subtree:true})}var a=document.createElement("zonos-controller");a.config=o;a.zonosApiKey=i;a.addEventListener("stripeInitEvent",(function(n){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:t=n.detail;e("loading Stripe");return[4,j(t.publishableKey)];case 1:o=i.sent();if(!o){r("API seems to be invalid or missing. Failed to load Stripe");return[2]}window.Zonos.stripe=o;void a.initCheckoutElement(o);return[2]}}))}))}));document.body.appendChild(a);g.zonosController=a;e("Zonos controller injected!")};U.injectScript=function(n){var t=n.cdnType,o=n.isModule,i=n.theRestUrl;var s=g.getZonosUrl(t);var c="".concat(s,"/").concat(i);var a=function(){var n=document.querySelector('script[src="'.concat(c,'"]'));return!!n};if(a()){e('Zonos script "'.concat(c,'" already exists in the document'),"warn");return}var l=document.head||document.body;var d=document.createElement("script");if(!!o){d.type="module"}else{d.noModule=true}d.src=c;d.crossOrigin="anonymous";d.onerror=function(){r("Failed to load ".concat(d.src));var n=u(t);if(!n){return}g.injectScript({cdnType:n,isModule:o,theRestUrl:i})};l.appendChild(d)};U.getZonosUrl=function(n){var e=function(){switch(n){case"jsdelivr":return S;case"unpkg":return O;case"cdnjs":return _;case"vercel":return k}};if(g.isNpm){var r=c();return r||e()}return e()};U.injectZonosCdn=function(){g.injectScript({cdnType:L,isModule:true,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"});g.injectScript({cdnType:L,isModule:false,theRestUrl:"dist/zonos-elements/zonos-elements.js"});e("Zonos cdn script injected!")};U.injectStylesheet=function(n){var e=n.cdnType,t=n.theRestUrl;var o=g.getZonosUrl(e);var i=document.head||document.body;var s=document.createElement("link");s.rel="preconnect";s.href="".concat(k,"/");i.appendChild(s);var c=document.createElement("link");c.rel="stylesheet";c.href="".concat(o,"/").concat(t);c.onerror=function(){r("Failed to load ".concat(c.href));var n=u(e);if(!n){return}g.injectStylesheet({cdnType:n,theRestUrl:t})};i.appendChild(c)};U.injectZonosCss=function(){var n=function(){return!!document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')};if(n()){e("Zonos style links already injected","warn");return}g.injectStylesheet({cdnType:L,theRestUrl:"dist/zonos-elements/zonos-elements.css"});e("Zonos style css injected!")};U.injectFonts=function(){var n=function(){var n=document.querySelectorAll('link[rel="stylesheet"][href^="'.concat(N,'"]'));for(var e=0;e<n.length;e++){var r=n[e];if(!r){continue}if(R.test(r.href)){continue}return r}return null};if(n()){e("Inter font already injected","warn");return}var r=document.head||document.body;var t=document.createElement("link");t.rel="preconnect";t.href=N;r.appendChild(t);var o=document.createElement("link");o.rel="stylesheet";o.href="".concat(N,"/inter/inter.css");r.appendChild(o);e("Zonos font injected!")};U.setupGoogleFont=function(n){var e;void((e=g.zonosController)===null||e===void 0?void 0:e.setupGoogleFont(n))};U.injectSupportGoogleFont=function(n){var r;e("[FONT] injecting ".concat(n));var t=(r=n.match(/family=(.*?):/))===null||r===void 0?void 0:r[1];var o=document.head||document.body;if(!document.querySelector('link[rel="preconnect"][href^="'.concat(A,'"]'))){var i=document.createElement("link");i.rel="preconnect";i.href=A;o.appendChild(i)}if(document.querySelector('link[rel="stylesheet"][href="'.concat(n,'"]'))){e("[FONT] ".concat(t," font already injected"),"warn");return}var u=document.createElement("link");u.rel="stylesheet";u.href=n;o.appendChild(u);e("[FONT] ".concat(t," font injected!"))}}}}));
|