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CAEVtV,aAAc,sCAMtB,MAGMwV,EAAmB,IAAID,kBAAiB,KAC1Czf,KAAK2f,4BAETD,EAAiBE,QAAQN,EANV,CAAEO,YAAY,EAAMC,WAAW,EAAMC,SAAS,IAQ7D/f,KAAKwf,SAAS,CACV5W,SAAU8W,KAOD,KAAAM,qBAAuB,KAAW,IAAAC,EAC5B,QAAnBA,EAAAjgB,KAAKkf,MAAMtW,gBAAQ,IAAAqX,GAAnBA,EAAqBC,cAMR,KAAAP,uBAAyB,KAEtC,MAAMR,IAAcnf,KAAKof,QAAQpU,SAAWhL,KAAKof,QAAQpU,QAAQmV,YAAc,GAAKngB,KAAKof,QAAQpU,QAAQoV,aAAe,GACnHpgB,KAAKkf,MAAMC,WAAaA,IACzBnf,KAAKwf,SAAS,CACVL,UAAAA,IAEJnf,KAAKggB,yBA9ENnD,oBACH7c,KAAKqf,uBAGFnC,uBACHld,KAAKggB,uBAGFxX,sBAAsBC,EAAqC4X,GAC9D,OAAIrgB,KAAKkf,QAAUmB,GAAargB,KAAKkE,QAAUuE,EAM5CC,SACH,OACIC,EAAAA,cAAA,OAAKoI,UAAW,GAAGA,uBAAgCO,IAAKtR,KAAKof,SACzDzW,EAAAA,cAAC5E,EAAgBjD,OAAA4d,OAAA,GAAK1e,KAAKkE,MAAK,CAAEoc,mBAAoBtgB,KAAKkf,WAiE3E,OAAOD","sources":["webpack://Msdyn365.Commerce.Online/../../src/checkout-state-data-action.ts?8344","webpack://Msdyn365.Commerce.Online/../../src/checkout-state.ts?acd8","webpack://Msdyn365.Commerce.Online/../../src/checkout-utilities.data.ts?b2cc","webpack://Msdyn365.Commerce.Online/../../../src/module-state-manager/module-state.ts?7579","webpack://Msdyn365.Commerce.Online/../../../src/module-state-manager/with-module-state.tsx?61ca","webpack://Msdyn365.Commerce.Online/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://Msdyn365.Commerce.Online/./src/common/payment-instrument.dropin.style.ts?5102","webpack://Msdyn365.Commerce.Online/./src/common/add-payment-form.tsx?1cf5","webpack://Msdyn365.Commerce.Online/./src/common/checkout.tsx?29a4","webpack://Msdyn365.Commerce.Online/./src/common/empty-active-cart.tsx?dc76","webpack://Msdyn365.Commerce.Online/./src/common/error.tsx?096f","webpack://Msdyn365.Commerce.Online/./src/common/iframe.tsx?feca","webpack://Msdyn365.Commerce.Online/./src/common/index.ts?f3e7","webpack://Msdyn365.Commerce.Online/./src/common/payment-instrument-message.ts?53ea","webpack://Msdyn365.Commerce.Online/./src/common/place-order.tsx?8526","webpack://Msdyn365.Commerce.Online/./src/common/waiting.tsx?8095","webpack://Msdyn365.Commerce.Online/./src/common/with-visibility-observer.tsx?95e4"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n    CacheType,\n    createObservableDataAction,\n    IAction,\n    IActionContext,\n    IActionInput,\n    IAny,\n    ICommerceApiSettings,\n    ICreateActionContext,\n    IGeneric\n} from '@msdyn365-commerce/core';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { CheckoutState } from './checkout-state';\n\n/**\n * CheckoutState - action input.\n */\nexport class CheckoutStateInput implements IActionInput {\n    private readonly apiSettings: ICommerceApiSettings;\n\n    constructor(apiSettings: ICommerceApiSettings) {\n        this.apiSettings = apiSettings;\n    }\n\n    public getCacheKey = () => buildCacheKey('CheckoutState', this.apiSettings);\n\n    public getCacheObjectType = () => 'CheckoutState';\n\n    public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CheckoutState - action.\n * @param input\n * @param ctx\n */\nexport async function checkoutStateAction(input: CheckoutStateInput, ctx: IActionContext): Promise<CheckoutState> {\n    return new CheckoutState();\n}\n\n/**\n * CheckoutState - create new input for create action.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext<IGeneric<IAny>>): IActionInput => {\n    return new CheckoutStateInput(inputData.requestContext.apiSettings);\n};\n\n/**\n * CheckoutState - create action.\n */\nexport const checkoutStateActionDataAction = createObservableDataAction<CheckoutState>({\n    action: <IAction<CheckoutState>>checkoutStateAction,\n    input: createInput\n});\n\nexport default checkoutStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, GiftCard, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { action, computed, observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class CheckoutState {\n    @observable private _tokenizedPaymentCard: TokenizedPaymentCard | undefined;\n\n    @computed public get tokenizedPaymentCard(): Readonly<TokenizedPaymentCard> | undefined {\n        return this._tokenizedPaymentCard;\n    }\n\n    @observable private _tenderLine: TenderLine | undefined;\n\n    @computed public get tenderLine(): Readonly<TenderLine> | undefined {\n        return this._tenderLine;\n    }\n\n    @observable private _billingAddress: Address | undefined;\n\n    @computed public get billingAddress(): Readonly<Address> | undefined {\n        return this._billingAddress;\n    }\n\n    @observable private _shippingAddress: Address | undefined;\n\n    @computed public get shippingAddress(): Readonly<Address> | undefined {\n        return this._shippingAddress;\n    }\n\n    @observable private _cardPrefix: string | undefined;\n\n    @computed public get cardPrefix(): Readonly<string> | undefined {\n        return this._cardPrefix;\n    }\n\n    @observable private _giftCards: GiftCard[] = [];\n\n    @computed public get giftCards(): readonly GiftCard[] {\n        return this._giftCards;\n    }\n\n    @observable private _giftCardExtends: IGiftCardExtend[] = [];\n\n    @computed public get giftCardExtends(): readonly IGiftCardExtend[] {\n        return this._giftCardExtends;\n    }\n\n    @observable private _loyaltyCardNumber?: string;\n\n    @computed public get loyaltyCardNumber(): Readonly<string> | undefined {\n        return this._loyaltyCardNumber;\n    }\n\n    @observable private _loyaltyAmount: number = 0;\n\n    @computed public get loyaltyAmount(): Readonly<number> | number {\n        return this._loyaltyAmount;\n    }\n\n    @observable private _guestCheckoutEmail: string = '';\n\n    @computed public get guestCheckoutEmail(): Readonly<string> | string {\n        return this._guestCheckoutEmail;\n    }\n\n    @observable private _isTermsAndConditionAccepted: boolean = false;\n\n    @computed public get isTermsAndConditionAccepted(): Readonly<boolean> | boolean {\n        return this._isTermsAndConditionAccepted;\n    }\n\n    @observable private _customerAccountAmount: number = 0;\n\n    @computed public get customerAccountAmount(): Readonly<number> | number {\n        return this._customerAccountAmount;\n    }\n\n    @action\n    public updateTokenizedPaymentCard(newTokenizedPaymentCard: TokenizedPaymentCard): void {\n        this._tokenizedPaymentCard = newTokenizedPaymentCard;\n    }\n\n    @action\n    public updateTenderLine(newTenderLine: TenderLine | undefined): void {\n        this._tenderLine = newTenderLine;\n    }\n\n    @action\n    public updateShippingAddress(newShippingAddress: Address): void {\n        this._shippingAddress = newShippingAddress;\n    }\n\n    @action\n    public updateBillingAddress(newBillingAddress: Address): void {\n        this._billingAddress = newBillingAddress;\n    }\n\n    @action\n    public updateCardPrefix(newCardPrefix: string): void {\n        this._cardPrefix = newCardPrefix;\n    }\n\n    @action\n    public removeGiftCard(giftCardNumber: string): void {\n        this._giftCards = this._giftCards.filter(giftCard => giftCard.Id !== giftCardNumber);\n    }\n\n    @action\n    public removeGiftCardExtend(giftCardNumber: string): void {\n        this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== giftCardNumber);\n    }\n\n    @action\n    public addGiftCard(giftCard: GiftCard): void {\n        this._giftCards = [giftCard, ...this._giftCards];\n    }\n\n    @action\n    public addGiftCardExtend(giftCard: IGiftCardExtend): void {\n        this._giftCardExtends = [giftCard, ...this._giftCards];\n    }\n\n    @action\n    public updateLoyaltyCardNumber(newLoyaltyCardNumber: string): void {\n        this._loyaltyCardNumber = newLoyaltyCardNumber;\n    }\n\n    @action\n    public updateLoyaltyAmount(newAmount: number): void {\n        this._loyaltyAmount = newAmount;\n    }\n\n    @action\n    public updateGuestCheckoutEmail(newGuestCheckoutEmail: string): void {\n        this._guestCheckoutEmail = newGuestCheckoutEmail;\n    }\n\n    @action\n    public updateTermsAndConditionsAcceptance(newIsTermsAndConditionAccepted: boolean): void {\n        this._isTermsAndConditionAccepted = newIsTermsAndConditionAccepted;\n    }\n\n    @action\n    public updateCustomerAccountAmount(newAmount: number): void {\n        this._customerAccountAmount = newAmount;\n    }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/**\n * EnabledPaymentsForOBO enum.\n */\n export enum EnabledPaymentsForOBO {\n    OnCustomerAccount = 1,\n    ExpressPayment = 0,\n    Loyalty = 0,\n    GiftCard = 0,\n    PaymentInstrument = 0,\n    ApplePay = 0\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n    public getCacheKey = () => 'ModuleState';\n\n    public getCacheObjectType = () => 'ModuleState';\n\n    public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n    const cacheKey = new ModuleStatesCacheKey();\n\n    let moduleStates = <IModuleStates>ctx.get<IModuleStates>(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n    if (moduleStates) {\n        return moduleStates;\n    }\n    ctx.update(cacheKey, {});\n    moduleStates = <IModuleStates>ctx.get<IModuleStates>(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n    return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n    const cacheKey = new ModuleStatesCacheKey();\n    ctx.update(cacheKey, value);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n    enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState = <P extends IProps>(WrappedComponent: React.ComponentType<P>): React.ComponentType<P> => {\n    /**\n     *\n     * ModuleState component.\n     * @extends {React.Component<P>}\n     */\n    @observer\n    class ModuleState extends React.Component<P> {\n        constructor(props: P) {\n            super(props);\n            this.initializeState();\n        }\n\n        public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n            if (this.props === nextProps) {\n                return false;\n            }\n            return true;\n        }\n\n        public render(): JSX.Element | null {\n            const { id } = this.props;\n            return <WrappedComponent {...this.props} moduleState={this.getModuleStateManager(id)} />;\n        }\n\n        private readonly initializeState = (): void => {\n            const { id, typeName, context } = this.props;\n            const states = getModuleStates(context.actionContext);\n            if (!states) {\n                this.props.telemetry.error('withModuleState initializeState() - states not found');\n                return;\n            }\n\n            if (states[id]) {\n                // State has been initialized\n                return;\n            }\n\n            updateModuleStates(\n                {\n                    ...states,\n                    [id]: {\n                        id,\n                        typeName,\n                        hasInitialized: false,\n                        hasError: false,\n                        isRequired: true,\n                        isCancellable: true,\n                        isSubmitContainer: false,\n                        status: undefined,\n                        childIds: []\n                    }\n                },\n                context.actionContext\n            );\n        };\n\n        /**\n         * GetModuleStateManager\n         * Get module state manager by id.\n         * @param id\n         */\n        private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n            const moduleState = this.get()[id];\n            return {\n                ...moduleState!,\n                hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n                hasError: this.validate(id, { hasError: true }), // Partial has error is error\n                isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n                isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n                isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n                isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n                isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n                isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n                shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n                hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n                hasModuleState: this.hasModuleState(id),\n                setIsRequired: (value: boolean): void => {\n                    this.update(id, { isRequired: value });\n                },\n                setIsCancellable: (value: boolean): void => {\n                    this.update(id, { isCancellable: value });\n                },\n                setIsSubmitContainer: (value: boolean): void => {\n                    this.update(id, { isSubmitContainer: value });\n                },\n                setHasError: (value: boolean): void => {\n                    this.update(id, { hasError: value });\n                },\n                onReady: (): void => {\n                    this.update(id, { status: 'ready' });\n                },\n                onUpdating: (): void => {\n                    this.update(id, { status: 'updating' });\n                },\n                onPending: (): void => {\n                    this.update(id, { status: 'pending' });\n                },\n                onSkip: (): void => {\n                    this.update(id, { status: 'skipped' });\n                },\n                onDisable: (): void => {\n                    this.update(id, { status: 'disabled' });\n                },\n                getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n                getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n                init: (options?: Partial<IModuleState>): void => {\n                    if (moduleState?.hasInitialized) {\n                        // State has been initialized\n                        return;\n                    }\n                    this.update(id, {\n                        hasInitialized: true,\n                        ...options\n                    });\n                }\n            };\n        };\n\n        /**\n         * GetModuleStateManagerByTypeName\n         * Get module state manager by type name.\n         * @param typeName\n         */\n        private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n            const moduleStates = getModuleStates(this.props.context.actionContext);\n            const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n            return this.getModuleStateManager((moduleState && moduleState.id) || '');\n        };\n\n        /**\n         * Get\n         * Get all module states.\n         */\n        private readonly get = (): IModuleStates => {\n            return getModuleStates(this.props.context.actionContext);\n        };\n\n        /**\n         * Update\n         * Update module state.\n         * @param id\n         * @param value\n         */\n        private readonly update = (id: string, value: Partial<IModuleState>): void => {\n            // Console.log('withModuleState - update', id, value);\n            const modules = this.get();\n            if (!modules[id]) {\n                this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n                return;\n            }\n            modules[id] = {\n                ...modules[id]!,\n                ...value\n            };\n        };\n\n        private readonly _validateLeaf = (id: string, source: Partial<IModuleState>): boolean => {\n            const modules = this.get();\n            const module = modules[id];\n            if (!module) {\n                return false;\n            }\n            return isMatch(module, source);\n        };\n\n        private readonly _validateContainer = (\n            id: string,\n            source: Partial<IModuleState>,\n            allMatched?: boolean,\n            skipSkippableItem?: boolean\n        ): boolean => {\n            const modules = this.get();\n            const module = modules[id];\n            if (!module) {\n                // Module doesn't has module state\n                return !!allMatched;\n            }\n\n            if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n                // Skip disabled or skipped modules\n                return !!allMatched;\n            }\n\n            // It is leaf module\n            if (!module.childIds || module.childIds.length === 0) {\n                return this._validateLeaf(id, source);\n            }\n\n            let childIds = module.childIds;\n\n            if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n                // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n                childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n            }\n\n            // It is container module\n            const method = allMatched ? 'every' : 'some';\n            return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n        };\n\n        /**\n         * Check if it is a section container with payment module.\n         * @param moduleId -- The id of the module.\n         * @returns If it is a section container with payment module.\n         */\n        private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n            if (!moduleId.includes(sectionContainerModuleId)) {\n                return false;\n            }\n\n            const modules = this.get();\n            const module = modules[moduleId];\n\n            if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n                return true;\n            }\n\n            return false;\n        };\n\n        /**\n         * Validate\n         * Validate current module and all its child module match the provided condition.\n         * @param id\n         * @param source\n         * @param allMatched\n         * @param skipSkippableItem\n         */\n        private readonly validate = (\n            id: string,\n            source: Partial<IModuleState>,\n            allMatched?: boolean,\n            skipSkippableItem?: boolean\n        ): boolean => {\n            const modules = this.get();\n            const module = modules[id];\n            if (!module) {\n                return false;\n            }\n\n            // It is leaf module\n            if (!module.childIds || module.childIds.length === 0) {\n                return this._validateLeaf(id, source);\n            }\n\n            // It is container module\n            return this._validateContainer(id, source, allMatched, skipSkippableItem);\n        };\n\n        /**\n         * HasExternalSubmitGroup\n         * Module will use external submit group.\n         */\n        private readonly hasExternalSubmitGroup = (): boolean => {\n            return !!this.props.enableControl;\n        };\n\n        /**\n         * HasModuleState\n         * Module is using module state manager.\n         * @param id\n         */\n        private readonly hasModuleState = (id: string): boolean => {\n            const modules = this.get();\n            const module = modules[id];\n            return !!module;\n        };\n    }\n\n    return ModuleState;\n};\n\nexport default withModuleState;\n","/*!\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    CheckoutModule,\n    ErrorCode,\n    ErrorLocation,\n    ErrorMessageResource,\n    getCheckoutState,\n    ICheckoutError,\n    ICheckoutState\n} from '@msdyn365-commerce/global-state/';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class -- create global class\nexport class CheckoutErrors {\n    public static readonly ActionError: ICheckoutError = {\n        errorCode: ErrorCode.ActionError,\n        errorMessageResource: ErrorMessageResource.checkoutTimeoutErrorMessage,\n        errorLocation: ErrorLocation.Checkout\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n        errorMessageResource: ErrorMessageResource.blockedLoyaltyCardErrorMessage,\n        errorLocation: ErrorLocation.CheckoutLoyalty\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n        errorMessageResource: ErrorMessageResource.customerAccountLimitSignDifferentFromAmountDueErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n        errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n        errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n        errorMessageResource: ErrorMessageResource.customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n        errorMessageResource: ErrorMessageResource.customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_FraudRisk: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n        errorMessageResource: ErrorMessageResource.fraudRiskErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n        errorMessageResource: ErrorMessageResource.giftCardBalanceInquiryFailedErrorMessage,\n        errorLocation: ErrorLocation.CheckoutGiftCard\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n        errorMessageResource: ErrorMessageResource.giftCardCurrencyMismatchErrorMessage,\n        errorLocation: ErrorLocation.CheckoutGiftCard\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n        errorMessageResource: ErrorMessageResource.invalidCartVersionErrorMessage,\n        errorLocation: ErrorLocation.Checkout\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n        errorMessageResource: ErrorMessageResource.invalidLoyaltyCardNumberErrorMessage,\n        errorLocation: ErrorLocation.CheckoutLoyalty\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n        errorMessageResource: ErrorMessageResource.invalidPaymentRequestErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n        errorMessageResource: ErrorMessageResource.invalidPaymentRequestConsoleErrorMessage,\n        errorLocation: ErrorLocation.Console\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n        errorMessageResource: ErrorMessageResource.missingRequiredCartTenderLinesErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n        errorMessageResource: ErrorMessageResource.multipleCustomerAccountPaymentsNotAllowedErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n        errorMessageResource: ErrorMessageResource.noMoreThanOneLoyaltyTenderErrorMessage,\n        errorLocation: ErrorLocation.CheckoutLoyalty\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n        errorMessageResource: ErrorMessageResource.noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage,\n        errorLocation: ErrorLocation.CheckoutGiftCard\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n        errorMessageResource: ErrorMessageResource.noTenderLoyaltyCardErrorMessage,\n        errorLocation: ErrorLocation.CheckoutLoyalty\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n        errorMessageResource: ErrorMessageResource.notEnoughRewardPointsErrorMessage,\n        errorLocation: ErrorLocation.CheckoutLoyalty\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n        errorMessageResource: ErrorMessageResource.paymentAlreadyVoidedErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n        errorMessageResource: ErrorMessageResource.paymentAmountExceedsGiftBalanceErrorMessage,\n        errorLocation: ErrorLocation.CheckoutGiftCard\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n        errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n        errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesConsoleErrorMessage,\n        errorLocation: ErrorLocation.Console\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n        errorMessageResource: ErrorMessageResource.paymentUsingUnauthorizedAccountErrorMessage,\n        errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n        errorMessageResource: ErrorMessageResource.refundAmountMoreThanAllowedErrorMessage,\n        errorLocation: ErrorLocation.CheckoutLoyalty\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n        errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n        errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n        errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n        errorMessageResource: ErrorMessageResource.unableToCancelPaymentErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n        errorMessageResource: ErrorMessageResource.unableToReadCardTokenInfoErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult: ICheckoutError = {\n        errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult,\n        errorMessageResource: ErrorMessageResource.unableToRetrieveCardPaymentAcceptResultErrorMessage,\n        errorLocation: ErrorLocation.CheckoutPaymentInstrument\n    };\n\n    public static readonly checkoutErrorsList: ICheckoutError[] = [\n        CheckoutErrors.ActionError,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n        CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult\n    ];\n}\n\nexport async function setCheckoutErrors(\n    errorCode: string,\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    resources: any,\n    isExpressCheckoutApplied: boolean,\n    ctx: IActionContext\n): Promise<void> {\n    let clientCheckoutError: ICheckoutError | undefined;\n    let consoleCheckoutErrors: ICheckoutError[] = [];\n\n    const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n        ctx.telemetry.exception(error);\n        throw error;\n    });\n\n    // find the checkout errors\n    for (const checkoutError of CheckoutErrors.checkoutErrorsList) {\n        if (errorCode === checkoutError.errorCode) {\n            if (checkoutError.errorLocation === ErrorLocation.Console) {\n                let consoleCheckoutError: ICheckoutError = {\n                    errorCode: checkoutError.errorCode,\n                    errorMessageResource: checkoutError.errorMessageResource,\n                    errorLocation: checkoutError.errorLocation\n                };\n                consoleCheckoutErrors.push(consoleCheckoutError);\n            } else {\n                if (clientCheckoutError) {\n                    ctx.telemetry.exception(new Error('Invalid number of client checkout errors.'));\n                    throw new Error('Invalid number of client checkout errors.');\n                } else {\n                    clientCheckoutError = {\n                        errorCode: checkoutError.errorCode,\n                        errorMessageResource: checkoutError.errorMessageResource,\n                        errorLocation: checkoutError.errorLocation\n                    };\n                }\n            }\n        }\n    }\n\n    // log the console checkout errors\n    for (let consoleCheckoutError of consoleCheckoutErrors) {\n        consoleCheckoutError.errorMessage = getCheckoutErrorMessage(resources, consoleCheckoutError.errorMessageResource!);\n        console.log(consoleCheckoutError.errorMessage);\n    }\n\n    // handle the client checkout error\n    if (clientCheckoutError) {\n        clientCheckoutError.errorMessage = getCheckoutErrorMessage(resources, clientCheckoutError.errorMessageResource!);\n\n        if (isExpressCheckoutApplied && clientCheckoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument) {\n            clientCheckoutError.errorLocation = ErrorLocation.Checkout;\n        }\n\n        await checkoutState.updateCheckoutError({ newCheckoutError: clientCheckoutError });\n        await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n    } else {\n        // if could not map to any checkout error(s), show the generic error\n        if (consoleCheckoutErrors.length === 0) {\n            let genericError = {\n                errorMessage: resources.genericErrorMessage,\n                errorLocation: ErrorLocation.Checkout\n            };\n\n            await checkoutState.updateCheckoutError({ newCheckoutError: genericError });\n            await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n        }\n    }\n}\n\nexport async function focusOnCheckoutError(checkoutErrorRef: React.RefObject<HTMLElement>, ctx: IActionContext): Promise<void> {\n    const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n        ctx.telemetry.exception(error);\n        throw error;\n    });\n\n    checkoutErrorRef.current && checkoutErrorRef.current.scrollIntoView();\n\n    await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\n    await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: false });\n}\n\nexport async function setCheckoutErrorFocus(checkoutModuleId: string, ctx: IActionContext): Promise<void> {\n    const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n        ctx.telemetry.exception(error);\n        throw error;\n    });\n\n    for (let checkoutModule of Object.keys(CheckoutModule)) {\n        if (checkoutModuleId.includes(CheckoutModule[checkoutModule])) {\n            await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule[checkoutModule] });\n            return;\n        }\n    }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getCheckoutErrorMessage(resources: any, errorMessageResource: ErrorMessageResource): string {\n    let errorResource = Object.keys(resources).find(resource => resource === errorMessageResource);\n    return resources[errorResource!];\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// eslint-disable-next-line import/no-anonymous-default-export -- Existing code.\nexport default `\n    .adyen-dropin {\n        font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif;\n        font-weight: normal;\n        font-size: 16px;\n        line-height: 21px;\n        margin-left: -7px;\n        text-transform: none;\n    }\n\n    /* Card pannel */\n\n    .adyen-checkout__payment-method--next-selected,\n    .adyen-checkout__payment-method:last-child {\n        background-color: transparent;\n        background: none !important;\n        border: none;\n    }\n\n    .adyen-checkout__payment-method__name {\n        color: #1D1D1D;\n        font-weight: normal;\n    }\n\n    .adyen-checkout__label__text--error,\n    .adyen-checkout__helper-text,\n    .adyen-checkout__label__text {\n        color: #1D1D1D;\n        font-size: 18px;\n        line-height: 24px;\n        padding-bottom: 4px;\n    }\n\n    .adyen-checkout__error-text {\n        color: #A80000;\n        font-size: 16px;\n        line-height: 21px;\n    }\n\n    .adyen-checkout__input {\n        background: white;\n        box-shadow: none;\n        border: none;\n        border-radius: 0;\n        box-shadow: none;\n        color: #1D1D1D;\n        height: 42px;\n        padding: 5px 8px;\n    }\n\n    .adyen-checkout__input--focus,\n    .adyen-checkout__input--focus:hover,\n    .adyen-checkout__input:active,\n    .adyen-checkout__input:active:hover,\n    .adyen-checkout__input:focus,\n    .adyen-checkout__input:focus:hover {\n        border: 1px dashed #fff;\n        outline: 1px dashed #000;\n        box-shadow: none;\n    }\n\n    .adyen-checkout__input:hover {\n        border: none;\n    }\n\n    .adyen-checkout__input--error,\n    .adyen-checkout__input--error:hover,\n    .adyen-checkout__input--invalid,\n    .adyen-checkout__input--invalid:hover {\n        border: none;\n        border-left: 2px solid #A80000;\n        color: #A80000;\n    }\n\n    .adyen-checkout__label--focused .adyen-checkout__label__text {\n        color: inherit;\n    }\n`;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { Iframe } from './iframe';\nimport defaultPaymentConnectorDropinStyle from './payment-instrument.dropin.style';\nimport defaultPaymentConnectorPaypalStyle from './payment-instrument.paypal.style';\nimport defaultPaymentConnectorStyle from './payment-instrument.style';\n\n/**\n * Interface for add payment form.\n */\nexport interface IAddPaymentFormProps {\n    acceptPageUrl?: string;\n    acceptPageContent?: string;\n    iframeRef?: React.RefObject<Iframe>;\n    canSubmit?: boolean;\n    canCancel?: boolean;\n    hasSelectedItem?: boolean;\n    iFrameHeightOverride?: number;\n    style?: string;\n    requestUrlOrigin?: string;\n    messageOrigin?: string;\n    isFetchingPaymentConnector?: boolean;\n    paymentStyleOverride?: string;\n    className?: string;\n    moduleName?: string;\n    resources: {\n        cancelButtonText: string;\n        submitButtonText: string;\n        iframeAriaLabel: string;\n    };\n    // eslint-disable-next-line @typescript-eslint/naming-convention -- For IFrame.\n    onIFrameMessage?(event: MessageEvent): void;\n    onSubmit?(): void;\n    onCancel?(): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0 - Root.\n * @param root0.acceptPageUrl - Accept page url.\n * @param root0.acceptPageContent - Accept page content.\n * @param root0.onSubmit - On submit.\n * @param root0.onCancel - On cancel.\n * @param root0.onIFrameMessage - On iFrame message.\n * @param root0.iframeRef - IFrame ref.\n * @param root0.canSubmit - Can submit.\n * @param root0.canCancel - Can cancel.\n * @param root0.iFrameHeightOverride - IFrame height override.\n * @param root0.requestUrlOrigin - Origin request url.\n * @param root0.messageOrigin - Message origin.\n * @param root0.isFetchingPaymentConnector - Is fetching payment connector.\n * @param root0.paymentStyleOverride - Payment style override.\n * @param root0.className - ClassName.\n * @param root0.moduleName - ModuleName.\n * @param root0.resources - Resources.\n * @param root0.resources.cancelButtonText - Cancel button text.\n * @param root0.resources.submitButtonText - Submit button text.\n * @param root0.resources.iframeAriaLabel - IFrame aria label.\n * @extends {React.FunctionComponent<IAddPaymentFormProps>}\n * @returns React nodes.\n */\nexport const AddPaymentFormComponent: React.FunctionComponent<IAddPaymentFormProps> = ({\n    acceptPageUrl = '',\n    acceptPageContent = '',\n    onSubmit,\n    onCancel,\n    // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing name.\n    onIFrameMessage,\n    iframeRef,\n    canSubmit,\n    canCancel,\n    iFrameHeightOverride,\n    requestUrlOrigin,\n    messageOrigin,\n    isFetchingPaymentConnector,\n    paymentStyleOverride,\n    className = 'ms-checkout-payment-instrument',\n    moduleName = 'checkout-payment-instrument',\n    resources: { cancelButtonText, submitButtonText, iframeAriaLabel }\n}) => (\n    <div className={classnames(`${className}__add`, { 'is-fetching': isFetchingPaymentConnector })}>\n        <Iframe\n            className={`${className}__add`}\n            moduleName={moduleName}\n            ref={iframeRef}\n            iframeAriaLabel={iframeAriaLabel}\n            displayContent={acceptPageContent}\n            sourceUrl={acceptPageUrl}\n            requestUrlOrigin={requestUrlOrigin}\n            messageOrigin={messageOrigin}\n            onIFrameMessage={onIFrameMessage}\n            height={iFrameHeightOverride}\n            css={\n                paymentStyleOverride ??\n                defaultPaymentConnectorStyle + defaultPaymentConnectorDropinStyle + defaultPaymentConnectorPaypalStyle\n            }\n        />\n        {canSubmit && (\n            <Button className={`${className}__btn-save`} title={submitButtonText} color='primary' onClick={onSubmit}>\n                {submitButtonText}\n            </Button>\n        )}\n        {canCancel && (\n            <Button className={`${className}__btn-cancel`} title={cancelButtonText} color='secondary' onClick={onCancel}>\n                {cancelButtonText}\n            </Button>\n        )}\n    </div>\n);\n\nexport default React.memo(AddPaymentFormComponent);\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 { getCheckoutState } from '@msdyn365-commerce/global-state';\nimport { checkoutAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { getTenderTypesAsync, resolveCardTypesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n    Address,\n    CardPaymentAcceptResult,\n    CardType,\n    CartTenderLine,\n    RetailOperation,\n    SalesOrder,\n    TenderType,\n    TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\n\nexport const OPERATIONS = {\n    PayCard: 201,\n    PayGiftCertificate: 214,\n    PayLoyalty: 207,\n    PayCustomerAccount: 202\n};\n\nconst getCardTypeId = async (ctx: IActionContext, cardPrefix: string = ''): Promise<string | undefined> => {\n    try {\n        const response = await resolveCardTypesAsync({ callerContext: ctx }, cardPrefix, CardType.Unknown);\n        if (response && response.length > 0) {\n            return response[0].TypeId;\n        }\n    } catch (error) {\n        ctx.telemetry.error('Call to resolveCardTypesAsync failed.', error);\n    }\n    return undefined;\n};\n\nconst findTenderIdTypeByOperationId = (tenderTypes: TenderType[], operationId: RetailOperation): string | undefined => {\n    const matchedTenderType = tenderTypes.find(tenderType => tenderType.OperationId === operationId);\n    if (matchedTenderType) {\n        return matchedTenderType.TenderTypeId;\n    }\n    return;\n};\n\nconst roundNumber = (value: number) => Number(value.toFixed(2));\n\nasync function getLoyaltyTenderLine(\n    ctx: IActionContext,\n    LoyaltyCardId: string,\n    Amount: number = 0,\n    Currency: string = 'USD'\n): Promise<CartTenderLine> {\n    const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\n        throw error;\n    });\n\n    if (!tenderTypes) {\n        throw new Error('Fail to get gift card tender line');\n    }\n\n    const TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayLoyalty);\n    return {\n        // @ts-expect-error\n        '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\n\n        'Amount@odata.type': '#Decimal',\n        Currency,\n        TenderTypeId,\n        Amount,\n        LoyaltyCardId\n    };\n}\n\nasync function getGiftCardTenderLine(\n    ctx: IActionContext,\n    GiftCardId: string = '',\n    Amount: number = 0,\n    Currency: string = 'USD',\n    tenderTypeId?: string,\n    giftCardPin?: string,\n    giftCardExpirationYear?: number,\n    giftCardExpirationMonth?: number\n): Promise<CartTenderLine> {\n    let TenderTypeId = tenderTypeId;\n\n    if (!TenderTypeId) {\n        const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\n            throw error;\n        });\n        if (!tenderTypes) {\n            throw new Error('Fail to get gift card tender line');\n        }\n        TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayGiftCertificate);\n    }\n\n    const GiftCardPin = giftCardPin;\n    const GiftCardExpirationYear = giftCardExpirationYear;\n    const GiftCardExpirationMonth = giftCardExpirationMonth;\n    return {\n        // @ts-expect-error\n        '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\n        'Amount@odata.type': '#Decimal',\n        Currency,\n        TenderTypeId,\n        Amount,\n        GiftCardId,\n        GiftCardPin,\n        GiftCardExpirationYear,\n        GiftCardExpirationMonth\n    };\n}\n\nasync function getCreditCardTenderLine(\n    ctx: IActionContext,\n    tokenizedPaymentCard: TokenizedPaymentCard,\n    cardPrefix: string = '',\n    Amount: number = 0,\n    Currency: string = 'USD',\n    billingAddress?: Address\n): Promise<CartTenderLine> {\n    const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\n        throw error;\n    });\n\n    let cartTypeId = tokenizedPaymentCard.CardTypeId;\n\n    if (!cartTypeId) {\n        cartTypeId = await getCardTypeId(ctx, cardPrefix);\n    }\n\n    if (!tenderTypes) {\n        throw new Error('Fail to get card tender type');\n    }\n\n    if (!cartTypeId) {\n        throw new Error('Fail to get card type id');\n    }\n\n    const TenderTypeId = tokenizedPaymentCard.TenderType ?? findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCard);\n    const cardTenderLine: CartTenderLine = {\n        // @ts-expect-error\n        '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\n        'Amount@odata.type': '#Decimal',\n        Currency,\n        Amount,\n        TenderTypeId,\n        CardTypeId: cartTypeId\n    };\n    cardTenderLine.TokenizedPaymentCard = {\n        ...tokenizedPaymentCard,\n        CardTypeId: cartTypeId,\n\n        // @ts-expect-error\n        '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.TokenizedPaymentCard',\n        House: tokenizedPaymentCard.House || 'N/A',\n        ...(tokenizedPaymentCard.CardTokenInfo && {\n            CardTokenInfo: {\n                ...tokenizedPaymentCard.CardTokenInfo,\n                '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CardTokenInfo'\n            }\n        }),\n        ...(billingAddress && {\n            Phone: billingAddress.Phone,\n            Country: billingAddress.ThreeLetterISORegionName,\n            Address1: billingAddress.Street,\n            City: billingAddress.City,\n            State: billingAddress.State,\n            Zip: billingAddress.ZipCode\n        })\n    };\n\n    return cardTenderLine;\n}\n\n/**\n * Get credit card tender line.\n * @param context - Action context.\n * @param amount - Due amount for credit card.\n * @param currency - Currency.\n * @param cardPaymentAcceptResult - CardPaymentAcceptResult.\n * @param billingAddress - BillingAddress.\n * @returns - The credit card tender line.\n */\nasync function getCreditCardTenderLineForSinglePaymentAuth(\n    context: IActionContext,\n    amount: number = 0,\n    currency: string = 'USD',\n    cardPaymentAcceptResult?: CardPaymentAcceptResult,\n    billingAddress?: Address\n): Promise<CartTenderLine> {\n    const tenderTypes = await getTenderTypesAsync({ callerContext: context, queryResultSettings: {} }).catch(error => {\n        throw error;\n    });\n\n    const tenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCard);\n\n    if (cardPaymentAcceptResult) {\n        cardPaymentAcceptResult.TokenizedPaymentCard = {\n            // @ts-expect-error\n            '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.TokenizedPaymentCard',\n            House: 'N/A',\n            ...(billingAddress && {\n                Phone: billingAddress.Phone,\n                Country: billingAddress.ThreeLetterISORegionName,\n                Address1: billingAddress.Street,\n                City: billingAddress.City,\n                State: billingAddress.State,\n                Zip: billingAddress.ZipCode\n            })\n        };\n    }\n\n    const cardTenderLine: CartTenderLine = {\n        // @ts-expect-error -- existing data.\n        '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\n        'Amount@odata.type': '#Decimal',\n        Currency: currency,\n        Amount: amount,\n        TenderTypeId: tenderTypeId,\n        CardPaymentAcceptResult: cardPaymentAcceptResult\n    };\n\n    return cardTenderLine;\n}\n\nasync function createCustomerAccountTenderLine(ctx: IActionContext, Amount: number, Currency: string = 'USD'): Promise<CartTenderLine> {\n    const CustomerId = null;\n    if (!ctx.requestContext.user.isAuthenticated) {\n        ctx.telemetry.error('A customer id is required to pay with customer account');\n    }\n\n    const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\n        throw error;\n    });\n\n    if (!tenderTypes) {\n        ctx.telemetry.error('No tender types found for this channel');\n    }\n\n    const TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCustomerAccount);\n    if (!TenderTypeId) {\n        ctx.telemetry.error('No customer account tender type');\n    }\n    return {\n        '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\n        'Amount@odata.type': '#Decimal',\n        Currency,\n        TenderTypeId,\n        Amount,\n\n        // @ts-expect-error\n        CustomerId\n    };\n}\n\nexport const CartCheckout = async (\n    ctx: IActionContext,\n    updatedCartVersion?: number,\n    isPaymentVerificationRedirection?: boolean\n): Promise<SalesOrder> => {\n    const checkoutState = await getCheckoutState(ctx).catch(error => {\n        throw error;\n    });\n\n    const cartState = checkoutState.checkoutCart;\n\n    const channelConfiguration = ctx.requestContext.channel;\n\n    if (!cartState || Object.keys(cartState).length === 0 || !channelConfiguration) {\n        throw new Error('Fail to placeOrder');\n    }\n\n    const {\n        giftCardExtends,\n        tokenizedPaymentCard,\n        cardPrefix,\n        guestCheckoutEmail,\n        billingAddress,\n        loyaltyAmount,\n        cardPaymentAcceptResult,\n        shouldEnableSinglePaymentAuthorizationCheckout,\n        isExpressCheckoutApplied,\n        isExpressAddressApplied\n    } = checkoutState;\n    const { Currency } = channelConfiguration;\n\n    let amountDue = cartState.cart.AmountDue || 0;\n    let cartTenderLines;\n    const getTenderLinePromises = [];\n    const loyaltyCardNumber = cartState.cart.LoyaltyCardId;\n\n    // Pay by loyalty first\n    if (loyaltyAmount && loyaltyCardNumber) {\n        const chargedAmount = roundNumber(Math.min(loyaltyAmount, amountDue));\n        const loyaltyTenderLinePromise = getLoyaltyTenderLine(ctx, loyaltyCardNumber, chargedAmount, Currency);\n        getTenderLinePromises.push(loyaltyTenderLinePromise);\n        amountDue = roundNumber(amountDue - chargedAmount);\n\n        ctx.telemetry.information('Checkout loyalty tender line is added.');\n    } else {\n        ctx.telemetry.information('Checkout loyalty tender line is not added when no loyaltyAmount or loyaltyCardNumber.');\n    }\n\n    // Then by gift card\n    if (giftCardExtends && giftCardExtends.length > 0) {\n        giftCardExtends.some(giftCardExtend => {\n            if (giftCardExtend.Balance && amountDue > 0) {\n                const chargedAmount = roundNumber(Math.min(giftCardExtend.Balance, amountDue));\n                const tenderTypeId = giftCardExtend.TenderTypeId;\n                const giftCardPin = giftCardExtend.Pin;\n                const giftCardExpirationYear = giftCardExtend.ExpirationDate\n                    ? Number.parseInt(giftCardExtend.ExpirationDate?.split('/')[1], 10)\n                    : undefined;\n                const giftCardExpirationMonth = giftCardExtend.ExpirationDate\n                    ? Number.parseInt(giftCardExtend.ExpirationDate?.split('/')[0], 10)\n                    : undefined;\n                const creditCardTenderLinePromise = getGiftCardTenderLine(\n                    ctx,\n                    giftCardExtend.Id,\n                    chargedAmount,\n                    Currency,\n                    tenderTypeId,\n                    giftCardPin,\n                    giftCardExpirationYear,\n                    giftCardExpirationMonth\n                );\n                getTenderLinePromises.push(creditCardTenderLinePromise);\n                amountDue = roundNumber(amountDue - chargedAmount);\n\n                ctx.telemetry.information('Checkout gift card tender line is added.');\n            } else {\n                ctx.telemetry.information('Checkout gift card tender line is not added when no balance or no remaining balance.');\n            }\n            return amountDue === 0;\n        });\n    }\n\n    // Then by customer account\n    if (checkoutState.customerAccountAmount > 0) {\n        const chargedAmount = roundNumber(Math.min(checkoutState.customerAccountAmount, amountDue));\n        const customerAccountTenderLinePromise = createCustomerAccountTenderLine(ctx, chargedAmount, Currency);\n        getTenderLinePromises.push(customerAccountTenderLinePromise);\n        amountDue = roundNumber(amountDue - chargedAmount);\n\n        ctx.telemetry.information('Checkout customer account amount tender line is added.');\n    } else {\n        ctx.telemetry.information('Checkout customer account amount tender line is not added when customerAccountAmount is 0.');\n    }\n\n    // Pay the rest by credit card\n    if (amountDue > 0) {\n        let creditCardTenderLinePromise: Promise<CartTenderLine>;\n\n        if (\n            shouldEnableSinglePaymentAuthorizationCheckout &&\n            (!(isExpressCheckoutApplied && !isExpressAddressApplied) || (isExpressCheckoutApplied && isPaymentVerificationRedirection))\n        ) {\n            creditCardTenderLinePromise = getCreditCardTenderLineForSinglePaymentAuth(\n                ctx,\n                amountDue,\n                Currency,\n                cardPaymentAcceptResult,\n                billingAddress\n            );\n        } else {\n            if (!tokenizedPaymentCard) {\n                throw new Error('Fail to placeOrder: no token found');\n            }\n            creditCardTenderLinePromise = getCreditCardTenderLine(\n                ctx,\n                tokenizedPaymentCard,\n                cardPrefix,\n                amountDue,\n                Currency,\n                billingAddress\n            );\n        }\n\n        getTenderLinePromises.push(creditCardTenderLinePromise);\n\n        ctx.telemetry.information('Checkout credit card tender line is added.');\n    } else {\n        ctx.telemetry.information('Checkout credit card tender line is not added when no remaining balance for credit card.');\n    }\n\n    if (getTenderLinePromises.length > 0) {\n        // When payment methods is required\n        cartTenderLines = await Promise.all(getTenderLinePromises).catch(error => {\n            throw error;\n        });\n\n        if (!cartTenderLines || cartTenderLines.length === 0) {\n            throw new Error('Fail to placeOrder: fail to get cart tender lines');\n        }\n    } else {\n        ctx.telemetry.information('TenderLinePromises length is 0.');\n    }\n\n    const cartVersion = updatedCartVersion || cartState.cart.Version;\n\n    ctx.telemetry.information('Checkout checkoutAsync is called.');\n\n    // Proceed checkout\n    const salesOrder = await checkoutAsync(\n        { callerContext: ctx, bypassCache: 'get' },\n        cartState.cart.Id,\n        guestCheckoutEmail,\n        undefined,\n        undefined,\n        cartTenderLines || null,\n        cartVersion\n    ).catch(async error => {\n        if (checkoutState.shouldEnableSinglePaymentAuthorizationCheckout) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown type.\n            if (error.data?.AdditionalContext) {\n                ctx.telemetry.warning('CheckoutAsync call failed. AdditionalContext is sent for single payment auth.');\n\n                await checkoutState.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n                // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown type.\n                await checkoutState.updateRedirectAdditionalContext({\n                    newRedirectAdditionalContext: error?.data?.AdditionalContext as string\n                });\n                await checkoutState.updateRedirectPaymentConnectorId({\n                    newRedirectPaymentConnectorId: cardPaymentAcceptResult?.Settings?.PaymentConnectorId as string\n                });\n            } else {\n                ctx.telemetry.warning('CheckoutAsync call failed. AdditionalContext is not sent for single payment auth.');\n\n                await checkoutState.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\n\n                await checkoutState.updateCheckoutErrorPaymentConnectorId({\n                    newCheckoutErrorPaymentConnectorId: cardPaymentAcceptResult?.Settings?.PaymentConnectorId as string\n                });\n\n                if (isPaymentVerificationRedirection) {\n                    ctx.telemetry.warning('RefreshCart when isPaymentVerificationRedirection is true.');\n\n                    await checkoutState.checkoutCart.refreshCart({});\n                    await checkoutState.updateIsExpressCheckoutApplied({ newIsExpressCheckoutApplied: false });\n                    await checkoutState.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n                }\n            }\n        }\n\n        throw error;\n    });\n\n    if (!salesOrder) {\n        ctx.telemetry.error('Failed to placeOrder: fail to checkout.');\n        throw new Error('Fail to placeOrder: fail to checkout');\n    }\n\n    return salesOrder;\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 { getCartState, getCheckoutState } from '@msdyn365-commerce/global-state';\n\nexport const EmptyActiveCart = async (ctx: IActionContext): Promise<void> => {\n    let cartState;\n    let checkoutState;\n    const lineItemIdsToRemove = [];\n\n    try {\n        cartState = await getCartState(ctx);\n        checkoutState = await getCheckoutState(ctx);\n    } catch (error) {\n        throw error;\n    }\n\n    if (!cartState || !cartState.cart) {\n        throw new Error('Fail to fetch active cart');\n    }\n\n    if (!checkoutState || !checkoutState.checkoutCart) {\n        throw new Error('Fail to fetch checkoutCart cart');\n    }\n\n    const activeCart = cartState.cart;\n    const checkoutCart = checkoutState.checkoutCart.cart;\n\n    for (const activeCartLine of activeCart.CartLines || []) {\n        for (const checkoutCartLine of checkoutCart.CartLines || []) {\n            if (activeCartLine.LineId && activeCartLine.LineId === checkoutCartLine.LineId) {\n                lineItemIdsToRemove.push(activeCartLine.LineId);\n            }\n        }\n    }\n\n    try {\n        await cartState.removeCartLines({ cartLineIds: lineItemIdsToRemove });\n        await cartState.removeAllPromoCodes({});\n        await checkoutState.removeCheckoutCartId({});\n    } catch (error) {\n        throw error;\n    }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * The payment error.\n */\nexport interface IPaymentError {\n    title: string;\n    message: string;\n    className?: string;\n}\n\n/**\n * The payment error.\n * @param param0 - First param.\n * @param param0.title - Title.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const ErrorComponent: React.FC<IPaymentError> = ({ title, message, className = 'ms-checkout-payment-instrument' }) => (\n    <div className={`${className}__error`} role='alert' aria-live='assertive'>\n        <p className={`${className}__error-title`}>{title}</p>\n        <p className={`${className}__error-message`}>{message}</p>\n    </div>\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IPaymentConnectorPostMessage } from './payment-instrument-message';\n\n/**\n * Payment iFrame interface.\n */\nexport interface IPaymentFrameElementProps {\n    className?: string;\n    moduleName?: string;\n    iframeAriaLabel: string;\n    displayContent?: string;\n    sourceUrl?: string;\n    requestUrlOrigin?: string;\n    messageOrigin?: string;\n    // eslint-disable-next-line @typescript-eslint/naming-convention -- public props.\n    css?: string;\n    height?: number;\n    // eslint-disable-next-line @typescript-eslint/naming-convention -- public event.\n    onIFrameMessage?(event: MessageEvent): void;\n}\n\n/**\n * Default post message name.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Existing name.\nexport const POST_MESSAGE_NAME = 'message';\n\n/**\n * Get host name.\n * @param url - The url.\n * @returns The host name.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Public props.\nconst getHostName = (url: string = ''): string => {\n    return (url.includes('//') ? url.split('/')[2] : url.split('/')[0]).toLowerCase();\n};\n\n/**\n *\n * IFrameElement component.\n * @extends {React.PureComponent<IPaymentFrameElementProps>}\n */\nexport class Iframe extends React.PureComponent<IPaymentFrameElementProps> {\n    private readonly iframeRef: React.RefObject<HTMLIFrameElement>;\n\n    // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility -- Existing code.\n    constructor(props: IPaymentFrameElementProps) {\n        super(props);\n        this.iframeRef = React.createRef();\n    }\n\n    public componentDidMount(): void {\n        window.addEventListener(POST_MESSAGE_NAME, this.onEvent);\n\n        this.updateContentDocument();\n    }\n\n    public componentDidUpdate(previousProps: IPaymentFrameElementProps): void {\n        if (previousProps.displayContent !== this.props.displayContent) {\n            this.updateContentDocument();\n        }\n    }\n\n    public componentWillUnmount(): void {\n        window.removeEventListener(POST_MESSAGE_NAME, this.onEvent);\n    }\n\n    public render(): JSX.Element | null {\n        const { sourceUrl, className, iframeAriaLabel, height, moduleName = 'checkout-payment-instrument' } = this.props;\n        return (\n            <iframe\n                title={iframeAriaLabel}\n                className={classnames(`${moduleName}__iframe`, className)}\n                aria-label={iframeAriaLabel}\n                src={sourceUrl}\n                ref={this.iframeRef}\n                height={height}\n                sandbox='allow-scripts allow-forms allow-same-origin allow-popups'\n            />\n        );\n    }\n\n    /**\n     * Post message.\n     * @param parameters - Payment connector post message.\n     */\n    public postMessage = (parameters: IPaymentConnectorPostMessage): void => {\n        if (this.iframeRef.current?.contentWindow?.postMessage) {\n            this.iframeRef.current.contentWindow.postMessage(parameters.message, parameters.targetOrigin);\n        }\n    };\n\n    /**\n     * On event.\n     * @param event - The message event.\n     */\n    private readonly onEvent = (event: MessageEvent) => {\n        // eslint-disable-next-line @typescript-eslint/naming-convention -- IFrame.\n        const { sourceUrl, onIFrameMessage, requestUrlOrigin, messageOrigin } = this.props;\n        const sourceHost = getHostName(sourceUrl);\n        const eventHost = getHostName(event.origin);\n        const requestHost = getHostName(requestUrlOrigin);\n        const messageHost = getHostName(messageOrigin);\n\n        // Important: security check\n        // check actual origin matches with expected origin\n        if (\n            !onIFrameMessage ||\n            (sourceUrl && !(sourceHost === eventHost || requestHost === eventHost || messageHost === eventHost)) ||\n            (!sourceUrl && !(requestHost === eventHost || messageHost === eventHost))\n        ) {\n            return;\n        }\n\n        onIFrameMessage(event);\n    };\n\n    /**\n     * Update content document.\n     */\n    private readonly updateContentDocument = (): void => {\n        // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing props.\n        const { displayContent, sourceUrl, css } = this.props;\n        if (!sourceUrl && displayContent && this.iframeRef.current) {\n            const innerDocument = this.iframeRef.current.contentDocument;\n\n            if (innerDocument) {\n                innerDocument.open();\n                innerDocument.write(displayContent);\n                if (css) {\n                    // Append custom style\n                    const style = document.createElement('style');\n                    const cssNote = document.createTextNode(css);\n                    style.appendChild(cssNote);\n                    innerDocument.head.appendChild(style);\n                }\n\n                innerDocument.close();\n            }\n        }\n    };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport * from './add-payment-form';\nexport * from './error';\nexport * from './iframe';\nexport * from './payment-instrument-message';\nexport * from './waiting';\nexport * from './with-visibility-observer';\nexport * from './interfaces';\nexport * from './place-order';\nexport * from './empty-active-cart';\nexport { CartCheckout } from './checkout';\n/**\n * AsyncResultStatusCode.\n */\nexport enum AsyncResultStatusCode {\n    LOADING = 'LOADING',\n    SUCCESS = 'SUCCESS',\n    FAILED = 'FAILED'\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Payment connect post message type.\n */\nexport enum PaymentConnectorPostMessageType {\n    CardPrefix = 'msax-cc-cardprefix',\n    Error = 'msax-cc-error',\n    Height = 'msax-cc-height',\n    Result = 'msax-cc-result',\n    Submit = 'msax-cc-submit',\n    ExtraContext = 'msax-cc-extracontext',\n    Redirect = 'msax-cc-redirect',\n    Showoverlay = 'msax-cc-showoverlay',\n    Hideoverlay = 'msax-cc-hideoverlay',\n    ShippingAddress = 'msax-shipping-address'\n}\n\n/**\n * Interface for payment connector post message.\n */\nexport interface IPaymentConnectorPostMessage {\n    message: string;\n    targetOrigin: string;\n}\n\n/**\n * Payment connector message.\n * @param data - Data with message.\n * @param messageType - Message type.\n * @returns Payment connector post message.\n */\nexport function paymentConnectorMessage(data: string, messageType: PaymentConnectorPostMessageType): IPaymentConnectorPostMessage {\n    return {\n        message: JSON.stringify({\n            type: messageType,\n            value: data\n        }),\n        targetOrigin: '*'\n    };\n}\n\n/**\n * Payment connector extra context message.\n * @param data - The data.\n * @returns The payment connector post message.\n */\nexport function paymentConnectorExtraContextMessage(data: string): IPaymentConnectorPostMessage {\n    return paymentConnectorMessage(data, PaymentConnectorPostMessageType.ExtraContext);\n}\n\n/**\n * Payment connector submit message.\n * @returns The payment connector post message.\n */\nexport function paymentConnectorSubmitMessage(): IPaymentConnectorPostMessage {\n    return paymentConnectorMessage('true', PaymentConnectorPostMessageType.Submit);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { SalesOrder, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { CartCheckout } from './checkout';\nimport { EmptyActiveCart } from './empty-active-cart';\n\nexport const PlaceOrder = async (\n    ctx: IActionContext,\n    checkoutState: ICheckoutState | undefined,\n    orderedProducts: SimpleProduct[] | undefined,\n    redirect: boolean,\n    updatedCartVersion?: number,\n    isPaymentVerificationRedirection?: boolean\n) => {\n    return new Promise(async (resolve: () => void, reject: (reason?: Error) => void) => {\n        ctx.telemetry.information('Checkout place-order method is triggered.');\n\n        let salesOrder: SalesOrder;\n\n        // Proceed checkout\n        try {\n            salesOrder = await CartCheckout(ctx, updatedCartVersion, isPaymentVerificationRedirection);\n        } catch (error) {\n            reject(error);\n            return;\n        }\n\n        // Remove purchased items from the active cart\n        try {\n            ctx.telemetry.information('Checkout emptyActiveCart is called.');\n            await EmptyActiveCart(ctx);\n        } catch (error) {\n            reject(error);\n            return;\n        }\n\n        if (redirect) {\n            ctx.telemetry.information('Redirect to order confirmation page.');\n\n            // Redirect to the order confirmation page\n            const orderConfirmationUrl = getUrlSync('orderConfirmation', ctx) || '';\n            if (!orderConfirmationUrl) {\n                reject(new Error('Error: No orderConfirmationUrl'));\n                return;\n            }\n\n            const separator = orderConfirmationUrl.includes('?') ? '&' : '?';\n            const url = `${orderConfirmationUrl}${separator}transactionId=${salesOrder.Id}`;\n            window.location.assign(url);\n        } else {\n            ctx.telemetry.information('Not redirect to order confirmation page.');\n\n            if (checkoutState) {\n                const result = await checkoutState.updateSalesOrder({\n                    newSalesOrder: salesOrder,\n                    newOrderedProducts: orderedProducts || []\n                });\n\n                if (result.status === 'FAILED') {\n                    reject(new Error('Error: Updating error state failed'));\n                    return;\n                }\n            } else {\n                reject(new Error('Error: No checkout state'));\n                return;\n            }\n            resolve();\n        }\n    });\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * Payment waiting props.\n */\nexport interface IPaymentWaitingProps {\n    message: string;\n    className?: string;\n}\n\n/**\n * Payment waiting.\n * @param param0 - First in param.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const WaitingComponent: React.FC<IPaymentWaitingProps> = ({ message, className = 'ms-checkout-payment-instrument' }) => (\n    <div className={`${className}__loading-background`}>\n        <Waiting />\n        <span className={`${className}__loading-message`}>{message}</span>\n    </div>\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\n/**\n * Visibility observer state.\n */\ninterface IVisibilityObserverState {\n    isVisible?: boolean;\n    errorMessage?: string;\n    observer?: MutationObserver;\n}\n\n/**\n * Visibility observer props.\n */\nexport interface IVisibilityObserverProps {\n    visibilityObserver?: IVisibilityObserverState;\n}\n\n/**\n * With visibility observer.\n * @param WrappedComponent - Wrapped component.\n * @param className - ClassName.\n * @returns React node.\n */\nexport const withVisibilityObserver = <P extends IVisibilityObserverProps>(\n    WrappedComponent: React.ComponentType<P>,\n    className = 'ms-checkout-payment-instrument'\n): React.ComponentType<P> => {\n    /**\n     *\n     * VisibilityObserver component.\n     * @extends {React.Component<P>}\n     */\n    class VisibilityObserver extends React.Component<P> {\n        // eslint-disable-next-line react/state-in-constructor -- Existing pattern.\n        public state: IVisibilityObserverState = {\n            isVisible: false,\n            // eslint-disable-next-line react/no-unused-state -- Need show error.\n            errorMessage: '',\n            observer: undefined\n        };\n\n        private readonly selfRef: React.RefObject<HTMLDivElement> = React.createRef();\n\n        public componentDidMount(): void {\n            this.initMutationObserver();\n        }\n\n        public componentWillUnmount(): void {\n            this.stopMutationObserver();\n        }\n\n        public shouldComponentUpdate(nextProps: IVisibilityObserverProps, nextState: IVisibilityObserverState): boolean {\n            if (this.state === nextState && this.props === nextProps) {\n                return false;\n            }\n            return true;\n        }\n\n        public render(): JSX.Element | null {\n            return (\n                <div className={`${className}__mutation-observer`} ref={this.selfRef}>\n                    <WrappedComponent {...this.props} visibilityObserver={this.state} />\n                </div>\n            );\n        }\n\n        /**\n         * Initial mutation observer.\n         */\n        private readonly initMutationObserver = (): void => {\n            // Select the node that will be observed for mutations\n            const targetNode = document.getElementsByTagName('body')[0];\n            // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Better double check.\n            if (!targetNode) {\n                this.setState({\n                    // eslint-disable-next-line react/no-unused-state -- Need show error.\n                    errorMessage: 'No body element found'\n                });\n                return;\n            }\n\n            // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Better double check.\n            if (!MutationObserver) {\n                this.setState({\n                    // eslint-disable-next-line react/no-unused-state -- Need show error.\n                    errorMessage: 'MutationObserver is not supported'\n                });\n                return;\n            }\n\n            // Options for the observer (which mutations to observe)\n            const config = { attributes: true, childList: true, subtree: true };\n\n            // Create an observer instance linked to the callback function\n            const mutationObserver = new MutationObserver(() => {\n                this.handleVisibilityChange();\n            });\n            mutationObserver.observe(targetNode, config);\n\n            this.setState({\n                observer: mutationObserver\n            });\n        };\n\n        /**\n         * Stop mutation observer.\n         */\n        private readonly stopMutationObserver = (): void => {\n            this.state.observer?.disconnect();\n        };\n\n        /**\n         * Handle visibility change.\n         */\n        private readonly handleVisibilityChange = (): void => {\n            // If module is visible or not\n            const isVisible = !!this.selfRef.current && this.selfRef.current.offsetWidth > 0 && this.selfRef.current.offsetHeight > 0;\n            if (!this.state.isVisible && isVisible) {\n                this.setState({\n                    isVisible\n                });\n                this.stopMutationObserver();\n            }\n        };\n    }\n\n    return VisibilityObserver;\n};\n"],"names":["CheckoutStateInput","apiSettings","_this","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","this","createObservableDataAction","action","input","ctx","CheckoutState","inputData","requestContext","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_isTermsAndConditionAccepted","_customerAccountAmount","Object","defineProperty","prototype","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","updateShippingAddress","newShippingAddress","updateBillingAddress","newBillingAddress","updateCardPrefix","newCardPrefix","removeGiftCard","giftCardNumber","filter","giftCard","Id","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","updateGuestCheckoutEmail","newGuestCheckoutEmail","updateTermsAndConditionsAcceptance","newIsTermsAndConditionAccepted","updateCustomerAccountAmount","__decorate","observable","computed","EnabledPaymentsForOBO","ModuleStatesCacheKey","getModuleStates","cacheKey","moduleStates","get","update","updateModuleStates","value","WrappedComponent","_super","ModuleState","props","call","initializeState","_b","id","typeName","context","states","actionContext","__assign","_a","hasInitialized","hasError","isRequired","isCancellable","isSubmitContainer","status","undefined","childIds","telemetry","error","getModuleStateManager","moduleState","validate","isReady","isUpdating","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasExternalSubmitGroup","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","setHasError","onReady","onUpdating","onPending","onSkip","onDisable","getModule","moduleId","getModuleByTypeName","getModuleStateManagerByTypeName","init","options","values","find","_moduleState","modules","_validateLeaf","source","module","isMatch","_validateContainer","allMatched","skipSkippableItem","length","app","config","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","includes","ArrayExtensions","hasElements","enableControl","__extends","shouldComponentUpdate","nextProps","render","React","observer","CheckoutErrors","async","setCheckoutErrors","errorCode","resources","isExpressCheckoutApplied","clientCheckoutError","consoleCheckoutErrors","checkoutState","getCheckoutState","catch","exception","checkoutError","checkoutErrorsList","errorLocation","ErrorLocation","Console","consoleCheckoutError","errorMessageResource","push","Error","errorMessage","getCheckoutErrorMessage","console","log","CheckoutPaymentInstrument","Checkout","updateCheckoutError","newCheckoutError","updateShouldFocusOnCheckoutError","newShouldFocusOnCheckoutError","genericError","genericErrorMessage","focusOnCheckoutError","checkoutErrorRef","current","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","CheckoutModule","None","setCheckoutErrorFocus","checkoutModuleId","checkoutModule","keys","resource","ActionError","ErrorCode","ErrorMessageResource","checkoutTimeoutErrorMessage","Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard","blockedLoyaltyCardErrorMessage","CheckoutLoyalty","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue","customerAccountLimitSignDifferentFromAmountDueErrorMessage","CheckoutCustomerAccountPayment","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit","customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems","customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount","customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices","customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_FraudRisk","fraudRiskErrorMessage","Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed","giftCardBalanceInquiryFailedErrorMessage","CheckoutGiftCard","Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch","giftCardCurrencyMismatchErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion","invalidCartVersionErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber","invalidLoyaltyCardNumberErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest","invalidPaymentRequestErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console","invalidPaymentRequestConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines","missingRequiredCartTenderLinesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed","multipleCustomerAccountPaymentsNotAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender","noMoreThanOneLoyaltyTenderErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry","noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard","noTenderLoyaltyCardErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints","notEnoughRewardPointsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided","paymentAlreadyVoidedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance","paymentAmountExceedsGiftBalanceErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties","paymentRequiresMerchantPropertiesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console","paymentRequiresMerchantPropertiesConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount","paymentUsingUnauthorizedAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed","refundAmountMoreThanAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","unableToAuthorizePaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired","unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported","unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment","unableToCancelPaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo","unableToReadCardTokenInfoErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult","unableToRetrieveCardPaymentAcceptResultErrorMessage","AddPaymentFormComponent","_ref","acceptPageUrl","acceptPageContent","onSubmit","onCancel","onIFrameMessage","iframeRef","canSubmit","canCancel","iFrameHeightOverride","requestUrlOrigin","messageOrigin","isFetchingPaymentConnector","paymentStyleOverride","className","moduleName","cancelButtonText","submitButtonText","iframeAriaLabel","classnames","Iframe","ref","displayContent","sourceUrl","height","css","defaultPaymentConnectorStyle","Button","title","color","onClick","OPERATIONS","getCardTypeId","cardPrefix","arguments","response","resolveCardTypesAsync","callerContext","CardType","Unknown","TypeId","findTenderIdTypeByOperationId","tenderTypes","operationId","matchedTenderType","tenderType","OperationId","TenderTypeId","roundNumber","Number","toFixed","CartCheckout","updatedCartVersion","isPaymentVerificationRedirection","cartState","checkoutCart","channelConfiguration","channel","giftCardExtends","tokenizedPaymentCard","guestCheckoutEmail","billingAddress","loyaltyAmount","cardPaymentAcceptResult","isExpressAddressApplied","Currency","cartTenderLines","amountDue","cart","AmountDue","getTenderLinePromises","loyaltyCardNumber","LoyaltyCardId","chargedAmount","Math","min","loyaltyTenderLinePromise","Amount","getTenderTypesAsync","queryResultSettings","getLoyaltyTenderLine","information","some","giftCardExtend","Balance","_giftCardExtend$Expir","_giftCardExtend$Expir2","tenderTypeId","giftCardPin","Pin","giftCardExpirationYear","ExpirationDate","parseInt","split","giftCardExpirationMonth","creditCardTenderLinePromise","GiftCardId","GiftCardPin","GiftCardExpirationYear","GiftCardExpirationMonth","getGiftCardTenderLine","customerAccountAmount","customerAccountTenderLinePromise","CustomerId","user","isAuthenticated","createCustomerAccountTenderLine","amount","currency","TokenizedPaymentCard","_objectSpread","House","Phone","Country","ThreeLetterISORegionName","Address1","Street","City","State","Zip","ZipCode","CardPaymentAcceptResult","getCreditCardTenderLineForSinglePaymentAuth","cartTypeId","CardTypeId","TenderType","cardTenderLine","CardTokenInfo","getCreditCardTenderLine","Promise","all","cartVersion","Version","salesOrder","checkoutAsync","bypassCache","_error$data","_error$data2","_cardPaymentAcceptRes","_cardPaymentAcceptRes2","data","AdditionalContext","warning","updateShouldCollapsePaymentSection","newShouldCollapsePaymentSection","updateRedirectAdditionalContext","newRedirectAdditionalContext","updateRedirectPaymentConnectorId","newRedirectPaymentConnectorId","Settings","PaymentConnectorId","updateIsCheckoutCallFailed","newIsCheckoutCallFailed","updateCheckoutErrorPaymentConnectorId","newCheckoutErrorPaymentConnectorId","refreshCart","updateIsExpressCheckoutApplied","newIsExpressCheckoutApplied","EmptyActiveCart","lineItemIdsToRemove","getCartState","activeCart","activeCartLine","CartLines","checkoutCartLine","LineId","removeCartLines","cartLineIds","removeAllPromoCodes","removeCheckoutCartId","ErrorComponent","message","role","POST_MESSAGE_NAME","getHostName","url","toLowerCase","constructor","super","postMessage","parameters","_this$iframeRef$curre","contentWindow","targetOrigin","onEvent","event","sourceHost","eventHost","origin","requestHost","messageHost","updateContentDocument","innerDocument","contentDocument","open","write","style","document","createElement","cssNote","createTextNode","appendChild","head","close","componentDidMount","window","addEventListener","componentDidUpdate","previousProps","componentWillUnmount","removeEventListener","src","sandbox","AsyncResultStatusCode","PaymentConnectorPostMessageType","paymentConnectorMessage","messageType","JSON","stringify","type","paymentConnectorExtraContextMessage","ExtraContext","paymentConnectorSubmitMessage","Submit","PlaceOrder","orderedProducts","redirect","resolve","reject","orderConfirmationUrl","getUrlSync","separator","location","assign","updateSalesOrder","newSalesOrder","newOrderedProducts","WaitingComponent","Waiting","withVisibilityObserver","VisibilityObserver","state","isVisible","selfRef","initMutationObserver","targetNode","getElementsByTagName","setState","MutationObserver","mutationObserver","handleVisibilityChange","observe","attributes","childList","subtree","stopMutationObserver","_this$state$observer","disconnect","offsetWidth","offsetHeight","nextState","visibilityObserver"],"sourceRoot":""}