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GAAKpG,GACLqG,EACAE,IA6Bb,EAxBuFtI,IACnF,MAAM,2BACF2lB,EAA0B,iBAC1BvlB,EAAgB,UAChB+c,EAAS,0BACTyI,EAAyB,aACzB5hB,EAAY,WACZ6hB,EAAU,WACVC,EAAU,aACVC,GACA/lB,EAEJ,OAEIF,EAAAA,cAACge,EAAAA,OAAM5V,OAAAC,OAAA,GAAKwd,EAA0B,CAAE5H,IAAK3d,IACxC+c,EAAUiI,SAAWphB,GAAgBlE,EAAAA,cAAComB,EAAYhe,OAAAC,OAAA,GAAKnE,IACxDlE,EAAAA,cAACmmB,EAAiB/d,OAAAC,OAAA,GAAKyd,IACtBzI,EAAUoI,kBAAoBM,EAC9B1I,EAAUsI,kBAAoBK,EAC9B3I,EAAUuI,oBAAsBK,kECvB7C,MA6BA,EA7B+F3Z,IAO1F,IAP2F,UAC5F2W,EAAS,UACTC,EAAS,SACTlX,EAAQ,iBACRoX,EAAgB,SAChBD,EAAQ,GACRzX,GACHY,EACG,MAAM+Z,GAAUC,EAAAA,EAAAA,kBAAiB,QAASlD,EAAmB,IACvDmD,GAAYC,EAAAA,EAAAA,wBAAuBpD,EAAmBiD,GAE5D,OACIrmB,EAAAA,cAAAA,EAAAA,SAAA,KACIA,EAAAA,cAAA,QAAAoI,OAAAC,OAAA,CACIL,UAAU,mDACVoE,KAAK,WAAU,aACH8W,EAAS,eACPD,EACdwD,KAAK,6BACLtD,SAAUA,EACVnX,SAAUA,EACVyY,QAASxB,EACTvX,GAAIA,GACA6a,mDClCpB,MAQA,EARuGja,IAAgB,IAAf,QAAE9D,GAAS8D,EAC/G,OAAK9D,EAIExI,EAAAA,cAAA,KAAGgI,UAAU,mDAAmDQ,GAH5D,mDCFf,MAQA,EARmG8D,IAAc,IAAb,MAAEhE,GAAOgE,EACzG,OAAKhE,EAIEtI,EAAAA,cAAA,KAAGgI,UAAU,iDAAiDM,GAH1D","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.tsx?de67","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-edit-mode.tsx?83e6","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-summary-mode.tsx?5675","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/checkout-pickup.tsx?28aa","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/checkout-pickup.view.tsx?d64e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-group.tsx?9de7","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-utility.ts?b7eb","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-date-dropdown.tsx?e5a3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-pickup/components/checkout-pickup-timeslot-dropdown.tsx?aef8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.tsx?9243","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.view.tsx?26e8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.check-box.tsx?3b17","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-message.tsx?c6a5","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-title.tsx?f908"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateManager, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentData } from './checkout-customer-account-payment.data';\nimport { ICheckoutCustomerAccountPaymentProps } from './checkout-customer-account-payment.props.autogenerated';\nimport { getAccountPaymentFormEditMode, IAccountPaymentEditViewForm } from './components/get-account-payment-form-edit-mode';\nimport { getAccountPaymentFormSummaryMode, IAccountPaymentSummaryViewForm } from './components/get-account-payment-form-summary-mode';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutCustomerAccountPaymentViewProps\n extends ICheckoutCustomerAccountPaymentProps {\n checkoutCustomerAccount: IModuleProps;\n summaryView: IAccountPaymentSummaryViewForm;\n editView: IAccountPaymentEditViewForm;\n moduleState: IModuleStateManager;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\nexport interface ICheckoutCustomerAccountPaymentState {\n paymentAmount: number;\n isCreditSectionExpanded: boolean;\n customizedAmt: string;\n amountVariable: string;\n errorMessage?: string;\n handleSaveAndContinue?: boolean;\n}\n\n/**\n *\n * CheckoutCustomerAccount component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nexport class CheckoutCustomerAccountPayment extends React.Component<\n ICheckoutCustomerAccountPaymentViewProps,\n ICheckoutCustomerAccountPaymentState\n> {\n private readonly defaultLocale: string = 'en-us';\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerInfo = get(this.props, 'data.customerInformation.result');\n const request = get(this.props, 'context.request');\n const b2bChannel = isChannelTypeB2B(request);\n const platform = get(this.props, 'context.request.app.platform');\n\n return (\n customerInfo &&\n customerInfo.AllowOnAccountPayment === true &&\n platform &&\n (platform.enableCustomerAccountPayment === 'all' ||\n (platform.enableCustomerAccountPayment === 'b2b' && b2bChannel) ||\n (platform.enableCustomerAccountPayment === 'b2c' && !b2bChannel))\n );\n }\n\n @computed get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.loyaltyAmount) {\n return 0;\n }\n return checkoutState.loyaltyAmount;\n }\n\n @computed get maxPaymentAmount(): number {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return 0;\n }\n\n // Use customer account after loyalty.\n const amountDue = Math.max(0, (cart.TotalAmount || 0) - this.getLoyaltyAmount);\n\n // If the user has a mandatory credit limit, then the max amount must not be more than that\n if (this.props.data.customerInformation?.result?.MandatoryCreditLimit) {\n return Math.min(this.getAvailableCredit(this.props.data.creditBalances?.result), amountDue);\n }\n return amountDue;\n }\n\n @computed get errorMessage(): string | undefined {\n if (this.state.paymentAmount > this.maxPaymentAmount) {\n return this.props.resources.invalidAmountExceedAmountDueMessage;\n }\n\n if (this.state.paymentAmount < 0) {\n return this.props.resources.invalidAmountNegativeMessage;\n }\n\n return undefined;\n }\n\n @computed get currencyCode(): string | undefined {\n return get(this.props, 'context.request.channel.Currency');\n }\n\n @computed get availableCredit(): number {\n const creditBalances = get(this.props, 'data.creditBalances.result');\n\n return creditBalances ? this.getAvailableCredit(creditBalances) : 0;\n }\n\n @computed get orderTotal(): number {\n const orderTotal = get(this.props, 'data.checkout.result.checkoutCart.cart.TotalAmount');\n\n return orderTotal ? orderTotal : 0;\n }\n\n @computed get formattedExcessCredit(): string | undefined {\n const excessCredit = this.availableCredit - this.orderTotal;\n return excessCredit < 0 ? this.props.context.cultureFormatter.formatCurrency(excessCredit, this.currencyCode) : undefined;\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n private readonly baseClassName: string = 'ms-checkout-customer-account';\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutCustomerAccountPaymentViewProps) {\n super(props);\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n this.state = {\n paymentAmount: this.maxPaymentAmount,\n isCreditSectionExpanded: false,\n customizedAmt: new Intl.NumberFormat(locale).format(this.maxPaymentAmount),\n amountVariable: this.maxPaymentAmount.toString(),\n handleSaveAndContinue: false\n };\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n // When the cart.TotalAmount gets updated (like if selecting the delivery option adds a charge) we need to update the amount based on the new total amount.\n reaction(\n () =>\n this.props.data.checkout.result &&\n this.props.data.checkout.result.checkoutCart.cart &&\n this.props.data.checkout.result.checkoutCart.cart.TotalAmount,\n totalAmount => {\n this.updateMaxAmount(this.maxPaymentAmount);\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutCustomerAccountPayment &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutCustomerAccountPayment) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutCustomerAccountPaymentProps,\n nextState: ICheckoutCustomerAccountPaymentState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const customerInfo = this.props.data.customerInformation?.result;\n\n if (!this.isCustomerAccountPaymentEnabled) {\n this.props.context.telemetry.information(\n 'customer account payments will not display, because the feature is disabled or not enabled for this type of customer'\n );\n return null;\n }\n\n const checkoutState = this.props.data.checkout.result;\n const cart = checkoutState ? checkoutState.checkoutCart.cart : undefined;\n const hasInvoiceLine = checkoutState?.checkoutCart.hasInvoiceLine;\n const creditBalances = this.props.data.creditBalances.result;\n\n if (!cart || hasInvoiceLine) {\n return null;\n }\n const resources = this.props.resources;\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n\n const customerSinceDate = new Date(customerInfo?.CreatedDateTime || 0).toLocaleDateString(locale);\n\n const hasError = this.props.moduleState.hasError;\n const errorMessage = this.state.errorMessage;\n\n const props = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n checkoutCustomerAccount: {\n moduleProps: this.props,\n className: classnames(this.baseClassName)\n },\n alert: hasError && errorMessage && (\n \n ),\n editView: getAccountPaymentFormEditMode({\n onAddPayment: this.addPayment,\n resources,\n customizedAmt: this.state.customizedAmt,\n amountVariable: this.state.amountVariable,\n amount: this.state.paymentAmount,\n onChangePaymentAmount: this.onChangePaymentAmount,\n maxAmount: this.maxPaymentAmount,\n customer: customerInfo,\n customerCreatedDate: customerSinceDate,\n availableCredit: this.props.context.cultureFormatter.formatCurrency(\n this.getAvailableCredit(creditBalances),\n this.currencyCode\n ),\n showCreditLimit: customerInfo?.MandatoryCreditLimit || false,\n errorMessage: this.errorMessage,\n onToggleCreditSection: this.toggleCreditSection,\n creditSectionIsExpanded: this.state.isCreditSectionExpanded,\n orderTotal: this.props.context.cultureFormatter.formatCurrency(this.orderTotal, this.currencyCode),\n excessCredit: this.formattedExcessCredit,\n onRemovePayment: this.removePayment,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined,\n locale:\n this.props.context && this.props.context.request && this.props.context.request.locale\n ? this.props.context.request.locale\n : this.defaultLocale,\n skipOnChangeLogic: this.props.context.request.features?.skipCheckoutOnChangeLogic\n }),\n summaryView: getAccountPaymentFormSummaryMode({\n resources,\n amount: this.state.paymentAmount,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined\n })\n };\n\n return this.props.renderView(props) as React.ReactElement;\n }\n\n private readonly getAvailableCredit = (creditBalances: CustomerBalances | undefined) => {\n let availableCredit = 0;\n\n if (!creditBalances) {\n return 0;\n }\n\n if (creditBalances.InvoiceAccountCreditLimit === 0) {\n availableCredit = creditBalances.CreditLimit - creditBalances.Balance - creditBalances.PendingBalance;\n } else {\n availableCredit =\n creditBalances.InvoiceAccountCreditLimit -\n creditBalances.InvoiceAccountBalance -\n creditBalances.InvoiceAccountPendingBalance;\n }\n\n return availableCredit;\n };\n\n private readonly addPayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({ handleSaveAndContinue: true });\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: this.state.paymentAmount });\n this.props.context.telemetry.information('customer account payment amount updated');\n };\n\n private readonly toggleCreditSection = (): void => {\n this.setState({\n isCreditSectionExpanded: !this.state.isCreditSectionExpanded\n });\n };\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onCancel: this.handleCancelOrSubmit,\n onSubmit: this.handleCancelOrSubmit,\n onEdit: this.onEdit\n });\n\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount !== 0) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onChangePaymentAmount = (customizedAmt: string, paymentAmount: number, amountVariable: string): void => {\n this.setState({\n customizedAmt: customizedAmt,\n paymentAmount: paymentAmount,\n amountVariable: amountVariable\n });\n };\n\n private readonly updateMaxAmount = (newAmount: number): void => {\n // If the user has already set an amount, we should not override that in the UI because it will be confusing.\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount === 0) {\n this.setState({\n // We should never allow a negative amount.\n paymentAmount: Math.max(0, newAmount),\n customizedAmt: Math.max(0, newAmount).toString()\n });\n }\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Payment section customer account payment onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.customerAccountAmount > 0) {\n this.setState({ handleSaveAndContinue: false });\n this.props.telemetry.information('Payment section customer account payment onSubmit is called.');\n\n if (\n Msdyn365.isOboRequest(this.props.context.request) &&\n checkoutState?.customerAccountAmount !== checkoutState?.checkoutCart.cart.TotalAmount\n ) {\n this._setErrorMessage(this.props.resources.invalidAmountForOBOMessage);\n } else {\n this.props.moduleState.onReady();\n }\n } else if (\n checkoutState?.customerAccountAmount === 0 &&\n !this.state.handleSaveAndContinue &&\n this.props.config.isCheckoutCustomerAccountPaymentRequired\n ) {\n this._setErrorMessage(this.props.resources.customerAccountCreditErrorMessage);\n } else {\n this.props.telemetry.information('Payment section customer account payment onCancel is called.');\n\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly removePayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({\n paymentAmount: 0\n });\n\n this.onChangePaymentAmount('', NaN, '0');\n\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: 0 });\n this.props.context.telemetry.information('customer account payment removed');\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutCustomerAccountPayment;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { Alert, Button, INodeProps, NodeTag, getLocaleBasedCustomizedPrice, ILocalizedPrice } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentEditViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n customizedAmt: string;\n amount: number;\n amountVariable: string;\n maxAmount: number;\n customer: Customer | undefined;\n customerCreatedDate: string;\n availableCredit: string;\n showCreditLimit: boolean;\n errorMessage: string | undefined;\n creditSectionIsExpanded: boolean;\n orderTotal: string;\n excessCredit: string | undefined;\n appliedAmount: string | undefined;\n locale: string;\n onAddPayment(): Promise;\n onChangePaymentAmount(customizedAmt: string, paymentAmount: number, amountVariable: string): void;\n onToggleCreditSection(): void;\n onRemovePayment(): Promise;\n skipOnChangeLogic?: boolean;\n}\n\nexport interface IAccountPaymentEditViewForm {\n formProps: INodeProps;\n inputLabel: React.ReactNode;\n inputAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n customerName: React.ReactNode;\n customerAccountNumber: React.ReactNode;\n customerSince: React.ReactNode;\n accountCredit: React.ReactNode;\n alert: React.ReactNode;\n accountDetails: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n}\n\n/**\n * On Add Account Payment Function.\n * @param onAddPayment -On Add Payment Function.\n * @returns Call of Add payment function.\n */\nconst onAddAccountPayment = (onAddPayment: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onAddPayment();\n};\n\n/**\n * On Change Amount Function.\n * @param onChangePaymentAmount -On Change Payment Amount Function.\n * @returns Call of Change payment Amount function.\n */\nconst onChangeAmountHandler = (\n customizedAmt: string,\n paymentAmount: number,\n amountVariable: string,\n locale: string,\n onChangePaymentAmount: (customizedAmt: string, paymentAmount: number, amountVariable: string) => void\n) => (event: React.ChangeEvent) => {\n const value = event.target.value;\n const customState: ILocalizedPrice = {\n customizedAmount: customizedAmt,\n amountVariable: amountVariable,\n paymentAmount: paymentAmount\n };\n const returnModifiedState = getLocaleBasedCustomizedPrice(value, customState, locale, keyCode);\n customizedAmt = returnModifiedState.customizedAmount as string;\n paymentAmount = returnModifiedState.paymentAmount as number;\n amountVariable = returnModifiedState.amountVariable as string;\n onChangePaymentAmount(customizedAmt, paymentAmount, amountVariable);\n keyCode = 0;\n};\n\nlet keyCode: number = 0;\nexport const getAccountPaymentFormEditMode = (options: IGetAccountPaymentEditViewFormInput): IAccountPaymentEditViewForm => {\n const {\n resources,\n onAddPayment,\n amount,\n customizedAmt,\n amountVariable,\n onChangePaymentAmount,\n maxAmount,\n customer,\n customerCreatedDate,\n availableCredit,\n showCreditLimit,\n errorMessage,\n onToggleCreditSection,\n creditSectionIsExpanded,\n orderTotal,\n excessCredit,\n onRemovePayment,\n appliedAmount,\n locale,\n skipOnChangeLogic\n } = options;\n\n const {\n addPaymentButtonLabel,\n inputAmountLabel,\n inputAmountAriaLabel,\n customerSinceLabel,\n accountCreditLabel,\n creditDetailsSectionLabel,\n orderTotalLabel,\n availableCreditLabel,\n creditExcessLabel,\n appliedCustomerAccountPaymentLabel,\n removeCustomerAccountPaymentLabel,\n accountCreditDetails\n } = resources;\n\n const inputLabel = (\n \n {inputAmountLabel}\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-edit',\n onSubmit: onAddAccountPayment(onAddPayment),\n tag: 'form' as NodeTag\n };\n\n const addPaymentButton = (\n maxAmount || amount < 0 || Number.isNaN(amount)}\n >\n {addPaymentButtonLabel}\n \n );\n\n const inputAmount = (\n onChangePaymentAmount(value, Number(value), value)\n : onChangeAmountHandler(customizedAmt, amount, amountVariable, locale, onChangePaymentAmount)\n }\n onKeyDown={event => (keyCode = event.which)}\n aria-label={inputAmountAriaLabel}\n aria-valuemin={0}\n aria-valuemax={maxAmount}\n aria-valuenow={amount}\n min={0}\n max={maxAmount}\n />\n );\n\n const customerName =
{customer?.Name}
;\n\n const customerAccountNumber =
#{customer?.AccountNumber}
;\n\n const customerSince = (\n
\n {customerSinceLabel}\n {customerCreatedDate}\n
\n );\n\n const accountCredit = (\n <>\n {accountCreditLabel}\n {showCreditLimit && {availableCredit}}\n \n \n );\n\n const accountDetails = creditSectionIsExpanded ? (\n
\n <>\n
\n \n \n {creditDetailsSectionLabel}\n \n
\n \n
\n {availableCreditLabel}\n {availableCredit}\n
\n
\n {orderTotalLabel}\n {orderTotal}\n
\n
\n {creditExcessLabel}\n {excessCredit ?? '0'}\n
\n
\n ) : (\n undefined\n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n \n {removeCustomerAccountPaymentLabel}\n \n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\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, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentSummaryViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n amount: number;\n appliedAmount: string | undefined;\n}\n\nexport interface IAccountPaymentSummaryViewForm {\n formProps: INodeProps;\n label: React.ReactNode;\n paymentAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n alert?: React.ReactNode;\n paymentAmountInput?: React.ReactNode;\n}\n\nexport const getAccountPaymentFormSummaryMode = (options: IGetAccountPaymentSummaryViewFormInput): IAccountPaymentSummaryViewForm => {\n const { resources, amount, appliedAmount } = options;\n\n const { addPaymentButtonLabel, inputAmountSummaryLabel, appliedCustomerAccountPaymentLabel, inputAmountAriaLabel } = resources;\n\n const label = (\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-summary',\n tag: 'form' as NodeTag\n };\n\n const paymentAmount = ;\n\n const paymentAmountInput = (\n \n );\n\n const addPaymentButton = (\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder,\n paymentAmountInput\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { getEstimatedPickupTimeslotAvailabilitiesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CartLine,\n LineDeliverySpecification,\n OrgUnitLocation,\n PickupTimeslotAvailability,\n PickupTimeslotAvailabilitySearchCriteria,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getFallbackImageUrl,\n getSimpleProducts,\n ObjectExtensions,\n ProductInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { format, IModuleProps, isNullOrWhiteSpace, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutPickupData } from './checkout-pickup.data';\nimport { ICheckoutPickupProps } from './checkout-pickup.props.autogenerated';\nimport {\n CheckoutPickupDateDropdown,\n CheckoutPickupError,\n CheckoutPickupTimeslotDropdown,\n getDate,\n getTimeslot,\n getUTCDateWithoutTime\n} from './components';\nimport {\n CheckoutPickupAddress,\n CheckoutPickupCartLines,\n CheckoutPickupGroupHeader,\n CheckoutPickupTimeslotInfo,\n DefaultImageSettings,\n ICheckoutPickupAddressProps,\n ICheckoutPickupCartLineInfo,\n ICheckoutPickupCartLinesProps,\n ICheckoutPickupGroup,\n ICheckoutPickupGroupHeaderProps,\n ICheckoutPickupGroupViewProps,\n ICheckoutPickupTimeslotInfoProps,\n PickupTimeslotAvailabilityState\n} from './components/checkout-pickup-group';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutPickupModuleProps extends ICheckoutPickupProps, IModuleStateProps {}\n\nexport interface ICheckoutPickupState {\n pickupGroups: ICheckoutPickupGroup[];\n}\n\nexport interface ICheckoutPickupViewState {\n isLoading: boolean;\n isHeaderError: boolean;\n isShowDropdown: boolean;\n isShowSelected: boolean;\n}\n\nexport interface ICheckoutPickupViewProps extends ICheckoutPickupProps<{}> {\n checkoutPickup: IModuleProps;\n viewState: ICheckoutPickupViewState;\n headerError: React.ReactNode;\n waiting: React.ReactNode;\n pickupGroups: ICheckoutPickupGroupViewProps[];\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutPickup component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutPickup extends React.Component {\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isLoading: boolean = false;\n\n @observable private headerErrorMessage?: string;\n\n @computed get isDataReady(): boolean {\n return (\n (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS' &&\n (this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.status) === 'SUCCESS'\n );\n }\n\n constructor(props: ICheckoutPickupModuleProps) {\n super(props);\n this.state = { pickupGroups: [] };\n\n this.setDateHandler = this.setDateHandler.bind(this);\n this.setTimeslotHandler = this.setTimeslotHandler.bind(this);\n }\n\n public componentDidMount(): void {\n when(\n () => this.isDataReady,\n async () => {\n await this.initPickupGroup();\n this.initModuleState();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutPickup && checkoutError.errorMessage) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutPickup) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutPickupModuleProps, nextState: ICheckoutPickupState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n if (!this.isDataReady || !this.canPickup()) {\n return null;\n }\n\n const { resources, config, context } = this.props;\n\n const {\n pickupDateLabel,\n pickupTimeslotLabel,\n pickupDateDefaultText,\n pickupTimeslotDefaultText,\n itemsText,\n singleItemText,\n pickupDateTimeslotText,\n pickupTimeslotPlaceHolder,\n pickupLocationLabel\n } = resources;\n\n const { locale } = context.request;\n const { className, imageSettings, useHour12TimeFormat } = config;\n const defaultClassName = 'ms-checkout-pickup';\n const groupsViewProps: ICheckoutPickupGroupViewProps[] = [];\n\n this.state.pickupGroups.forEach((value, index) => {\n // Divider line for each pickup group\n const groupDivider: React.ReactNode = index !== 0 &&
;\n\n // Line images\n const cartlines: ICheckoutPickupCartLineInfo[] = value.cartLines\n .filter(x => !ObjectExtensions.isNullOrUndefined(x.product))\n .map(line => ({\n lineId: line.cartLine.LineId || '',\n imageProps: {\n requestContext: context.actionContext.requestContext,\n className: `${defaultClassName}__group-line-image`,\n altText: line.product?.Name,\n src: line.product?.PrimaryImageUrl || '',\n fallBackSrc: getFallbackImageUrl(\n line.product?.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n ),\n gridSettings: context.request.gridSettings!,\n imageSettings: imageSettings || DefaultImageSettings,\n loadFailureBehavior: 'empty'\n },\n quantity: line.cartLine.Quantity || 0\n }));\n\n // Heading for each group\n const numberOfCartLines = this._countItems(cartlines);\n const itemText = numberOfCartLines > 1 ? itemsText : singleItemText;\n const itemTitle = `(${format(itemText, numberOfCartLines)})`;\n const headerProps: ICheckoutPickupGroupHeaderProps = {\n moduleClassName: defaultClassName,\n storeInfo: `${value.pickupModeName}, ${value.storeName}`,\n items: itemTitle\n };\n const groupHeader: React.ReactNode = ;\n\n const lineImageProps: ICheckoutPickupCartLinesProps = {\n moduleClassName: defaultClassName,\n cartLines: cartlines.filter(x => !ObjectExtensions.isNullOrUndefined(x))\n };\n const cartLineImages: React.ReactNode = ;\n\n // Selected pickup date and timeslot node\n const dateString = getDate(value.selectedDate, locale);\n const timeslotString = getTimeslot(\n pickupTimeslotPlaceHolder,\n value.selectedTimeslot?.StartDateTime,\n value.selectedTimeslot?.EndDateTime,\n locale,\n useHour12TimeFormat\n );\n const timeslotInfoProps: ICheckoutPickupTimeslotInfoProps = {\n moduleClassName: defaultClassName,\n title: pickupDateTimeslotText,\n content: `${dateString} ${timeslotString}`\n };\n const selectedDateTimeslotNode: React.ReactNode = ;\n\n // Pickup address\n const addressProps: ICheckoutPickupAddressProps = {\n moduleClassName: defaultClassName,\n title: pickupLocationLabel,\n address: value.pickupAddress\n };\n const pickupAddress: React.ReactNode = ;\n\n // Pickup date and timeslot dropdown list\n const dropdownClassName = `${defaultClassName}__group-datetime-dropdown`;\n const labelClassName = `${dropdownClassName}-label`;\n const dropdownSelectClassName = `${dropdownClassName}-select`;\n const dateDropdownNode: React.ReactNode = (\n \n );\n\n const timeslotDropdownNode: React.ReactNode = (\n \n );\n\n const viewProp: ICheckoutPickupGroupViewProps = {\n moduleProps: { ...this.props },\n pickupGroupContainer: { className: `${defaultClassName}__group` },\n dateTimeslotContainer: { className: `${defaultClassName}__group-datetime` },\n pickupStoreId: value.pickupStoreId,\n pickupModeName: value.pickupModeName,\n deliveryMode: value.deliveryMode,\n groupDivider,\n groupHeader,\n groupErrorMessage: ,\n cartLineImages,\n pickupDateDropdown: dateDropdownNode,\n pickupTimeslotDropdown: timeslotDropdownNode,\n selectedDateTimeslot: selectedDateTimeslotNode,\n pickupAddress\n };\n\n groupsViewProps.push(viewProp);\n });\n\n const {\n moduleState: { isReady, hasError }\n } = this.props;\n const isHeaderError = !this.isLoading && this.headerErrorMessage !== undefined;\n const isShowDropdown = !this.isLoading && !isReady;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n\n const viewProps: ICheckoutPickupViewProps = {\n ...this.props,\n checkoutPickup: {\n moduleProps: this.props,\n className: classname(defaultClassName, className)\n },\n viewState: {\n isLoading: this.isLoading,\n isHeaderError,\n isShowSelected,\n isShowDropdown\n },\n headerError: ,\n waiting: ,\n pickupGroups: groupsViewProps,\n checkoutErrorRef: this.checkoutErrorRef\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n public async setDateHandler(pickupStoreId: string, deliveryMode: string, pickupDate: Date | undefined): Promise {\n const oldGroup = this.state.pickupGroups.find(\n group => group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode\n );\n if (!oldGroup) {\n return;\n }\n\n const newGroup: ICheckoutPickupGroup = { ...oldGroup };\n newGroup.selectedDate = pickupDate;\n newGroup.selectedTimeslot = undefined; // Clear the selected timeslot in any case\n newGroup.timeslotErrorMessage = undefined; // Clear the timeslot error message if any\n newGroup.lineDeliverySpecs.forEach((lineSpec: LineDeliverySpecification) => {\n if (lineSpec.DeliverySpecification) {\n lineSpec.DeliverySpecification.PickupTimeslotStartDateTime = undefined;\n lineSpec.DeliverySpecification.PickupTimeslotEndDateTime = undefined;\n }\n });\n\n if (pickupDate) {\n // Date is set\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n StartDate: pickupDate,\n EndDate: pickupDate,\n SearchOptionValue: 2 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.All\n };\n const timeslotResults: PickupTimeslotAvailability[] = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {}, bypassCache: 'get' },\n searchCriteria\n );\n\n newGroup.availableTimeslots = timeslotResults.filter(value => (value.AvailableCapacity || 0) > 0);\n newGroup.dateErrorMessage =\n newGroup.availableTimeslots.length === 0 ? this.props.resources.noAvailableTimeslotError : undefined;\n } else {\n // Date is not set\n newGroup.availableTimeslots = [];\n newGroup.dateErrorMessage = undefined;\n }\n\n const groups = this.state.pickupGroups.map(group => {\n if (group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode) {\n return newGroup;\n }\n return group;\n });\n\n this.setState({ pickupGroups: groups });\n }\n\n @action\n public setTimeslotHandler(pickupStoreId: string, deliveryMode: string, pickupTimeslot: PickupTimeslotAvailability | undefined): void {\n const oldGroup = this.state.pickupGroups.find(\n group => group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode\n );\n if (!oldGroup) {\n return;\n }\n\n const newGroup: ICheckoutPickupGroup = { ...oldGroup };\n\n newGroup.selectedTimeslot = pickupTimeslot;\n newGroup.lineDeliverySpecs.forEach((lineSpec: LineDeliverySpecification) => {\n if (lineSpec.DeliverySpecification) {\n lineSpec.DeliverySpecification.PickupTimeslotStartDateTime = pickupTimeslot?.StartDateTime;\n lineSpec.DeliverySpecification.PickupTimeslotEndDateTime = pickupTimeslot?.EndDateTime;\n }\n });\n\n if (pickupTimeslot) {\n newGroup.timeslotErrorMessage = undefined;\n }\n\n const groups = this.state.pickupGroups.map(group => {\n if (group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode) {\n return newGroup;\n }\n return group;\n });\n\n this.setState({ pickupGroups: groups });\n }\n\n @action\n private readonly initModuleState = (): void => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onSubmit: this.onSubmit,\n status: this.canPickup() ? (this.isPickupTimeSlotSet() ? 'ready' : 'updating') : 'disabled'\n });\n };\n\n private readonly onEdit = (): void => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly onReady = (): void => {\n this.props.moduleState.onReady();\n };\n\n private readonly onPending = (): void => {\n this.props.moduleState.onPending();\n };\n\n private readonly onSubmit = async (): Promise => {\n await this.updateCartLinePickupDateTimeslot();\n };\n\n private readonly setError = (errorMessage: string, isHeaderError: boolean = true): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n if (isHeaderError) {\n this.headerErrorMessage = errorMessage;\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.headerErrorMessage = undefined;\n };\n\n @action\n private readonly initPickupGroup = async (): Promise => {\n const pickupCartLines: CartLine[] = this.getCartLinesforPickup();\n let products: SimpleProduct[] = [];\n try {\n products = await this.getProductsByCartLines(\n this.props.data.checkout.result?.checkoutCart.cart.ChannelId || 0,\n pickupCartLines\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n const pickupGroups: ICheckoutPickupGroup[] = [];\n const locations: OrgUnitLocation[] = this.props.data.orgUnitLocations.result || [];\n this.isLoading = true;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { featureState, deliveryOptions } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n for (const line of pickupCartLines) {\n const group: ICheckoutPickupGroup | undefined = pickupGroups.find(\n x => x.pickupStoreId === line.FulfillmentStoreId && x.deliveryMode === line.DeliveryMode\n );\n const product: SimpleProduct | undefined = products.find(x => x.RecordId === line.ProductId);\n const lineDeliverySpecification: LineDeliverySpecification = {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: line.DeliveryMode,\n DeliveryPreferenceTypeValue: 2,\n PickUpStoreId: line.FulfillmentStoreId,\n PickupTimeslotStartDateTime: line.PickupTimeslotStartDateTime,\n PickupTimeslotEndDateTime: line.PickupTimeslotEndDateTime,\n DeliveryAddress: line.ShippingAddress\n }\n };\n if (group) {\n group.lineDeliverySpecs.push(lineDeliverySpecification);\n group.cartLines.push({ cartLine: line, product });\n } else {\n // Group not exists yet\n const location: OrgUnitLocation | undefined = locations.find(x => x.OrgUnitNumber === line.FulfillmentStoreId);\n const storeName: string = this.getStoreName(location, line);\n const selectedDate: Date | undefined =\n line.PickupTimeslotStartDateTime && getUTCDateWithoutTime(line.PickupTimeslotStartDateTime);\n const selectedTimeslot =\n line.PickupTimeslotStartDateTime && line.PickupTimeslotEndDateTime\n ? { StartDateTime: line.PickupTimeslotStartDateTime, EndDateTime: line.PickupTimeslotEndDateTime }\n : undefined;\n const newGroup: ICheckoutPickupGroup = {\n pickupModeName: retailMultiplePickUpOptionEnabled\n ? this.getPickupModeDescription(\n this.props.resources.generalPickupText,\n line.DeliveryMode,\n deliveryOptions?.result,\n product\n )\n : this.props.resources.generalPickupText,\n pickupStoreId: line.FulfillmentStoreId || '',\n deliveryMode: line.DeliveryMode || '',\n storeName,\n pickupAddress: line.ShippingAddress,\n availabilityState: PickupTimeslotAvailabilityState.None,\n lineDeliverySpecs: [lineDeliverySpecification],\n cartLines: [{ cartLine: line, product }],\n availableDates: [],\n availableTimeslots: [],\n selectedDate,\n selectedTimeslot\n };\n\n let dailyGroupingResults: PickupTimeslotAvailability[] = [];\n try {\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n SearchOptionValue: 1 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.DailyGroupingTimeslotOnly\n };\n dailyGroupingResults = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n searchCriteria\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n newGroup.availabilityState = this.getPickupTimeslotAvailabilityState(dailyGroupingResults);\n if (newGroup.availabilityState === PickupTimeslotAvailabilityState.NotAvailable) {\n newGroup.groupErrorMessage = this.props.resources.noAvailableDateError;\n this.setError(newGroup.groupErrorMessage, false);\n }\n dailyGroupingResults.forEach(value => {\n if (value.StartDateTime && (value.AvailableCapacity || 0) > 0) {\n newGroup.availableDates.push(getUTCDateWithoutTime(value.StartDateTime));\n }\n });\n\n if (selectedDate) {\n let timeslotResults: PickupTimeslotAvailability[] = [];\n try {\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n StartDate: selectedDate,\n EndDate: selectedDate,\n SearchOptionValue: 2 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.All\n };\n timeslotResults = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {}, bypassCache: 'get' },\n searchCriteria\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n newGroup.availableTimeslots = timeslotResults.filter(value => (value.AvailableCapacity || 0) > 0);\n }\n pickupGroups.push(newGroup);\n }\n }\n\n const filteredPickupGroups = pickupGroups.filter(\n group =>\n group.availabilityState === PickupTimeslotAvailabilityState.Available ||\n group.availabilityState === PickupTimeslotAvailabilityState.NotAvailable\n );\n\n if (!ArrayExtensions.hasElements(filteredPickupGroups)) {\n this.props.context.telemetry.error('Data is not ready or pickup group is empty, module wont render.');\n }\n this.isLoading = false;\n this.setState({ pickupGroups: filteredPickupGroups });\n };\n\n @action\n private readonly updateCartLinePickupDateTimeslot = async (): Promise => {\n if (!this.validateTimeslot()) {\n return;\n }\n const { resources } = this.props;\n let lineSpecs: LineDeliverySpecification[] = [];\n\n this.state.pickupGroups.forEach(group => {\n lineSpecs = lineSpecs.concat(group.lineDeliverySpecs);\n });\n\n this.clearError();\n this.onPending();\n\n try {\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const response = await checkoutState.checkoutCart.updateCartLinePickupDateTimeslot({ lineDeliverySpecifications: lineSpecs });\n\n if (response.status === 'FAILED') {\n this.setError(resources.genericErrorMessage);\n } else {\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n };\n\n private readonly getProductsByCartLines = async (channelId: number, cartLines: CartLine[]): Promise => {\n const actionContext = this.props.context.actionContext;\n const productInputs = cartLines\n .filter(line => !ObjectExtensions.isNullOrUndefined(line.ProductId))\n .map(\n line =>\n new ProductInput(\n line.ProductId || 0,\n actionContext.requestContext.apiSettings,\n channelId,\n undefined,\n actionContext.requestContext\n )\n );\n return getSimpleProducts(productInputs, actionContext);\n };\n\n private readonly validateTimeslot = (): boolean => {\n let validationResult = true;\n this.state.pickupGroups.forEach(group => {\n switch (group.availabilityState) {\n case PickupTimeslotAvailabilityState.NotAvailable:\n // Need customer to select another store in this case\n validationResult = false;\n break;\n case PickupTimeslotAvailabilityState.Available:\n if (!group.selectedDate || !group.selectedTimeslot) {\n if (!group.selectedDate) {\n group.dateErrorMessage = this.props.resources.pickupDateRequired;\n }\n if (!group.selectedTimeslot) {\n group.timeslotErrorMessage = this.props.resources.pickupTimeslotRequired;\n }\n this.setError(this.props.resources.pickupDateTimeslotRequired, false);\n validationResult = false;\n } else {\n group.dateErrorMessage = undefined;\n group.timeslotErrorMessage = undefined;\n }\n break;\n\n // We consider timeslot not defined as fallback case\n case PickupTimeslotAvailabilityState.NotDefined:\n default:\n }\n });\n\n return validationResult;\n };\n\n private readonly getStoreName = (orgUnitLocation: OrgUnitLocation | undefined, cartLine: CartLine): string => {\n return orgUnitLocation?.OrgUnitName || cartLine.ShippingAddress?.Name || cartLine.FulfillmentStoreId || '';\n };\n\n private readonly canPickup = (): boolean => {\n return ArrayExtensions.hasElements(this.state.pickupGroups);\n };\n\n private readonly isPickupTimeSlotSet = (): boolean => {\n return (\n ArrayExtensions.hasElements(this.state.pickupGroups) &&\n this.state.pickupGroups.every(\n group =>\n !ObjectExtensions.isNullOrUndefined(group.selectedTimeslot?.StartDateTime) &&\n !ObjectExtensions.isNullOrUndefined(group.selectedTimeslot?.EndDateTime)\n )\n );\n };\n\n private readonly getCartLinesforPickup = (): CartLine[] => {\n return this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(line => this.isPickupLine(line)) || [];\n };\n\n private readonly isPickupMode = (deliveryMode: string | undefined): boolean => {\n const pickupDeliveryModeCode = this.props.context.request.channel?.PickupDeliveryModeCode;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n if (retailMultiplePickUpOptionEnabled && deliveryMode !== undefined) {\n const pickupDeliveryMode = channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.includes(deliveryMode);\n return pickupDeliveryMode !== undefined ? pickupDeliveryMode : false;\n }\n return deliveryMode !== undefined && pickupDeliveryModeCode !== undefined && deliveryMode === pickupDeliveryModeCode;\n };\n\n private readonly isPickupLine = (line: CartLine): boolean => {\n return (\n this.isPickupMode(line.DeliveryMode) && line.FulfillmentStoreId !== undefined && !isNullOrWhiteSpace(line.FulfillmentStoreId)\n );\n };\n\n private readonly getPickupModeDescription = (\n resourceString: string,\n deliveryMode?: string,\n deliveryOptions?: ProductDeliveryOptions[],\n product?: SimpleProduct\n ): string => {\n let deliveryOption: string = resourceString;\n if (ArrayExtensions.hasElements(deliveryOptions) && product !== undefined) {\n let foundProductDeliveryOption;\n foundProductDeliveryOption = deliveryOptions?.find(deliveryO => {\n return deliveryO && deliveryO.ProductId === product.RecordId;\n });\n const deliveryDesc = foundProductDeliveryOption?.DeliveryOptions\n ? foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === deliveryMode)?.Description\n : resourceString;\n if (deliveryDesc !== undefined) {\n deliveryOption = deliveryDesc;\n }\n }\n return deliveryOption;\n };\n\n private readonly getPickupTimeslotAvailabilityState = (dailyResult: PickupTimeslotAvailability[]) => {\n let state: PickupTimeslotAvailabilityState = PickupTimeslotAvailabilityState.None;\n if (!ArrayExtensions.hasElements(dailyResult)) {\n state = PickupTimeslotAvailabilityState.NotDefined;\n } else if (dailyResult.every(date => (date.AvailableCapacity || 0) <= 0)) {\n state = PickupTimeslotAvailabilityState.NotAvailable;\n } else {\n state = PickupTimeslotAvailabilityState.Available;\n }\n return state;\n };\n\n /**\n * Returns count of products.\n * @param cartLine - The checkout pickup cart line info props.\n * @returns Number of products.\n */\n private readonly _countItems = (cartlines: ICheckoutPickupCartLineInfo[]): number => {\n return cartlines.reduce((count, line) => {\n return count + (line.quantity || 0);\n }, 0);\n };\n}\n\nexport default CheckoutPickup;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutPickupGroupViewProps, ICheckoutPickupViewProps } from './index';\n\nconst CheckoutPickupView: React.FC = props => {\n const { checkoutPickup, checkoutErrorRef, viewState, headerError, waiting, pickupGroups } = props;\n\n return (\n \n {viewState.isLoading && waiting}\n {viewState.isHeaderError && headerError}\n {pickupGroups.map(\n (pickupGroupViewProps: ICheckoutPickupGroupViewProps, index: number): React.ReactElement => {\n const {\n pickupGroupContainer,\n dateTimeslotContainer,\n groupDivider,\n groupHeader,\n groupErrorMessage,\n cartLineImages,\n pickupDateDropdown,\n pickupTimeslotDropdown,\n selectedDateTimeslot,\n pickupAddress\n } = pickupGroupViewProps;\n\n return (\n \n {groupDivider}\n {groupHeader}\n {groupErrorMessage}\n {cartLineImages}\n {viewState.isShowDropdown && (\n \n {pickupDateDropdown}\n {pickupTimeslotDropdown}\n \n )}\n {viewState.isShowSelected && pickupAddress}\n {viewState.isShowSelected && selectedDateTimeslot}\n \n );\n }\n )}\n \n );\n};\n\nexport default CheckoutPickupView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageProps, IImageSettings, Image, IModule } from '@msdyn365-commerce/core';\nimport {\n Address,\n CartLine,\n LineDeliverySpecification,\n PickupTimeslotAvailability,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface ICheckoutPickupGroupKey {\n pickupStoreId: string;\n deliveryMode: string;\n}\n\nexport interface ICheckoutPickupGroup extends ICheckoutPickupGroupKey {\n pickupModeName: string;\n storeName: string;\n pickupAddress?: Address;\n availabilityState: PickupTimeslotAvailabilityState;\n groupErrorMessage?: string;\n dateErrorMessage?: string;\n timeslotErrorMessage?: string;\n lineDeliverySpecs: LineDeliverySpecification[];\n cartLines: ICartLineWithProduct[];\n\n availableDates: Date[];\n availableTimeslots: PickupTimeslotAvailability[];\n\n selectedDate?: Date;\n selectedTimeslot?: PickupTimeslotAvailability;\n}\n\nexport enum PickupTimeslotAvailabilityState {\n None,\n Available,\n NotDefined,\n NotAvailable // All slots occupied\n}\n\nexport interface ICartLineWithProduct {\n cartLine: CartLine;\n product?: SimpleProduct;\n}\n\nexport interface ICheckoutPickupGroupViewProps {\n moduleProps: IModule;\n\n pickupGroupContainer: INodeProps;\n dateTimeslotContainer: INodeProps;\n\n pickupStoreId: string;\n pickupModeName: string;\n deliveryMode: string;\n\n groupDivider: React.ReactNode;\n groupHeader: React.ReactNode;\n groupErrorMessage: React.ReactNode;\n cartLineImages: React.ReactNode;\n pickupDateDropdown: React.ReactNode;\n pickupTimeslotDropdown: React.ReactNode;\n\n selectedDateTimeslot: React.ReactNode;\n pickupAddress: React.ReactNode;\n}\n\nexport interface ICheckoutPickupErrorProps {\n errorMessage?: string;\n}\n\nexport const CheckoutPickupError: React.FC = ({ errorMessage }) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \n \n );\n};\n\nexport interface ICheckoutPickupGroupHeaderProps {\n moduleClassName: string;\n storeInfo: string;\n items: string;\n}\n\nexport const CheckoutPickupGroupHeader: React.FC = ({ moduleClassName, storeInfo, items }) => {\n return (\n
\n
{storeInfo}
\n
{items}
\n
\n );\n};\n\nexport interface ICheckoutPickupTimeslotInfoProps {\n moduleClassName: string;\n title: string;\n content: string;\n}\n\nexport const CheckoutPickupTimeslotInfo: React.FC = ({ moduleClassName, title, content }) => {\n return (\n
\n
{title}
\n
{content}
\n
\n );\n};\n\nexport interface ICheckoutPickupAddressProps {\n moduleClassName: string;\n title: string;\n address?: Address;\n}\n\nexport const CheckoutPickupAddress: React.FC = ({ moduleClassName, title, address }) => {\n if (!address) {\n return null;\n }\n\n return (\n
\n
{title}
\n {address.Name && {address.Name}}\n <>\n {address.Street && {address.Street}}\n {address.City && {address.City}}\n {address.State && {`, ${address.State}`}}\n {address.County && {`, ${address.County}`}}\n {address.ZipCode && {` ${address.ZipCode}`}}\n {address.ThreeLetterISORegionName && (\n \n {` ${address.ThreeLetterISORegionName}`}\n \n )}\n \n
\n );\n};\n\nexport interface ICheckoutPickupCartLineInfo {\n lineId: string;\n imageProps: IImageProps;\n quantity: number;\n}\n\nexport interface ICheckoutPickupCartLinesProps {\n moduleClassName: string;\n cartLines: ICheckoutPickupCartLineInfo[];\n}\n\nexport const CheckoutPickupCartLines: React.FC = ({ moduleClassName, cartLines }) => {\n if (!ArrayExtensions.hasElements(cartLines)) {\n return null;\n }\n return (\n
\n {cartLines.map(prop => {\n const showQty = prop.quantity > 1;\n let className = `${moduleClassName}__group-product-image`;\n if (showQty) {\n className = classnames(className, ' product-image-wide');\n }\n return (\n
\n \n {showQty &&
{prop.quantity}
}\n
\n );\n })}\n
\n );\n};\n\nexport const DefaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=108&h=108&q=80&m=6&f=jpg\"', w: 108, h: 108 },\n lg: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n xl: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 }\n },\n lazyload: true,\n quality: 80\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { format } from '@msdyn365-commerce-modules/utilities';\n\nexport function getDate(date: Date | undefined, locale: string): string {\n if (!date) {\n return '';\n }\n const options: Intl.DateTimeFormatOptions = {\n timeZone: 'UTC'\n };\n const formatter = new Intl.DateTimeFormat(locale, options);\n return formatter.format(new Date(date));\n}\n\nexport const getTimeslot = (\n placeHolder: string,\n startDate: Date | undefined,\n endDate: Date | undefined,\n locale: string,\n useHour12TimeFormat?: boolean\n): string => {\n if (!startDate || !endDate) {\n return '';\n }\n let options: Intl.DateTimeFormatOptions = { hour: 'numeric', minute: 'numeric' };\n options = useHour12TimeFormat\n ? { hour: 'numeric', minute: 'numeric', timeZone: 'UTC' }\n : { hour: 'numeric', minute: 'numeric', timeZone: 'UTC', hour12: true };\n const formatter = new Intl.DateTimeFormat(locale, options);\n return format(placeHolder, formatter.format(new Date(startDate)), formatter.format(new Date(endDate)));\n};\n\nexport const getUTCDateWithoutTime = (input: Date): Date => {\n const date: Date = new Date(input);\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0));\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { LabeledDropdown } from '@msdyn365-commerce-modules/utilities';\nimport {\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption\n} from '@msdyn365-commerce-modules/utilities/dist/types/labeled-dropdown/LabeledDropdown.props';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { CheckoutPickupError } from './checkout-pickup-group';\nimport { getDate } from './checkout-pickup-utility';\n\nexport interface IPickupDropdownProps {\n pickupStoreId: string;\n deliveryMode: string;\n\n className: string;\n labelClassname?: string;\n labelText: string;\n defaultText: string;\n errorMessage?: string;\n\n locale: string;\n\n // Props for the LabeledDropdown component\n dropdownId: string;\n controlledByParent: boolean;\n toggleColor?: string;\n dropdownClassname?: string;\n}\n\nexport interface IPickupDateDropdownProps extends IPickupDropdownProps {\n availableDates: Date[];\n selectedDate?: Date;\n setDateHandler(pickupStoreId: string, deliveryMode: string, pickupDate: Date | undefined): void;\n}\n\n/**\n *\n * CheckoutPickupDateDropdown component.\n * @extends {React.Component}\n */\nexport class CheckoutPickupDateDropdown extends React.PureComponent {\n private readonly defaultKey: number = -1;\n\n private readonly defaultOption: ILabeledDropdownOption;\n\n // As the LabeledDropdown control only offers key and value, we need to map the key with date and timeslot data\n @computed get getDateMap(): Map {\n const map = new Map();\n this.props.availableDates.forEach((value, index) => {\n map.set(index.toString(), value);\n });\n return map;\n }\n\n constructor(props: IPickupDateDropdownProps) {\n super(props);\n this.defaultOption = { key: this.defaultKey.toString(), value: props.defaultText };\n this.updateDateSelection = this.updateDateSelection.bind(this);\n }\n\n public render(): JSX.Element | null {\n const {\n className,\n labelClassname,\n labelText,\n errorMessage,\n dropdownId,\n availableDates,\n selectedDate,\n controlledByParent,\n toggleColor,\n dropdownClassname\n } = this.props;\n\n const { dropdownOptions, selectedOption } = this.mapDatesToOptions(availableDates, selectedDate);\n\n return (\n
\n \n \n \n
\n );\n }\n\n private readonly updateDateSelection = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { pickupStoreId, deliveryMode, setDateHandler } = this.props;\n const date: Date | undefined = this.getDate(notification);\n setDateHandler(pickupStoreId, deliveryMode, date);\n };\n\n private readonly getDate = (notification: ILabeledDropdownOnChangeNotification): Date | undefined => {\n const key: string = notification.selectedOption.key;\n if (key === this.defaultKey.toString() || !this.getDateMap.has(key)) {\n return undefined;\n }\n return this.getDateMap.get(key);\n };\n\n private readonly mapDatesToOptions = (\n dates: Date[],\n selectedDate: Date | undefined\n ): { dropdownOptions: ILabeledDropdownOption[]; selectedOption: ILabeledDropdownOption | undefined } => {\n const { locale } = this.props;\n let options: ILabeledDropdownOption[] = [];\n let selectedOption: ILabeledDropdownOption = this.defaultOption;\n\n options = dates.map((value: Date, index: number) => {\n return {\n key: index.toString(),\n value: getDate(value, locale)\n };\n });\n options.unshift(this.defaultOption);\n\n const index: number = dates.findIndex((value: Date) => selectedDate !== undefined && selectedDate.getTime() === value.getTime());\n if (index >= 0 && selectedDate) {\n selectedOption = {\n key: index.toString(),\n value: getDate(selectedDate, locale)\n };\n }\n\n return {\n dropdownOptions: options,\n selectedOption\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 { PickupTimeslotAvailability } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { LabeledDropdown } from '@msdyn365-commerce-modules/utilities';\nimport {\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption\n} from '@msdyn365-commerce-modules/utilities/dist/types/labeled-dropdown/LabeledDropdown.props';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { IPickupDropdownProps } from './checkout-pickup-date-dropdown';\nimport { CheckoutPickupError } from './checkout-pickup-group';\nimport { getTimeslot } from './checkout-pickup-utility';\n\nexport interface IPickupTimeslotDropdownProps extends IPickupDropdownProps {\n availableTimeslots: PickupTimeslotAvailability[];\n selectedTimeslot?: PickupTimeslotAvailability;\n timeslotPlaceHolder: string;\n setTimeslotHandler(pickupStoreId: string, deliveryMode: string, pickupTimeslot: PickupTimeslotAvailability | undefined): void;\n useHour12TimeFormat?: boolean;\n}\n\n/**\n *\n * CheckoutPickupTimeslotDropdown component.\n * @extends {React.Component}\n */\nexport class CheckoutPickupTimeslotDropdown extends React.PureComponent {\n private readonly defaultKey: number = -1;\n\n private readonly defaultOption: ILabeledDropdownOption;\n\n // As the LabeledDropdown control only offers key and value, we need to map the key with date and timeslot data\n @computed get getTimeslotMap(): Map {\n const map = new Map();\n this.props.availableTimeslots.forEach((value, index) => {\n map.set(index.toString(), value);\n });\n return map;\n }\n\n constructor(props: IPickupTimeslotDropdownProps) {\n super(props);\n this.defaultOption = { key: this.defaultKey.toString(), value: props.defaultText };\n this.updateTimeslotSelection = this.updateTimeslotSelection.bind(this);\n }\n\n public render(): JSX.Element | null {\n const {\n className,\n labelClassname,\n labelText,\n errorMessage,\n dropdownId,\n availableTimeslots,\n selectedTimeslot,\n controlledByParent,\n toggleColor,\n dropdownClassname\n } = this.props;\n\n const { dropdownOptions, selectedOption } = this.mapTimeslotsToOptions(availableTimeslots, selectedTimeslot);\n\n return (\n
\n \n \n \n
\n );\n }\n\n private readonly updateTimeslotSelection = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { pickupStoreId, deliveryMode, setTimeslotHandler } = this.props;\n const timeslot: PickupTimeslotAvailability | undefined = this.getTimeslot(notification);\n setTimeslotHandler(pickupStoreId, deliveryMode, timeslot);\n };\n\n private readonly getTimeslot = (notification: ILabeledDropdownOnChangeNotification): PickupTimeslotAvailability | undefined => {\n const key: string = notification.selectedOption.key;\n if (key === this.defaultKey.toString() || !this.getTimeslotMap.has(key)) {\n return undefined;\n }\n return this.getTimeslotMap.get(key);\n };\n\n private readonly mapTimeslotsToOptions = (\n timeslots: PickupTimeslotAvailability[],\n selectedTimeslot: PickupTimeslotAvailability | undefined\n ): { dropdownOptions: ILabeledDropdownOption[]; selectedOption: ILabeledDropdownOption | undefined } => {\n const { timeslotPlaceHolder, locale, useHour12TimeFormat } = this.props;\n let options: ILabeledDropdownOption[] = [];\n let selectedOption: ILabeledDropdownOption = this.defaultOption;\n\n options = timeslots.map((value: PickupTimeslotAvailability, index: number) => {\n return {\n key: index.toString(),\n value: getTimeslot(timeslotPlaceHolder, value.StartDateTime, value.EndDateTime, locale, useHour12TimeFormat)\n };\n });\n options.unshift(this.defaultOption);\n\n const index: number = timeslots.findIndex(\n value =>\n selectedTimeslot !== undefined &&\n selectedTimeslot.StartDateTime?.getTime() === value.StartDateTime?.getTime() &&\n selectedTimeslot.EndDateTime?.getTime() === value.EndDateTime?.getTime()\n );\n if (index >= 0 && selectedTimeslot) {\n selectedOption = {\n key: index.toString(),\n value: getTimeslot(\n timeslotPlaceHolder,\n selectedTimeslot.StartDateTime,\n selectedTimeslot.EndDateTime,\n locale,\n useHour12TimeFormat\n )\n };\n }\n\n return {\n dropdownOptions: options,\n selectedOption\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 * as MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutTermsAndConditionsData } from './checkout-terms-and-conditions.data';\nimport { ICheckoutTermsAndConditionsProps } from './checkout-terms-and-conditions.props.autogenerated';\nimport CheckboxComponent from './components/checkout-terms-and-conditions.check-box';\nimport ErrorMessageComponent from './components/checkout-terms-and-conditions.error-message';\nimport ErrorTitleComponent from './components/checkout-terms-and-conditions.error-title';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutTermsAndConditionsModuleProps\n extends ICheckoutTermsAndConditionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutTermsAndConditions {\n termsAndConditionAcceptance: INodeProps;\n checkBox: React.ReactNode;\n description: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsError {\n error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsViewState {\n isError: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutTermsAndConditionsViewProps extends ICheckoutTermsAndConditionsProps<{}> {\n checkoutTermsAndConditions: IModuleProps;\n isTermsAccepted: boolean;\n errorMessageData: string;\n viewState: ICheckoutTermsAndConditionsViewState;\n termsAndConditionsContent: ICheckoutTermsAndConditions;\n errorMessage?: ICheckoutTermsAndConditionsError;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutTermsAndConditions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutTermsAndConditions extends React.Component {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isTermsAccepted: boolean = true;\n\n @observable private errorMessage?: string;\n\n constructor(props: ICheckoutTermsAndConditionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get isShowButtons(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && (showControlButtons || false);\n }\n\n @computed get isAutoSave(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && !showControlButtons;\n }\n\n @computed get defaultTermsAndConditionAcceptedValue(): boolean {\n const { showCheckbox } = this.props.config;\n return !showCheckbox;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.isTermsAndConditionAccepted,\n async () => {\n this.isTermsAccepted =\n this.props.data.checkout.result?.isTermsAndConditionAccepted || this.defaultTermsAndConditionAcceptedValue;\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutTermsAndConditions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutTermsAndConditions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutTermsAndConditionsModuleProps,\n nextState: ICheckoutTermsAndConditionsViewState\n ): 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 const {\n moduleState: { isReady, hasError },\n config: { className }\n } = this.props;\n const isTermsAndConditionAccepted = this.props.data.checkout.result?.isTermsAndConditionAccepted;\n const isError = hasError;\n const isShowContent = !isReady;\n const isShowSelected = !hasError && isReady;\n\n const viewProps = {\n ...this.props,\n ...this.state,\n isTermsAccepted: this.isTermsAccepted,\n errorMessageData: this.errorMessage,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isError,\n isShowSaveButton: isShowContent && this.isShowButtons,\n isShowEditButton: isShowSelected && this.isShowButtons,\n isShowCancelButton: isShowContent && this.isShowButtons && isTermsAndConditionAccepted\n },\n checkoutTermsAndConditions: {\n moduleProps: this.props,\n className: classname('ms-checkout-terms-and-conditions', className)\n },\n termsAndConditionsContent: this.getTermsAndConditions(),\n errorMessage: this.getErrorMessage(),\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSubmit,\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onChange: this.onChange\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.description = event.target.value);\n\n private readonly getTermsAndConditions = (): ICheckoutTermsAndConditions => {\n const {\n moduleState: { isReady },\n config: { showCheckbox, description }\n } = this.props;\n const isDisabled = isReady && !this.isAutoSave;\n const isTermsAndConditionAccepted = this.isTermsAccepted;\n const { checkboxAriaLabel } = this.props.resources;\n return {\n termsAndConditionAcceptance: { className: 'ms-checkout-terms-and-conditions__container' },\n checkBox: showCheckbox && (\n \n ),\n description: (\n \n )\n };\n };\n\n @action\n private readonly init = async (): Promise => {\n const {\n data,\n config: { showCheckbox }\n } = this.props;\n\n const hasInvoiceLine = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n\n // If hasInvoiceLine is true, this is for b2b and isTermsAccepted should be true\n if (hasInvoiceLine || data.checkout.result?.isTermsAndConditionAccepted || !showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(true);\n this.isTermsAccepted = true;\n } else if (showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(false);\n this.isTermsAccepted = false;\n }\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n status: hasInvoiceLine ? 'disabled' : this.isTermsAccepted ? 'ready' : 'updating'\n });\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly getErrorMessage = (): ICheckoutTermsAndConditionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n error: { tag: 'div', className: 'ms-checkout-terms-and-conditions__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel', cancelBtnAriaLabel } = this.props.resources;\n return (\n \n {cancelBtnLabel}\n \n );\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save', saveBtnAriaLabel } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change', editBtnAriaLabel } = this.props.resources;\n return (\n \n {editBtnLabel}\n \n );\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Terms and conditions onEdit is called.');\n\n this.onUpdating();\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Terms and conditions onSubmit is called.');\n\n if (!this.isTermsAccepted) {\n if (this.isAutoSave) {\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n } else {\n this.setError(this.props.resources.errorMessage);\n this.props.moduleState.setHasError(true);\n }\n } else {\n this.clearError();\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Terms and conditions onCancel is called.');\n\n // Reset to the saved value\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const isTermsAccepted = this.props.data.checkout.result.isTermsAndConditionAccepted;\n if (!isTermsAccepted) {\n // It has no saved email, set to status updating and request user to fill the email form\n this.props.moduleState.onUpdating();\n } else {\n // It has saved email, set to status ready\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly updateTermsAndConditionsAcceptance = async (isTermsAccepted: boolean): Promise => {\n if (this.props.data.checkout.result) {\n await this.props.data.checkout.result.updateTermsAndConditionsAcceptance({ newIsTermsAndConditionAccepted: isTermsAccepted });\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onChange = async (event: React.ChangeEvent) => {\n const checked = event.target.checked;\n this.isTermsAccepted = checked;\n\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\n await this.props.data.checkout.result.updateIsTermsAndConditionsChecked({ newIsTermsAndConditionChecked: checked });\n }\n\n if (this.isAutoSave) {\n await this.onSubmit();\n }\n };\n}\n\nexport default CheckoutTermsAndConditions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutTermsAndConditions,\n ICheckoutTermsAndConditionsError,\n ICheckoutTermsAndConditionsViewProps\n} from './checkout-terms-and-conditions';\n\nconst TermsAndCondition: React.FC = ({ termsAndConditionAcceptance, checkBox, description }) => {\n return (\n \n {checkBox}\n {description}\n \n );\n};\n\nconst ErrorMessage: React.FC = ({ error, title, message }) => {\n return (\n \n {title}\n {message}\n \n );\n};\n\nconst CheckoutTermsAndConditionsView: React.FC = props => {\n const {\n checkoutTermsAndConditions,\n checkoutErrorRef,\n viewState,\n termsAndConditionsContent,\n errorMessage,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isError && errorMessage && }\n \n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutTermsAndConditionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsCheckboxProps {\n isChecked: boolean;\n ariaLabel?: string;\n disabled: boolean;\n id?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.ariaLabel\n * @param root0.disabled\n * @param root0.telemetryContent\n * @param root0.onChange\n * @param root0.id\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsCheckbox: React.FC = ({\n isChecked,\n ariaLabel,\n disabled,\n telemetryContent,\n onChange,\n id\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n <>\n \n \n );\n};\n\nexport default CheckoutTermsAndConditionsCheckbox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorMessage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsErrorTitleProps {\n title?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.title\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorTitle: React.FC = ({ title }) => {\n if (!title) {\n return null;\n }\n\n return

{title}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorTitle;\n"],"names":["CheckoutCustomerAccountPayment","React","constructor","props","super","defaultLocale","baseClassName","checkoutErrorRef","getAvailableCredit","creditBalances","availableCredit","InvoiceAccountCreditLimit","CreditLimit","Balance","PendingBalance","InvoiceAccountBalance","InvoiceAccountPendingBalance","addPayment","async","checkoutState","this","data","checkout","result","setState","handleSaveAndContinue","_clearError","updateCustomerAccountAmount","newAmount","state","paymentAmount","context","telemetry","information","error","toggleCreditSection","isCreditSectionExpanded","init","moduleState","onCancel","handleCancelOrSubmit","onSubmit","onEdit","customerAccountAmount","onReady","onChangePaymentAmount","customizedAmt","amountVariable","updateMaxAmount","Math","max","toString","onUpdating","Msdyn365","request","checkoutCart","cart","TotalAmount","_setErrorMessage","resources","invalidAmountForOBOMessage","config","isCheckoutCustomerAccountPaymentRequired","customerAccountCreditErrorMessage","onSkip","removePayment","NaN","errorMessage","setHasError","locale","get","maxPaymentAmount","Intl","NumberFormat","format","customerInfo","b2bChannel","isChannelTypeB2B","platform","AllowOnAccountPayment","enableCustomerAccountPayment","loyaltyAmount","_this$props$data$cust","undefined","amountDue","getLoyaltyAmount","_this$props$data$cred","customerInformation","MandatoryCreditLimit","min","invalidAmountExceedAmountDueMessage","invalidAmountNegativeMessage","orderTotal","excessCredit","cultureFormatter","formatCurrency","currencyCode","status","_this$props$data$chec","when","isDataReady","reaction","totalAmount","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec2","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec3","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","actionContext","shouldComponentUpdate","nextProps","nextState","render","_this$props$data$cust2","_this$props$context$r","isCustomerAccountPaymentEnabled","hasInvoiceLine","customerSinceDate","Date","CreatedDateTime","toLocaleDateString","hasError","_objectSpread","checkoutCustomerAccount","moduleProps","className","classnames","alert","ErrorComponent","Object","assign","title","errorMessageTitle","message","editView","getAccountPaymentFormEditMode","onAddPayment","amount","maxAmount","customer","customerCreatedDate","showCreditLimit","onToggleCreditSection","creditSectionIsExpanded","formattedExcessCredit","onRemovePayment","appliedAmount","skipOnChangeLogic","features","skipCheckoutOnChangeLogic","summaryView","getAccountPaymentFormSummaryMode","renderView","__decorate","computed","action","withModuleState","observer","onAddAccountPayment","event","preventDefault","onChangeAmountHandler","value","target","customState","customizedAmount","returnModifiedState","getLocaleBasedCustomizedPrice","keyCode","options","addPaymentButtonLabel","inputAmountLabel","inputAmountAriaLabel","customerSinceLabel","accountCreditLabel","creditDetailsSectionLabel","orderTotalLabel","availableCreditLabel","creditExcessLabel","appliedCustomerAccountPaymentLabel","removeCustomerAccountPaymentLabel","accountCreditDetails","inputLabel","id","formProps","tag","addPaymentButton","Button","onClick","disabled","Number","isNaN","inputAmount","type","onInput","_ref","currentTarget","onKeyDown","which","customerName","Name","customerAccountNumber","AccountNumber","customerSince","accountCredit","role","accountDetails","Alert","assertive","fade","includeAlertClass","isOpen","appliedLine","bottomBorder","inputAmountSummaryLabel","label","paymentAmountInput","CheckoutPickup","_this","isLoading","initModuleState","canPickup","isPickupTimeSlotSet","onPending","updateCartLinePickupDateTimeslot","setError","isHeaderError","arguments","length","headerErrorMessage","clearError","initPickupGroup","_this$props","_featureState$result","pickupCartLines","getCartLinesforPickup","products","getProductsByCartLines","ChannelId","pickupGroups","locations","orgUnitLocations","featureState","deliveryOptions","retailMultiplePickUpOptionEnabled","find","feature","IsEnabled","line","group","x","pickupStoreId","FulfillmentStoreId","deliveryMode","DeliveryMode","product","RecordId","ProductId","lineDeliverySpecification","LineId","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","PickUpStoreId","PickupTimeslotStartDateTime","PickupTimeslotEndDateTime","DeliveryAddress","ShippingAddress","lineDeliverySpecs","push","cartLines","cartLine","location","OrgUnitNumber","storeName","getStoreName","selectedDate","getUTCDateWithoutTime","selectedTimeslot","StartDateTime","EndDateTime","newGroup","pickupModeName","getPickupModeDescription","generalPickupText","pickupAddress","availabilityState","PickupTimeslotAvailabilityState","None","availableDates","availableTimeslots","dailyGroupingResults","searchCriteria","DeliveryModeCode","StoreId","SearchOptionValue","getEstimatedPickupTimeslotAvailabilitiesAsync","callerContext","queryResultSettings","getPickupTimeslotAvailabilityState","NotAvailable","groupErrorMessage","noAvailableDateError","forEach","AvailableCapacity","timeslotResults","StartDate","EndDate","bypassCache","filter","filteredPickupGroups","Available","ArrayExtensions","hasElements","validateTimeslot","lineSpecs","concat","lineDeliverySpecifications","genericErrorMessage","setIsCancellable","_unused","channelId","productInputs","ObjectExtensions","isNullOrUndefined","map","ProductInput","requestContext","apiSettings","getSimpleProducts","validationResult","dateErrorMessage","timeslotErrorMessage","pickupDateRequired","pickupTimeslotRequired","pickupDateTimeslotRequired","NotDefined","orgUnitLocation","_cartLine$ShippingAdd","OrgUnitName","every","_group$selectedTimesl","_group$selectedTimesl2","CartLines","isPickupLine","isPickupMode","_this$props2","_featureState$result2","pickupDeliveryModeCode","channel","PickupDeliveryModeCode","channelDeliveryOptionConfig","_channelDeliveryOptio","pickupDeliveryMode","PickupDeliveryModeCodes","includes","isNullOrWhiteSpace","resourceString","deliveryOption","_foundProductDelivery","_foundProductDelivery2","foundProductDeliveryOption","deliveryO","deliveryDesc","DeliveryOptions","option","Code","Description","dailyResult","date","_countItems","cartlines","reduce","count","quantity","setDateHandler","bind","setTimeslotHandler","componentDidMount","_this$props$data$chec4","_this$props$data$chec5","pickupDateLabel","pickupTimeslotLabel","pickupDateDefaultText","pickupTimeslotDefaultText","itemsText","singleItemText","pickupDateTimeslotText","pickupTimeslotPlaceHolder","pickupLocationLabel","imageSettings","useHour12TimeFormat","defaultClassName","groupsViewProps","index","_value$selectedTimesl","_value$selectedTimesl2","groupDivider","_line$product","_line$product2","_line$product3","_context$request$app","lineId","imageProps","altText","src","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","ItemId","app","OmniChannelMedia","gridSettings","DefaultImageSettings","loadFailureBehavior","Quantity","numberOfCartLines","itemText","itemTitle","headerProps","moduleClassName","storeInfo","items","groupHeader","CheckoutPickupGroupHeader","lineImageProps","cartLineImages","CheckoutPickupCartLines","dateString","getDate","timeslotString","getTimeslot","timeslotInfoProps","content","selectedDateTimeslotNode","CheckoutPickupTimeslotInfo","addressProps","address","CheckoutPickupAddress","dropdownClassName","labelClassName","dropdownSelectClassName","dateDropdownNode","CheckoutPickupDateDropdown","defaultText","labelText","dropdownId","controlledByParent","labelClassname","dropdownClassname","timeslotDropdownNode","CheckoutPickupTimeslotDropdown","timeslotPlaceHolder","viewProp","pickupGroupContainer","dateTimeslotContainer","CheckoutPickupError","pickupDateDropdown","pickupTimeslotDropdown","selectedDateTimeslot","isReady","isShowDropdown","isShowSelected","viewProps","checkoutPickup","classname","viewState","headerError","waiting","Waiting","pickupDate","oldGroup","lineSpec","noAvailableTimeslotError","groups","pickupTimeslot","observable","Module","ref","pickupGroupViewProps","Node","key","_ref2","_ref3","_ref4","Street","City","State","County","ZipCode","ThreeLetterISORegionName","_ref5","prop","showQty","Image","viewports","xs","q","w","h","lg","xl","lazyload","quality","DateTimeFormat","timeZone","placeHolder","startDate","endDate","hour","minute","hour12","formatter","input","UTC","getUTCFullYear","getUTCMonth","getUTCDate","defaultKey","updateDateSelection","notification","selectedOption","getDateMap","has","mapDatesToOptions","dates","defaultOption","unshift","findIndex","getTime","dropdownOptions","Map","set","toggleColor","htmlFor","LabeledDropdown","onSelectOption","updateTimeslotSelection","getTimeslotMap","mapTimeslotsToOptions","timeslots","_selectedTimeslot$Sta","_value$StartDateTime","_selectedTimeslot$End","_value$EndDateTime","CheckoutTermsAndConditions","isTermsAccepted","handleTextChange","description","getTermsAndConditions","showCheckbox","isDisabled","isAutoSave","isTermsAndConditionAccepted","checkboxAriaLabel","termsAndConditionAcceptance","checkBox","CheckboxComponent","isChecked","ariaLabel","onChange","telemetryContent","MsDyn365","text","editProps","_data$checkout$result","updateTermsAndConditionsAcceptance","isPaymentVerificationRedirection","getErrorMessage","ErrorTitleComponent","ErrorMessageComponent","getCancelButton","cancelBtnLabel","cancelBtnAriaLabel","color","getSaveButton","saveBtnLabel","saveBtnAriaLabel","getEditButton","editBtnLabel","editBtnAriaLabel","newIsTermsAndConditionAccepted","checked","shouldEnableSinglePaymentAuthorizationCheckout","updateIsTermsAndConditionsChecked","newIsTermsAndConditionChecked","getTelemetryObject","telemetryPageName","friendlyName","showControlButtons","hasExternalSubmitGroup","defaultTermsAndConditionAcceptedValue","_this$props$data$chec6","_this$props$data$chec7","_this$props$data$chec8","isError","isShowContent","errorMessageData","isShowSaveButton","isShowButtons","isShowEditButton","isShowCancelButton","checkoutTermsAndConditions","termsAndConditionsContent","saveButton","editButton","cancelButton","onSave","TermsAndCondition","ErrorMessage","payLoad","getPayloadObject","attribute","getTelemetryAttributes","name"],"sourceRoot":""}