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AA,EAAA,8GACAA,EAAA,gFACAA,EAAA,wHACAA,EAAA,kEACAA,EAAA,sEACAA,EAAA,oEACAA,EAAA,0FACAA,EAAA,4GACAA,EAAA,8FACAA,EAAA,0FACAA,EAAA,kFACAA,EAAA,sIACAA,EAAA,sIACAA,EAAA,4EACAA,EAAA,sEACAA,EAAA,8EACAA,EAAA,0GAjCJ,CAAYA,IAAAA,EAAoB,KAoChC,SAAYC,GACRA,EAAAA,EAAA,uBACAA,EAAAA,EAAA,mDACAA,EAAAA,EAAA,mEACAA,EAAAA,EAAA,qDACAA,EAAAA,EAAA,qCACAA,EAAAA,EAAA,uCACAA,EAAAA,EAAA,+CACAA,EAAAA,EAAA,qCACAA,EAAAA,EAAA,yDACAA,EAAAA,EAAA,mCACAA,EAAAA,EAAA,sDACAA,EAAAA,EAAA,4DACAA,EAAAA,EAAA,sBACAA,EAAAA,EAAA,gDAdJ,CAAYA,IAAAA,EAAa,KAiBzB,SAAYC,GACRA,EAAA,kDACAA,EAAA,mEACAA,EAAA,oDACAA,EAAA,mCACAA,EAAA,sCACAA,EAAA,8CACAA,EAAA,mCACAA,EAAA,wDACAA,EAAA,iCACAA,EAAA,oDACAA,EAAA,2DACAA,EAAA,YAZJ,CAAYA,IAAAA,EAAc","sources":["webpack://Msdyn365.Commerce.Online/./src/checkout-state/base-checkout-cart-state.ts?509c","webpack://Msdyn365.Commerce.Online/./src/checkout-state/checkout-state-storage.ts?b049","webpack://Msdyn365.Commerce.Online/./src/checkout-state/base-checkout-state.ts?a438","webpack://Msdyn365.Commerce.Online/./src/data-actions/checkout-state-data-action.ts?ad58","webpack://Msdyn365.Commerce.Online/./src/data-actions/get-cart-state-data-action.ts?9f8e","webpack://Msdyn365.Commerce.Online/./src/data-actions/get-cart-state.ts?4428","webpack://Msdyn365.Commerce.Online/./src/data-actions/get-checkout-cart.ts?2235","webpack://Msdyn365.Commerce.Online/./src/data-actions/get-checkout-state.ts?61f7","webpack://Msdyn365.Commerce.Online/./src/state-interfaces/checkout-state-enums.ts?13e8"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { BaseCartState } from '../cart-state/base-cart-state';\nimport getCheckoutCart, { GetCheckoutCartInput } from '../data-actions/get-checkout-cart';\n\n/**\n * Version of BaseCartState that uses the checkout cart.\n */\nexport class BaseCheckoutCartState extends BaseCartState {\n public async initialize(): Promise {\n if (this.isInitialized) {\n return;\n }\n\n const newCart = await getCheckoutCart(new GetCheckoutCartInput(this.actionContext.requestContext.apiSettings), this.actionContext);\n\n if (newCart) {\n this._cart = newCart;\n this._status = 'READY';\n } else {\n this._status = 'ERROR';\n }\n\n this.isInitialized = true;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport enum CheckoutStorageKey {\n BillingAddress = 'BillingAddress',\n GiftCard = 'GiftCard',\n LoyaltyCardNumber = 'LoyaltyCardNumber',\n LoyaltyAmount = 'LoyaltyAmount',\n TermsAndCondition = 'TermsAndCondition',\n CheckoutGenericData = 'Checkout-Generic-Data',\n PaymentTenderType = 'PaymentTenderType',\n RedirectPaymentConnectorId = 'RedirectPaymentConnectorId',\n IsExpressCheckoutApplied = 'IsExpressCheckoutApplied'\n}\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 {\n Address,\n AttributeValueBase,\n CardPaymentAcceptResult,\n CartLine,\n CommerceProperty,\n GiftCard,\n Note,\n SalesOrder,\n SimpleProduct,\n TenderLine,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport get from 'lodash/get';\nimport { action, computed, observable } from 'mobx';\n\nimport { GlobalState } from '../global-state/global-state';\nimport { CheckoutModule } from '../state-interfaces';\nimport { ICartState } from '../state-interfaces/i-cart-state';\nimport {\n ICheckoutActionResult,\n ICheckoutGenericData,\n ICheckoutState,\n IGiftCardExtend,\n ICheckoutError\n} from '../state-interfaces/i-checkout-state';\nimport { BaseCheckoutCartState } from './base-checkout-cart-state';\nimport { CheckoutStorageKey } from './checkout-state-storage';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class BaseCheckoutState extends GlobalState implements ICheckoutState {\n @observable protected _checkoutCart: ICartState;\n\n @computed public get checkoutCart(): ICartState {\n return this._checkoutCart;\n }\n\n @observable protected _salesOrder?: SalesOrder;\n\n @computed public get salesOrder(): Readonly {\n return this._salesOrder;\n }\n\n @observable protected _attributeValues: AttributeValueBase[];\n\n @computed public get attributeValues(): Readonly {\n return this._attributeValues;\n }\n\n @observable protected _extensionProperties: CommerceProperty[];\n\n @computed public get extensionProperties(): Readonly {\n return this._extensionProperties;\n }\n\n @observable protected _orderedProducts?: SimpleProduct[];\n\n @computed public get orderedProducts(): Readonly {\n return this._orderedProducts;\n }\n\n @observable protected _tokenizedPaymentCard?: TokenizedPaymentCard;\n\n @computed public get tokenizedPaymentCard(): Readonly {\n return this._tokenizedPaymentCard;\n }\n\n @observable protected _tenderLine?: TenderLine;\n\n @computed public get tenderLine(): Readonly {\n return this._tenderLine;\n }\n\n @observable protected _billingAddress?: Address;\n\n @computed public get billingAddress(): Readonly
{\n return this._billingAddress;\n }\n\n @observable protected _isBillingAddressSameAsShippingAddress?: boolean;\n\n @computed public get isBillingAddressSameAsShippingAddress(): Readonly {\n return this._isBillingAddressSameAsShippingAddress;\n }\n\n @observable protected _shippingAddress?: Address;\n\n @computed public get shippingAddress(): Readonly
{\n return this._shippingAddress;\n }\n\n @observable protected _cartLinesWithShippingAddress?: CartLine[];\n\n @computed public get cartLinesWithShippingAddress(): Readonly {\n return this._cartLinesWithShippingAddress;\n }\n\n @observable protected _hasShippingAddress?: boolean;\n\n @computed public get hasShippingAddress(): Readonly {\n return this._hasShippingAddress;\n }\n\n @observable protected _hasCartDeliveryMode?: boolean;\n\n @computed public get hasCartDeliveryMode(): Readonly {\n return this._hasCartDeliveryMode;\n }\n\n @observable protected _cardPrefix?: string;\n\n @computed public get cardPrefix(): Readonly {\n return this._cardPrefix;\n }\n\n @observable protected _paymentTenderType?: string;\n\n @computed public get paymentTenderType(): Readonly {\n return this._paymentTenderType;\n }\n\n /**\n * @deprecated Use giftCardExtends method.\n */\n @computed public get giftCards(): Readonly {\n return this.giftCardExtends;\n }\n\n @observable protected _giftCardExtends: IGiftCardExtend[] = [];\n\n @computed public get giftCardExtends(): Readonly {\n return this._giftCardExtends;\n }\n\n @observable protected _loyaltyCardNumber?: string;\n\n @computed public get loyaltyCardNumber(): Readonly {\n return this._loyaltyCardNumber;\n }\n\n @observable protected _loyaltyAmount: number = 0;\n\n @computed public get loyaltyAmount(): Readonly {\n return this._loyaltyAmount;\n }\n\n @observable protected _guestCheckoutEmail: string = '';\n\n @computed public get guestCheckoutEmail(): Readonly {\n return this._guestCheckoutEmail;\n }\n\n @observable protected _hasGuestCheckoutEmail?: boolean;\n\n @computed public get hasGuestCheckoutEmail(): Readonly {\n return this._hasGuestCheckoutEmail;\n }\n\n @observable protected _isTermsAndConditionAccepted?: boolean;\n\n @computed public get isTermsAndConditionAccepted(): Readonly {\n return this._isTermsAndConditionAccepted;\n }\n\n @observable protected _isTermsAndConditionChecked?: boolean;\n\n @computed public get isTermsAndConditionChecked(): Readonly {\n return this._isTermsAndConditionChecked;\n }\n\n @observable protected _shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n\n @computed public get shouldEnableSinglePaymentAuthorizationCheckout(): Readonly {\n return this._shouldEnableSinglePaymentAuthorizationCheckout;\n }\n\n @observable protected _shouldEnableCheckoutErrorDisplayMessaging?: boolean;\n\n @computed public get shouldEnableCheckoutErrorDisplayMessaging(): Readonly {\n return this._shouldEnableCheckoutErrorDisplayMessaging;\n }\n\n @observable protected _shouldCollapsePaymentSection?: boolean;\n\n @computed public get shouldCollapsePaymentSection(): Readonly {\n return this._shouldCollapsePaymentSection;\n }\n\n @observable protected _shouldTriggerPaymentWithPlaceOrder?: boolean;\n\n @computed public get shouldTriggerPaymentWithPlaceOrder(): Readonly {\n return this._shouldTriggerPaymentWithPlaceOrder;\n }\n\n @observable protected _isPaymentSectionContainerReady?: boolean;\n\n @computed public get isPaymentSectionContainerReady(): Readonly {\n return this._isPaymentSectionContainerReady;\n }\n\n @observable protected _cardPaymentAcceptResult?: CardPaymentAcceptResult;\n\n @computed public get cardPaymentAcceptResult(): Readonly {\n return this._cardPaymentAcceptResult;\n }\n\n @observable protected _isPaymentSectionContainerHasError?: boolean;\n\n @computed public get isPaymentSectionContainerHasError(): Readonly {\n return this._isPaymentSectionContainerHasError;\n }\n\n @observable protected _redirectAdditionalContext?: string;\n\n @computed public get redirectAdditionalContext(): Readonly {\n return this._redirectAdditionalContext;\n }\n\n @observable protected _redirectPaymentConnectorId?: string;\n\n @computed public get redirectPaymentConnectorId(): Readonly {\n return this._redirectPaymentConnectorId;\n }\n\n @observable protected _checkoutErrorPaymentConnectorId?: string;\n\n @computed public get checkoutErrorPaymentConnectorId(): Readonly {\n return this._checkoutErrorPaymentConnectorId;\n }\n\n @observable protected _isPlaceOrderEnabledInRedirection?: boolean;\n\n @computed public get isPlaceOrderEnabledInRedirection(): Readonly {\n return this._isPlaceOrderEnabledInRedirection;\n }\n\n @observable protected _isPaymentVerificationRequired?: boolean;\n\n @computed public get isPaymentVerificationRequired(): Readonly {\n return this._isPaymentVerificationRequired;\n }\n\n @observable protected _isCheckoutCallFailed?: boolean;\n\n @computed public get isCheckoutCallFailed(): Readonly {\n return this._isCheckoutCallFailed;\n }\n\n @observable protected _customerAccountAmount: number = 0;\n\n @computed public get customerAccountAmount(): Readonly {\n return this._customerAccountAmount;\n }\n\n @observable protected _shouldEnableExpressCheckoutInCheckout?: boolean;\n\n @computed public get shouldEnableExpressCheckoutInCheckout(): Readonly {\n return this._shouldEnableExpressCheckoutInCheckout;\n }\n\n @observable protected _shouldEnableExpressCheckoutInCart?: boolean;\n\n @computed public get shouldEnableExpressCheckoutInCart(): Readonly {\n return this._shouldEnableExpressCheckoutInCart;\n }\n\n @observable protected _shippingAddressFromExpressCheckout?: Address;\n\n @computed public get shippingAddressFromExpressCheckout(): Readonly
{\n return this._shippingAddressFromExpressCheckout;\n }\n\n @observable protected _emailAddressFromExpressCheckout: string = '';\n\n @computed public get emailAddressFromExpressCheckout(): Readonly {\n return this._emailAddressFromExpressCheckout;\n }\n\n @observable protected _billingAddressFromExpressCheckout?: Address;\n\n @computed public get billingAddressFromExpressCheckout(): Readonly
{\n return this._billingAddressFromExpressCheckout;\n }\n\n @observable protected _isExpressCheckoutApplied?: boolean;\n\n @computed public get isExpressCheckoutApplied(): Readonly {\n return this._isExpressCheckoutApplied;\n }\n\n @observable protected _isExpressAddressApplied?: boolean;\n\n @computed public get isExpressAddressApplied(): Readonly {\n return this._isExpressAddressApplied;\n }\n\n @observable protected _isExpressCheckoutAppliedInCartPage?: boolean;\n\n @computed public get isExpressCheckoutAppliedInCartPage(): Readonly {\n return this._isExpressCheckoutAppliedInCartPage;\n }\n\n @observable protected _isExpressPaymentModulesReady?: CommerceProperty[];\n\n @computed public get isExpressPaymentModulesReady(): Readonly {\n return this._isExpressPaymentModulesReady;\n }\n\n @computed public get isPaymentVerificationRedirection(): Readonly {\n const { requestFormData, query } = this.actionContext.requestContext;\n return !!(query && query.pv === '1' && (requestFormData || query.redirectResult));\n }\n\n @observable protected _checkoutError?: ICheckoutError;\n\n @computed public get checkoutError(): Readonly {\n return this._checkoutError;\n }\n\n @observable protected _isBillingAddressHasError?: boolean;\n\n @computed public get isBillingAddressHasError(): Readonly {\n return this._isBillingAddressHasError;\n }\n\n @observable protected _checkoutErrorFocus?: CheckoutModule;\n\n @computed public get checkoutErrorFocus(): Readonly {\n return this._checkoutErrorFocus;\n }\n\n @observable protected _shouldFocusOnCheckoutError?: boolean;\n\n @computed public get shouldFocusOnCheckoutError(): Readonly {\n return this._shouldFocusOnCheckoutError;\n }\n\n @observable protected _checkoutGenericData: object = {};\n\n constructor(actionContext: IActionContext) {\n super(actionContext);\n this._checkoutCart = new BaseCheckoutCartState(actionContext);\n this._attributeValues = [];\n this._extensionProperties = [];\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for app settings.\n this._shouldEnableSinglePaymentAuthorizationCheckout = actionContext.requestContext.app.config\n .shouldEnableSinglePaymentAuthorizationCheckout as boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for app settings.\n this._shouldEnableCheckoutErrorDisplayMessaging = actionContext.requestContext.app.config\n .shouldEnableCheckoutErrorDisplayMessaging as boolean;\n }\n\n @action\n public updateSalesOrder(input: {\n newSalesOrder: SalesOrder;\n newOrderedProducts: SimpleProduct[];\n additionalProperties?: object;\n }): Promise {\n this._salesOrder = input.newSalesOrder;\n this._orderedProducts = input.newOrderedProducts;\n this._attributeValues = input.newSalesOrder.AttributeValues || [];\n this._extensionProperties = input.newSalesOrder.ExtensionProperties || [];\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateAttributeValues(input: {\n newAttributeValues: AttributeValueBase[];\n additionalProperties?: object;\n }): Promise {\n this._attributeValues = input.newAttributeValues;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateExtensionProperties(input: {\n newExtensionProperties: CommerceProperty[];\n additionalProperties?: object;\n }): Promise {\n this._extensionProperties = input.newExtensionProperties;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updateTokenizedPaymentCard(input: {\n newTokenizedPaymentCard?: TokenizedPaymentCard;\n additionalProperties?: object;\n }): Promise {\n this._tokenizedPaymentCard = input.newTokenizedPaymentCard;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updateTenderLine(input: { newTenderLine?: TenderLine; additionalProperties?: object }): Promise {\n this._tenderLine = input.newTenderLine;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateShippingAddress(input: {\n newShippingAddress: Address;\n additionalProperties?: object;\n }): Promise {\n this._shippingAddress = input.newShippingAddress;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateCartLinesShippingAddress(input: {\n newCartLinesWithShippingAddress: CartLine[];\n additionalProperties?: object;\n }): Promise {\n this._cartLinesWithShippingAddress = input.newCartLinesWithShippingAddress;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateHasShippingAddress(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newHasShippingAddress: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._hasShippingAddress = input.newHasShippingAddress;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateHasCartDeliveryMode(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newHasCartDeliveryMode: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._hasCartDeliveryMode = input.newHasCartDeliveryMode;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateTermsAndConditionsAcceptance(input: {\n newIsTermsAndConditionAccepted: boolean;\n additionalProperties?: object;\n }): Promise {\n this._isTermsAndConditionAccepted = input.newIsTermsAndConditionAccepted;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateIsTermsAndConditionsChecked(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsTermsAndConditionChecked: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isTermsAndConditionChecked = input.newIsTermsAndConditionChecked;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateShouldCollapsePaymentSection(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newShouldCollapsePaymentSection: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._shouldCollapsePaymentSection = input.newShouldCollapsePaymentSection;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateShouldTriggerPaymentWithPlaceOrder(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newShouldTriggerPaymentWithPlaceOrder: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._shouldTriggerPaymentWithPlaceOrder = input.newShouldTriggerPaymentWithPlaceOrder;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsPaymentSectionContainerReady(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsPaymentSectionContainerReady: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isPaymentSectionContainerReady = input.newIsPaymentSectionContainerReady;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateCardPaymentAcceptResult(input: {\n newCardPaymentAcceptResult: CardPaymentAcceptResult;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._cardPaymentAcceptResult = input.newCardPaymentAcceptResult;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsPaymentSectionContainerHasError(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsPaymentSectionContainerHasError: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isPaymentSectionContainerHasError = input.newIsPaymentSectionContainerHasError;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateRedirectAdditionalContext(input: {\n newRedirectAdditionalContext: string;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._redirectAdditionalContext = input.newRedirectAdditionalContext;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateRedirectPaymentConnectorId(input: {\n newRedirectPaymentConnectorId: string;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._redirectPaymentConnectorId = input.newRedirectPaymentConnectorId;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateCheckoutErrorPaymentConnectorId(input: {\n newCheckoutErrorPaymentConnectorId: string;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._checkoutErrorPaymentConnectorId = input.newCheckoutErrorPaymentConnectorId;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsCheckoutCallFailed(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsCheckoutCallFailed: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isCheckoutCallFailed = input.newIsCheckoutCallFailed;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsPlaceOrderEnabledInRedirection(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsPlaceOrderEnabledInRedirection: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isPlaceOrderEnabledInRedirection = input.newIsPlaceOrderEnabledInRedirection;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsPaymentVerificationRequired(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsPaymentVerificationRequired: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isPaymentVerificationRequired = input.newIsPaymentVerificationRequired;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public updateBillingAddress(input: { newBillingAddress: Address; additionalProperties?: object }): Promise {\n this._billingAddress = input.newBillingAddress;\n\n // @ts-expect-error\n this._isBillingAddressSameAsShippingAddress = input.additionalProperties?.isBillingAddressSameAsShippingAddress || false;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public removeBillingAddress(input: { additionalProperties?: object }): Promise {\n this._billingAddress = undefined;\n this._isBillingAddressSameAsShippingAddress = undefined;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updatePaymentTenderType(input: {\n newPaymentTenderType?: string;\n additionalProperties?: object;\n }): Promise {\n this._paymentTenderType = input.newPaymentTenderType;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updateCardPrefix(input: { newCardPrefix: string; additionalProperties?: object }): Promise {\n this._cardPrefix = input.newCardPrefix;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public removeGiftCard(input: { giftCardNumber: string; additionalProperties?: object }): Promise {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== input.giftCardNumber);\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public removeGiftCardExtend(input: { giftCardNumber: string; additionalProperties?: object }): Promise {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== input.giftCardNumber);\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public addGiftCard(input: { giftCard: GiftCard; additionalProperties?: object }): Promise {\n // @ts-expect-error\n const { Pin, ExpirationDate, TenderTypeId } = input.additionalProperties || {};\n\n const gitCardExtend = { ...input.giftCard, ...{ Pin, ExpirationDate, TenderTypeId } };\n\n this._giftCardExtends = [gitCardExtend, ...this._giftCardExtends];\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public addGiftCardExtend(input: { giftCard: IGiftCardExtend; additionalProperties?: object }): Promise {\n this._giftCardExtends = [input.giftCard, ...this._giftCardExtends];\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updateLoyaltyCardNumber(input: { newLoyaltyCardNumber: string; additionalProperties?: object }): Promise {\n this._loyaltyCardNumber = input.newLoyaltyCardNumber;\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updateLoyaltyAmount(input: { newAmount: number; additionalProperties?: object }): Promise {\n this._loyaltyAmount = Number(input.newAmount.toFixed(2));\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateGuestCheckoutEmail(input: {\n newGuestCheckoutEmail: string;\n customerReference?: string;\n customerRequisition?: string;\n note?: Note;\n additionalProperties?: object;\n }): Promise {\n this._guestCheckoutEmail = input.newGuestCheckoutEmail;\n const emailOnCart = this.checkoutCart.cart.ReceiptEmail;\n const customerReqOnCart = this.checkoutCart.cart.CustomerRequisition;\n const customerRefOnCart = this.checkoutCart.cart.Comment;\n const noteOnCart = this.checkoutCart.cart.Notes;\n const noteInput = input?.note;\n if (\n emailOnCart !== input.newGuestCheckoutEmail ||\n customerRefOnCart !== input.customerReference ||\n customerReqOnCart !== input.customerRequisition ||\n (noteOnCart !== undefined && noteOnCart[0]?.Description) !== (noteInput !== undefined && noteInput[0]?.Description)\n ) {\n await this.checkoutCart.updateReceiptEmail({\n newEmail: input.newGuestCheckoutEmail,\n customerReference: input.customerReference,\n customerRequisition: input.customerRequisition,\n note: input.note\n });\n }\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n /**\n * Updates cartLines objects in cart.\n * @param input - The input.\n * @param input.updatedCartLinesObject - updated cartline.\n * @returns ICartActionResult.\n */\n @action\n public async updateCartLines(input: { updatedCartLinesObject: CartLine[] }): Promise {\n await this.checkoutCart.updateCartLines({ updatedCartLinesObject: input.updatedCartLinesObject });\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateHasGuestCheckoutEmail(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: {\n newHasGuestCheckoutEmail: boolean;\n customerReference?: string;\n customerRequisition?: string;\n note?: Note;\n additionalProperties?: { [key: string]: unknown };\n }\n ): Promise {\n this._hasGuestCheckoutEmail = input.newHasGuestCheckoutEmail;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public removeCheckoutCartId(input: { additionalProperties?: object }): Promise {\n this.actionContext.requestContext.cookies.removeCheckoutCartCookie();\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public saveDataInStorage(input: { additionalProperties?: object }): Promise {\n const { sessionStorage } = this.actionContext.requestContext;\n\n // Add all local data to session storage\n if (this.billingAddress) {\n sessionStorage.setCheckoutCartData(CheckoutStorageKey.BillingAddress, {\n billingAddress: this.billingAddress,\n isBillingAddressSameAsShippingAddress: this.isBillingAddressSameAsShippingAddress\n });\n }\n\n if (this.giftCardExtends && this.giftCardExtends.length > 0) {\n sessionStorage.setCheckoutCartData(CheckoutStorageKey.GiftCard, this.giftCardExtends);\n }\n\n if (this.loyaltyCardNumber) {\n sessionStorage.setCheckoutCartData(CheckoutStorageKey.LoyaltyCardNumber, { loyaltyCardNumber: this.loyaltyCardNumber });\n }\n\n if (this.loyaltyAmount) {\n sessionStorage.setCheckoutCartData(CheckoutStorageKey.LoyaltyAmount, { loyaltyAmount: this.loyaltyAmount });\n }\n\n if (this.isTermsAndConditionAccepted) {\n sessionStorage.setCheckoutCartData(CheckoutStorageKey.TermsAndCondition, {\n isTermsAndConditionAccepted: this.isTermsAndConditionAccepted\n });\n }\n\n if (this.paymentTenderType) {\n window.sessionStorage.setItem(CheckoutStorageKey.PaymentTenderType, this.paymentTenderType);\n }\n\n if (this.redirectPaymentConnectorId) {\n window.sessionStorage.setItem(CheckoutStorageKey.RedirectPaymentConnectorId, this.redirectPaymentConnectorId);\n }\n\n if (this.isExpressCheckoutApplied) {\n window.sessionStorage.setItem(CheckoutStorageKey.IsExpressCheckoutApplied, this.isExpressCheckoutApplied.toString());\n }\n\n // Save generic data with SaveDataBeforeRedirect value true\n const filtered = Object.keys(this._checkoutGenericData).reduce((filteredData: object, key: string) => {\n if (this._checkoutGenericData[key].SaveDataBeforeRedirect) {\n filteredData[key] = this._checkoutGenericData[key];\n }\n return filteredData;\n }, {});\n\n if (Object.keys(filtered).length > 0) {\n sessionStorage.setCheckoutCartData(CheckoutStorageKey.CheckoutGenericData, { checkoutGenericData: filtered });\n }\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public updateCustomerAccountAmount(input: { newAmount: number; additionalProperties?: object }): Promise {\n this._customerAccountAmount = Number(input.newAmount.toFixed(2));\n\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public async updateBillingAddressFromExpressCheckout(input: {\n newBillingAddressFromExpressCheckout: Address;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._billingAddressFromExpressCheckout = input.newBillingAddressFromExpressCheckout;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateShippingAddressFromExpressCheckout(input: {\n newShippingAddressFromExpressCheckout: Address;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._shippingAddressFromExpressCheckout = input.newShippingAddressFromExpressCheckout;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateEmailAddressFromExpressCheckout(input: {\n newEmailAddressFromExpressCheckout: string;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._emailAddressFromExpressCheckout = input.newEmailAddressFromExpressCheckout;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateShouldEnableExpressCheckoutInCheckout(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newShouldEnableExpressCheckoutInCheckout: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._shouldEnableExpressCheckoutInCheckout = input.newShouldEnableExpressCheckoutInCheckout;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateShouldEnableExpressCheckoutInCart(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newShouldEnableExpressCheckoutInCart: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._shouldEnableExpressCheckoutInCart = input.newShouldEnableExpressCheckoutInCart;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsExpressCheckoutApplied(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsExpressCheckoutApplied: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isExpressCheckoutApplied = input.newIsExpressCheckoutApplied;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsExpressAddressApplied(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsExpressAddressApplied: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isExpressAddressApplied = input.newIsExpressAddressApplied;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsExpressCheckoutAppliedInCartPage(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsExpressCheckoutAppliedInCartPage: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isExpressCheckoutAppliedInCartPage = input.newIsExpressCheckoutAppliedInCartPage;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsBillingAddressHasError(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newIsBillingAddressHasError: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._isBillingAddressHasError = input.newIsBillingAddressHasError;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateIsExpressPaymentModulesReady(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: {\n newIsExpressPaymentModulesReady: CommerceProperty[];\n additionalProperties?: { [key: string]: unknown };\n }\n ): Promise {\n this._isExpressPaymentModulesReady = input.newIsExpressPaymentModulesReady;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateExpressCheckoutDetails(input: {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n newIsExpressCheckoutApplied: boolean;\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n newIsExpressAddressApplied?: boolean;\n newCardPaymentAcceptResult?: CardPaymentAcceptResult;\n newEmailAddressFromExpressCheckout: string;\n newTenderLine?: TenderLine;\n newPaymentTenderType?: string;\n newTokenizedPaymentCard?: TokenizedPaymentCard;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._isExpressCheckoutApplied = input.newIsExpressCheckoutApplied;\n\n if (input.newIsExpressAddressApplied !== undefined) {\n this._isExpressAddressApplied = input.newIsExpressAddressApplied;\n }\n\n if (input.newCardPaymentAcceptResult !== undefined) {\n this._cardPaymentAcceptResult = input.newCardPaymentAcceptResult;\n }\n\n if (input.newPaymentTenderType !== undefined) {\n this._paymentTenderType = input.newPaymentTenderType;\n }\n\n if (input.newTokenizedPaymentCard !== undefined) {\n this._tokenizedPaymentCard = input.newTokenizedPaymentCard;\n }\n\n if (input.newTenderLine !== undefined) {\n this._tenderLine = input.newTenderLine;\n }\n\n if (input.newEmailAddressFromExpressCheckout) {\n this._emailAddressFromExpressCheckout = input.newEmailAddressFromExpressCheckout;\n }\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateCheckoutError(input: {\n newCheckoutError: ICheckoutError;\n additionalProperties?: { [key: string]: unknown };\n }): Promise {\n this._checkoutError = input.newCheckoutError;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public setCheckoutGenericData(input: {\n key: string;\n checkoutGenericData: ICheckoutGenericData;\n additionalProperties?: object;\n }): Promise {\n this._checkoutGenericData[input.key] = input.checkoutGenericData;\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n @action\n public getCheckoutGenericData(input: { key: string }): ICheckoutGenericData | undefined {\n return this._checkoutGenericData[input.key];\n }\n\n @action\n public async updateCheckoutErrorFocus(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newCheckoutErrorFocus: CheckoutModule; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._checkoutErrorFocus = input.newCheckoutErrorFocus;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n @action\n public async updateShouldFocusOnCheckoutError(\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Keep the same naming pattern.\n input: { newShouldFocusOnCheckoutError: boolean; additionalProperties?: { [key: string]: unknown } }\n ): Promise {\n this._shouldFocusOnCheckoutError = input.newShouldFocusOnCheckoutError;\n\n const result: ICheckoutActionResult = { status: 'SUCCESS' };\n return Promise.resolve(result);\n }\n\n public async initialize(): Promise {\n if (this.isInitialized) {\n return;\n }\n\n await this._checkoutCart.initialize();\n\n this.setInitialData();\n this.isInitialized = true;\n this._status = 'READY';\n this._attributeValues = [];\n this._extensionProperties = [];\n }\n\n @action\n private cleanCheckoutData(input: { additionalProperties?: object }): Promise {\n this.actionContext.requestContext.sessionStorage.removeCheckoutCartData();\n return Promise.resolve({ status: 'SUCCESS' });\n }\n\n private setInitialData() {\n const { sessionStorage } = this.actionContext.requestContext;\n\n if (this.isPaymentVerificationRedirection) {\n const billingAddress = sessionStorage.getCheckoutCartData(CheckoutStorageKey.BillingAddress);\n const giftCard = sessionStorage.getCheckoutCartData(CheckoutStorageKey.GiftCard);\n\n this._billingAddress = get(billingAddress, 'billingAddress');\n this._isBillingAddressSameAsShippingAddress = get(billingAddress, 'isBillingAddressSameAsShippingAddress');\n this._giftCardExtends = (giftCard && Array.isArray(giftCard) ? giftCard : []) as IGiftCardExtend[];\n this._loyaltyCardNumber = get(sessionStorage.getCheckoutCartData(CheckoutStorageKey.LoyaltyCardNumber), 'loyaltyCardNumber');\n this._loyaltyAmount = get(sessionStorage.getCheckoutCartData(CheckoutStorageKey.LoyaltyAmount), 'loyaltyAmount');\n this._isTermsAndConditionAccepted = get(\n sessionStorage.getCheckoutCartData(CheckoutStorageKey.TermsAndCondition),\n 'isTermsAndConditionAccepted'\n );\n this._checkoutGenericData =\n get(sessionStorage.getCheckoutCartData(CheckoutStorageKey.CheckoutGenericData), 'checkoutGenericData') || {};\n this._paymentTenderType = window.sessionStorage.getItem(CheckoutStorageKey.PaymentTenderType) ?? undefined;\n this._redirectPaymentConnectorId = window.sessionStorage.getItem(CheckoutStorageKey.RedirectPaymentConnectorId) as string;\n this._isExpressCheckoutApplied = (window.sessionStorage.getItem(CheckoutStorageKey.IsExpressCheckoutApplied) as string)\n ? true\n : false;\n }\n\n this.cleanCheckoutData({});\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { BaseCheckoutState } from '../checkout-state/base-checkout-state';\nimport { ICheckoutState } from '../state-interfaces/i-checkout-state';\nimport createGlobalStateDataAction from './global-state-data-action';\n\nexport default createGlobalStateDataAction('CHECKOUTSTATE', BaseCheckoutState);\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 getCatalogId,\n IAction,\n IActionContext,\n IActionInput,\n ICommerceApiSettings,\n ICreateActionContext,\n IRequestContext\n} from '@msdyn365-commerce/core';\nimport { Cart } from '@msdyn365-commerce/retail-proxy';\n\nimport { ICartState } from '../state-interfaces';\nimport { getCartState } from './get-cart-state';\n\n/**\n * Input class for getCart data action.\n */\nexport class GetCartStateDataInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n private readonly catalogId?: number;\n\n constructor(apiSettings: ICommerceApiSettings, requestContext?: IRequestContext) {\n this.apiSettings = apiSettings;\n if (requestContext) {\n this.catalogId = getCatalogId(requestContext);\n }\n }\n\n public getCacheKey = () => `GetCart-ChannelId:${this.apiSettings.channelId}-CatalogId:${this.catalogId ?? 0}`;\n\n public getCacheObjectType = () => 'Cart';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nconst createInput = (inputData: ICreateActionContext) => {\n return new GetCartStateDataInput(inputData.requestContext.apiSettings, inputData.requestContext);\n};\n\n/**\n * Data action to copy the cart for actions.\n * @param input\n * @param ctx\n */\nexport async function getCartStateData(input: GetCartStateDataInput, ctx: IActionContext): Promise {\n const cartState = await getCartState(ctx);\n if (cartState && cartState.cart.Id !== undefined) {\n return cartState;\n }\n\n return undefined;\n}\n\nexport default createObservableDataAction({\n id: '@msdyn365-commerce/global-state/get-cart-state-data',\n action: >getCartStateData,\n input: createInput\n});\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult, IActionContext } from '@msdyn365-commerce/core';\n\nimport { BaseCartState } from '../cart-state/base-cart-state';\nimport { ICartState } from '../state-interfaces/i-cart-state';\nimport cartStateDataAction from './cart-state-data-action';\nimport { GlobalStateInput } from './global-state-data-action';\n\nexport function getCartState(ctx: IActionContext): AsyncResult {\n return cartStateDataAction(\n new GlobalStateInput('CARTSTATE', BaseCartState, ctx.requestContext.apiSettings, ctx.requestContext),\n ctx\n );\n}\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 ICommerceApiSettings,\n ICreateActionContext\n} from '@msdyn365-commerce/core';\nimport { Cart } from '@msdyn365-commerce/retail-proxy';\nimport { copyAsync, readAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\n\nimport { getCartState } from './get-cart-state';\n\n/**\n * Input class for getCheckoutCart data action.\n */\nexport class GetCheckoutCartInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => `CheckoutCart-ChannelId:${this.apiSettings.channelId}-ApiSettingsCatalogId:${this.apiSettings.catalogId}`;\n\n public getCacheObjectType = () => 'CheckoutCart';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\nenum CartTokenPrefix {\n Auth = 't',\n Anon = 'p'\n}\n\nconst createInput = (inputData: ICreateActionContext) => {\n return new GetCheckoutCartInput(inputData.requestContext.apiSettings);\n};\n\n/**\n * Data action to copy the cart for checkout actions.\n * @param input\n * @param ctx\n */\nexport async function getCheckoutCart(input: GetCheckoutCartInput, ctx: IActionContext): Promise {\n const savedCheckoutCartId = ctx.requestContext.cookies.getCheckoutCartCookie();\n const cartCookieParts: string[] = savedCheckoutCartId.split(':');\n let checkoutCartId = null;\n const isAuthenticated = ctx.requestContext.user.isAuthenticated;\n\n if (\n (isAuthenticated && cartCookieParts[0] === CartTokenPrefix.Auth) ||\n (!isAuthenticated && cartCookieParts[0] === CartTokenPrefix.Anon)\n ) {\n checkoutCartId = cartCookieParts[1];\n }\n\n let checkoutCart: Cart | undefined;\n\n if (checkoutCartId) {\n try {\n checkoutCart = await readAsync({ callerContext: ctx, bypassCache: 'none' }, checkoutCartId);\n } catch (error) {\n ctx.telemetry.error('Error getting checkout cart based on saved checkout card id');\n ctx.telemetry.exception(error);\n }\n }\n\n const cartState = await getCartState(ctx);\n if (cartState && cartState.cart.Id !== undefined) {\n if (checkoutCart && checkoutCart.Version && cartState.cart.Version && checkoutCart.Version > cartState.cart.Version) {\n return Promise.resolve(checkoutCart);\n }\n\n return copyAsync({ callerContext: ctx }, cartState.cart.Id, 2)\n .then(cart => {\n ctx.requestContext.cookies.setCheckoutCartCookie(cart, isAuthenticated);\n return cart;\n })\n .catch(error => {\n ctx.telemetry.error('Error copying cart');\n ctx.telemetry.exception(error);\n return undefined;\n });\n }\n\n return undefined;\n}\n\nexport const getCheckoutCartDataAction = createObservableDataAction({\n id: '@msdyn365-commerce/global-state/get-checkout-cart',\n action: >getCheckoutCart,\n input: createInput\n});\n\nexport default getCheckoutCartDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult, IActionContext } from '@msdyn365-commerce/core';\n\nimport { BaseCheckoutState } from '../checkout-state/base-checkout-state';\nimport { ICheckoutState } from '../state-interfaces/i-checkout-state';\nimport checkoutStateDataAction from './checkout-state-data-action';\nimport { GlobalStateInput } from './global-state-data-action';\n\nexport function getCheckoutState(ctx: IActionContext): AsyncResult {\n return checkoutStateDataAction(\n new GlobalStateInput('CHECKOUTSTATE', BaseCheckoutState, ctx.requestContext.apiSettings, ctx.requestContext),\n ctx\n );\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport enum ErrorCode {\n ActionError = 'ActionError',\n Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard = 'Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard',\n Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue = 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue',\n Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit = 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit',\n Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit = 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit',\n Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems = 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems',\n Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount = 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount',\n Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices = 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices',\n Microsoft_Dynamics_Commerce_Runtime_FraudRisk = 'Microsoft_Dynamics_Commerce_Runtime_FraudRisk',\n Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed = 'Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed',\n Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch = 'Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch',\n Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion = 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion',\n Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber = 'Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber',\n Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest = 'Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest',\n Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines = 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines',\n Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed = ' Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed',\n Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender = 'Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender',\n Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry = 'Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry',\n Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard = 'Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard',\n Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints = 'Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints',\n Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided = 'Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided',\n Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance = 'Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance',\n Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties = 'Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties',\n Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount = 'Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount',\n Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed = 'Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed',\n Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment = 'Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment',\n Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired = 'Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired',\n Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported = 'Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported',\n Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment = 'Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment',\n Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo = 'Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo',\n Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult = 'Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult'\n}\n\nexport enum ErrorMessageResource {\n blockedLoyaltyCardErrorMessage = 'blockedLoyaltyCardErrorMessage',\n checkoutTimeoutErrorMessage = 'checkoutTimeoutErrorMessage',\n customerAccountLimitSignDifferentFromAmountDueErrorMessage = 'customerAccountLimitSignDifferentFromAmountDueErrorMessage',\n customerAccountPaymentExceedsAvailableCreditLimitErrorMessage = 'customerAccountPaymentExceedsAvailableCreditLimitErrorMessage',\n customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage = 'customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage',\n customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage = 'customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage',\n customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage = 'customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage',\n customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage = 'customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage',\n fraudRiskErrorMessage = 'fraudRiskErrorMessage',\n giftCardBalanceInquiryFailedErrorMessage = 'giftCardBalanceInquiryFailedErrorMessage',\n giftCardCurrencyMismatchErrorMessage = 'giftCardCurrencyMismatchErrorMessage',\n invalidCartVersionErrorMessage = 'invalidCartVersionErrorMessage',\n invalidLoyaltyCardNumberErrorMessage = 'invalidLoyaltyCardNumberErrorMessage',\n invalidPaymentRequestConsoleErrorMessage = 'invalidPaymentRequestConsoleErrorMessage',\n invalidPaymentRequestErrorMessage = 'invalidPaymentRequestErrorMessage',\n missingRequiredCartTenderLinesErrorMessage = 'missingRequiredCartTenderLinesErrorMessage',\n multipleCustomerAccountPaymentsNotAllowedErrorMessage = 'multipleCustomerAccountPaymentsNotAllowedErrorMessage',\n noMoreThanOneLoyaltyTenderErrorMessage = 'noMoreThanOneLoyaltyTenderErrorMessage',\n noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage = 'noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage',\n noTenderLoyaltyCardErrorMessage = 'noTenderLoyaltyCardErrorMessage',\n notEnoughRewardPointsErrorMessage = 'notEnoughRewardPointsErrorMessage',\n paymentAlreadyVoidedErrorMessage = 'paymentAlreadyVoidedErrorMessage',\n paymentAmountExceedsGiftBalanceErrorMessage = 'paymentAmountExceedsGiftBalanceErrorMessage',\n paymentRequiresMerchantPropertiesConsoleErrorMessage = 'paymentRequiresMerchantPropertiesConsoleErrorMessage',\n paymentRequiresMerchantPropertiesErrorMessage = 'paymentRequiresMerchantPropertiesErrorMessage',\n paymentUsingUnauthorizedAccountErrorMessage = 'paymentUsingUnauthorizedAccountErrorMessage',\n refundAmountMoreThanAllowedErrorMessage = 'refundAmountMoreThanAllowedErrorMessage',\n unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage = 'unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage',\n unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage = 'unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage',\n unableToAuthorizePaymentErrorMessage = 'unableToAuthorizePaymentErrorMessage',\n unableToCancelPaymentErrorMessage = 'unableToCancelPaymentErrorMessage',\n unableToReadCardTokenInfoErrorMessage = 'unableToReadCardTokenInfoErrorMessage',\n unableToRetrieveCardPaymentAcceptResultErrorMessage = 'unableToRetrieveCardPaymentAcceptResultErrorMessage'\n}\n\nexport enum ErrorLocation {\n Checkout,\n CheckoutBillingAddress,\n CheckoutCustomerAccountPayment,\n CheckoutDeliveryOptions,\n CheckoutExpress,\n CheckoutGiftCard,\n CheckoutGuestProfile,\n CheckoutLoyalty,\n CheckoutPaymentInstrument,\n CheckoutPickup,\n CheckoutShippingAddress,\n CheckoutTermsAndConditions,\n Console,\n GiftCardBalanceCheck\n}\n\nexport enum CheckoutModule {\n CheckoutBillingAddress = 'checkout-billing-address',\n CheckoutCustomerAccountPayment = 'checkout-customer-account-payment',\n CheckoutDeliveryOptions = 'checkout-delivery-options',\n CheckoutExpress = 'checkout-express',\n CheckoutGiftCard = 'checkout-gift-card',\n CheckoutGuestProfile = 'checkout-guest-profile',\n CheckoutLoyalty = 'checkout-loyalty',\n CheckoutPaymentInstrument = 'checkout-payment-instrument',\n CheckoutPickup = 'checkout-pickup',\n CheckoutShippingAddress = 'checkout-shipping-address',\n CheckoutTermsAndConditions = 'checkout-terms-and-conditions',\n None = 'none'\n}\n"],"names":["BaseCheckoutCartState","BaseCartState","this","isInitialized","newCart","getCheckoutCart","GetCheckoutCartInput","actionContext","requestContext","apiSettings","_cart","_status","CheckoutStorageKey","BaseCheckoutState","GlobalState","constructor","super","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_customerAccountAmount","_emailAddressFromExpressCheckout","_checkoutGenericData","_checkoutCart","_attributeValues","_extensionProperties","_shouldEnableSinglePaymentAuthorizationCheckout","app","config","shouldEnableSinglePaymentAuthorizationCheckout","_shouldEnableCheckoutErrorDisplayMessaging","shouldEnableCheckoutErrorDisplayMessaging","_salesOrder","_orderedProducts","_tokenizedPaymentCard","_tenderLine","_billingAddress","_isBillingAddressSameAsShippingAddress","_shippingAddress","_cartLinesWithShippingAddress","_hasShippingAddress","_hasCartDeliveryMode","_cardPrefix","_paymentTenderType","giftCardExtends","_loyaltyCardNumber","_hasGuestCheckoutEmail","_isTermsAndConditionAccepted","_isTermsAndConditionChecked","_shouldCollapsePaymentSection","_shouldTriggerPaymentWithPlaceOrder","_isPaymentSectionContainerReady","_cardPaymentAcceptResult","_isPaymentSectionContainerHasError","_redirectAdditionalContext","_redirectPaymentConnectorId","_checkoutErrorPaymentConnectorId","_isPlaceOrderEnabledInRedirection","_isPaymentVerificationRequired","_isCheckoutCallFailed","_shouldEnableExpressCheckoutInCheckout","_shouldEnableExpressCheckoutInCart","_shippingAddressFromExpressCheckout","_billingAddressFromExpressCheckout","_isExpressCheckoutApplied","_isExpressAddressApplied","_isExpressCheckoutAppliedInCartPage","_isExpressPaymentModulesReady","requestFormData","query","pv","redirectResult","_checkoutError","_isBillingAddressHasError","_checkoutErrorFocus","_shouldFocusOnCheckoutError","updateSalesOrder","input","newSalesOrder","newOrderedProducts","AttributeValues","ExtensionProperties","Promise","resolve","status","newAttributeValues","newExtensionProperties","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","newShippingAddress","newCartLinesWithShippingAddress","newHasShippingAddress","newHasCartDeliveryMode","newIsTermsAndConditionAccepted","newIsTermsAndConditionChecked","newShouldCollapsePaymentSection","newShouldTriggerPaymentWithPlaceOrder","newIsPaymentSectionContainerReady","newCardPaymentAcceptResult","newIsPaymentSectionContainerHasError","newRedirectAdditionalContext","newRedirectPaymentConnectorId","newCheckoutErrorPaymentConnectorId","newIsCheckoutCallFailed","newIsPlaceOrderEnabledInRedirection","newIsPaymentVerificationRequired","updateBillingAddress","_input$additionalProp","newBillingAddress","additionalProperties","isBillingAddressSameAsShippingAddress","removeBillingAddress","undefined","updatePaymentTenderType","newPaymentTenderType","updateCardPrefix","newCardPrefix","removeGiftCard","filter","giftCard","Id","giftCardNumber","removeGiftCardExtend","addGiftCard","Pin","ExpirationDate","TenderTypeId","gitCardExtend","_objectSpread","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","Number","newAmount","toFixed","_noteOnCart$","_noteInput$","newGuestCheckoutEmail","emailOnCart","checkoutCart","cart","ReceiptEmail","customerReqOnCart","CustomerRequisition","customerRefOnCart","Comment","noteOnCart","Notes","noteInput","note","customerReference","customerRequisition","Description","updateReceiptEmail","newEmail","updateCartLines","updatedCartLinesObject","newHasGuestCheckoutEmail","removeCheckoutCartId","cookies","removeCheckoutCartCookie","saveDataInStorage","sessionStorage","billingAddress","setCheckoutCartData","BillingAddress","length","GiftCard","loyaltyCardNumber","LoyaltyCardNumber","loyaltyAmount","LoyaltyAmount","isTermsAndConditionAccepted","TermsAndCondition","paymentTenderType","window","setItem","PaymentTenderType","redirectPaymentConnectorId","RedirectPaymentConnectorId","isExpressCheckoutApplied","IsExpressCheckoutApplied","toString","filtered","Object","keys","reduce","filteredData","key","SaveDataBeforeRedirect","CheckoutGenericData","checkoutGenericData","updateCustomerAccountAmount","newBillingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","newEmailAddressFromExpressCheckout","newShouldEnableExpressCheckoutInCheckout","newShouldEnableExpressCheckoutInCart","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newIsExpressCheckoutAppliedInCartPage","newIsBillingAddressHasError","newIsExpressPaymentModulesReady","newCheckoutError","setCheckoutGenericData","getCheckoutGenericData","newCheckoutErrorFocus","newShouldFocusOnCheckoutError","initialize","setInitialData","cleanCheckoutData","removeCheckoutCartData","isPaymentVerificationRedirection","_window$sessionStorag","getCheckoutCartData","get","Array","isArray","getItem","__decorate","observable","computed","action","createGlobalStateDataAction","GetCartStateDataInput","getCacheKey","_this$catalogId","channelId","catalogId","getCacheObjectType","dataCacheType","getCatalogId","async","getCartStateData","ctx","cartState","getCartState","createObservableDataAction","id","inputData","cartStateDataAction","GlobalStateInput","CartTokenPrefix","cartCookieParts","getCheckoutCartCookie","split","checkoutCartId","isAuthenticated","user","Auth","Anon","readAsync","callerContext","bypassCache","error","telemetry","exception","Version","copyAsync","then","setCheckoutCartCookie","catch","getCheckoutState","checkoutStateDataAction","ErrorCode","ErrorMessageResource","ErrorLocation","CheckoutModule"],"sourceRoot":""}