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tE,OACIS,EAAAA,cAACmW,EAAAA,KAAIhW,OAAAC,OAAA,GAAK8V,GACLnU,EAAMC,KAAKoU,GACDpW,EAAAA,cAAAA,EAAAA,SAAA,KAAGoW,EAAKC,iBAoBzBpN,EAAqDqN,IAUtD,IAVuD,YACxDC,EAAW,QACXxV,EAAO,MACPgB,EAAK,SACLyP,EAAQ,MACRxO,EAAK,iBACLwT,EAAgB,WAChBC,EAAU,mBACVC,EAAkB,aAClBC,GACHL,EACG,OACItW,EAAAA,cAACmW,EAAAA,KAAIhW,OAAAC,OAAA,GAAKmW,GACLxV,EACAgB,EAAMC,KAAKoU,IACR,MAAM,YAAEQ,EAAW,IAAEjU,EAAG,MAAEkU,EAAK,MAAEhF,EAAK,MAAEiF,GAAUV,EAClD,OACIpW,EAAAA,cAACmW,EAAAA,KAAIhW,OAAAC,OAAA,GAAKwW,EAAW,CAAEjU,IAAKA,IACvBkU,EACAhF,EACAiF,MAIZtF,GACGxR,EAAAA,cAACmW,EAAAA,KAAIhW,OAAAC,OAAA,GAAK4C,EAAM+T,cACX/T,EAAME,MACNF,EAAMI,SAGdoT,GAAoBC,EACpBC,GAAsBC,IAiCnC,EAvB+E7V,IAC3E,MAAM,uBACFsF,EAAsB,iBACtBM,EAAgB,MAChBmL,EAAK,UACLH,EAAS,QACT3Q,EAAO,uBACPiR,EAAsB,YACtBG,EAAW,uBACXE,GACAvR,EAEJ,OACId,EAAAA,cAACgX,EAAAA,OAAM7W,OAAAC,OAAA,GAAKgG,EAAsB,CAAE6Q,IAAKvQ,IACpC3F,EACA8Q,EACAH,EAAUzC,8BAAgC+C,EAC1CN,EAAU3C,eAAiB/O,EAAAA,cAAC6C,EAAW1C,OAAAC,OAAA,GAAK+R,IAC5CT,EAAU1C,0BAA4BhP,EAAAA,cAACiJ,EAAgB9I,OAAAC,OAAA,GAAKiS","sources":["webpack://@msdyn365-commerce-partners/fabrikam/./src/common/components/address-billing-checkbox.tsx?4008","webpack://@msdyn365-commerce-partners/fabrikam/./src/common/components/address-billing-heading.tsx?7bbd","webpack://@msdyn365-commerce-partners/fabrikam/./src/common/components/address-list.tsx?a628","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/checkout-billing-address/checkout-billing-address.tsx?2aa0","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/checkout-billing-address/checkout-billing-address.view.tsx?b194"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport AddressInputComponent from './address-input';\n\nexport interface IAddressBillingCheckbox {\n isChecked: boolean;\n value: string;\n ariaLabel: string;\n text: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\nexport const AddressBillingCheckbox: React.FC = ({\n isChecked,\n value,\n ariaLabel,\n text,\n telemetryContent,\n onChange\n}) => {\n const additionalAttributes = {\n checked: isChecked,\n 'aria-checked': isChecked\n };\n\n return (\n \n );\n};\nexport default AddressBillingCheckbox;\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\nexport interface IAddressBillingHeading {\n text: string;\n}\n\nexport const AddressBillingHeading: React.FC = ({ text }) => (\n

{text}

\n);\n\nexport default IAddressBillingHeading;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Heading as HeadingData } from '@msdyn365-commerce-modules/data-types';\nimport { Heading, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { AddressFormat } from '../address-format';\nimport { IAddressResource, IAddressResponse } from '../address-module.data';\nimport AddressButtonComponent from './address-button';\nimport AddressErrorMessageComponent from './address-error-message';\nimport AddressErrorTitleComponent from './address-error-title';\nimport { AddressShow, IAddressShowProps } from './address-show';\n\nexport interface IAddressListError {\n Error: INodeProps;\n isShowError: boolean;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAddressListItem {\n Item: INodeProps;\n key: number;\n error: IAddressListError;\n showItems: IAddressShowProps;\n isShowPrimaryButton: boolean;\n primaryButton: React.ReactNode;\n editButton: React.ReactNode;\n removeButton: React.ReactNode;\n}\n\nexport interface IAddressList {\n List: INodeProps;\n isShowList: boolean;\n heading: React.ReactNode;\n items: IAddressListItem[];\n}\n\nexport interface IAddressListProps {\n ListAddress: INodeProps;\n heading: React.ReactNode;\n isShowEmptyListMessage: boolean;\n emptyListMessage: React.ReactNode;\n addButton: React.ReactNode;\n primaryAddressList: IAddressList;\n otherAddressList: IAddressList;\n}\n\nexport interface IAddressListInputProps {\n isUpdating?: boolean;\n selectedAddress?: Address;\n addressFormat: AddressFormat;\n addresses: Address[];\n addressPurposes: AddressPurpose[];\n heading?: HeadingData;\n primaryAddressSectionHeading?: HeadingData;\n otherAddressSectionHeading?: HeadingData;\n addressActionResponse?: IAddressResponse;\n resources: IAddressResource;\n contextRequest: Msdyn365.IRequestContext;\n telemetryContent?: ITelemetryContent;\n handleLineItemHeadingChange?(event: Msdyn365.ContentEditableEvent): void;\n onAddAddress(): void;\n onEditAddress(address?: Address): void;\n onRemoveAddress(address?: Address): void;\n onUpdatePrimaryAddress(address: Address): void;\n canRenderAsyncCustomerDataAsUnmodifiable?: boolean;\n isAsyncCustomer?: boolean;\n isAsyncCustomerAddressCreationFeatureEnabled?: boolean;\n isEditAsyncCustomerFeatureEnabled?: boolean;\n}\n\nconst getButtonAriaLabel = (ariaLabel: string, addressName?: string): string => {\n return ariaLabel.replace('{addressName}', addressName || '');\n};\n\nconst getAddressList = (\n className: string,\n addresses: Address[],\n showPrimaryButton: boolean,\n props: IAddressListInputProps,\n heading?: HeadingData\n): IAddressList => {\n const {\n resources,\n isUpdating,\n addressActionResponse,\n selectedAddress,\n addressFormat,\n onEditAddress,\n onRemoveAddress,\n onUpdatePrimaryAddress,\n addressPurposes,\n telemetryContent\n } = props;\n const { errorTitle = null, errorMessage = null } = addressActionResponse || {};\n\n return {\n List: { className },\n isShowList: addresses.length > 0,\n heading: heading && ,\n items: addresses.map(\n (address: Address): IAddressListItem => {\n const isSelectedAddress = selectedAddress && selectedAddress.RecordId === address.RecordId;\n const isShowError = isSelectedAddress && errorTitle && errorMessage;\n\n // Disable 'primary', 'edit', and 'remove' buttons if the customer IS EITHER async OR async address creation feature is enabled and edit async customer feature is disabled.\n // Conversely, these buttons can only be enabled when the customer is NOT async AND the address creation feature is disabled.\n const isInvalidAsyncState: boolean =\n props.isEditAsyncCustomerFeatureEnabled || false\n ? false\n : (props.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (props.isAsyncCustomer || false || props.isAsyncCustomerAddressCreationFeatureEnabled || false);\n\n return {\n Item: { className: `${className}-list` },\n key: address.RecordId || 0,\n showItems: AddressShow({\n addressFormat: addressFormat.getAddressFormat(address.ThreeLetterISORegionName || ''),\n address,\n addressPurposes\n }),\n error: {\n Error: { className: `${className}-error` },\n isShowError: !!isShowError,\n title: ,\n message: \n },\n isShowPrimaryButton: showPrimaryButton,\n\n primaryButton: (\n {\n onUpdatePrimaryAddress(address);\n }\n }}\n />\n ),\n editButton: (\n {\n onEditAddress(address);\n },\n role: 'link'\n }}\n />\n ),\n removeButton: (\n {\n onRemoveAddress(address);\n },\n role: 'link'\n }}\n />\n )\n };\n }\n )\n };\n};\n\nconst getPrimaryAddressList = (props: IAddressListInputProps): IAddressList => {\n const { addresses, primaryAddressSectionHeading } = props;\n const primaryAddresses = addresses.filter((address: Address) => address.IsPrimary);\n return getAddressList('msc-address-list__primary', primaryAddresses, false, props, primaryAddressSectionHeading);\n};\n\nconst getOtherAddressList = (props: IAddressListInputProps): IAddressList => {\n const { addresses, otherAddressSectionHeading } = props;\n const otherAddresses = addresses.filter((address: Address) => !address.IsPrimary);\n return getAddressList('msc-address-list__primary', otherAddresses, true, props, otherAddressSectionHeading);\n};\n\nexport const AddressList = (props: IAddressListInputProps): IAddressListProps => {\n const { addresses, heading, resources, onAddAddress, telemetryContent, handleLineItemHeadingChange } = props;\n const headingComponent = heading?.text && (\n {\n // Required\n },\n requestContext: props.contextRequest\n }}\n />\n );\n\n // IF the 'Edit async customer' feature is enabled. we won't be disabling the button in this scenario.\n // ELSE disable the 'Add' button only when the customer is async AND the 'Async Address Creation' feature is disabled.\n const disableAddButton: boolean =\n props.isEditAsyncCustomerFeatureEnabled || false\n ? false\n : (props.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (props.isAsyncCustomer || false) &&\n !(props.isAsyncCustomerAddressCreationFeatureEnabled || false);\n\n return {\n ListAddress: { className: 'ms-address-list' },\n heading: headingComponent,\n isShowEmptyListMessage: addresses.length === 0,\n emptyListMessage:

{resources.addressEmptyListAddressMessage}

,\n addButton: (\n \n ),\n primaryAddressList: getPrimaryAddressList(props),\n otherAddressList: getOtherAddressList(props)\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { CheckoutModule, ErrorLocation, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { 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 { AddressBillingCheckbox } from '../../common/components/address-billing-checkbox';\nimport { AddressBillingHeading } from '../../common/components/address-billing-heading';\nimport { AddressShow, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutBillingAddressData } from './checkout-billing-address.data';\nimport { ICheckoutBillingAddressProps } from './checkout-billing-address.props.autogenerated';\nimport { ErrorComponent } from '../../common';\nimport { focusOnCheckoutError } from '../../checkout-errors/checkout-errors';\n\n/**\n * Props interface.\n */\nexport interface IProps extends ICheckoutBillingAddressProps, IModuleStateProps {}\n\n/**\n * Checkout billing address view state interface.\n */\nexport interface ICheckoutBillingAddressViewState {\n isShowAddress: boolean;\n isShowAddOrUpdateAddress: boolean;\n isShowSameAsShippingCheckbox: boolean;\n errorMessage?: string;\n}\n\n/**\n * Checkout billing address view props interface.\n */\nexport interface ICheckoutBillingAddressViewProps extends IProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: ICheckoutBillingAddressViewState;\n CheckoutBillingAddress: IModuleProps;\n sameAsShippingCheckbox: React.ReactNode;\n heading: React.ReactNode;\n showAddress: IAddressShowProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutBillingAddress component.\n * @extends {React.PureComponent>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutBillingAddress extends React.Component {\n @observable private currentOperation: AddressOperation;\n\n @observable private isBillingAddressSameAsShipping: boolean;\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 validationError: object;\n\n @observable private readonly addressActionResponse?: IAddressResponse;\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 addRenderRef: React.RefObject;\n private readonly telemetryContent?: ITelemetryContent;\n\n private autoSuggest?: AutoSuggest;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: IProps) {\n super(props);\n const { context, data, resources, telemetry } = this.props;\n\n this.addUpdateAddress = {};\n this.validationError = {};\n this.isBillingAddressSameAsShipping = false;\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.addressPurposes = data.addressPurposes.result || [];\n this.countryRegions = data.countryRegions.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.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n this.state = {\n isShowAddress: false,\n isShowAddOrUpdateAddress: false,\n isShowSameAsShippingCheckbox: false,\n errorMessage: ''\n };\n\n // This.addRenderRef = React.createRef();\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 } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\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 && this.props.data.checkout.result.shippingAddress,\n shippingAddress => {\n if (this.props.moduleState.isUpdating) {\n if (shippingAddress && this.isBillingAddressSameAsShipping) {\n this.isBillingAddressSameAsShipping = true;\n this._updateCurrentOperation(AddressOperation.Show, shippingAddress);\n } else if (shippingAddress && this.isBillingAddressSameAsShipping) {\n this._updateCurrentOperation(AddressOperation.Show, shippingAddress);\n }\n }\n }\n );\n\n reaction(\n () => this.isBillingAddressRequried,\n isBillingAddressRequried => {\n if (isBillingAddressRequried) {\n if (this.props.moduleState.isDisabled) {\n this.onEdit();\n }\n } else {\n this.props.data.checkout.result?.removeBillingAddress({});\n this.props.moduleState.onDisable();\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.CheckoutBillingAddress &&\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.CheckoutBillingAddress) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\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(\n nextProps: ICheckoutBillingAddressProps,\n nextState: ICheckoutBillingAddressViewState\n ): 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.isBillingAddressRequried || this._shouldHideBillingAddressForOBO) {\n return null;\n }\n\n const {\n resources,\n moduleState: { hasError }\n } = this.props;\n\n const { renderView, config } = this.props;\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 countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n className: config.className,\n viewState: {\n isShowAddress: this.selectedAddress && this.currentOperation === AddressOperation.Show,\n isShowAddOrUpdateAddress: this.currentOperation !== AddressOperation.Show,\n isShowSameAsShippingCheckbox: this.isCartContainsItemsForShipping && this.props.moduleState.isUpdating\n },\n CheckoutBillingAddress: {\n moduleProps: this.props,\n className: classnames('ms-checkout-billing-address', config.className)\n },\n heading: ,\n alert: hasError && errorMessage && ,\n checkoutErrorRef: this.checkoutErrorRef,\n\n sameAsShippingCheckbox: (\n \n ),\n showAddress: this._renderShowAddress(),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * On suggestion selected.\n * @param result - The suggestion result.\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 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 }, 0);\n };\n\n /**\n * 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 addressFormatItem.forEach(format => {\n if (this.addUpdateAddress[format.name] !== undefined && !this.autoSuggest?.excludedAddressFields.includes(format.name)) {\n this.addressFormat[format.name] = '';\n }\n });\n this._clearValidation();\n };\n\n /**\n * Clear validation.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n /**\n * On address update.\n * @param name - Name.\n * @param value - Value.\n */\n private readonly onAddressAddUpdate = (name: string, value: string) => {\n set(this.addUpdateAddress, { [name]: value });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * Method data initialization.\n * @param props -The checkout address properties.\n */\n private readonly _dataInitialize = (props: IProps): 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.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n };\n\n /**\n * Render add or update address function.\n * @returns - Address add update props.\n */\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\n return AddressAddUpdate({\n resources: this.resources,\n addressType: AddressType.Billing,\n addressFormat: this.addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName ?? this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n telemetryContent: this.telemetryContent,\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n onSave: this._onSubmitAddress,\n onCancel: this._resetView\n });\n };\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 * On country region change function.\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 * Gets address format for exclude list.\n * @returns - Address item type.\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 * Attach 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('#billing_addressstreet', '#billing_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * On address add update input change.\n * @param event - The event.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n };\n\n /**\n * On address add update dropdown change.\n * @param event - The event.\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 * Gets 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 this.stateProvinceInfo = result;\n });\n };\n\n /**\n * Initialize module state.\n */\n private readonly _initModuleState = (): void => {\n this.props.moduleState.init({\n status: this.isBillingAddressRequried ? 'updating' : 'disabled',\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit\n });\n\n const { billingAddress, isBillingAddressSameAsShippingAddress } = this.props.data.checkout.result ?? {};\n\n if (this.isBillingAddressRequried) {\n if (billingAddress) {\n this.isBillingAddressSameAsShipping = isBillingAddressSameAsShippingAddress ?? false;\n this._updateCurrentOperation(AddressOperation.Show, billingAddress);\n this._updateModuleState();\n } else if (this.isCartContainsItemsForShipping) {\n this.isBillingAddressSameAsShipping = true;\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n } else {\n this.isBillingAddressSameAsShipping = false;\n this._updateCurrentOperation(AddressOperation.Add);\n }\n }\n };\n\n /**\n * Sets default country region Id.\n */\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * On change - Billing address same as shipping.\n * @param event - The event.\n */\n private readonly _onBillingAddressSameAsShippingChange = (event: React.ChangeEvent) => {\n this.isBillingAddressSameAsShipping = event.currentTarget.checked;\n\n if (this.isBillingAddressSameAsShipping && this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n } else {\n this._updateCurrentOperation(AddressOperation.Add, this.billingAddress);\n }\n };\n\n @computed private get isCartContainsItemsForShipping(): boolean {\n const { request } = this.props.context;\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\n const pickupDeliveryModeCode = request.channel?.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request.channel?.EmailDeliveryModeCode;\n\n // If hasInvoiceLine is true, there are only invoices no items in cart and return false here\n return this.props.data.checkout.result?.checkoutCart.hasInvoiceLine\n ? false\n : retailMultiplePickUpOptionEnabled\n ? ((this.props.data.checkout.result && this.props.data.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 : ((this.props.data.checkout.result && this.props.data.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 @computed private get billingAddress(): Address | undefined {\n return this.props.data.checkout.result?.billingAddress;\n }\n\n @computed private get shippingAddress(): Address | undefined {\n return this.props.data.checkout.result?.shippingAddress;\n }\n\n @computed private get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n return checkoutState?.loyaltyAmount ? checkoutState.loyaltyAmount : 0;\n }\n\n @computed private get getGiftCardTotalAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.giftCardExtends) {\n return 0;\n }\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n }, 0);\n }\n\n @computed private get getCustomerAccountAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n const defaultAmount = 0;\n\n return checkoutState?.customerAccountAmount ?? defaultAmount;\n }\n\n @computed private get shouldPaidByCard(): boolean {\n const {\n data: { checkout },\n config\n } = this.props;\n if (!checkout.result) {\n return false;\n }\n\n const checkoutResult = checkout.result;\n const cart = checkoutResult.checkoutCart.cart;\n if (!cart || !cart.CartLines || cart.CartLines.length === 0) {\n return false;\n }\n\n const { paymentTenderType, tokenizedPaymentCard } = checkoutResult;\n const isPaidByOtherPaymentSource = config.paymenTenderType !== paymentTenderType && tokenizedPaymentCard;\n\n // Use payment card when it is not free or gift card balance + Loyalty amount can not cover the total amount\n const amountDue = (cart.TotalAmount || 0) - this.getGiftCardTotalAmount - this.getLoyaltyAmount - this.getCustomerAccountAmount;\n\n return amountDue > 0 && !isPaidByOtherPaymentSource;\n }\n\n @computed private get isBillingAddressRequried(): boolean {\n return (\n this.shouldPaidByCard &&\n (!this.props.data.checkout?.result?.isPaymentVerificationRedirection ||\n !!this.props.data.checkout?.result?.isCheckoutCallFailed)\n );\n }\n\n @computed private get _shouldHideBillingAddressForOBO(): boolean {\n return Msdyn365.isOboRequest(this.props.context.request) && EnabledPaymentsForOBO.PaymentInstrument === 0;\n }\n\n /**\n * On submit address.\n */\n private readonly _onSubmitAddress = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n this.props.moduleState.setHasError(true);\n\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n this.props.data.checkout.result?.isPaymentSectionContainerHasError\n ) {\n this.props.data.checkout.result.updateIsBillingAddressHasError({ newIsBillingAddressHasError: true });\n }\n\n return;\n }\n\n this._setBillingAddress(this.addUpdateAddress);\n this._updateCurrentOperation(AddressOperation.Show, this.addUpdateAddress);\n this._updateModuleState();\n };\n\n /**\n * On submit.\n */\n private readonly onSubmit = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Billing address submit for Add or Update operation.');\n this._onSubmitAddress();\n break;\n case AddressOperation.Show:\n this.props.telemetry.information('Billing address submit for Show operation.');\n if (this.selectedAddress) {\n this._setBillingAddress(this.selectedAddress);\n this._updateCurrentOperation(AddressOperation.Show, this.selectedAddress);\n this._updateModuleState();\n }\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * 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('Billing address cancel for Add or Update operation.');\n this._resetView();\n this._clearAddressFields();\n break;\n case AddressOperation.Show:\n this.props.telemetry.information('Billing address cancel for Show operation.');\n this._resetView();\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * On edit.\n */\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Billing address onEdit is called.');\n\n if (this.isBillingAddressSameAsShipping && this.shippingAddress && this.isCartContainsItemsForShipping) {\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n } else {\n this._updateCurrentOperation(AddressOperation.Add, this.billingAddress);\n }\n this.props.moduleState.onUpdating();\n };\n\n /**\n * Sets billing address.\n * @param address - The address.\n */\n private readonly _setBillingAddress = (address: Address): void => {\n if (this.props.data.checkout.result) {\n const newBillingAddress = { ...address };\n\n if (address.ThreeLetterISORegionName && !newBillingAddress.TwoLetterISORegionName) {\n newBillingAddress.TwoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(address.ThreeLetterISORegionName);\n }\n\n this.props.data.checkout.result.updateBillingAddress({\n newBillingAddress,\n additionalProperties: {\n isBillingAddressSameAsShippingAddress: this.isBillingAddressSameAsShipping\n }\n });\n }\n };\n\n /**\n * Reset view.\n */\n private readonly _resetView = () => {\n this._updateCurrentOperation(AddressOperation.Show, this.billingAddress);\n this._updateModuleState();\n };\n\n /**\n * Update current operation.\n * @param operation - 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, { AddressTypeValue: this.addUpdateAddress.AddressTypeValue || this.defaultAddressType });\n }\n };\n\n /**\n * Updates the module state.\n */\n private readonly _updateModuleState = () => {\n if (this.currentOperation === AddressOperation.Show) {\n this.props.moduleState.onReady();\n } else {\n this.props.moduleState.onUpdating();\n }\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\nexport default CheckoutBillingAddress;\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 { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutBillingAddressViewProps } from './checkout-billing-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 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 - IAddressError.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns - AddressForm 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 Billing Address View Component.\n * @param props - Props.\n * @returns - CheckoutBillingAddress Module.\n */\nconst CheckoutBillingAddressView: React.FC = props => {\n const {\n CheckoutBillingAddress,\n checkoutErrorRef,\n alert,\n viewState,\n heading,\n sameAsShippingCheckbox,\n showAddress,\n showAddOrUpdateAddress\n } = props;\n\n return (\n \n {heading}\n {alert}\n {viewState.isShowSameAsShippingCheckbox && sameAsShippingCheckbox}\n {viewState.isShowAddress && }\n {viewState.isShowAddOrUpdateAddress && }\n \n );\n};\n\nexport default CheckoutBillingAddressView;\n"],"names":["AddressBillingCheckbox","_ref","isChecked","value","ariaLabel","text","telemetryContent","onChange","additionalAttributes","checked","React","className","AddressInputComponent","Object","assign","type","additionalAddributes","AddressBillingHeading","getButtonAriaLabel","addressName","replace","getAddressList","addresses","showPrimaryButton","props","heading","resources","isUpdating","addressActionResponse","selectedAddress","addressFormat","onEditAddress","onRemoveAddress","onUpdatePrimaryAddress","addressPurposes","errorTitle","errorMessage","List","isShowList","length","Heading","items","map","address","isSelectedAddress","RecordId","isShowError","isInvalidAsyncState","isEditAsyncCustomerFeatureEnabled","canRenderAsyncCustomerDataAsUnmodifiable","isAsyncCustomer","isAsyncCustomerAddressCreationFeatureEnabled","Item","key","showItems","AddressShow","getAddressFormat","ThreeLetterISORegionName","error","Error","title","AddressErrorTitleComponent","message","AddressErrorMessageComponent","isShowPrimaryButton","primaryButton","AddressButtonComponent","classnames","disabled","addressPrimaryButtonText","addressPrimaryButtonAriaLabel","Name","onClick","editButton","addressEditButtonText","addressEditButtonAriaLabel","role","removeButton","addressRemoveButtonText","addressRemoveButtonAriaLabel","getPrimaryAddressList","primaryAddressSectionHeading","primaryAddresses","filter","IsPrimary","getOtherAddressList","otherAddressSectionHeading","otherAddresses","AddressList","_heading$headingTag","onAddAddress","handleLineItemHeadingChange","headingComponent","Msdyn365","tag","headingTag","editProps","onEdit","requestContext","contextRequest","disableAddButton","ListAddress","isShowEmptyListMessage","emptyListMessage","addressEmptyListAddressMessage","addButton","addressAddButtonText","addressAddButtonAriaLabel","primaryAddressList","otherAddressList","CheckoutBillingAddress","constructor","super","countryRegionId","countryRegions","defaultAddressType","checkoutErrorRef","_onSuggestionSelected","async","this","_clearAddressFields","getTranformedAddress","result","stateProvinceInfo","set","addUpdateAddress","Street","ZipCode","CountyName","City","State","DistrictName","FullAddress","setTimeout","forEach","format","_this$autoSuggest","undefined","name","autoSuggest","excludedAddressFields","includes","_clearValidation","validationError","onAddressAddUpdate","validateAddressFormat","_dataInitialize","data","reaction","_data$countryRegions$","_data$addressPurposes","countryStates","_data$countryStates$r","_renderAddOrUpdateAddress","_this$addUpdateAddres","AddressAddUpdate","addressType","AddressType","Billing","defaultCountryRegionId","dropdownDisplayData","getPrefilledAddressDropdownData","addressStateDefaultSelectionText","onInputChange","_onAddressAddUpdateInputChange","onDropdownChange","_onAddressAddUpdateDropdownChange","hasExternalSubmitGroup","moduleState","onSave","_onSubmitAddress","onCancel","_resetView","_onCountryChange","_this$autoSuggest2","twoLetterIsoRegionName","getTwoLetterISORegionName","TwoLetterISORegionName","changeAutoSuggestionCountryCode","_getAddressFormatExcludeList","config","addressFormatExcludeList","showAddressType","push","AddressItemType","AddressTypeValue","_attachMapAutoSuggest","storeSelectorStateManager","_this$autoSuggest3","isMapApiLoaded","attachAutoSuggest","event","target","RegExp","_getStateProvinces","currentOperation","AddressOperation","Add","Update","addressCommon","getStateProvinces","then","some","state","StateId","_initModuleState","_this$props$data$chec","init","status","isBillingAddressRequried","onSubmit","billingAddress","isBillingAddressSameAsShippingAddress","checkout","isBillingAddressSameAsShipping","_updateCurrentOperation","Show","_updateModuleState","isCartContainsItemsForShipping","shippingAddress","_onBillingAddressSameAsShippingChange","currentTarget","_this$props$data$chec2","_this$props$data$chec3","setHasError","shouldEnableSinglePaymentAuthorizationCheckout","isPaymentSectionContainerHasError","updateIsBillingAddressHasError","newIsBillingAddressHasError","_setBillingAddress","telemetry","information","onUpdating","newBillingAddress","_objectSpread","updateBillingAddress","additionalProperties","operation","onReady","_setErrorMessage","setState","context","AddressCommon","AddressFormat","AddressMetaData","getTelemetryObject","request","telemetryPageName","friendlyName","isShowAddress","isShowAddOrUpdateAddress","isShowSameAsShippingCheckbox","_this$props$data$chec5","actionContext","channel","autoSuggestionEnabled","autoSuggestOptions","_setDefaultCountryRegionId","_this$props$data$chec4","isDisabled","removeBillingAddress","onDisable","BingMapsApiKey","BingMapsEnabled","options","AutoSuggest","ChannelCountryRegionISOCode","DefaultLanguageId","_loadMapAPI","_this$props$data$stor","loadMapApi","_this$autoSuggest4","_this$props$data$stor2","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec6","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec7","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","_this$props$data$stor3","_this$autoSuggest5","disposeAutoSuggest","shouldComponentUpdate","nextProps","nextState","render","_shouldHideBillingAddressForOBO","hasError","renderView","viewState","moduleProps","addressBillingAddressHeading","alert","ErrorComponent","errorMessageTitle","sameAsShippingCheckbox","addressSameAsShippingAddressAriaLabel","addressSameAsShippingAddressText","showAddress","_renderShowAddress","showAddOrUpdateAddress","_this$selectedAddress","_request$channel","market","getDefaultCountryRegionId","_featureState$result","_request$channel2","_request$channel3","_this$props$data$chec8","channelDeliveryOptionConfig","featureState","retailMultiplePickUpOptionEnabled","find","feature","IsEnabled","pickupDeliveryModeCode","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","checkoutCart","hasInvoiceLine","cart","CartLines","cartLine","_channelDeliveryOptio","DeliveryMode","PickupDeliveryModeCodes","deliveryMode","_this$props$data$chec9","_this$props$data$chec10","checkoutState","loyaltyAmount","giftCardExtends","reduce","count","giftCard","Balance","_checkoutState$custom","customerAccountAmount","checkoutResult","paymentTenderType","tokenizedPaymentCard","isPaidByOtherPaymentSource","paymenTenderType","TotalAmount","getGiftCardTotalAmount","getLoyaltyAmount","getCustomerAccountAmount","_this$props$data$chec11","_this$props$data$chec12","shouldPaidByCard","isPaymentVerificationRedirection","isCheckoutCallFailed","EnabledPaymentsForOBO","PaymentInstrument","__decorate","observable","action","computed","withModuleState","observer","AddressDetail","Node","item","description","_ref2","AddressForm","isShowSaveButton","saveButton","isShowCancelButton","cancelButton","AddressItem","label","input","AddressError","Module","ref"],"sourceRoot":""}