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AK+B,MACE7a,IA/PvB8Y,EAAK2E,kBAAiB,EAkQ9B,OArQ0BC,EAAAA,EAAAA,IAAAA,EAAAA,GAMfC,EAAAA,UAAAA,sBAAP,SAA6BzI,GACzB,OAAI7W,KAAKsD,QAAUuT,GAMhByI,EAAAA,UAAAA,OAAP,WACY,IAAA3d,EAAO3B,KAAKsD,MAAK,GACzB,OAAOL,EAAAA,cAACyZ,GAAgB,WAAK1c,KAAKsD,MAAK,CAAE6L,YAAanP,KAAKke,sBAAsBvc,OAfnF2d,GAAW,SADhBzF,EAAAA,IAAQ,uCACHyF,GAAN,CAA0Brc,EAAAA","sources":["webpack://msdyn365.commerce.online/./src/actions/get-country-state.ts?3ecd","webpack://msdyn365.commerce.online/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://msdyn365.commerce.online/./src/common/components/address-error-alert.tsx?bcde","webpack://msdyn365.commerce.online/./src/common/components/address-select.tsx?c1df","webpack://msdyn365.commerce.online/./src/modules/checkout-shipping-address/components/checkout-shipping-cartlines-images.tsx?c635","webpack://msdyn365.commerce.online/./src/modules/checkout-shipping-address/checkout-shipping-address.tsx?de3a","webpack://msdyn365.commerce.online/./src/modules/checkout-shipping-address/checkout-shipping-address.view.tsx?3386","webpack://msdyn365.commerce.online/../../src/checkout-state-data-action.ts?8344","webpack://msdyn365.commerce.online/../../src/checkout-state.ts?acd8","webpack://msdyn365.commerce.online/../../../src/module-state-manager/module-state.ts?7579","webpack://msdyn365.commerce.online/../../../src/module-state-manager/with-module-state.tsx?61ca"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { getCountryRegionsAction, GetCountryRegionsInput } from './get-country-regions';\nimport { getStateProvinceAction, GetStateProvincesInput } from './get-state-provinces';\n\n/**\n * Input class for get country regions data action.\n */\nexport class GetCountryStateInput implements IActionInput {\n public locale: string;\n\n public apiSettings: ICommerceApiSettings;\n\n constructor(locale: string, apiSettings: ICommerceApiSettings) {\n this.locale = locale;\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey(`CountryStateInfo-${this.locale}`, this.apiSettings);\n\n public getCacheObjectType = () => 'StateProvinceInfo';\n\n public dataCacheType = (): CacheType => 'application';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): GetCountryStateInput => {\n const { locale, apiSettings } = inputData.requestContext;\n if (!(inputData.requestContext && locale)) {\n throw new Error('Unable to create country regions input. Locale is not provided.');\n }\n return new GetCountryStateInput(locale, apiSettings);\n};\n\nexport async function getCountryStateAction(input: GetCountryStateInput, ctx: IActionContext): Promise {\n const countryInput = new GetCountryRegionsInput(input.locale, input.apiSettings);\n const countryRegionsInfo = await getCountryRegionsAction(countryInput, ctx);\n\n const channelConfiguration = ctx.requestContext.channel;\n\n const marketISOCode = (channelConfiguration && channelConfiguration.ChannelCountryRegionISOCode) || 'US';\n const currentCountryRegion = countryRegionsInfo.find(countryRegion => (countryRegion.ISOCode || '') === marketISOCode);\n const countryRegionId = (currentCountryRegion && currentCountryRegion.CountryRegionId) || 'USA';\n\n const stateInput = new GetStateProvincesInput(countryRegionId, input.apiSettings);\n return getStateProvinceAction(stateInput, ctx);\n}\n\nexport const getCountryStateActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/address/get-country-state',\n action: >getCountryStateAction,\n input: createInput\n});\n\nexport default getCountryStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { CheckoutModule, getCheckoutState, ICheckoutState } from '@msdyn365-commerce/global-state/';\n\nexport async function focusOnCheckoutError(checkoutErrorRef: React.RefObject, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n checkoutErrorRef.current && checkoutErrorRef.current.scrollIntoView();\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * The payment error.\n */\nexport interface IPaymentError {\n title: string;\n message: string;\n className?: string;\n}\n\n/**\n * The payment error.\n * @param param0 - First param.\n * @param param0.title - Title.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const ErrorComponent: React.FC = ({ title, message, className = 'ms-checkout-payment-instrument' }) => (\n
\n

{title}

\n

{message}

\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { format, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { AddressFormat } from '../address-format';\nimport { IAddressResource } from '../address-module.data';\nimport AddressButtonComponent from './address-button';\nimport AddressInputComponent from './address-input';\nimport { AddressShow, IAddressShowProps } from './address-show';\n\nexport interface IAddressSelectInputProps {\n hasExternalSubmitGroup?: boolean;\n addressFormat: AddressFormat;\n addresses: Address[];\n addressPurposes: AddressPurpose[];\n resources: IAddressResource;\n selectedAddress: Address;\n telemetryContent?: ITelemetryContent;\n onAddressOptionChange(event: React.ChangeEvent): void;\n onAddAddress(): void;\n onSave(): void;\n onCancel(): void;\n}\n\nexport interface IAddressSelectItem {\n key: number;\n SelectItem: INodeProps;\n input: React.ReactNode;\n showItems: IAddressShowProps;\n}\n\nexport interface IAddressSelectProps {\n SelectAddress: INodeProps;\n addButton: React.ReactNode;\n items: IAddressSelectItem[];\n isShowSaveButton: boolean;\n saveButton: React.ReactNode;\n isShowCancelButton: boolean;\n cancelButton: React.ReactNode;\n}\n\nconst getInput = (index: number, address: Address, props: IAddressSelectInputProps): React.ReactNode => {\n const { addresses, onAddressOptionChange, selectedAddress, resources, addressPurposes } = props;\n const addType = address.AddressTypeValue ? addressPurposes[address.AddressTypeValue - 1].Name : '';\n const ichecked = address.RecordId === selectedAddress.RecordId;\n const additionalAttributes = {\n checked: ichecked,\n 'aria-checked': ichecked,\n 'aria-setsize': addresses.length,\n 'aria-posinset': index + 1,\n 'aria-label': format(resources.addressChangeCheckboxAriaLabel, addType)\n };\n\n return (\n \n );\n};\n\nconst getAddressSelectItems = (props: IAddressSelectInputProps): IAddressSelectItem[] => {\n const { addresses, addressFormat, addressPurposes } = props;\n\n return addresses.map((address, index) => {\n return {\n key: address.RecordId || 0,\n SelectItem: { className: 'msc-address-select__item' },\n input: getInput(index, address, props),\n showItems: AddressShow({\n addressFormat: addressFormat.getAddressFormat(address.ThreeLetterISORegionName || ''),\n address,\n addressPurposes\n })\n };\n });\n};\n\nexport const AddressSelect = (props: IAddressSelectInputProps): IAddressSelectProps => {\n const { resources, onCancel, onSave, onAddAddress, hasExternalSubmitGroup } = props;\n\n return {\n SelectAddress: { className: 'msc-address-select' },\n addButton: (\n \n ),\n isShowSaveButton: !hasExternalSubmitGroup,\n saveButton: (\n \n ),\n isShowCancelButton: !hasExternalSubmitGroup,\n cancelButton: (\n \n ),\n items: getAddressSelectItems(props)\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageProps, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICheckoutShippingAddressResources } from '../checkout-shipping-address.props.autogenerated';\n\n/**\n * The cartline product interface.\n */\nexport interface ICartLineWithProduct {\n cartLine: CartLine;\n product?: SimpleProduct;\n}\n\n/**\n * The checkout shipping cartline interface.\n */\nexport interface ICheckoutShippingCartLineInfo {\n lineId: string;\n imageProps: IImageProps;\n quantity: number;\n}\n\n/**\n * The checkout shipping cartline props.\n */\nexport interface ICheckoutShippingCartLinesProps {\n moduleClassName: string;\n cartLines: ICheckoutShippingCartLineInfo[];\n title: string;\n itemTitle: string;\n resources: ICheckoutShippingAddressResources;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Following as per module\nexport const CheckoutPickupCartLines: React.FC = ({\n moduleClassName,\n cartLines,\n title,\n itemTitle,\n resources\n}) => {\n const context = ({\n gridSettings: {\n xs: { w: 767 },\n sm: { w: 991 },\n md: { w: 1199 },\n lg: { w: 1599 },\n xl: { w: 1600 }\n }\n } as unknown) as IRequestContext;\n const isMobileCheck = isMobile({ variant: VariantType.Browser, context });\n const isMobileView = isMobileCheck === 'xs' || isMobileCheck === 'sm';\n\n if (!ArrayExtensions.hasElements(cartLines)) {\n return null;\n }\n const quantity = 1;\n return (\n
\n
\n
{title}
\n
{itemTitle}
\n
\n
\n {cartLines.map((cartLine: ICheckoutShippingCartLineInfo) => {\n const isShowQty = cartLine.quantity > quantity;\n let className = `${moduleClassName}__group-images-lines-product`;\n const role = 'text';\n if (isShowQty) {\n className = classnames(className, ' product-image-wide');\n }\n return (\n
\n \n {isMobileView\n ? isShowQty && (\n \n {cartLine.quantity}\n
\n )\n : isShowQty && (\n
\n )}\n {!isMobileView && isShowQty && (\n \n {format(resources.productQuantityInfo, cartLine.quantity, cartLine.imageProps.altText)}\n \n )}\n
\n );\n })}\n \n \n );\n};\n\n/**\n * The checkout shipping cartline image settings.\n */\nexport const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n lg: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n xl: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 }\n },\n lazyload: true,\n quality: 80\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Address,\n AddressPurpose,\n CartLine,\n CountryRegionInfo,\n SimpleProduct,\n StateProvinceInfo,\n TenderLine,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { getFallbackImageUrl, getSimpleProducts, ObjectExtensions, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, set } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AutoSuggest } from '../../common/address-autosuggest';\nimport { IAutoSuggestOptions } from '../../common/address-autosuggest.data';\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemType } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { AddressSelect, IAddressSelectProps } from '../../common/components/address-select';\nimport { AddressShow, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutShippingAddressData } from './checkout-shipping-address.data';\nimport { ICheckoutShippingAddressProps } from './checkout-shipping-address.props.autogenerated';\nimport {\n CheckoutPickupCartLines,\n defaultImageSettings,\n ICartLineWithProduct,\n ICheckoutShippingCartLineInfo,\n ICheckoutShippingCartLinesProps\n} from './components/checkout-shipping-cartlines-images';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport { ErrorComponent } from '../../common/components/address-error-alert';\nimport { focusOnCheckoutError } from '../../checkout-errors/checkout-errors';\n\n/**\n * The checkout address props interface.\n */\nexport interface ICheckoutAddressProps extends ICheckoutShippingAddressProps, IModuleStateProps {}\n\n/**\n * The checkout shipping address view state.\n */\nexport interface ICheckoutShippingAddressViewState {\n isShowAddress: boolean;\n isShowAddresList: boolean;\n isShowAddOrUpdateAddress: boolean;\n}\n\n/**\n * The checkout shipping address state.\n */\nexport interface ICheckoutAddresState {\n shippingGroups: ICartLineWithProduct[];\n errorMessage?: string;\n}\n\n/**\n * The checkout shipping address view props.\n */\nexport interface ICheckoutShippingAddressViewProps extends ICheckoutAddressProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n addressListSelectedAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: ICheckoutShippingAddressViewState;\n CheckoutShippingAddress: IModuleProps;\n isUpdating: boolean;\n hasError: boolean;\n showAddress: IAddressShowProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n cartLineImages?: React.ReactNode;\n showAddressSelect: IAddressSelectProps;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n showAddOrUpdateAddressHandler?(onSaveHandler?: () => void, onCancelHandler?: () => void): IAddressAddUpdateProps;\n showAddressSelectHandler?(\n onAddAddressHandler?: () => void,\n onSaveHandler?: () => void,\n onCancelHandler?: () => void\n ): IAddressSelectProps;\n}\n\n/**\n * IExpressPaymentDetail interface.\n */\ninterface IExpressPaymentDetails {\n email?: string;\n tenderLine?: TenderLine;\n tokenizedPaymentCard?: TokenizedPaymentCard;\n paymentTenderType?: string;\n address?: Address;\n isExpressCheckoutAppliedInCartPage: boolean;\n isExpressAddressAppliedInCartPage?: boolean;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutShippingAddress extends React.Component {\n @observable private currentOperation: AddressOperation;\n\n @observable private selectedAddress?: Address;\n\n @observable private addUpdateAddress: Address;\n\n @observable private countryRegionId: string = 'USA';\n\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n\n @observable private customerAddresses: Address[] = [];\n\n @observable private validationError: object;\n\n @observable private addressActionResponse?: IAddressResponse;\n\n @observable private isUpdating?: boolean;\n\n @observable private hasError?: boolean;\n\n @observable private addressListSelectedAddress: Address = {};\n\n private readonly addressCommon: AddressCommon;\n\n private addressFormat!: AddressFormat;\n\n private countryRegions: CountryRegionInfo[] = [];\n\n private addressPurposes: AddressPurpose[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly defaultAddressType: number = 6; // Default to Home\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private autoSuggest?: AutoSuggest;\n\n private readonly multiplePickupStoreSwitchName: string = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutAddressProps) {\n super(props);\n this.state = { shippingGroups: [] };\n const { context, data, resources, telemetry } = this.props;\n\n this.addUpdateAddress = {};\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.customerAddresses = data.address.result || [];\n this.stateProvinceInfo = data.countryStates.result || [];\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n this.validationError = {};\n this.retailMultiplePickUpOptionEnabled = data.featureState.result?.find(\n feature => feature.Name === this.multiplePickupStoreSwitchName\n )?.IsEnabled;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled, autoSuggestOptions },\n resources\n } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\n\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n\n this.props.data.checkout.then(() => {\n this._setDefaultCountryRegionId();\n this._initModuleState();\n });\n\n reaction(\n () => this.countryRegionId,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.currentOperation,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.shippingAddressFromExpressCheckout,\n () => {\n if (!this.expressPaymentDetailsFromCartPage && this._canShip()) {\n let address = this.props.data.checkout.result?.shippingAddressFromExpressCheckout;\n\n if (address?.TwoLetterISORegionName) {\n const threeLetterIsoRegionName = this.getThreeLetterIsoRegionName(address.TwoLetterISORegionName);\n\n address = { ...address, ThreeLetterISORegionName: threeLetterIsoRegionName };\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n }\n\n this._updateCurrentOperation(AddressOperation.Add, address);\n this._onAddressAddUpdateSubmit();\n }\n }\n );\n\n if (autoSuggestionEnabled) {\n if (channel && !channel.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n return;\n }\n\n if (channel && !channel.BingMapsEnabled) {\n telemetry.error('Map is disabled from HQ.');\n return;\n }\n\n const options: IAutoSuggestOptions = { ...autoSuggestOptions };\n this.autoSuggest = new AutoSuggest(\n telemetry,\n options,\n channel?.BingMapsApiKey,\n channel?.ChannelCountryRegionISOCode,\n channel?.DefaultLanguageId\n );\n\n // Customer doesn't have any address. Then add view will be loaded directly. Code for the same to handle that\n if (\n this.props.data.storeSelectorStateManager.result &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n await this.autoSuggest._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager.result?.loadMapApi &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\n async () => {\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isMapApiLoaded,\n async () => {\n await this._attachMapAutoSuggest();\n }\n );\n }\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutShippingAddress &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutShippingAddress) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n\n await this._initPickupGroup();\n }\n\n public async componentDidUpdate(): Promise {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n await this._attachMapAutoSuggest();\n }\n } else {\n this.autoSuggest?.disposeAutoSuggest();\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutAddressProps, nextState: ICheckoutAddresState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n if (!this._canShip()) {\n return null;\n }\n\n const {\n config,\n context,\n renderView,\n resources,\n moduleState: { hasError }\n } = this.props;\n const { headingImages, itemsText, singleItemText, errorMessageTitle } = resources;\n const { imageSettings } = config;\n\n // Line images\n const cartlines: ICheckoutShippingCartLineInfo[] = this.state.shippingGroups\n .filter(x => !ObjectExtensions.isNullOrUndefined(x.product))\n .map(line => ({\n lineId: line.cartLine.LineId ?? '',\n imageProps: {\n requestContext: context.actionContext.requestContext,\n className: 'ms-checkout-shipping-address__group-images-lines-line-image',\n altText: line.product?.Name,\n src: line.product?.PrimaryImageUrl ?? '',\n fallBackSrc: getFallbackImageUrl(line.product?.ItemId, context.actionContext.requestContext.apiSettings),\n gridSettings: context.request.gridSettings!,\n imageSettings: imageSettings ?? defaultImageSettings,\n loadFailureBehavior: 'empty'\n },\n quantity: line.cartLine.Quantity ?? 0\n }));\n\n const quantity = 1;\n const itemText = cartlines.length > quantity ? itemsText : singleItemText;\n\n const lineImageProps: ICheckoutShippingCartLinesProps = {\n moduleClassName: 'ms-checkout-shipping-address',\n cartLines: cartlines.filter(x => !ObjectExtensions.isNullOrUndefined(x)),\n itemTitle: `(${format(itemText, cartlines.length)})`,\n title: headingImages,\n resources: this.props.resources\n };\n\n const cartLineImages: React.ReactNode = ;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { featureState } = this.props.data;\n const isRetailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const errorMessage = this.state.errorMessage;\n\n const viewProps = {\n ...this.props,\n currentOperation: this.currentOperation,\n selectedAddress: this.selectedAddress,\n addUpdateAddress: this.addUpdateAddress,\n addressListSelectedAddress: this.addressListSelectedAddress,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n customerAddresses: this.customerAddresses,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n isUpdating: this.isUpdating,\n hasError: this.hasError,\n className: config.className,\n viewState: {\n isShowAddress: this.currentOperation === AddressOperation.Show && this.selectedAddress,\n isShowAddresList: this.currentOperation === AddressOperation.List && this.customerAddresses.length > 0,\n isShowAddOrUpdateAddress:\n this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update\n },\n CheckoutShippingAddress: {\n moduleProps: this.props,\n className: classnames('ms-checkout-shipping-address', config.className)\n },\n showAddress: this._renderShowAddress(),\n alert: hasError && errorMessage && ,\n checkoutErrorRef: this.checkoutErrorRef,\n\n /**\n * Show address select.\n * @param onAddAddressHandler - On add address click function.\n * @param onSaveHandler - On save click function.\n * @param onCancelHandler - On cancel click function.\n * @returns - Renders select address.\n */\n showAddressSelectHandler: (onAddAddressHandler?: () => void, onSaveHandler?: () => void, onCancelHandler?: () => void) =>\n this._renderSelectAddress(onAddAddressHandler, onSaveHandler, onCancelHandler),\n\n /**\n * Show add/update address.\n * @param onSaveHandler - On save click function.\n * @param onCancelHandler - On cancel click function.\n * @returns - Renders select address.\n */\n showAddOrUpdateAddressHandler: (onSaveHandler?: () => void, onCancelHandler?: () => void) =>\n this._renderAddOrUpdateAddress(onSaveHandler, onCancelHandler),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress(),\n cartLineImages: isRetailMultiplePickUpOptionEnabled ? cartLineImages : undefined,\n showAddressSelect: this._renderSelectAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Initialize pickup group.\n */\n @action\n private readonly _initPickupGroup = async (): Promise => {\n const pickupCartLines: CartLine[] = this._getCartLinesforDelivery();\n const cartLines: ICartLineWithProduct[] = [];\n\n try {\n const products = await this._getProductsByCartLines(\n this.props.data.checkout.result?.checkoutCart.cart.ChannelId || 0,\n pickupCartLines\n );\n for (const line of pickupCartLines) {\n const product: SimpleProduct | undefined = products.find(x => x.RecordId === line.ProductId);\n cartLines.push({ cartLine: line, product });\n }\n this.setState({ shippingGroups: cartLines });\n } catch (error) {\n this.props.telemetry.error(error);\n this.setState({ shippingGroups: [] });\n }\n };\n\n /**\n * On suggestion selected.\n * @param result - Suggestion result interface.\n */\n @action\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n this._clearAddressFields();\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\n const timeout = 0;\n set(this.addUpdateAddress, { Street: '' });\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\n set(this.addUpdateAddress, { CountyName: address.CountyName });\n set(this.addUpdateAddress, { City: address.City });\n set(this.addUpdateAddress, { State: address.State });\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\n\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\n setTimeout(() => {\n set(this.addUpdateAddress, { Street: address.Street });\n }, timeout);\n };\n\n /**\n * Method to clear address fields.\n */\n @action\n private readonly _clearAddressFields = (): void => {\n const addressFormatItem = this.addressFormat.getAddressFormat(\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n );\n for (const formatAddress of addressFormatItem) {\n if (\n this.addUpdateAddress[formatAddress.name] !== undefined &&\n !this.autoSuggest?.excludedAddressFields.includes(formatAddress.name)\n ) {\n this.addressFormat[formatAddress.name] = '';\n }\n }\n this._clearValidation();\n };\n\n /**\n * Method to clear validation.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n /**\n * Method data initialization.\n * @param props -The checkout address properties.\n */\n private readonly _dataInitialize = (props: ICheckoutAddressProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.address.result,\n () => {\n this.customerAddresses = data.address.result ?? [];\n }\n );\n\n reaction(\n () => data.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n\n reaction(\n () => data.featureState.result,\n () => {\n this.retailMultiplePickUpOptionEnabled = data.featureState.result?.find(\n feature => feature.Name === this.multiplePickupStoreSwitchName\n )?.IsEnabled;\n }\n );\n };\n\n /**\n * Method to get cart lines for delivery.\n * @returns The cart line collection.\n */\n private readonly _getCartLinesforDelivery = (): CartLine[] => {\n return this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(line => this._isDelivery(line)) ?? [];\n };\n\n /**\n * Method to check cart line for delivery.\n * @param line -The cart line.\n * @returns True/false as per cart line delivery mode.\n */\n private readonly _isDelivery = (line: CartLine): boolean => {\n return this._isNotPickupMode(line.DeliveryMode) && (line.FulfillmentStoreId === undefined || line.FulfillmentStoreId === '');\n };\n\n /**\n * Method to check cart line for delivery.\n * @param deliveryMode -The delivery mode.\n * @returns True/false as per cart line delivery mode.\n */\n private readonly _isNotPickupMode = (deliveryMode: string | undefined): boolean => {\n const pickupDeliveryModeCode = this.props.context.request.channel?.PickupDeliveryModeCode;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props.data;\n const retailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n if (retailMultiplePickUpOptionEnabled && deliveryMode !== undefined) {\n const pickupDeliveryMode = channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.some(\n pickupMode => pickupMode !== deliveryMode\n );\n return pickupDeliveryMode !== undefined ? pickupDeliveryMode : false;\n }\n return deliveryMode !== undefined && pickupDeliveryModeCode !== undefined && deliveryMode !== pickupDeliveryModeCode;\n };\n\n /**\n * Method to check cart line for delivery.\n * @param channelId - The channelId.\n * @param cartLines - Cart line collections.\n * @returns Collection of SimpleProduct.\n */\n private readonly _getProductsByCartLines = async (channelId: number, cartLines: CartLine[]): Promise => {\n const actionContext = this.props.context.actionContext;\n const productInputs = cartLines\n .filter(line => !ObjectExtensions.isNullOrUndefined(line.ProductId))\n .map(\n line =>\n new ProductInput(\n line.ProductId || 0,\n actionContext.requestContext.apiSettings,\n channelId,\n undefined,\n actionContext.requestContext\n )\n );\n return getSimpleProducts(productInputs, actionContext);\n };\n\n /**\n * Method to render add/update address.\n * @param onSaveHandler -- Handles onsave functionality.\n * @param onCancelHandler -- Handles oncancel functionality.\n * @returns Address app/update props.\n */\n private readonly _renderAddOrUpdateAddress = (onSaveHandler?: () => void, onCancelHandler?: () => void): IAddressAddUpdateProps => {\n const addressFormat =\n this.currentOperation === AddressOperation.Add && this.addressCommon.isAuthenticatedFlow()\n ? this.addressFormat\n : this.addressFormat;\n\n /**\n * On Cancel Button Function.\n */\n const onCancelButtonHandler = () => {\n this._resetView();\n onCancelHandler?.();\n };\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Shipping,\n addressFormat: addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n hasError: this.hasError,\n addressActionResponse: this.addressActionResponse,\n telemetryContent: this.telemetryContent,\n dropdownDisplayData: addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n\n /**\n * On Save Function.\n */\n onSave: () => {\n this.onSubmit();\n onSaveHandler?.();\n },\n\n onCancel: !this.selectedAddress && !this.addressCommon.isAuthenticatedFlow() ? () => {} : onCancelButtonHandler\n });\n };\n\n /**\n * Method to render select address.\n * @param onAddAddressHandler - To handle add address button click.\n * @param onSaveHandler - To handle save button click.\n * @param onCancelHandler - To handle cancel button click.\n * @returns Select address props.\n */\n private readonly _renderSelectAddress = (\n onAddAddressHandler?: () => void,\n onSaveHandler?: () => void,\n onCancelHandler?: () => void\n ): IAddressSelectProps => {\n /**\n * On Cancel Button Function.\n */\n const onCancelButtonHandler = () => {\n this._resetView();\n onCancelHandler?.();\n };\n return AddressSelect({\n addressFormat: this.addressFormat,\n addresses: this.customerAddresses,\n resources: this.resources,\n addressPurposes: this.addressPurposes,\n selectedAddress: this.addressListSelectedAddress,\n onAddressOptionChange: this._onAddressOptionChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n telemetryContent: this.telemetryContent,\n\n /**\n * On Add Address Function.\n */\n onAddAddress: () => {\n this._goToAddAddress();\n onAddAddressHandler?.();\n },\n\n /**\n * On Save Function.\n */\n onSave: () => {\n this._onSelectAddress();\n onSaveHandler?.();\n },\n\n onCancel: !this.selectedAddress ? () => {} : onCancelButtonHandler\n });\n };\n\n /**\n * Method to render show address.\n * @returns Show address props.\n */\n private _renderShowAddress(): IAddressShowProps | null {\n if (this.selectedAddress) {\n return AddressShow({\n address: this.selectedAddress,\n addressFormat: this.addressFormat.getAddressFormat(this.selectedAddress.ThreeLetterISORegionName || ''),\n addressPurposes: this.addressPurposes\n });\n }\n\n return null;\n }\n\n /**\n * Method to render map auto suggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.autoSuggest?.attachAutoSuggest('#shipping_addressstreet', '#shipping_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * Method gets called on address option change.\n * @param event - To get current option.\n */\n private readonly _onAddressOptionChange = (event: React.ChangeEvent) => {\n const addressRecordId = event.currentTarget.value;\n const selectedAddress = this.customerAddresses.find(address => (address.RecordId || '').toString() === addressRecordId);\n if (selectedAddress) {\n this.addressListSelectedAddress = selectedAddress;\n }\n };\n\n /**\n * Method to render map auto suggest.\n * @param name - Address name field.\n * @param value - Address name value field.\n */\n private readonly onAddressAddUpdate = (name: string, value: string | boolean) => {\n set(this.addUpdateAddress, { [name]: value });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * Method to get called on address update change.\n * @param event - Input element.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n if (event.target.type === 'checkbox') {\n this.onAddressAddUpdate(event.target.name, event.target.checked);\n } else {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n }\n };\n\n /**\n * Method to get called on address update dropdown change.\n * @param event - Select element.\n */\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\n this.onAddressAddUpdate(event.target.name, event.target.value);\n\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n this._onCountryChange(event.target.value);\n }\n };\n\n /**\n * Method to get called on address update submit.\n */\n private readonly _onAddressAddUpdateSubmit = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n return;\n }\n\n let response: Promise;\n if (this.addressCommon.isAuthenticatedFlow() && this._isNewAddress(this.addUpdateAddress)) {\n response =\n this.currentOperation === AddressOperation.Update\n ? this.addressCommon.updateCustomerAddress(this.addUpdateAddress)\n : this.addressCommon.addCustomerAddress(this.addUpdateAddress);\n } else {\n response = Promise.resolve({ address: this.addUpdateAddress });\n }\n\n this.isUpdating = true;\n this._updateModuleState();\n\n response.then(\n (result: IAddressResponse) => {\n this.isUpdating = false;\n\n let newAddress = result.address;\n newAddress = { ...newAddress, ...this.addUpdateAddress };\n\n if (result.address) {\n this.hasError = false;\n this._clearError();\n if (result.customerAddresses) {\n this._onAddOrUpdateSuccess({ customerAddresses: result.customerAddresses, address: newAddress });\n } else {\n this._onAddOrUpdateSuccess({ address: newAddress });\n }\n } else {\n this.hasError = true;\n this.addressActionResponse = result;\n this._updateModuleState();\n }\n },\n () => {\n this.hasError = true;\n this.isUpdating = false;\n this._updateModuleState();\n }\n );\n };\n\n /**\n * Method to get called on country change.\n * @param countryRegionId - Country region id.\n */\n private readonly _onCountryChange = (countryRegionId: string) => {\n this.countryRegionId = countryRegionId;\n const twoLetterIsoRegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterIsoRegionName });\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterIsoRegionName);\n this._clearAddressFields();\n };\n\n /**\n * Method to get all address format exclude list.\n * @returns Collection of address items.\n */\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\n const { config } = this.props;\n const addressFormatExcludeList: AddressItemType[] = [];\n\n if (!config.showAddressType) {\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\n }\n\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\n\n return addressFormatExcludeList;\n };\n\n /**\n * Method to get all state/provinces.\n */\n private readonly _getStateProvinces = (): void => {\n if (\n !this.countryRegionId ||\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n return;\n }\n\n this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n set(this.addUpdateAddress, { State: '' });\n }\n\n this.stateProvinceInfo = result;\n });\n };\n\n /**\n * Method to set default country region id.\n */\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * Method to get default address region id.\n * @returns - Address object from existing addresses.\n */\n private readonly _getDefaultAddress = (): Address | undefined => {\n if (this.customerAddresses) {\n const primaryAddress = this.customerAddresses.find((address: Address) => address.IsPrimary);\n return primaryAddress || (this.customerAddresses.length > 0 ? this.customerAddresses[0] : undefined);\n }\n return undefined;\n };\n\n /**\n * Method to get address from express payment details from cart page.\n * @returns - Address.\n */\n private readonly _getAddressFromCartExpressPaymentDetails = (): Address | undefined => {\n if (this.expressPaymentDetailsFromCartPage) {\n const { tokenizedPaymentCard, address, isExpressAddressAppliedInCartPage } = this.expressPaymentDetailsFromCartPage;\n\n let addressFromCartExpress: Address | undefined;\n\n if (isExpressAddressAppliedInCartPage) {\n addressFromCartExpress = address ? this.getExpressAddress(address) : undefined;\n } else {\n addressFromCartExpress = tokenizedPaymentCard ? this.getAddressFromTokenizedPaymentCard(tokenizedPaymentCard) : undefined;\n }\n\n return addressFromCartExpress;\n }\n return undefined;\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const twoLetterIsoRegionName = tokenizedPaymentCard.Country;\n\n const threeLetterIsoRegionName = twoLetterIsoRegionName ? this.getThreeLetterIsoRegionName(twoLetterIsoRegionName) : undefined;\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n\n const address: Address = {\n TwoLetterISORegionName: twoLetterIsoRegionName,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone,\n ThreeLetterISORegionName: threeLetterIsoRegionName,\n AddressTypeValue: this.defaultAddressType\n };\n\n return address;\n };\n\n /**\n * Get address from expressAddress.\n * @param expressAddress -- The expressAddress.\n * @returns The address.\n */\n private readonly getExpressAddress = (expressAddress: Address): Address => {\n const twoLetterIsoRegionName = expressAddress.TwoLetterISORegionName;\n\n const threeLetterIsoRegionName = twoLetterIsoRegionName ? this.getThreeLetterIsoRegionName(twoLetterIsoRegionName) : undefined;\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n\n const address: Address = {\n ...expressAddress,\n ThreeLetterISORegionName: threeLetterIsoRegionName,\n AddressTypeValue: this.defaultAddressType\n };\n\n return address;\n };\n\n /**\n * Get three letter ISO region name from two letter ISO region name.\n * @param twoLetterIsoRegionName -- The three letter ISO region name.\n * @returns The three letter ISO region name.\n */\n private readonly getThreeLetterIsoRegionName = (twoLetterIsoRegionName: string): string | undefined => {\n const countryRegion = this.countryRegions.find(country => {\n return country.ISOCode?.toLowerCase() === twoLetterIsoRegionName.toLowerCase();\n });\n\n return countryRegion?.CountryRegionId;\n };\n\n /**\n * Method to initialize all module state.\n */\n private readonly _initModuleState = (): void => {\n this.props.moduleState.init({\n status: this._canShip() ? 'updating' : 'disabled',\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit\n });\n\n const checkoutState = this.props.data.checkout.result;\n\n if (this._canShip()) {\n let defaultAddress;\n\n if (checkoutState?.checkoutCart.cart.ShippingAddress) {\n defaultAddress = checkoutState.checkoutCart.cart.ShippingAddress;\n } else if (this._getAddressFromCartExpressPaymentDetails()) {\n defaultAddress = this._getAddressFromCartExpressPaymentDetails();\n } else if (this._getDefaultAddress()) {\n defaultAddress = this._getDefaultAddress();\n } else {\n defaultAddress = checkoutState?.isExpressCheckoutApplied ? checkoutState.shippingAddressFromExpressCheckout : undefined;\n }\n\n if (defaultAddress && !this.addressCommon.isEmpty(defaultAddress)) {\n this._updateCurrentOperation(AddressOperation.Show, defaultAddress);\n this._setShippingAddress(defaultAddress);\n this._updateModuleState();\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: true });\n } else {\n this._updateCurrentOperation(AddressOperation.Add);\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: false });\n }\n }\n };\n\n /**\n * Method get called on submit address.\n */\n private readonly onSubmit = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Shipping address submit for Add or Update operation.');\n this._onAddressAddUpdateSubmit();\n break;\n case AddressOperation.List:\n this.props.telemetry.information('Shipping address submit for List operation.');\n this._onSelectAddress();\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * Method get called on cancel.\n */\n private readonly onCancel = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Shipping address cancel for Add or Update operation.');\n this._clearAddressFields();\n if (!(!this.selectedAddress && !this.addressCommon.isAuthenticatedFlow())) {\n this._resetView();\n }\n\n break;\n case AddressOperation.List:\n this.props.telemetry.information('Shipping address cancel for List operation.');\n if (this.selectedAddress) {\n this._resetView();\n }\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * Method get called on edit address.\n */\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Shipping address onEdit is called.');\n\n if (this.addressCommon.isAuthenticatedFlow() && this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.List, this.shippingAddress);\n } else if (this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.Update, this.shippingAddress);\n }\n\n this._updateModuleState();\n };\n\n /**\n * Method to check if checkout cartlines are available fro shipping.\n * @returns - True/false as per the delivery mode.\n */\n private readonly _canShip = (): boolean => {\n const { checkout, channelDeliveryOptionConfig } = this.props.data;\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n if (!checkout.result || !request.channel || checkout.result.checkoutCart.isEmpty || checkout.result.checkoutCart.hasInvoiceLine) {\n return false;\n }\n\n // @ts-expect-error: Type-checker not realizing above request.channel check\n return this.retailMultiplePickUpOptionEnabled\n ? checkout.result.checkoutCart.cart.CartLines?.some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : checkout.result.checkoutCart.cart.CartLines?.some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n /**\n * Method get called on select address.\n */\n private readonly _onSelectAddress = () => {\n this._updateCurrentOperation(AddressOperation.Show, this.addressListSelectedAddress);\n this._setShippingAddress(this.addressListSelectedAddress);\n this._updateModuleState();\n };\n\n /**\n * Method get called on goto add address.\n */\n private readonly _goToAddAddress = () => {\n this._setDefaultCountryRegionId();\n this._updateCurrentOperation(AddressOperation.Add);\n };\n\n /**\n * Method get called on add/update success.\n * @param response - Retail api response.\n */\n private readonly _onAddOrUpdateSuccess = (response: IAddressResponse) => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n\n if (response.address) {\n this._updateCurrentOperation(AddressOperation.Show, response.address);\n this._setShippingAddress(response.address);\n this._updateModuleState();\n }\n };\n\n /**\n * Method get called on set Shipping Address.\n * @param address - Retail Api address result.\n */\n private readonly _setShippingAddress = (address: Address): void => {\n if (this.props.data.checkout.result) {\n const newShippingAddress = { ...address };\n\n if (address.ThreeLetterISORegionName && !newShippingAddress.TwoLetterISORegionName) {\n newShippingAddress.TwoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(address.ThreeLetterISORegionName);\n }\n\n this.props.data.checkout.result.updateShippingAddress({ newShippingAddress });\n this.props.data.checkout.result.checkoutCart.updateShippingAddress({ newShippingAddress }).catch(error => {\n this.props.telemetry.error(error);\n });\n }\n };\n\n @computed private get shippingAddress(): Address | undefined {\n return this.props.data.checkout.result?.shippingAddress;\n }\n\n /**\n * Method get called on reset view.\n */\n private readonly _resetView = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this._updateCurrentOperation(\n this.addressCommon.isAuthenticatedFlow() ? AddressOperation.List : AddressOperation.Show,\n this.shippingAddress\n );\n break;\n default:\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n }\n this._updateModuleState();\n };\n\n /**\n * Update current operation.\n * @param operation - The address operation.\n * @param selectedAddress - The selected address.\n */\n private readonly _updateCurrentOperation = (operation: AddressOperation, selectedAddress?: Address) => {\n this.currentOperation = operation;\n this.selectedAddress = selectedAddress;\n\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n this.addUpdateAddress = { ...this.selectedAddress } || {};\n set(this.addUpdateAddress, {\n ThreeLetterISORegionName: this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n });\n set(this.addUpdateAddress, {\n AddressTypeValue: this.addUpdateAddress.AddressTypeValue || this.defaultAddressType\n });\n } else if (this.currentOperation === AddressOperation.List) {\n this.addressListSelectedAddress = { ...this.selectedAddress } || {};\n }\n };\n\n /**\n * Update module state.\n */\n private readonly _updateModuleState = () => {\n if (this.currentOperation === AddressOperation.Show) {\n this.props.moduleState.onReady();\n } else if (this.isUpdating) {\n this.props.moduleState.onPending();\n } else {\n this.props.moduleState.onUpdating();\n }\n };\n\n /**\n * Method to check if the customer already has the address.\n * @param address - The address.\n */\n private readonly _isNewAddress = (address: Address): boolean => {\n for (const existingAddress of this.customerAddresses) {\n if (\n (address.Name ?? '') === existingAddress.Name &&\n (address.Street ?? '') === existingAddress.Street &&\n (address.StreetNumber ?? '') === existingAddress.StreetNumber &&\n (address.City ?? '') === existingAddress.City &&\n (address.State ?? '') === existingAddress.State &&\n (address.ZipCode ?? '') === existingAddress.ZipCode &&\n (address.Phone ?? '') === existingAddress.Phone &&\n (address.ThreeLetterISORegionName ?? '') === existingAddress.ThreeLetterISORegionName &&\n (address.AddressTypeValue ?? '') === existingAddress.AddressTypeValue\n ) {\n return false;\n }\n }\n\n return true;\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutShippingAddress;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IAddressSelectItem, IAddressSelectProps } from '../../common/components/address-select';\nimport { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutShippingAddressViewProps } from './checkout-shipping-address';\n\n/**\n * Address show component.\n * @param param0 - Root param.\n * @param param0.AddressDetail - Address detail.\n * @param param0.items - IAddressShowItem[].\n * @returns - Address Node.\n */\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\n return (\n \n {items.map((item: IAddressShowItem) => {\n return <>{item.description};\n })}\n \n );\n};\n\n/**\n * Address Select Component.\n * @param param0 - Root param.\n * @param param0.SelectAddress - Select address.\n * @param param0.addButton - Add button.\n * @param param0.items - IAddressSelectItem[].\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns - SelectAddress Node.\n */\nconst AddressSelect: React.FC = ({\n SelectAddress,\n addButton,\n items,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {addButton}\n {items.map((item: IAddressSelectItem) => {\n const SelectItem = item.SelectItem;\n return (\n \n {item.input}\n \n \n );\n })}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Address Add Update Component.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - Error message.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns Address add update component node.\n */\nconst AddressAddUpdate: React.FC = ({\n AddressForm,\n heading,\n items,\n hasError,\n error,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Checkout Shipping Address View Component.\n * @param props - Props.\n * @returns - CheckoutShippingAddress Module.\n */\nconst CheckoutShippingAddressView: React.FC = props => {\n const {\n CheckoutShippingAddress,\n checkoutErrorRef,\n alert,\n viewState,\n showAddress,\n showAddressSelect,\n showAddOrUpdateAddress,\n cartLineImages\n } = props;\n\n return (\n \n {alert}\n {cartLineImages}\n {viewState.isShowAddress && }\n {viewState.isShowAddresList && }\n {viewState.isShowAddOrUpdateAddress && }\n \n );\n};\n\nexport default CheckoutShippingAddressView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { CheckoutState } from './checkout-state';\n\n/**\n * CheckoutState - action input.\n */\nexport class CheckoutStateInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey('CheckoutState', this.apiSettings);\n\n public getCacheObjectType = () => 'CheckoutState';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CheckoutState - action.\n * @param input\n * @param ctx\n */\nexport async function checkoutStateAction(input: CheckoutStateInput, ctx: IActionContext): Promise {\n return new CheckoutState();\n}\n\n/**\n * CheckoutState - create new input for create action.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\n return new CheckoutStateInput(inputData.requestContext.apiSettings);\n};\n\n/**\n * CheckoutState - create action.\n */\nexport const checkoutStateActionDataAction = createObservableDataAction({\n action: >checkoutStateAction,\n input: createInput\n});\n\nexport default checkoutStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, GiftCard, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { action, computed, observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class CheckoutState {\n @observable private _tokenizedPaymentCard: TokenizedPaymentCard | undefined;\n\n @computed public get tokenizedPaymentCard(): Readonly | undefined {\n return this._tokenizedPaymentCard;\n }\n\n @observable private _tenderLine: TenderLine | undefined;\n\n @computed public get tenderLine(): Readonly | undefined {\n return this._tenderLine;\n }\n\n @observable private _billingAddress: Address | undefined;\n\n @computed public get billingAddress(): Readonly
| undefined {\n return this._billingAddress;\n }\n\n @observable private _shippingAddress: Address | undefined;\n\n @computed public get shippingAddress(): Readonly
| undefined {\n return this._shippingAddress;\n }\n\n @observable private _cardPrefix: string | undefined;\n\n @computed public get cardPrefix(): Readonly | undefined {\n return this._cardPrefix;\n }\n\n @observable private _giftCards: GiftCard[] = [];\n\n @computed public get giftCards(): readonly GiftCard[] {\n return this._giftCards;\n }\n\n @observable private _giftCardExtends: IGiftCardExtend[] = [];\n\n @computed public get giftCardExtends(): readonly IGiftCardExtend[] {\n return this._giftCardExtends;\n }\n\n @observable private _loyaltyCardNumber?: string;\n\n @computed public get loyaltyCardNumber(): Readonly | undefined {\n return this._loyaltyCardNumber;\n }\n\n @observable private _loyaltyAmount: number = 0;\n\n @computed public get loyaltyAmount(): Readonly | number {\n return this._loyaltyAmount;\n }\n\n @observable private _guestCheckoutEmail: string = '';\n\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\n }\n\n @observable private _isTermsAndConditionAccepted: boolean = false;\n\n @computed public get isTermsAndConditionAccepted(): Readonly | boolean {\n return this._isTermsAndConditionAccepted;\n }\n\n @observable private _customerAccountAmount: number = 0;\n\n @computed public get customerAccountAmount(): Readonly | number {\n return this._customerAccountAmount;\n }\n\n @action\n public updateTokenizedPaymentCard(newTokenizedPaymentCard: TokenizedPaymentCard): void {\n this._tokenizedPaymentCard = newTokenizedPaymentCard;\n }\n\n @action\n public updateTenderLine(newTenderLine: TenderLine | undefined): void {\n this._tenderLine = newTenderLine;\n }\n\n @action\n public updateShippingAddress(newShippingAddress: Address): void {\n this._shippingAddress = newShippingAddress;\n }\n\n @action\n public updateBillingAddress(newBillingAddress: Address): void {\n this._billingAddress = newBillingAddress;\n }\n\n @action\n public updateCardPrefix(newCardPrefix: string): void {\n this._cardPrefix = newCardPrefix;\n }\n\n @action\n public removeGiftCard(giftCardNumber: string): void {\n this._giftCards = this._giftCards.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public removeGiftCardExtend(giftCardNumber: string): void {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public addGiftCard(giftCard: GiftCard): void {\n this._giftCards = [giftCard, ...this._giftCards];\n }\n\n @action\n public addGiftCardExtend(giftCard: IGiftCardExtend): void {\n this._giftCardExtends = [giftCard, ...this._giftCards];\n }\n\n @action\n public updateLoyaltyCardNumber(newLoyaltyCardNumber: string): void {\n this._loyaltyCardNumber = newLoyaltyCardNumber;\n }\n\n @action\n public updateLoyaltyAmount(newAmount: number): void {\n this._loyaltyAmount = newAmount;\n }\n\n @action\n public updateGuestCheckoutEmail(newGuestCheckoutEmail: string): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\n }\n\n @action\n public updateTermsAndConditionsAcceptance(newIsTermsAndConditionAccepted: boolean): void {\n this._isTermsAndConditionAccepted = newIsTermsAndConditionAccepted;\n }\n\n @action\n public updateCustomerAccountAmount(newAmount: number): void {\n this._customerAccountAmount = newAmount;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n public getCacheKey = () => 'ModuleState';\n\n public getCacheObjectType = () => 'ModuleState';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n const cacheKey = new ModuleStatesCacheKey();\n\n let moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n if (moduleStates) {\n return moduleStates;\n }\n ctx.update(cacheKey, {});\n moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n const cacheKey = new ModuleStatesCacheKey();\n ctx.update(cacheKey, value);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState =

(WrappedComponent: React.ComponentType

): React.ComponentType

=> {\n /**\n *\n * ModuleState component.\n * @extends {React.Component

}\n */\n @observer\n class ModuleState extends React.Component

{\n constructor(props: P) {\n super(props);\n this.initializeState();\n }\n\n public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { id } = this.props;\n return ;\n }\n\n private readonly initializeState = (): void => {\n const { id, typeName, context } = this.props;\n const states = getModuleStates(context.actionContext);\n if (!states) {\n this.props.telemetry.error('withModuleState initializeState() - states not found');\n return;\n }\n\n if (states[id]) {\n // State has been initialized\n return;\n }\n\n updateModuleStates(\n {\n ...states,\n [id]: {\n id,\n typeName,\n hasInitialized: false,\n hasError: false,\n isRequired: true,\n isCancellable: true,\n isSubmitContainer: false,\n status: undefined,\n childIds: []\n }\n },\n context.actionContext\n );\n };\n\n /**\n * GetModuleStateManager\n * Get module state manager by id.\n * @param id\n */\n private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n const moduleState = this.get()[id];\n return {\n ...moduleState!,\n hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n hasError: this.validate(id, { hasError: true }), // Partial has error is error\n isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n hasModuleState: this.hasModuleState(id),\n setIsRequired: (value: boolean): void => {\n this.update(id, { isRequired: value });\n },\n setIsCancellable: (value: boolean): void => {\n this.update(id, { isCancellable: value });\n },\n setIsSubmitContainer: (value: boolean): void => {\n this.update(id, { isSubmitContainer: value });\n },\n setHasError: (value: boolean): void => {\n this.update(id, { hasError: value });\n },\n onReady: (): void => {\n this.update(id, { status: 'ready' });\n },\n onUpdating: (): void => {\n this.update(id, { status: 'updating' });\n },\n onPending: (): void => {\n this.update(id, { status: 'pending' });\n },\n onSkip: (): void => {\n this.update(id, { status: 'skipped' });\n },\n onDisable: (): void => {\n this.update(id, { status: 'disabled' });\n },\n getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n init: (options?: Partial): void => {\n if (moduleState?.hasInitialized) {\n // State has been initialized\n return;\n }\n this.update(id, {\n hasInitialized: true,\n ...options\n });\n }\n };\n };\n\n /**\n * GetModuleStateManagerByTypeName\n * Get module state manager by type name.\n * @param typeName\n */\n private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n const moduleStates = getModuleStates(this.props.context.actionContext);\n const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n return this.getModuleStateManager((moduleState && moduleState.id) || '');\n };\n\n /**\n * Get\n * Get all module states.\n */\n private readonly get = (): IModuleStates => {\n return getModuleStates(this.props.context.actionContext);\n };\n\n /**\n * Update\n * Update module state.\n * @param id\n * @param value\n */\n private readonly update = (id: string, value: Partial): void => {\n // Console.log('withModuleState - update', id, value);\n const modules = this.get();\n if (!modules[id]) {\n this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n return;\n }\n modules[id] = {\n ...modules[id]!,\n ...value\n };\n };\n\n private readonly _validateLeaf = (id: string, source: Partial): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n return isMatch(module, source);\n };\n\n private readonly _validateContainer = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n // Module doesn't has module state\n return !!allMatched;\n }\n\n if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n // Skip disabled or skipped modules\n return !!allMatched;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n let childIds = module.childIds;\n\n if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n }\n\n // It is container module\n const method = allMatched ? 'every' : 'some';\n return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n if (!moduleId.includes(sectionContainerModuleId)) {\n return false;\n }\n\n const modules = this.get();\n const module = modules[moduleId];\n\n if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Validate\n * Validate current module and all its child module match the provided condition.\n * @param id\n * @param source\n * @param allMatched\n * @param skipSkippableItem\n */\n private readonly validate = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n // It is container module\n return this._validateContainer(id, source, allMatched, skipSkippableItem);\n };\n\n /**\n * HasExternalSubmitGroup\n * Module will use external submit group.\n */\n private readonly hasExternalSubmitGroup = (): boolean => {\n return !!this.props.enableControl;\n };\n\n /**\n * HasModuleState\n * Module is using module state manager.\n * @param id\n */\n private readonly hasModuleState = (id: string): boolean => {\n const modules = this.get();\n const module = modules[id];\n return !!module;\n };\n }\n\n return ModuleState;\n};\n\nexport default withModuleState;\n"],"names":["GetCountryStateInput","constructor","locale","apiSettings","getCacheKey","buildCacheKey","this","getCacheObjectType","dataCacheType","async","getCountryStateAction","input","ctx","countryInput","GetCountryRegionsInput","countryRegionsInfo","getCountryRegionsAction","channelConfiguration","requestContext","channel","marketISOCode","ChannelCountryRegionISOCode","currentCountryRegion","find","countryRegion","ISOCode","countryRegionId","CountryRegionId","stateInput","GetStateProvincesInput","getStateProvinceAction","getCountryStateActionDataAction","createObservableDataAction","id","action","inputData","Error","focusOnCheckoutError","checkoutErrorRef","checkoutState","getCheckoutState","catch","error","telemetry","exception","current","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","CheckoutModule","None","ErrorComponent","title","message","className","React","role","getInput","index","address","props","addresses","onAddressOptionChange","selectedAddress","resources","addressPurposes","addType","AddressTypeValue","Name","ichecked","RecordId","additionalAttributes","checked","length","format","addressChangeCheckboxAriaLabel","AddressInputComponent","name","type","value","toString","onChange","additionalAddributes","telemetryContent","getAddressSelectItems","addressFormat","map","key","SelectItem","showItems","AddressShow","getAddressFormat","ThreeLetterISORegionName","AddressSelect","onCancel","onSave","onAddAddress","hasExternalSubmitGroup","SelectAddress","addButton","AddressButtonComponent","text","addressAddButtonText","ariaLabel","addressAddButtonAriaLabel","onClick","isShowSaveButton","saveButton","addressSaveButtonText","addressSaveButtonAriaLabel","isShowCancelButton","cancelButton","addressCancelButtonText","addressCancelButtonAriaLabel","items","CheckoutPickupCartLines","moduleClassName","cartLines","itemTitle","isMobileCheck","isMobile","variant","VariantType","Browser","context","gridSettings","xs","w","sm","md","lg","xl","isMobileView","ArrayExtensions","hasElements","cartLine","isShowQty","quantity","classnames","lineId","Image","imageProps","productQuantityInfo","altText","defaultImageSettings","viewports","q","h","lazyload","quality","CheckoutShippingAddress","super","customerAddresses","addressListSelectedAddress","countryRegions","defaultAddressType","multiplePickupStoreSwitchName","retailMultiplePickUpOptionEnabled","_initPickupGroup","pickupCartLines","_getCartLinesforDelivery","products","_getProductsByCartLines","data","checkout","result","checkoutCart","cart","ChannelId","line","product","x","ProductId","push","setState","shippingGroups","_onSuggestionSelected","_clearAddressFields","getTranformedAddress","stateProvinceInfo","set","addUpdateAddress","Street","ZipCode","CountyName","City","State","DistrictName","FullAddress","setTimeout","addressFormatItem","formatAddress","undefined","autoSuggest","excludedAddressFields","includes","_clearValidation","validationError","_dataInitialize","reaction","countryStates","featureState","feature","IsEnabled","CartLines","filter","_isDelivery","_isNotPickupMode","DeliveryMode","FulfillmentStoreId","deliveryMode","pickupDeliveryModeCode","request","PickupDeliveryModeCode","channelDeliveryOptionConfig","pickupDeliveryMode","PickupDeliveryModeCodes","some","pickupMode","channelId","actionContext","productInputs","ObjectExtensions","isNullOrUndefined","ProductInput","getSimpleProducts","_renderAddOrUpdateAddress","onSaveHandler","onCancelHandler","currentOperation","AddressOperation","Add","addressCommon","isAuthenticatedFlow","AddressAddUpdate","isUpdating","addressType","AddressType","Shipping","defaultCountryRegionId","hasError","addressActionResponse","dropdownDisplayData","getPrefilledAddressDropdownData","addressStateDefaultSelectionText","onInputChange","_onAddressAddUpdateInputChange","onDropdownChange","_onAddressAddUpdateDropdownChange","moduleState","onSubmit","_resetView","_renderSelectAddress","onAddAddressHandler","_onAddressOptionChange","_goToAddAddress","_onSelectAddress","_attachMapAutoSuggest","storeSelectorStateManager","isMapApiLoaded","attachAutoSuggest","event","addressRecordId","currentTarget","onAddressAddUpdate","validateAddressFormat","target","replace","RegExp","AddressItemType","_onCountryChange","_onAddressAddUpdateSubmit","response","_isNewAddress","Update","updateCustomerAddress","addCustomerAddress","Promise","resolve","_updateModuleState","then","newAddress","_clearError","_onAddOrUpdateSuccess","twoLetterIsoRegionName","getTwoLetterISORegionName","TwoLetterISORegionName","changeAutoSuggestionCountryCode","_getAddressFormatExcludeList","config","addressFormatExcludeList","showAddressType","IsPrimary","_getStateProvinces","getStateProvinces","state","StateId","_getDefaultAddress","_getAddressFromCartExpressPaymentDetails","expressPaymentDetailsFromCartPage","tokenizedPaymentCard","isExpressAddressAppliedInCartPage","addressFromCartExpress","getExpressAddress","getAddressFromTokenizedPaymentCard","Country","threeLetterIsoRegionName","getThreeLetterIsoRegionName","NameOnCard","Address1","StreetNumber","Address2","Zip","Phone","expressAddress","country","toLowerCase","_initModuleState","init","status","_canShip","onEdit","defaultAddress","ShippingAddress","isExpressCheckoutApplied","shippingAddressFromExpressCheckout","isEmpty","_updateCurrentOperation","Show","_setShippingAddress","updateHasShippingAddress","newHasShippingAddress","information","List","shippingAddress","emailDeliveryModeCode","EmailDeliveryModeCode","hasInvoiceLine","_setDefaultCountryRegionId","newShippingAddress","updateShippingAddress","operation","onReady","onPending","onUpdating","existingAddress","_setErrorMessage","errorMessage","setHasError","AddressCommon","AddressFormat","AddressMetaData","getTelemetryObject","telemetryPageName","friendlyName","autoSuggestionEnabled","autoSuggestOptions","BingMapsApiKey","BingMapsEnabled","options","AutoSuggest","DefaultLanguageId","_loadMapAPI","loadMapApi","shouldEnableCheckoutErrorDisplayMessaging","checkoutError","errorLocation","ErrorLocation","checkoutErrorFocus","disposeAutoSuggest","shouldComponentUpdate","nextProps","nextState","render","renderView","headingImages","itemsText","singleItemText","errorMessageTitle","imageSettings","cartlines","LineId","src","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","ItemId","loadFailureBehavior","Quantity","itemText","lineImageProps","cartLineImages","isRetailMultiplePickUpOptionEnabled","viewState","isShowAddress","isShowAddresList","isShowAddOrUpdateAddress","moduleProps","showAddress","_renderShowAddress","alert","showAddressSelectHandler","showAddOrUpdateAddressHandler","showAddOrUpdateAddress","showAddressSelect","properties","ExtensionProperties","property","Key","Value","StringValue","JSON","parse","market","getDefaultCountryRegionId","__decorate","observable","computed","withModuleState","observer","AddressDetail","Node","item","description","AddressForm","heading","AddressItem","label","AddressError","Module","ref","_this","CheckoutState","CheckoutStateInput","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_isTermsAndConditionAccepted","_customerAccountAmount","Object","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","newTokenizedPaymentCard","newTenderLine","newBillingAddress","newCardPrefix","giftCardNumber","giftCard","Id","newLoyaltyCardNumber","newAmount","newGuestCheckoutEmail","newIsTermsAndConditionAccepted","getModuleStates","cacheKey","ModuleStatesCacheKey","moduleStates","get","update","WrappedComponent","_super","typeName","states","hasInitialized","isRequired","isCancellable","isSubmitContainer","childIds","validate","isReady","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","onSkip","onDisable","getModule","moduleId","getModuleStateManager","getModuleByTypeName","getModuleStateManagerByTypeName","values","_moduleState","modules","source","module","isMatch","allMatched","skipSkippableItem","_validateLeaf","app","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","_validateContainer","enableControl","initializeState","__extends","ModuleState"],"sourceRoot":""}