@zonos/elements 1.3.195 → 1.3.196
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-bc882927.js → cart-2e3968e9.js} +7 -2
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-608fa681.js → paypal-b5c80f16.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -44
- 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-empty-state-payment_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -42
- package/dist/collection/components/store/checkout/stripe.js +7 -2
- package/dist/esm/{cart-2f0ee51d.js → cart-006b6633.js} +7 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-3ecdf234.js → paypal-86483f34.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +9 -44
- 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-empty-state-payment_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/{cart-2f0ee51d.js → cart-006b6633.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-3ecdf234.js → paypal-86483f34.js} +1 -1
- package/dist/esm-es5/zonos-address_11.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-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-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-language-select_2.entry.js +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +0 -4
- package/dist/types/types/generated/graphql.internal.types.d.ts +8 -0
- package/dist/types/types/generated/graphql.internal.types.ts +8 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-39e369f6.system.entry.js → p-06547c8c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e15061e.system.entry.js → p-0d5fe109.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4931d780.entry.js → p-1383ab6b.entry.js} +1 -1
- package/dist/zonos-elements/{p-127deab4.system.entry.js → p-2abcaaa1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de73fec0.system.js → p-3bcf2091.system.js} +1 -1
- package/dist/zonos-elements/p-3febb54a.entry.js +1 -0
- package/dist/zonos-elements/{p-5d7c9ac3.entry.js → p-4e11db81.entry.js} +1 -1
- package/dist/zonos-elements/{p-2f34e29a.js → p-63bfe67c.js} +1 -1
- package/dist/zonos-elements/{p-0fe6efef.system.entry.js → p-76468d91.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-649d3e92.entry.js → p-7b1e8a42.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e27aaff.system.entry.js → p-81bf423c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e275d241.entry.js → p-8558486d.entry.js} +1 -1
- package/dist/zonos-elements/{p-76d8844b.entry.js → p-8caac4e2.entry.js} +1 -1
- package/dist/zonos-elements/{p-dc1b3bcb.entry.js → p-9350f23a.entry.js} +1 -1
- package/dist/zonos-elements/{p-34b5ae9c.system.js → p-98753f6e.system.js} +1 -1
- package/dist/zonos-elements/{p-8df9a41b.entry.js → p-a35aab84.entry.js} +1 -1
- package/dist/zonos-elements/{p-c7f0941d.system.entry.js → p-b1970c2c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8253ae4.system.entry.js → p-bde07ab8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6ccb1b13.entry.js → p-c1173557.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a31eb14.system.js → p-c69c3219.system.js} +1 -1
- package/dist/zonos-elements/{p-4abc1b34.system.entry.js → p-d319e084.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-23752a7e.entry.js → p-ddbeb2ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-fccf8c66.system.entry.js → p-e5d4705e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
- package/dist/zonos-elements/{p-264e7688.js → p-f57b0170.js} +1 -1
- package/dist/zonos-elements/{p-139566b2.system.entry.js → p-fb75b13f.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-6b2358f2.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-c137dc82.js";export{s as setNonce}from"./p-c137dc82.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o(JSON.parse('[["p-6b2358f2",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"customerProfile":["handleCustomerProfileChange"],"clientSecret":["handleClientSecretChange"],"stripeCustomerSessionClientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-6ccb1b13",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-8df9a41b",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-b2241919",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-e91b244c",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-cf6ae7dc",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-f6e587bb",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-7bb9c330",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-dc1b3bcb",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-9f6dd86a",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-5c061a35",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-147ca395",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-2882b9f4",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-1eddec23",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-578bf5d7",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-b8d91f99",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-6096c1c5",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-6adc6e27",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-23752a7e",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":["watchIsPaymentInfoFilled"],"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-e275d241",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-649d3e92",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-ad3c5358",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-4931d780",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-76d8844b",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"shipToCountries":[32],"shippingZones":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"defaultAddress":["defaultAddressChanged"],"line1":["line1Changed"],"city":["formFieldsChanged"],"country":["formFieldsChanged"],"firstName":["formFieldsChanged"],"lastName":["formFieldsChanged"],"line2":["formFieldsChanged"],"phone":["formFieldsChanged"],"postalCode":["formFieldsChanged"],"state":["formFieldsChanged"],"addressService":["shouldEnabledCustomAddressChanged"],"shippingZones":["shippingZonesChanged"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":["suggestionsChanged"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryOptions":["onCountryOptionsChange"],"selectedCountry":["onSelectedCountryChange"],"inputValue":["onPhoneNumberChange"]}],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":["onOptionsChange"],"selectedValue":["onSelectedValueChange"],"value":["onValueChange"]}]]],["p-5d7c9ac3",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"shouldEnabledCustomAddress":[32],"isEmailError":[32],"recordedFormTypeUsed":[32]},null,{"showErrorBanner":["watchShowErrorBanner"]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as o}from"./p-c137dc82.js";export{s as setNonce}from"./p-c137dc82.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o(JSON.parse('[["p-3febb54a",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"customerProfile":["handleCustomerProfileChange"],"clientSecret":["handleClientSecretChange"],"stripeCustomerSessionClientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-c1173557",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-a35aab84",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-b2241919",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-e91b244c",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-cf6ae7dc",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["p-f6e587bb",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-7bb9c330",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-9350f23a",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-9f6dd86a",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-5c061a35",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-147ca395",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-2882b9f4",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-1eddec23",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["p-578bf5d7",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-b8d91f99",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-6096c1c5",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-6adc6e27",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-ddbeb2ec",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":["watchIsPaymentInfoFilled"],"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-8558486d",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-7b1e8a42",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-ad3c5358",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-1383ab6b",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"container":[32],"scrollTop":[32],"totalHeight":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-8caac4e2",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"shipToCountries":[32],"shippingZones":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"defaultAddress":["defaultAddressChanged"],"line1":["line1Changed"],"city":["formFieldsChanged"],"country":["formFieldsChanged"],"firstName":["formFieldsChanged"],"lastName":["formFieldsChanged"],"line2":["formFieldsChanged"],"phone":["formFieldsChanged"],"postalCode":["formFieldsChanged"],"state":["formFieldsChanged"],"addressService":["shouldEnabledCustomAddressChanged"],"shippingZones":["shippingZonesChanged"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":["suggestionsChanged"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryOptions":["onCountryOptionsChange"],"selectedCountry":["onSelectedCountryChange"],"inputValue":["onPhoneNumberChange"]}],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":["onOptionsChange"],"selectedValue":["onSelectedValueChange"],"value":["onValueChange"]}]]],["p-4e11db81",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"shouldEnabledCustomAddress":[32],"isEmailError":[32],"recordedFormTypeUsed":[32]},null,{"showErrorBanner":["watchShowErrorBanner"]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]]'),e))));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as e,H as t,F as s}from"./p-c137dc82.js";import{l as n,s as i,a as c,b as r,c as a,i as d,d as l,e as h,f as u,g as m,h as p,j as z,k as g,m as k,n as f,o as w,t as y,p as b,q as v,r as C,u as x,v as S,w as O,x as I,y as A,z as T,A as P,B as j,C as D,D as L,E as B}from"./p-2f34e29a.js";import{p as E,s as $,a as U,b as _}from"./p-264e7688.js";import{z as N,g as R,m as M}from"./p-337fab4e.js";import{h as H,l as Z,b as F,s as W,c as K,d as G,e as V,g as q,j as Y,a as Q,i as J}from"./p-0fc02cde.js";import{c as X}from"./p-b4b7f705.js";import{c as oo}from"./p-595f5dd2.js";import{g as eo}from"./p-b8d87932.js";import{i as to}from"./p-4593324c.js";import{s as so}from"./p-96d77739.js";import{_ as no,c as io,a as co,d as ro}from"./p-3f1a2d31.js";import{R as ao}from"./p-08e7107d.js";const lo=o=>{const e=o.items.map((o=>({amount:o.amount,attributes:o.attributes||[],countryOfOrigin:o.countryOfOrigin||void 0,currencyCode:o.currencyCode,description:o.description||"",imageUrl:o.imageUrl||"",itemType:o.itemType||"PHYSICAL_GOOD",measurements:o.measurements||[],name:o.name||o.description||"",productId:o.productId||"",quantity:o.quantity||0,sku:o.sku||""})))||[];return{adjustments:o.adjustments,cartItems:e}},ho=(o=!0)=>!(!n.localizationLoaded||!n.isShippableCountry&&(o&&Z("Checkout: not shippable country"),1));let uo=0;const mo=async({cartId:o,retries:e})=>{const t=q(),{errors:s,json:n}=await H("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(Z("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),mo({cartId:o,retries:e-1})):i?null:n},po='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',zo=class{constructor(e){o(this,e),this.onChangeLocaleListener=()=>{},this.isRedirectAfterOrder=!1,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||N.appearance.theme;await d({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:E()})},this.handleCartExpiredCheck=()=>{var o;if(q())return Z("Not checking for cart expiration in test mode"),!1;if(!N.checkoutSettings.defaultCartExpiration||!(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.createdAt))return!1;const e=new Date(window.Zonos.cartData.createdAt).getTime(),t=(new Date).getTime(),s=Math.floor((t-e)/1e3);return Z(`currentTime: ${t} | cartCreatedAt: ${e}`),Z(`Cart has been created for ${s/60} minutes`),!!(N.checkoutSettings.defaultCartExpiration&&s>N.checkoutSettings.defaultCartExpiration)&&(this.isCartExpired=!0,!0)},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${io}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return Z("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(Z("Payment intent exist, checking stripe payment intent status"),!n)return Z("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:c,status:r}=await l({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(Z(c?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,h.checkoutSessionId=i,u.clientSecret=n,this.setToFinishStep(r),{shouldAllowOrder:!1}):t?(Z("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(Z("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(h.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}},this.getBaseCurrencySettlementInfo=()=>{const o=h.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.appearanceSettingsOverride=void 0,this.preview=!1,this.hiddenMode=!1,this.mobile=!1,this.overrideStagingMode=void 0,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.zonosReviewRef=void 0,this.storybookPaymentStatusOverride=void 0,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.clientSecret=u.clientSecret,this.stripeCustomerSessionClientSecret=u.stripeCustomerSessionClientSecret}async initCartInfoHandler(o){m({adjustments:h.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,$("zonos-checkout-close"),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==h.step||p(),h.step="customer-info",z(),g(),null===(t=(e=N.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if("function"==typeof N.checkoutSettings.createCartId){Z('"createCartId" is provided, start building cart');const o=await N.checkoutSettings.createCartId();let e;"object"==typeof o?(Z("object detected, use cartId and prefill address from createCartId"),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),h.customerAuthenticationToken=o.customerAuthenticationToken||null):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=no(o);if(!t&&!e)return F("[ZONOS - loadZonos] invalid cart id"),null;const s=await mo({cartId:o,retries:5});return Z("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(F("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return F("Failed to build cart, please try again."),!1;if(window.Zonos.cartData=s,this.handleCartExpiredCheck())return!1;const{adjustments:n,cartItems:i}=lo(s);await m({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){if(Z("tempCartUUID is provided, start building cart"),this.handleCartExpiredCheck())return!1;const{adjustments:o,cartItems:e}=lo(window.Zonos.cartData);await m({adjustments:o,cartItems:e})}else if(N.checkoutSettings.buildCartDetail&&n.selectedCountryCode){Z("build cart detail");const o=await N.checkoutSettings.buildCartDetail({countryCode:n.selectedCountryCode,currencyCode:n.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0)).map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await m({adjustments:t,cartItems:e})}if(!h.checkoutSessionId){const o=await k();if(Z(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return h.isStagingMode||f(),await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===N.checkoutSettings.successBehavior||!!h.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=Y(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;Z(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return Z(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,Z("=== Showing order duplication confirmation","warn")}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,h.checkoutSessionId&&H("/api/zonos-elements/update-checkout-session-metadata",{body:{id:h.checkoutSessionId,metadata:[{key:"orderDuplicationConsent",value:"1"}]},method:"POST"})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||N.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=N.checkoutSettings.placeOrderButtonSelector,e=N.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;if(Z(`attach checkout ${o}`),Z(`attach checkout to always trigger international checkout selector: ${e}`),!o&&!e&&!window.Zonos.cartData)return;const t=[o,e,`#${ro}`,`#${io}`,`#${co}`].filter(Boolean);document.querySelectorAll(t.join(",")).forEach((t=>{t.getAttribute("data-zonos-checkout-attached")||(Z(`attached event to button ${o}`,"info",{button:t}),t.addEventListener("click",(async o=>{var s;const i=performance.now(),c=e&&t.matches(e),r=t.matches(`#${co}`),a=t.matches(`#${ro}`)||t.matches(`#${io}`);if(!window.Zonos.isLegacyCheckout&&(!ho()||((o=!0)=>!n.localizationLoaded||!!n.isDisabledCountry&&(o&&Z("Checkout: disabled country"),!0))())&&!c&&!r&&!a)return;o.preventDefault(),o.stopPropagation(),Z("zonos checkout button clicked");const{shouldAllowOrder:d}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(d){window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;Z("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await H("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),uo++,uo>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),u.isFetchingSession=!0,this.open=!0;try{const o=await this.buildCartAndInit();if(this.isCartExpired)throw new Error("This shopping cart is expired");if(!o)throw new Error("Error building cart");w({isPreview:this.preview,sessionTimeout:54e5}),$("zonos-checkout-start"),y({checkoutSessionId:h.checkoutSessionId,eventName:"checkout_open"});const{enabled:e}=await(async()=>{const{errors:o,json:e}=await H("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(h.shouldHideDiscountInput=!e,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=K(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:G},V()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};H("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:G},V()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId};H("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-i})}}catch(o){if(u.isFetchingSession=!1,F(o),this.isCartExpired)return;W({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:G,cartId:window.Zonos.cartId,checkoutSessionBody:b(),href:window.location.href,storeBaseUrl:(null===(s=window.Zonos.cartData)||void 0===s?void 0:s.storeBaseUrl)||N.onlineStoreSettings.url}}),v({messages:[C("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:C("Error creating Checkout")})}}}),{capture:!0,passive:!1}),N.checkoutSettings.disablePlaceOrderButtonActivation||t.removeAttribute("disabled"),t.setAttribute("data-zonos-checkout-attached","true"),t.matches(`#${ro}`)&&(t.dispatchEvent(oo("click")),r(),t.remove()),t.matches(`#${io}`)&&(t.dispatchEvent(oo("click")),t.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;Z("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:i,customerEmail:c,customerName:r,customerPhone:a,customerState:d,customerZip:l}=o,h=new URLSearchParams(window.location.search),u=i||x(h)||n.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:u,customerEmail:c,customerName:r,customerPhone:a,customerState:d,customerZip:l})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);Z("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=x(o)||n.selectedCountryCode,s=e("customerCity"),i=e("customerEmail"),c=e("customerAddress1"),r=e("customerAddress2"),a=e("customerName"),d=e("customerPhone"),l=e("customerZip"),h=e("customerState");this.applyPrefillAddress({customerAddress1:c,customerAddress2:r,customerCity:s,customerCountry:t,customerEmail:i,customerName:a,customerPhone:d,customerState:h,customerZip:l})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",i=o.customerCity||"",c=o.customerEmail||"",r=o.customerName||"",a=o.customerPhone||"",d=o.customerZip||"",l=o.customerState||"";e&&r&&a&&t?t&&n.shippingZoneCountries&&!(t in n.shippingZoneCountries)?Z(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:i||"",country:t,line1:e,line2:s,postal_code:d,state:l},email:c,name:r,phone:a}],Z("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):Z("Missing required query params so it can not be prefilled","info",[!e&&"line1",!r&&"name",!a&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){h.isStagingMode=!!this.overrideStagingMode}async init(){u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,h.isStagingMode=Q(),void 0!==this.overrideStagingMode&&(h.isStagingMode=this.overrideStagingMode),(({domesticRedirectedBtnSelector:o,onShippingAddressSessionFound:e})=>{if(!window.Zonos.isBigCommerce)return;const t=new MutationObserver((async()=>{const s=document.querySelector(o),n=i();if(!s&&n){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==e||e(n),void t.disconnect()}const d=document.querySelector('select[name="shippingAddress.countryCode"]'),l=document.querySelector("#checkout-shipping-continue");d&&l&&(t.disconnect(),l.addEventListener("click",(async o=>{var e,t;const s=d.value;if(!s)return;if(c(s),!ho(!1))return void r();const n=document.querySelector("form");if(!n)return;const i=new FormData(n),l=document.querySelector("input#addressLine1Input"),h={address1:null!==(e=i.get("shippingAddress.address1"))&&void 0!==e?e:l&&l.value,address2:i.get("shippingAddress.address2"),city:i.get("shippingAddress.city"),countryCode:i.get("shippingAddress.countryCode"),firstName:i.get("shippingAddress.firstName"),lastName:i.get("shippingAddress.lastName"),phone:i.get("shippingAddress.phone"),postalCode:i.get("shippingAddress.postalCode"),stateOrProvince:null!==(t=i.get("shippingAddress.stateOrProvince"))&&void 0!==t?t:i.get("shippingAddress.stateOrProvinceCode")};if(Object.values(h).some((o=>null==o)))return F("One or more shipping address field is missing",Object.entries(h)),void W({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(h))],metadata:{storeId:N.storeId}});a({address1:h.address1,address2:h.address2,city:h.city,countryCode:h.countryCode,firstName:h.firstName,lastName:h.lastName,phone:h.phone,postalCode:h.postalCode,state:h.stateOrProvince}),o.preventDefault(),o.stopPropagation(),window.location.href="/"})))}));t.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:ro,onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{u.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(Z("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):Z("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){h.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){S(o)}async triggerCheckoutInternational(){const o=document.querySelector(`#${co}`);o&&o.dispatchEvent(oo("click"))}async handleCustomerInfoContinue(){$("zonos-checkout-customer-info"),y({checkoutSessionId:h.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0,await O();const o=setInterval((()=>{!h.landedCostData&&u.isFetchingLandedCost||(h.landedCostData&&(U({currency:h.currency}),I()),this.submitLoading=!1,clearInterval(o))}),500)}async handleShippingContinue(){this.submitLoading=!0,setTimeout((()=>{I(),this.submitLoading=!1}),500)}handleInventoryCheckDialogConfirm(){h.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"!==u.checkoutSettlementCurrency||!u.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,_.paypalErrorMessage=null,u.hasPaymentError=!1,this.submitLoading=!0,h.inventoryCheckErrorMessage=null,!await A())return u.hasPaymentError=!0,u.customErrorMessage=C("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:u.checkoutSettlementCurrency}),void(this.submitLoading=!1);try{h.inventoryCheckErrorMessage=await T()}catch(o){h.inventoryCheckErrorMessage=C("Unable to check inventory. Please try again.")}if(h.inventoryCheckErrorMessage)this.submitLoading=!1;else{try{await P(),I(),g()}catch(o){F(o),$("zonos-checkout-payment-fail"),u.hasPaymentError=!0,u.shouldInventoryRefund&&(j(),u.shouldInventoryRefund=!1)}this.submitLoading=!1}}else this.payInUsdConfirmDialogOpen=!0}async handleFinishClick(){if(D(),this.preview)return h.step="customer-info",void await this.init();if(p(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||N.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=J(this.mobile),this.applyStripeTheme(),Z(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=J(this.mobile),this.applyStripeTheme(),Z(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=R(this.appearanceSettingsOverride.theme))}handleAddressChange(){D()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return Z("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);Z("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=u.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=u.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){Z("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=J(this.mobile),this.isIframed=window.self!==window.top,Z(`iframed: ${this.isIframed}`),this.handleAppearanceSettingsOverrideChange(),this.onChangeLocaleListener=L("selectedLocale",(()=>{this.applyStripeTheme()})),Z(`mobile: ${this.isMobile}`)}disconnectedCallback(){D(),p(),this.onChangeLocaleListener()}render(){var o,i,c,r;this.customerProfile=u.customerProfile,this.clientSecret=u.clientSecret,u.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=u.stripeCustomerSessionClientSecret);const a="finish"!==h.step&&"error"!==h.step&&!u.stripeElements||u.isFetchingSession,{colorPrimary:d,colorSecondary:l,logoUrl:m,style:p}=M(N.appearance,this.appearanceSettingsOverride||null),z="ENABLED"===N.appearance.zonosAttribution,g=N.appearance.theme,k=d&&to(d)?"DARK":"LIGHT",f=this.isMobile?g:k,w=this.isMobile?void 0:l,{customMessages:y}=n,b=null===(o=y.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,v=this.getCurrentLocalePageEnum(),x=y.filter((o=>o.pageName===v)),S=this.getBaseCurrencySettlementInfo(),O=()=>{const o=this.preview?`${m}?timestamp=${Date.now()}`:m;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${N.organizationName} logo`,src:o}))},I=q(),A=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||Q();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},O(),I&&e("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},C("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),x.map((o=>e("zonos-custom-message",{icon:po,message:o.message}))))},T=()=>h.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:C("Your checkout session has expired. Please reload the page to continue."),restStateTitle:C("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},C("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":eo({overrideBorderStyle:p})}},"finish"!==h.step&&"error"!==h.step&&e(s,null,e("div",{class:"zonos--left","data-theme":f,style:so({"--zonos--primary-color":this.isMobile?void 0:d})},!this.isMobile&&A(),"customer-info"===h.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:w}),"shipping"===h.step&&e("zonos-shipping",{continueLoading:this.submitLoading,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:w}),"payment"===h.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:w})),e("div",{class:"zonos--right","data-theme":g},this.isMobile&&A(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:ao}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:w}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:po,message:b})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:po,message:b}))))),("finish"===h.step||"error"===h.step)&&e("div",{class:"zonos--done","data-theme":g},e("div",{class:"zonos--header"},O(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:ao}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:g})),e("zonos-checkout-finish",{borderRadius:p,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===h.step&&h.error?Object.assign(Object.assign({},h.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":g,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(t,{class:X(["zonos--checkout zonos--elements",z&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?T():e("zonos-dialog",{borderStyle:p,"data-theme":g,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},T()),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:C("Don't close"),dialogConfirmBtnText:C("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:C("Would you like to close checkout and return to the site?"),dialogTitle:C("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:C("Return to merchant site"),dialogConfirmBtnText:C("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(i=this.placedOrderInfo)||void 0===i?void 0:i.zonosOrderNumber)?C("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):C("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate((null===(c=this.placedOrderInfo)||void 0===c?void 0:c.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:C("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:C("Return to cart"),dialogIntent:"danger",dialogOpen:!!h.inventoryCheckErrorMessage,dialogSubtitle:h.inventoryCheckErrorMessage,dialogTitle:C("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),S&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:B({amount:S.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:C("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:C("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:C("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:C("You are being sent back to the shop to re-add items to your cart."),dialogTitle:C("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}}};zo.style=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{zo as zonos_checkout}
|