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kB,QAAS5B,KAAK4B,QACzEe,GAAE,UAAK3C,KAAKH,MAAM8C,GAAhB,cAAgCsG,SAAUjJ,KAAKH,MAAMoJ,SAAUzI,KAAM,GACvEmR,IAAKA,IACb,IAAI,WACA,OAAQ,gBAAC,KAAoB,CACzBgU,YAAa,cAAsBC,QAASC,SAASC,IAAKlkB,QAAS5B,KAAK4B,QACxEe,GAAE,UAAK3C,KAAKH,MAAM8C,GAAhB,aAA+BsG,SAAUjJ,KAAKH,MAAMoJ,SAAUzI,KAAM,GACtEmR,IAAKA,IACb,IAAI,OACA,OAAQ,gBAAC,KAAoB,CACzBgU,YAAa,UAAkBC,QAASC,SAASC,IAAKlkB,QAAS5B,KAAK4B,QACpEe,GAAE,UAAK3C,KAAKH,MAAM8C,GAAhB,SAA2BsG,SAAUjJ,KAAKH,MAAMoJ,SAAUzI,KAAM,GAClEmR,IAAKA,IACb,QACI,OAAO,KAGnB,OAAO,MAIf,W,uGCrEO,MAAMoU,EAA2DlmB,IACpE,MAAM,gBAAEylB,EAAF,uBAAmBG,GAA2B5lB,EAEpD,OAAK4lB,EAKD,kBAAC,EAAAnjB,OAAM,iBAAKgjB,GACPG,IALL5lB,EAAM+B,QAAQgC,UAAUuD,MAAM,iDACvB,OASf","sources":["webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/bulk-purchase/bulk-purchase.tsx?9fd5","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/bulk-purchase/bulk-purchase.view.tsx?feac","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/carousel/carousel.tsx?80d4","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/carousel/carousel.view.tsx?d82f","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/header/components/header-preferred-store.tsx?ee9c","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/header/components/logo.tsx?f27e","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/header/components/nav-icon.tsx?2475","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/header/header.tsx?e91a","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/header/header.view.tsx?cf0f","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/media-gallery/utils/get-valid-product-images.ts?a364","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/media-gallery/media-gallery.tsx?24d7","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/media-gallery/media-gallery.view.tsx?5061","webpack://@msdyn365-commerce-partners/fabrikam/./src/order-summary-lineitem.tsx?8a98","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/product-collection/product-collection.tsx?4008","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/product-collection/product-collection.view.tsx?5d36","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/promo-banner/components/close-button.tsx?063b","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/promo-banner/components/links.tsx?2587","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/promo-banner/components/text.tsx?782b","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/promo-banner/promo-banner.tsx?9ee9","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/promo-banner/promo-banner.view.tsx?7f77","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/social-share-item/social-share-item.tsx?bbcb","webpack://@msdyn365-commerce-partners/fabrikam/./src/modules/social-share-item/social-share-item.view.tsx?2d3e"],"sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps {\n productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps {\n container: IModuleProps;\n content: React.ReactElement;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n isExpanded: boolean;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent {\n public static readonly className = 'ms-bulk-purchase';\n\n public constructor(props: IBulkPurchaseExtendedProps) {\n super(props);\n\n this.state = {\n isExpanded: false\n };\n }\n\n public render(): React.ReactElement | null {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n if (!hasDimensionsInProps && !hasDimensionsInData) {\n return null;\n }\n\n const viewProps: IBulkPurchaseViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className: classnames(BulkPurchase.className, this.props.config.className)\n },\n content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderCollapseContent(className: string): React.ReactElement {\n return (\n
\n {this._renderCollapseButton(`${className}__collapse-button`)}\n {this._renderCollapse(`${className}__collapse`)}\n
\n );\n }\n\n private _renderCollapseButton(className: string): React.ReactElement {\n return (\n \n {this.props.resources.bulkPurchaseHeaderTitle}\n \n );\n }\n\n private _renderCollapse(className: string): React.ReactElement {\n return (\n \n {this._renderMainContent(`${className}__main-content`)}\n \n );\n }\n\n private _renderMainContent(className: string): React.ReactElement {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return (\n
\n {\n !isMobileDevice &&\n
\n \n
\n }\n {this._renderMatrix(`${className}__matrix-container`)}\n
\n );\n }\n\n private _renderMatrix(className: string): React.ReactElement {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n\n return (\n }\n data={{\n dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n orderTemplates: this.props.data.orderTemplates?.result,\n customerInformation: this.props.data.customerInformation?.result\n }}\n resources={this.props.resources}\n />\n );\n }\n\n /**\n * Callback which toggles collapse mode.\n */\n private readonly _toggleCollapse = () => {\n this.setState(state => ({\n isExpanded: !state.isExpanded\n }));\n };\n}\n\nexport default BulkPurchase;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBulkPurchaseViewProps } from './bulk-purchase';\n\n/**\n * Bulk purchase view.\n * @param props - Bulk purchase view props.\n * @returns React node with a module.\n */\nexport const BulkPurchaseViewComponent: React.FC = props => {\n return (\n \n {props.content}\n \n );\n};\n\nexport default BulkPurchaseViewComponent;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICarouselData } from './carousel.data';\nimport { ICarouselProps } from './carousel.props.autogenerated';\nimport { ICarouselState } from './carousel.state';\n\nexport interface ICarouselViewProps extends ICarouselProps<{}>, ICarouselState {\n closeAnimation: string;\n carouselContainer: IModuleProps;\n telemetryContent: ITelemetryContent;\n next(): void;\n previous(): void;\n onIndicatorsClickHandler(): void;\n handleDismissCarousel(): void;\n handleOnExited(): void;\n handleOnExiting(): void;\n}\n\n/**\n *\n * CarouselModule component.\n * @extends {React.PureComponent>}\n */\nclass CarouselModule extends React.PureComponent, ICarouselState> {\n private animating: boolean;\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: ICarouselProps, state: ICarouselState) {\n super(props);\n this.state = { activeIndex: 0, closeNow: false, dismissCarousel: false };\n this.animating = false;\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n }\n\n public componentDidMount(): void {\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\n if (this.props.context.request.cookies.get(`CarouselDismiss_${this.props.id}`) === undefined) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'false');\n this.setState({ dismissCarousel: false });\n }\n }\n }\n\n public render(): JSX.Element | null {\n if (this.state.dismissCarousel) {\n return null;\n }\n\n const { className } = this.props.config;\n\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n ...this.state,\n telemetryContent: this.telemetryContent,\n carouselContainer: {\n moduleProps: this.props,\n className: classnames('ms-carousel', className)\n },\n closeAnimation: this.state.closeNow ? 'close-now' : '',\n next: this._next,\n previous: this._previous,\n onIndicatorsClickHandler: this._goToIndex,\n handleDismissCarousel: this._handleDismissCarousel,\n handleOnExited: this._onExited,\n handleOnExiting: this._onExiting };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Function implementation to dismiss the Carousel.\n */\n private readonly _handleDismissCarousel = (): void => {\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'true');\n this.setState({ dismissCarousel: true });\n }\n };\n\n /**\n * Function implementation to move to next slide.\n */\n private readonly _next = (): void => {\n const { slots } = this.props;\n const nextIndex = this.state.activeIndex === (slots && slots.content && slots.content.length - 1) ? 0 : this.state.activeIndex + 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n };\n\n /**\n * Function implementation to move to previous slide.\n */\n private readonly _previous = (): void => {\n const slots = this.props.slots && this.props.slots.content;\n const nextIndex = this.state.activeIndex === 0 ? (slots ? slots.length - 1 : 0) : this.state.activeIndex - 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n };\n\n private readonly _onExiting = (): void => {\n this.animating = true;\n };\n\n private readonly _onExited = (): void => {\n this.animating = false;\n this.setState({ closeNow: false });\n };\n\n /**\n * Function implementation to move to a given slide.\n * @param newIndex\n */\n private readonly _goToIndex = (newIndex: number): void => {\n if (this.animating) {\n return;\n }\n this.setState({ activeIndex: newIndex });\n };\n}\n\nexport default CarouselModule;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Carousel } from '@msdyn365-commerce/components';\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICarouselViewProps } from './carousel';\n\n/**\n * Returns item slots.\n * @returns Array of item slots.\n * @param props -Props.\n */\nconst retrieveItems = (props: ICarouselViewProps): React.ReactNode[] => {\n let items = [];\n items = props.slots && props.slots.content && props.slots.content.length > 0 ? props.slots.content : [];\n return items;\n};\nconst CarouselView: React.FC = props => (\n \n \n \n);\n\nexport default CarouselView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderProps } from '../header.props.autogenerated';\n\n/**\n * The header preferred store component.\n */\n@observer\nexport class HeaderPreferredStore extends React.PureComponent> {\n private readonly modalCloseButtonRef: React.RefObject = React.createRef();\n\n /**\n * Handle click on the store selector.\n * @returns : Promise void.\n */\n public handleClick = () => {\n return this._findPreferredStoreOnClick(this.props);\n };\n\n public render(): JSX.Element | undefined {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n slots,\n resources\n } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- slots can be undefined.\n if (ArrayExtensions.hasElements(slots?.storeSelector)) {\n const storeName = storeSelectorStateManager?.preferredStore &&\n storeSelectorStateManager.preferredStore.StoreName ? storeSelectorStateManager.preferredStore.StoreName : resources.headerPreferredStoreText;\n\n return (\n
\n \n \n {storeName}\n \n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferredStoreOnClick(props: IHeaderProps): Promise {\n const { data: { storeSelectorStateManager: { result: storeSelectorStateManager } }, modules } = props;\n if (!storeSelectorStateManager) {\n return;\n }\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && ArrayExtensions.hasElements(modules.storeSelector)) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n await storeSelectorStateManager.openDialog({\n id: storeSelectorId,\n showMapViewLink: false,\n parentElementRef: this.modalCloseButtonRef,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\n }).catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to set preferred store');\n }\n });\n }\n}\n\nexport default HeaderPreferredStore;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILogoProps {\n image: Msdyn365.IImageData;\n gridSettings?: Msdyn365.IGridSettings;\n link?: ILinkData;\n className?: string;\n telemetryContent?: ITelemetryContent;\n requestContext: Msdyn365.IRequestContext;\n typeName?: string;\n}\n\nexport interface ILinkData {\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n linkText?: string;\n}\n\n/**\n *\n * Logo component.\n * @extends {React.PureComponent}\n */\nexport class Logo extends React.PureComponent {\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: ILogoProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return (\n
\n {this._renderLogo(this.props)}\n
\n );\n }\n\n private _renderLogo(config: ILogoProps): JSX.Element {\n if (config.link && config.link.linkUrl.destinationUrl) {\n return (\n \n {this._renderImage(config)}\n \n );\n }\n return (\n this._renderImage(config)\n );\n }\n\n private _renderImage(config: ILogoProps): JSX.Element {\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=132&h=28&m=6', w: 0, h: 0 },\n lg: { q: 'w=160&h=48&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n}\n\nexport default Logo;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderResources } from '../header.props.autogenerated';\n\nexport interface INavIconProps {\n resources: IHeaderResources;\n isExpanded: boolean;\n targetId: string;\n telemetryContent?: ITelemetryContent;\n toggleNavBar(): void;\n}\n\n/**\n *\n * NavIcon component.\n * @extends {React.PureComponent}\n */\n\n@observer\nexport class NavIcon extends React.PureComponent {\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: INavIconProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes, Modal,\n ModalBody, ModalHeader, onTelemetryClick, Popover, TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\nimport { IHeaderData } from './header.data';\nimport { IHeaderProps, IHeaderResources, IMyAccountLinksData } from './header.props.autogenerated';\n\nexport interface IHeaderState {\n mobileMenuCollapsed: boolean;\n signinPopoverOpen: boolean;\n hasSigninerror?: boolean;\n}\n\nexport interface IHeaderViewProps extends IHeaderProps, IHeaderState {\n logo: React.ReactNode;\n wishListIconDesktop: React.ReactNode;\n wishListIconMobile: React.ReactNode;\n cartIcon: React.ReactNode;\n navIcon: React.ReactNode;\n className: string;\n menuBar: React.ReactNode[];\n search: React.ReactNode[];\n siteOptions: React.ReactNode[];\n HeaderTag: IModuleProps;\n HeaderContainer: INodeProps;\n MobileMenuContainer: INodeProps;\n MobileMenuHeader: React.ReactNode;\n MobileMenuBodyContainer: INodeProps;\n MobileMenuLinksContainer: INodeProps;\n HeaderTopBarContainer: INodeProps;\n Divider: INodeProps;\n\n AccountInfoDropdownParentContainer?: INodeProps;\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\n accountInfoDropdownButton?: React.ReactNode;\n\n signOutLink?: React.ReactNode;\n signInLink?: React.ReactNode;\n accountLinks?: React.ReactNode[];\n preferredStore?: React.ReactNode;\n}\n\n/**\n *\n * Header component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Header extends React.PureComponent, IHeaderState> {\n private readonly popOverRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private cart: ICartState | undefined;\n\n @computed public get displayName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n\n public constructor(props: IHeaderProps) {\n super(props);\n this.popOverRef = React.createRef();\n this._toggleNavbar = this._toggleNavbar.bind(this);\n this._togglePopover = this._togglePopover.bind(this);\n this._keydown = this._keydown.bind(this);\n this.state = {\n mobileMenuCollapsed: true,\n signinPopoverOpen: false,\n hasSigninerror: false\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('keydown', this._keydown);\n }\n reaction(\n () => this.props.data.cart.result,\n () => {\n this.cart = this.props.data.cart.result;\n }\n );\n\n const {\n context: {\n request: {\n user\n }\n },\n resources: {\n signUpCustomerNotFoundTitle,\n signUpMultipleCustomerFoundTitle,\n closeNotificationLabel\n }\n } = this.props;\n\n const signinNotificationError = this._getSigninNotification(user, signUpMultipleCustomerFoundTitle, signUpCustomerNotFoundTitle);\n if (signinNotificationError !== undefined && this.state.hasSigninerror === false) {\n // For signup show simple error notification.\n NotificationsManager.instance().addNotification(new ErrorNotification(\n signinNotificationError, closeNotificationLabel));\n }\n\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('keydown', this._keydown, false);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n data: { accountInformation,\n wishlists\n },\n context: {\n request: {\n user\n }\n },\n context,\n resources: {\n cartLabel,\n cartQtyLabel\n }\n } = this.props;\n const { logoLink, logoImage, shouldShowWishlistCount } = this.props.config;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- app config is generic\n const disableTooltip = this.props.context.app.config.disableTooltip || false;\n const headerToggleClass = this.state.mobileMenuCollapsed ? '' : 'ms-header-open';\n const headerClassName = classnames('ms-header', this.props.config.className, headerToggleClass);\n const navbarKey = 'header-nav-mobile';\n const customer = accountInformation && accountInformation.result;\n const cartIconSlot = this._getSlot('cartIcon');\n const menuBarSlot = this._getSlot('menuBar');\n const searchSlot = this._getSlot('search');\n let wishlistCount = 0;\n const siteOptionsSlot = this._getSlot('siteOptions');\n const preferredStoreSlot = this._getSlot('storeSelector');\n if (wishlists !== undefined) {\n if (!wishlists.result || !ArrayExtensions.hasElements(wishlists.result) ||\n !wishlists.result[0].CommerceListLines || !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)) {\n wishlistCount = 0;\n } else {\n wishlistCount = wishlists.result[0].CommerceListLines.length;\n }\n }\n const viewProps: IHeaderViewProps = {\n ...(this.props as IHeaderProps),\n ...(this.state),\n logo: ,\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: (ArrayExtensions.hasElements(cartIconSlot)) ? cartIconSlot[0] : ,\n navIcon: ,\n menuBar: ArrayExtensions.hasElements(menuBarSlot) ? menuBarSlot : [],\n search: ArrayExtensions.hasElements(searchSlot) ? searchSlot : [],\n siteOptions: ArrayExtensions.hasElements(siteOptionsSlot) ? siteOptionsSlot : [],\n className: headerClassName,\n HeaderTag: {\n moduleProps: this.props,\n className: classnames(headerClassName),\n tag: 'header'\n },\n HeaderContainer: {\n className: classnames('ms-header__container')\n },\n HeaderTopBarContainer: {\n className: classnames('ms-header__topbar')\n },\n Divider: {\n className: classnames('ms-header__divider')\n },\n MobileMenuContainer: {\n tag: Modal,\n id: navbarKey,\n className: 'ms-header__mobile-hamburger',\n isOpen: !this.state.mobileMenuCollapsed,\n wrapClassName: 'ms-header__modal',\n toggle: this._toggleNavbar\n },\n MobileMenuHeader: (\n \n ),\n MobileMenuBodyContainer: {\n tag: ModalBody,\n className: 'ms-header__mobile-hamburger-menu-body'\n },\n MobileMenuLinksContainer: {\n className: 'ms-header__mobile-hamburger-menu-links'\n },\n AccountInfoDropdownParentContainer: {\n className: 'ms-header__account-info'\n },\n AccountInfoDropdownPopoverConentContainer: customer && this.displayName ? {\n tag: Popover,\n id: 'myprofilePopover',\n className: 'ms-header__account-info-content',\n placement: 'bottom',\n isOpen: this.state.signinPopoverOpen,\n target: this.popOverRef,\n toggle: this._togglePopover\n } : undefined,\n signInLink: this._getSigninButton(customer, user, this.props.resources),\n signOutLink: this._getSignOutButton(customer, user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(customer),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) &&\n ()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - Link Index.\n * @returns : Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\n if (this.props.config.myAccountLinks?.[linkIndex]) {\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Get the slot.\n * @param slotName - Name of the slot.\n * @returns The slot.\n */\n private _getSlot(slotName: string): React.ReactNode[] | null {\n const { slots } = this.props;\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\n }\n\n /**\n * Renders the sign in button.\n * @param customer - Customer object.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSigninButton(customer: Customer | undefined, user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources):\n React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return !customer && (\n \n \n {resources.signInLinkText}\n \n \n );\n }\n\n /**\n * Renders the sign out button.\n * @param customer - Customer object.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSignOutButton(customer: Customer | undefined, user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources):\n React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return customer && this.displayName && (\n \n \n {resources.signOutLinkText}\n \n \n );\n }\n\n private _getSigninNotification(user: MsDyn365.IRequestContextUser | undefined,\n signUpMultipleCustomerFoundTitle: string, signUpCustomerNotFoundTitle: string): string | undefined {\n const { signUpCustomerNotFound, signUpMultipleCustomerFound } = this.props.config;\n const notFoundError = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\n const multipleAccountError = 'Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountsFoundWithSameEmailAddress';\n\n if (user?.retailServerErrorCode === notFoundError) {\n return signUpCustomerNotFound !== undefined ? signUpCustomerNotFound : signUpCustomerNotFoundTitle;\n } else if (user?.retailServerErrorCode === multipleAccountError) {\n return signUpMultipleCustomerFound !== undefined ? signUpMultipleCustomerFound : signUpMultipleCustomerFoundTitle;\n }\n return undefined;\n }\n\n private _getAccountInfoDropdownButton(customer: Customer | undefined): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return customer && this.displayName && (\n \n \n {this.displayName}\n \n \n );\n }\n\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\n const { myAccountLinks } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n if (!customer || !this.displayName || !myAccountLinks || !ArrayExtensions.hasElements(myAccountLinks)) {\n return undefined;\n }\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\n payLoad.contentAction.etext = cta.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: cta.ariaLabel,\n className: 'ms-signin-info__account-link-button',\n linkText: cta.linkText,\n linkUrl: cta.linkUrl.destinationUrl,\n openInNewTab: cta.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n\n return (\n \n );\n });\n }\n\n private _toggleNavbar(): void {\n this.setState({\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\n });\n }\n\n private _togglePopover(): void {\n this.setState({\n signinPopoverOpen: !this.state.signinPopoverOpen\n });\n }\n\n private _keydown(event: KeyboardEvent): void {\n if (event.keyCode === KeyCodes.Escape) {\n this.setState({ mobileMenuCollapsed: true });\n }\n }\n}\n\nexport default Header;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n \n \n { props.MobileMenuHeader }\n {_renderReactFragment(props.menuBar)}\n \n { props.accountLinks ? props.accountLinks.map(link => link) : false }\n { props.siteOptions }\n { props.wishListIconMobile }\n { props.signInLink }\n { props.signOutLink }\n \n \n \n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n { accountLinks ? accountLinks.map(link => link) : false }\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n props.context.telemetry.error('Header content is empty, module wont render.');\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0 ? items.map((slot: React.ReactNode, index: number) => {\n return (\n {slot}\n );\n }) : null}\n \n );\n}\n\nexport default headerView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\n\nexport async function getValidProductImages(\n productId: number, channelId: number,\n actionContext: IActionContext, imageSettings: IImageSettings,\n selectedProduct?: SimpleProduct): Promise {\n const actionInput = new MediaLocationsForSelectedVariantInput(\n productId,\n channelId,\n selectedProduct\n );\n\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return Promise.all(mediaLocations.map((mediaLocation) => validateMediaLocaionAsync(mediaLocation, imageSettings)))\n .then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n });\n }\n\n return [];\n }).catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n return [];\n });\n}\n\nexport async function validateProductImages(mediaLocations: MediaLocation[], actionContext: IActionContext, imageSettings: IImageSettings): Promise {\n return Promise.all(mediaLocations.map((mediaLocation) => validateMediaLocaionAsync(mediaLocation, imageSettings)))\n .then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n }).catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to validate prodcut images');\n return [];\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-unused-vars-experimental -- .\nasync function validateMediaLocaionAsync(mediaLocation: MediaLocation, imageSettings?: IImageSettings): Promise<[IImageData, boolean]> {\n const imageData = {\n src: mediaLocation.Uri || '',\n altText: mediaLocation.AltText || ''\n };\n\n if (imageData.src === '') {\n return [imageData, false];\n }\n\n return new Promise<[IImageData, boolean]>((resolve) => {\n try {\n const http = new XMLHttpRequest();\n http.open('HEAD', imageData.src, true);\n\n http.addEventListener('load', () => {\n resolve([imageData, http.status === 200 || http.status === 201]);\n });\n\n http.addEventListener('error', () => {\n resolve([imageData, false]);\n });\n\n http.send();\n } catch {\n resolve([imageData, false]);\n }\n });\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\nimport { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n defaultDataScale,\n IComponentNodeProps,\n ImagefullView,\n IModalViewProps,\n IModuleProps,\n inlineZoomImageOnHover,\n inlineZoomImageOnMouseMove,\n inlineZoomImageOnMouseOut,\n inlineZoomInitClick,\n INodeProps,\n ISingleSlideCarouselProps,\n isMobile,\n KeyCodes,\n NodeTag,\n onContainerZoomInit,\n onMouseMoveLensContainer,\n onMouseOutLensContainer,\n onMouseOverImageContainer,\n removeContainerZoomStyle,\n removeInlineZoomStyle,\n SingleSlideCarousel,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IMediaGalleryData } from './media-gallery.data';\nimport { imageSource, imageZoom, IMediaGalleryProps, thumbnailsOrientation } from './media-gallery.props.autogenerated';\nimport { getValidProductImages, validateProductImages } from './utils';\n\nexport interface IMediaGalleryState {\n animating: boolean;\n activeIndex: number;\n isImageZoomed: boolean;\n modalIsOpen: boolean;\n lastUpdate?: number;\n isMobileImageZoomed?: boolean;\n mediaGalleryItems?: IImageData[];\n}\n\nexport interface IMediaGalleryThumbnailsViewProps {\n ThumbnailsContainerProps: INodeProps;\n SingleSlideCarouselComponentProps: INodeProps;\n items?: IMediaGalleryThumbnailItemViewProps[];\n}\n\nexport interface IMediaGalleryThumbnailItemViewProps {\n ThumbnailItemContainerProps: INodeProps;\n Picture: React.ReactElement;\n}\n\nexport interface IMediaGalleryViewProps extends IMediaGalleryProps {\n state: IMediaGalleryState;\n MediaGallery: IModuleProps;\n CarouselProps: INodeProps;\n Thumbnails: IMediaGalleryThumbnailsViewProps;\n Modal?: React.ReactElement | null;\n callbackToggle?(): void;\n callbackThumbnailClick?(index: number): void;\n callbackThumbnailKeyDown?(index: number): void;\n}\n\n/**\n * Props for carousel.\n */\ninterface IMediaGalleryCarouselItems {\n items: ItemType[];\n keys: (string | undefined)[];\n}\n\n/**\n * Media gallery component.\n */\nclass MediaGallery extends React.Component, IMediaGalleryState> {\n private readonly _inlineZoomDivRef: Map = new Map();\n\n private readonly defaultGalleryImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly defaultThumbnailImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly _zoomedImageSettings: IImageSettings;\n\n public constructor(props: IMediaGalleryProps) {\n super(props);\n this._toggleModal = this._toggleModal.bind(this);\n this.state = { activeIndex: 0, animating: false, isImageZoomed: false, modalIsOpen: false };\n\n this._zoomedImageSettings = props.config.zoomedImageSettings ??\n props.config.galleryImageSettings ??\n this.defaultGalleryImageSettings;\n\n this._onImageMouseOut = this._onImageMouseOut.bind(this);\n this._inlineZoomImageOnHover = this._inlineZoomImageOnHover.bind(this);\n this._onInlineImageClick = this._onInlineImageClick.bind(this);\n this._onContainerZoomImageClick = this._onContainerZoomImageClick.bind(this);\n this._onMouseOutLensContainer = this._onMouseOutLensContainer.bind(this);\n }\n\n public isMobile(): boolean {\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n return size === 'xs';\n }\n\n public async componentDidMount(): Promise {\n const source = this.props.config.imageSource || imageSource.pageContext;\n const shouldUpdateOnPartialDimensionSelection = this.props.config.shouldUpdateOnPartialDimensionSelection;\n\n if (source === imageSource.pageContext) {\n if (this.state.mediaGalleryItems === undefined && this.props.data.mediaLocationsForSelectedVariant.result) {\n const images = await validateProductImages(\n this.props.data.mediaLocationsForSelectedVariant.result,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings\n );\n this._setImages(images);\n } else if (this.state.mediaGalleryItems === undefined && this.props.data.product.result) {\n const product = this.props.data.product.result;\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings,\n product.productVariant\n );\n\n this._setImages(images);\n } else {\n this._setImages([]);\n }\n\n reaction(\n () => {\n const product = this.props.data.product.result;\n if (!product) {\n return null;\n }\n\n if (!shouldUpdateOnPartialDimensionSelection || ObjectExtensions.isNullOrUndefined(product.productVariant?.RecordId)) {\n return `${product.RecordId}`;\n }\n\n return `${product.RecordId}-${product.productVariant!.RecordId}`;\n },\n async () => {\n const product = this.props.data.product.result;\n if (product) {\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n shouldUpdateOnPartialDimensionSelection ? product.productVariant : undefined\n );\n this._setImages(images);\n } else {\n this._setImages([]);\n }\n }\n );\n }\n\n if (source === imageSource.productId && this.props.data.mediaLocations.result) {\n const images = await validateProductImages(\n this.props.data.mediaLocations.result,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings || this.defaultThumbnailImageSettings\n );\n this._setImages(images);\n }\n\n }\n\n public shouldComponentUpdate(nextProps: IMediaGalleryProps,\n nextState: IMediaGalleryState): 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 {\n const {\n id,\n config,\n resources\n } = this.props;\n\n const { className, showPaginationTooltip } = config;\n\n const isVertical: boolean = config.thumbnailsOrientation === thumbnailsOrientation.vertical;\n const isFullscreenAllowed: boolean = this.isMobile() || config.allowFullScreen || false;\n const zoomViewMode: string =\n config.imageZoom === imageZoom.inline ? imageZoom.inline : (config.imageZoom === imageZoom.container ? imageZoom.container : '');\n\n const mediaGalleryCarouselItems = this._getMediaGalleryItems(isFullscreenAllowed, zoomViewMode);\n const mediaGalleryThumbnailCarouselItems = this._getMediaGalleryThumbnailItems();\n const viewProps: IMediaGalleryViewProps = {\n ...(this.props as IMediaGalleryProps),\n state: this.state,\n MediaGallery: {\n moduleProps: this.props,\n className: classnames(`ms-media-gallery ${isVertical ? 'vertical' : ''}`, className)\n },\n Modal: isFullscreenAllowed ? this.imageModalSlider(zoomViewMode) : null,\n callbackToggle: this.openModalDialog,\n callbackThumbnailClick: this._generateOnThumbnailClick,\n callbackThumbnailKeyDown: this._generateOnThumbnailKeyDown,\n CarouselProps: {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items: mediaGalleryCarouselItems.items,\n activeIndex: this.state.activeIndex,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n onIndicatorsClickHandler: this.goToIndex,\n showPaginationTooltip: showPaginationTooltip === true,\n indicatorAriaText: resources.ariaLabelForSlide,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n key: mediaGalleryCarouselItems.keys\n } as IComponentNodeProps,\n Thumbnails: {\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: 'ms-media-gallery__thumbnails',\n vertical: isVertical,\n flipperPrevLabel: resources.previousScreenshotFlipperText,\n flipperNextLabel: resources.nextScreenshotFlipperText,\n parentId: id,\n useTabList: true,\n key: JSON.stringify(mediaGalleryThumbnailCarouselItems.keys)\n } as IComponentNodeProps,\n items: mediaGalleryThumbnailCarouselItems.items\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Zoomed out image on previous/next click.\n */\n public updateZoomedInImage(): void {\n this.setState({ isImageZoomed: false });\n }\n\n private readonly onExiting = () => {\n this.setState({ animating: true });\n };\n\n private readonly onExited = () => {\n this.setState({ animating: false });\n };\n\n /**\n * On click next in carousel.\n */\n private readonly next = (): void => {\n if (this.isLastItem() === undefined) {\n return;\n }\n\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex + 1;\n this.goToIndex(nextIndex);\n\n this.updateZoomedInImage();\n\n };\n\n /**\n * On click previous in carousel.\n */\n private readonly previous = (): void => {\n const images = this.state.mediaGalleryItems;\n const nextIndex = this.isFirstItem() ? (images ? images.length - 1 : 0) : this.state.activeIndex - 1;\n this.goToIndex(nextIndex);\n this.updateZoomedInImage();\n\n };\n\n private readonly goToIndex = (index: number): void => {\n this.setState({ activeIndex: index });\n };\n\n private _getMediaGalleryThumbnailItems(): IMediaGalleryCarouselItems {\n const mediaGalleryItems = this.state.mediaGalleryItems;\n const thumbnailImageSettings = this.props.config.thumbnailImageSettings;\n if (thumbnailImageSettings) {\n thumbnailImageSettings.cropFocalRegion = true;\n }\n\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\n\n if (!hasMediaGalleryItems) {\n if (this.state.lastUpdate) {\n const defaultKey = 0;\n return { items: [this._getEmptyThumbnailItem(thumbnailImageSettings, defaultKey, this.state.activeIndex)], keys: ['empty'] };\n }\n return { items: [], keys: [] };\n }\n\n return {\n items: [\n ...mediaGalleryItems!.map((item: IImageData, index: number) => this._getThumbnailItem(\n item, thumbnailImageSettings ?? this.defaultThumbnailImageSettings, index, this.state.activeIndex))\n ],\n keys: [...mediaGalleryItems!.map(item => item.src)]\n };\n }\n\n private _getMediaGalleryItems(isFullscreenAllowed: boolean, zoomViewMode: string): IMediaGalleryCarouselItems {\n const mediaGalleryItems = this.state.mediaGalleryItems;\n const galleryImageSettings = this.props.config.galleryImageSettings;\n if (galleryImageSettings) {\n galleryImageSettings.cropFocalRegion = true;\n }\n\n const zoomView = isFullscreenAllowed ? 'fullscreen' : zoomViewMode;\n\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\n\n if (!hasMediaGalleryItems) {\n if (this.state.lastUpdate) {\n return { items: [this._renderEmptyImage(galleryImageSettings)], keys: ['empty'] };\n }\n return { items: [], keys: [] };\n }\n\n return {\n items: [\n ...mediaGalleryItems!.map((item: IImageData, index: number) => this._renderCarouselItemImageView(\n zoomView, item, galleryImageSettings ?? this.defaultGalleryImageSettings, index))\n ],\n keys: [...mediaGalleryItems!.map(item => item.src)]\n };\n }\n\n private _setImages(images?: IImageData[]): void {\n const curatedImage = this.props.config.images || [];\n const shouldHidePrimaryImages = this.props.config.shouldHideMasterProductImagesForVariant ?? true;\n\n let imagesToSet = images ?? [];\n if (shouldHidePrimaryImages) {\n // Currently returned image response is having duplicate image\n // along with non-selected variant and previous selection is not getting cleared. With the help of index we\n // select item from 0 index till it is having non repeating image source name ending with index number.\n // Here we are keeping '.' to make sure that we are considering any digit just before '.' in image source path\n imagesToSet = imagesToSet.filter((item, index) => {\n let incrementedIndex = index;\n const imageIndex = `${++incrementedIndex}.`;\n return item.src?.includes(imageIndex);\n });\n }\n\n this.setState({\n mediaGalleryItems: [...imagesToSet, ...curatedImage],\n activeIndex: 0,\n lastUpdate: Date.now()\n });\n }\n\n private _renderCarouselItemImageView(\n zoomView: string, image: IImageData, imageSettings: IImageSettings, index: number,\n isInPopup: boolean = false): React.ReactNode {\n\n if (this.isMobile()) {\n if (isInPopup) {\n return this._renderImageInContainerOnZoom(image, this._zoomedImageSettings, index);\n }\n return this._renderImageFullScreenOnZoom(image, imageSettings, index);\n }\n\n switch (zoomView) {\n case 'container': {\n return this._renderImageInContainerOnZoom(image, this._zoomedImageSettings, index);\n }\n case 'inline': {\n return this._renderImageInlineOnZoom(image, this._zoomedImageSettings, index);\n }\n case 'fullscreen': {\n return this._renderImageFullScreenOnZoom(image, imageSettings, index);\n }\n\n // No default\n }\n return (<>\n {this._getCarouselItem(image, imageSettings, index, isInPopup)}\n );\n\n }\n\n private readonly _getCarouselItem = (image: IImageData, imageSettings: IImageSettings, index: number, isInPopup: boolean = false): React.ReactNode => (\n \n );\n\n private readonly _getThumbnailItem = (image: IImageData, imageSettings: IImageSettings, index: number, modifiedActiveIndex: number): IMediaGalleryThumbnailItemViewProps => {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: index,\n 'aria-label': image.altText,\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n };\n\n /**\n * Ref Handler.\n * @param index -Remove item click function.\n * @returns Set inline zoom.\n */\n private readonly _refHandler = (index: number) => (divRef: HTMLDivElement) => {\n this._inlineZoomDivRef.set(index, divRef);\n };\n\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\n return (event: React.KeyboardEvent) => {\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\n event.preventDefault();\n\n this.goToIndex(index);\n }\n };\n };\n\n private readonly _generateOnThumbnailClick = (index: number) => {\n return (event: React.MouseEvent) => {\n event.preventDefault();\n\n this.goToIndex(index);\n };\n };\n\n private _renderImageInlineOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n \n \n \n \n );\n }\n\n private _inlineZoomImageOnHover(event: React.MouseEvent): void {\n inlineZoomImageOnHover(event, this.props.config.dataScale ?? String(defaultDataScale));\n }\n\n private _handleMobileViewZoomedImageClick(event: React.MouseEvent) {\n const target = event.currentTarget;\n const mobileZoomedInImageClassName = 'msc-mobile-zoomed-in';\n if (!this.state.isMobileImageZoomed) {\n const bounds = target.getBoundingClientRect();\n const dataScale = Number(this.props.config.dataScale ?? defaultDataScale);\n\n const positionX = event.clientX - bounds.left;\n const positionY = event.clientY - bounds.top;\n const scaledPositionX = positionX * dataScale;\n const scaledPositionY = positionY * dataScale;\n\n target.style.transform = `scale(${dataScale})`;\n target.classList.add(mobileZoomedInImageClassName);\n target.parentElement!.style.overflow = 'auto';\n target.parentElement!.scrollTo(scaledPositionX - positionX, scaledPositionY - positionY);\n this.setState({\n isMobileImageZoomed: true\n });\n } else {\n target.style.transform = '';\n target.classList.remove(mobileZoomedInImageClassName);\n target.parentElement!.style.overflow = '';\n this.setState({\n isMobileImageZoomed: false\n });\n }\n }\n\n private _onInlineImageClick(event: React.MouseEvent): void {\n if (window.innerWidth <= 768) { // $msv-breakpoint-m\n this._handleMobileViewZoomedImageClick(event);\n return;\n }\n inlineZoomInitClick(event, this.props.config.dataScale ?? String(defaultDataScale));\n this.setState({\n isImageZoomed: true\n });\n }\n\n private _onImageMouseOut(event: React.MouseEvent): void {\n inlineZoomImageOnMouseOut(event);\n this.setState({\n isImageZoomed: false\n });\n\n }\n\n private _onContainerZoomImageClick(event: React.MouseEvent): void {\n if (window.innerWidth <= 768) { // $msv-breakpoint-m\n this._handleMobileViewZoomedImageClick(event);\n return;\n }\n\n onContainerZoomInit(event);\n\n this.setState({\n isImageZoomed: true\n });\n }\n\n private _onMouseOutLensContainer(event: React.MouseEvent): void {\n onMouseOutLensContainer(event);\n\n this.setState({\n isImageZoomed: false\n });\n }\n\n private _renderImageInContainerOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n
\n \n \n
\n );\n }\n\n private _renderImageFullScreenOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n
\n \n
\n \n
\n\n
\n );\n }\n\n private _mapProductToImageData(product: SimpleProduct): IImageData {\n return {\n src: product.PrimaryImageUrl || ''\n };\n }\n\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n return (\n
\n \n
\n );\n }\n\n private _getEmptyThumbnailItem(imageSettings: IImageSettings | undefined, index: number, modifiedActiveIndex: number): IMediaGalleryThumbnailItemViewProps {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: 'empty',\n 'aria-label': '',\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n }\n\n private readonly isFirstItem = () => this.state.activeIndex === 0;\n\n private readonly isLastItem = () => {\n const images = this.state.mediaGalleryItems;\n return images && this.state.activeIndex === images.length - 1;\n };\n\n private readonly openModalDialog = (): void => {\n this._toggleModal();\n };\n\n private _toggleModal(): void {\n if (this.state.modalIsOpen) {\n const parentDiv = this._inlineZoomDivRef.get(this.state.activeIndex);\n if (parentDiv && parentDiv.children && parentDiv.children.length >= 2) {\n const image = parentDiv.children[1].querySelector('img');\n if (image) {\n image.removeAttribute('style');\n }\n }\n this.setState({\n isImageZoomed: false\n });\n }\n this.setState({\n isImageZoomed: false,\n modalIsOpen: !this.state.modalIsOpen\n });\n removeInlineZoomStyle();\n removeContainerZoomStyle();\n }\n\n private readonly imageModalSlider = (ZoomView: string): React.ReactElement => {\n const {\n data: {\n product: { result: product }\n },\n resources\n } = this.props;\n let mediaGalleryItems = this.state.mediaGalleryItems;\n\n if (!mediaGalleryItems && product) {\n mediaGalleryItems = [this._mapProductToImageData(product)];\n }\n if (this.state.modalIsOpen) {\n const carouselprops = {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items:\n mediaGalleryItems &&\n mediaGalleryItems.map((item: IImageData, index: number) => this._renderCarouselItemImageView(\n ZoomView, item, this._zoomedImageSettings, index, true)),\n activeIndex: this.state.activeIndex,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n onIndicatorsClickHandler: this.goToIndex,\n showPaginationTooltip: true,\n hideIndicator: false,\n keyboard: false,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n isDisabledFunctionality: this.state.isMobileImageZoomed\n } as IComponentNodeProps;\n\n const carousel = ;\n\n const imageModalSliderProps: IModalViewProps = {\n modalIsOpen: this.state.modalIsOpen,\n ontoggle: this._toggleModal,\n galleryCarousel: carousel,\n classNames: classnames('ms-media-gallery__modal', 'msc-modal-input-required')\n };\n return ImagefullView(imageModalSliderProps) as React.ReactElement;\n }\n return
;\n\n };\n}\n\nexport default MediaGallery;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IMediaGalleryThumbnailItemViewProps, IMediaGalleryThumbnailsViewProps, IMediaGalleryViewProps } from '../..';\n\nconst MediaGalleryView: React.FC = props => {\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\n\n return (\n \n \n {Modal}\n {_renderThumbnails(Thumbnails)}\n \n );\n};\n\nconst _renderThumbnails = (thumbnails: IMediaGalleryThumbnailsViewProps): JSX.Element => {\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps, items } = thumbnails;\n\n return (\n \n \n {items && items.map(_renderThumbnailItem)}\n \n \n );\n};\n\nconst _renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\n\n return (\n \n {Picture}\n \n );\n};\n\nexport default MediaGalleryView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Cart, ChannelConfiguration, ChannelDeliveryOptionConfiguration } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\nexport interface IOrderSummaryProps {\n subTotalLabel: string;\n shippingLabel: string;\n taxLabel: string;\n orderTotalLabel: string;\n loyaltyLabel?: string;\n giftcardLabel?: string;\n totalDiscountsLabel: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n cart: Cart;\n channelConfiguration: ChannelConfiguration;\n id: string;\n typeName: string;\n otherChargeLabel?: string;\n freeText?: string;\n toBeCalculatedText?: string;\n checkoutState?: ICheckoutState;\n retailMultiplePickUpOptionEnabled?: boolean;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n}\n\nexport interface IOrderSummaryLines {\n subtotal: React.ReactNode;\n shipping?: React.ReactNode;\n otherCharge?: React.ReactNode;\n tax: React.ReactNode;\n orderTotal: React.ReactNode;\n totalDiscounts?: React.ReactNode;\n giftCard?: React.ReactNode;\n loyalty?: React.ReactNode;\n}\n\ninterface IOrderSummaryLineProps {\n label: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n price?: number;\n freeText?: string;\n toBeCalculatedText?: string;\n id: string;\n typeName: string;\n cssLabel: string;\n}\n\ninterface IShippingOrderLine {\n cart: Cart;\n channelConfiguration: ChannelConfiguration;\n canShip?: boolean;\n hasDeliveryMethod?: boolean;\n hasShippingMethod?: boolean;\n freightFee?: number;\n}\n\nconst OrderSummaryLine: React.FC = ({\n price,\n label,\n context,\n id,\n typeName,\n toBeCalculatedText,\n freeText,\n cssLabel\n}) => {\n return (\n

\n \n {label}\n \n {price || price === 0 ? (\n \n ) : (\n \n {toBeCalculatedText}\n \n )}\n

\n );\n};\n\nconst _buildOrderSummarySection = (\n props: IOrderSummaryProps,\n price: number | undefined,\n cssLabel: string,\n label: string = ''\n): React.ReactNode => {\n return (\n \n );\n};\n\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\n};\n\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\n\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n };\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\n return Math.min(giftCardTotalValue, amount);\n};\n\nconst getDeliveryConfiguration = (cart: Cart, channelConfiguration: ChannelConfiguration, channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration, retailMultiplePickUpOptionEnabled?: boolean): IShippingOrderLine => {\n\n const pickupDeliveryModeCode = channelConfiguration && channelConfiguration.PickupDeliveryModeCode;\n const emailDeliveryModeCode = channelConfiguration && channelConfiguration.EmailDeliveryModeCode;\n const cartLines = cart.CartLines || [];\n const deliveryModes = cartLines.map(cartLine => cartLine.DeliveryMode);\n\n const freightFee = cart.ShippingChargeAmount;\n const canShip = deliveryModes.some(deliveryMode => (!((deliveryMode !== '' && (deliveryMode === getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) || deliveryMode === emailDeliveryModeCode)))));\n const hasDeliveryMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== emailDeliveryModeCode);\n const hasShippingMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) && deliveryMode !== emailDeliveryModeCode);\n return {\n canShip,\n hasDeliveryMethod,\n hasShippingMethod,\n freightFee\n } as IShippingOrderLine;\n};\n\nconst getDeliveryMode = (deliveryMode?: string, featureSate: boolean = false, channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration, pickupDeliveryMode?: string) => {\n if (!featureSate) {\n return pickupDeliveryMode;\n }\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === deliveryMode);\n\n};\n\nexport const OrderSummary = (props: IOrderSummaryProps) => {\n const { SubtotalAmount, TaxAmount, DiscountAmountWithoutTax = 0, TotalAmount, OtherChargeAmount } = props.cart;\n const { canShip, hasDeliveryMethod, hasShippingMethod, freightFee } = getDeliveryConfiguration(props.cart, props.channelConfiguration, props.channelDeliveryOptionConfig, props.retailMultiplePickUpOptionEnabled);\n const reactNodes: IOrderSummaryLines = {\n subtotal: _buildOrderSummarySection(props, SubtotalAmount, 'sub-total', props.subTotalLabel),\n tax: _buildOrderSummarySection(props, hasDeliveryMethod ? TaxAmount : undefined, 'tax-amount', props.taxLabel),\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge: OtherChargeAmount && _buildOrderSummarySection(props, OtherChargeAmount, 'other-charges', props.otherChargeLabel) || undefined\n };\n\n if (canShip) {\n reactNodes.shipping = _buildOrderSummarySection(props, hasShippingMethod ? freightFee : undefined, 'shipping', props.shippingLabel);\n }\n if (props.checkoutState) {\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount;\n\n if (loyaltyAmount > 0) {\n reactNodes.loyalty = _buildOrderSummarySection(props, -loyaltyAmount, 'loyalty', props.loyaltyLabel || 'Loyalty amount');\n }\n\n if (giftCardAmount > 0) {\n reactNodes.giftCard = _buildOrderSummarySection(props, -giftCardAmount, 'gift-card', props.giftcardLabel || 'Gift card amount');\n }\n\n reactNodes.orderTotal = _buildOrderSummarySection({ ...props, freeText: undefined }, totalAmountAfterGiftCard, 'total', props.orderTotalLabel);\n }\n\n if (DiscountAmountWithoutTax > 0) {\n reactNodes.totalDiscounts = _buildOrderSummarySection(props, -DiscountAmountWithoutTax, 'total-discounts', props.totalDiscountsLabel);\n }\n\n return reactNodes;\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getPriceForProductSearchResult, ObjectExtensions, PriceForProductSearchResultInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IComponentNodeProps, IModuleProps, INodeProps,\n ISingleSlideCarouselProps, ITelemetryContent, NodeTag, SingleSlideCarousel } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IProductCollectionData } from './product-collection.data';\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\n\nexport interface IProductCollectionViewProps extends IProductCollectionProps {\n heading?: React.ReactNode;\n ProductCollectionContainer: IModuleProps;\n SingleSlideCarouselComponentProps: INodeProps;\n GridComponentProps: INodeProps;\n products: IProductComponentViewProps[];\n isCarousel: boolean;\n productPrices?: ProductPrice[];\n}\n\nexport interface IProductComponentViewProps {\n ProductContainer: INodeProps;\n productComponent: React.ReactNode;\n}\nexport interface IProductComponentState {\n products: ProductSearchResult[];\n}\n\n/**\n * ProductCollection component.\n */\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n constructor(props: IProductCollectionProps) {\n super(props);\n this.productPrices = [];\n this.state = {\n products: this.props.config.productCollection.products\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n }\n\n public componentDidMount(): void {\n if (this.props.config.enableAffiliationBasedPricing &&\n this.props.context.actionContext.requestContext?.user?.isAuthenticated) {\n this._getActivePrice();\n }\n }\n\n public render(): JSX.Element | null {\n const { heading, className } = this.props.config;\n const { resources } = this.props;\n\n // Initiallize state in case if the products were not found during initial module render\n this.initProductState(this.props.config.productCollection);\n\n const products = this.state.products;\n const isCarousel = this.props.config.layout === layout.carousel;\n const headingLabel = heading ? heading.text : '';\n const headingComponent = heading && (\n \n );\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\n const updatedProducts = products?.map(\n (item: ProductSearchResult, index: number) => {\n const getProductData = this._getProduct(item, index);\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\n }\n );\n\n const productCollectionViewProps = {\n ...this.props,\n heading: headingComponent,\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: '',\n flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\n flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\n parentId: this.props.id,\n telemetryContent: this.telemetryContent\n } as IComponentNodeProps,\n ProductCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-product-collection', className)\n },\n GridComponentProps: {\n tag: 'ul' as NodeTag,\n className: 'ms-product-collection__items'\n },\n isCarousel,\n\n products: ArrayExtensions.hasElements(updatedProducts) && updatedProducts.filter(\n (item) => {\n return item !== undefined;\n }\n ),\n productPrices: this.productPrices\n };\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n /**\n * Helper method to initialize products state.\n * @param productCollection - List of products.\n */\n private readonly initProductState = (productCollection: Msdyn365.IProductList) => {\n if (!ArrayExtensions.hasElements(this.state.products) && ArrayExtensions.hasElements(productCollection.products)) {\n this.setState({ products: productCollection.products });\n }\n };\n\n private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\n if (!product || !product.Name) {\n this.props.telemetry.trace('[product-collection] Product or product name is null');\n return null;\n }\n const telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n const { imageSettings, allowBackNavigation } = this.props.config;\n const resources = this.props.resources;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n const quickviewSlot = this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\n const reviewCount = 1;\n const reviewTotalRatings = Number(product.TotalRatings);\n const reviewCountAriaLabelValue = reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature');\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return {\n ProductContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-product-collection__item',\n role: 'listitem',\n key: index\n },\n productComponent: (\n \n )\n };\n };\n\n /**\n * Get the active price for products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.state.products;\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext);\n\n this.setState({ products });\n };\n}\n\nexport default ProductCollection;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\n\nconst ProductCollectionView: React.FC = props => {\n const { heading, ProductCollectionContainer, products, SingleSlideCarouselComponentProps, GridComponentProps, isCarousel } = props;\n if (products) {\n return (\n \n {heading}\n {\n isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)\n }\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return (\n \n {items && items.map(_renderProduct)}\n \n );\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return (\n \n {items && items.map(_renderProduct)}\n \n );\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return (\n \n {productComponent}\n \n );\n};\n\nexport default ProductCollectionView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPromoBannerCloseButton {\n closeButtonAriaLabel?: string;\n label?: string;\n telemetryContent?: ITelemetryContent;\n onClose(): void;\n\n}\n\nexport const PromoBannerCloseButton: React.FC = ({ closeButtonAriaLabel, label, telemetryContent, onClose }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PromoBannerClose);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n \n {label}\n \n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../promo-banner.props.autogenerated';\n\nexport interface IPromoBannerLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nexport const PromoBannerLinks: React.FC = ({ links, requestContext, onTextChange, telemetryContent }) => {\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n \n {editableLinks && editableLinks.length > 0 ? : null}\n \n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n linkdata.forEach((link, index) => {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-promo-banner__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes,\n onClick: onTelemetryClick(telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\nexport interface IPromoBannerText {\n text: string;\n requestContext: Msdyn365.IRequestContext;\n onTextChange(event: Msdyn365.ContentEditableEvent): void;\n}\n\nexport const PromoBannerText: React.FC = ({ text, onTextChange, requestContext }) => {\n return (\n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Carousel } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { PromoBannerCloseButton, PromoBannerLinks, PromoBannerText } from './components';\nimport { IBannerMessagesData, IPromoBannerProps, IPromoBannerResources } from './promo-banner.props.autogenerated';\n\nexport interface IPromoBannerState {\n animating: boolean;\n isVisible: boolean;\n activeIndex: number;\n}\n\nexport interface IPromoBannerViewProps extends IPromoBannerProps<{}>, IPromoBannerState {\n promoBannerProps: IModuleProps;\n contentProps: INodeProps ;\n bannerMessages: IBannerMessagesData[];\n promoBannerTextProps: INodeProps;\n promoBannerLinksProps: INodeProps;\n carouselProps: INodeProps;\n closeButton?: React.ReactNode;\n className: string;\n promoBannerText: string;\n resources: IPromoBannerResources;\n onDismiss(): void;\n handleText(): void;\n handleLinks(): void;\n}\n\n/**\n *\n * PromoBannerModule component.\n * @extends {React.PureComponent>}\n */\nclass PromoBanner extends React.PureComponent, IPromoBannerState> {\n public state: IPromoBannerState = {\n animating: false,\n isVisible: true,\n activeIndex: 0\n };\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n\n public render(): JSX.Element | null {\n const { bannerMessages, dismissEnabled, interval, hideFlipper, autoplay, className = '' } = this.props.config;\n const { closeButtonAriaLabel, closeButtonLabel, bannerText } = this.props.resources;\n const { isVisible, activeIndex } = this.state;\n\n if (!isVisible) {\n this.props.context.telemetry.error('Promo banner content is empty, module wont render.');\n return null;\n }\n\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n className: classnames('ms-promo-banner', className),\n isVisible, // State data\n onDismiss: this._onDismiss, // Methods\n handleLinks: this.handleLinkTextChange,\n handleText: this.handleTextChange,\n\n promoBannerProps: { className: classnames('ms-promo-banner', className), moduleProps: this.props, role: 'banner' },\n promoBannerTextProps: {\n tag: PromoBannerText\n },\n promoBannerLinksProps: {\n tag: PromoBannerLinks,\n telemetryContent: this.telemetryContent\n },\n contentProps: { className: 'ms-promo-banner__content' },\n promoBannerText: bannerText,\n bannerMessages,\n activeIndex,\n carouselProps: {\n tag: Carousel,\n className: 'ms-promo-banner__carousel',\n activeIndex,\n next: this._next,\n previous: this._previous,\n onIndicatorsClickHandler: this._goToIndex,\n hideIndicator: hideFlipper,\n interval,\n hideFlipper,\n autoplay\n },\n closeButton: dismissEnabled && \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.bannerMessages && this.props.config.bannerMessages[0]) {\n this.props.config.bannerMessages[0].text = event.target.value;\n }\n };\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.bannerMessages && this.props.config.bannerMessages[1]) {\n const links = this.props.config.bannerMessages[1].links;\n if (links) {\n links[linkIndex].linkText = event.target.value;\n }\n }\n };\n\n private readonly _next = (): void => {\n const nextIndex = this._isLastItem() ? 0 : this.state.activeIndex + 1;\n this._goToIndex(nextIndex);\n };\n\n private readonly _previous = (): void => {\n const nextIndex = this._isFirstItem() ? (this.props.config.bannerMessages ? this.props.config.bannerMessages.length - 1 : 0) : this.state.activeIndex - 1;\n this._goToIndex(nextIndex);\n };\n\n private readonly _goToIndex = (index: number): void => {\n if (this.state.animating) {\n return;\n }\n this.setState({ activeIndex: index });\n };\n\n private readonly _isFirstItem = () => this.state.activeIndex === 0;\n\n private readonly _isLastItem = () => this.props.config.bannerMessages && this.state.activeIndex === this.props.config.bannerMessages.length - 1;\n\n private readonly _onDismiss = (): void => {\n this.setState({ isVisible: false });\n };\n}\n\nexport default PromoBanner;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IPromoBannerViewProps } from './promo-banner';\n\nconst PromoBannerView: React.FC = props => {\n const {\n promoBannerProps,\n contentProps,\n closeButton,\n bannerMessages,\n promoBannerTextProps,\n promoBannerLinksProps,\n carouselProps,\n promoBannerText,\n handleLinks,\n handleText\n } = props;\n\n const slides = bannerMessages && bannerMessages.map((message, index) => {\n return (\n \n \n {promoBannerText}\n \n {message.text && }\n {message.links && message.links.length > 0 && }\n \n );\n });\n\n return (\n \n \n {closeButton}\n \n );\n};\nexport default PromoBannerView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { SocialMedia, SocialMediaComponent } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISocialShareItemConfig, ISocialShareItemProps, socialMedia } from './social-share-item.props.autogenerated';\n\nexport interface ISocialShareItemViewProps extends ISocialShareItemProps {\n SocialShareItemElement: React.ReactNode | null;\n SocialShareItem: IModuleProps;\n}\n\n/**\n *\n * SocialShareItem component.\n * @extends {React.PureComponent>}\n */\nclass SocialShareItem extends React.PureComponent> {\n constructor(props: ISocialShareItemProps) {\n super(props);\n\n this._getSocialShareItem = this._getSocialShareItem.bind(this);\n }\n\n public render(): JSX.Element | null {\n const viewprops = {\n ...this.props,\n SocialShareItem: {\n moduleProps: this.props,\n className: 'ms-social-share-item'\n },\n SocialShareItemElement: this._getSocialShareItem()\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n\n private _getSocialShareItem(): React.ReactNode | null {\n const src = this.props.config.icon;\n if (MsDyn365.isBrowser) {\n switch (this.props.config.socialMedia) {\n case socialMedia.facebook:\n return ();\n case socialMedia.twitter:\n return ();\n case socialMedia.pinterest:\n return ();\n case socialMedia.linkedin:\n return ();\n case socialMedia.mail:\n return ();\n default:\n return null;\n }\n }\n return null;\n }\n}\n\nexport default SocialShareItem;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { ISocialShareItemViewProps } from './social-share-item';\n\nexport const SocialShareItemView: React.FC = props => {\n const { SocialShareItem, SocialShareItemElement } = props;\n\n if (!SocialShareItemElement) {\n props.context.telemetry.error('Social media is not valid, module wont render');\n return null;\n }\n return (\n \n {SocialShareItemElement}\n \n );\n};\n\nexport default SocialShareItemView;\n"],"names":["BulkPurchase","props","super","_toggleCollapse","this","setState","state","isExpanded","hasDimensionsInProps","ArrayExtensions","productDimensions","hasDimensionsInData","data","result","viewProps","container","moduleProps","className","config","content","_renderCollapseContent","renderView","_renderCollapseButton","_renderCollapse","onClick","title","resources","bulkPurchaseHeaderTitle","isOpen","_renderMainContent","isMobileDevice","variant","context","request","text","bulkPurchaseDescriptionText","_renderMatrix","ProductDimensionsMatrix","dimensions","orderTemplates","customerInformation","BulkPurchaseViewComponent","Module","CarouselModule","_handleDismissCarousel","cookies","set","id","dismissCarousel","_next","slots","nextIndex","activeIndex","length","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","telemetryContent","telemetryPageName","friendlyName","telemetry","undefined","get","carouselContainer","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","retrieveItems","items","renderModuleAttributes","pause","pauseOnHover","ride","autoplay","interval","transitionType","hideFlipper","dismissEnabled","dismissCarouselAriaText","ariaLabelForDismissButton","indicatorAriaText","ariaLabelForSlide","directionTextPrev","flipperPrevious","directionTextNext","flipperNext","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","storeSelectorStateManager","storeSelector","storeName","preferredStore","StoreName","headerPreferredStoreText","color","headerPreferredStoreAriaLabel","ref","modules","storeSelectorId","Object","keys","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","Promise","resolve","catch","error","message","debug","Logo","payLoad","attributes","_renderLogo","link","linkUrl","destinationUrl","href","ariaLabel","target","openInNewTab","_renderImage","image","requestContext","gridSettings","imageSettings","viewports","xs","q","w","h","lg","lazyload","loadFailureBehavior","editProps","key","moduleType","typeName","imagePropertyName","shouldSkipToMainImage","NavIcon","toggleNavBar","mobileHamburgerAriaLabel","targetId","Header","handleLinkTextChange","linkIndex","event","myAccountLinks","linkText","value","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","mobileMenuCollapsed","signinPopoverOpen","hasSigninerror","customer","accountInformation","FirstName","Name","window","addEventListener","cart","user","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","addNotification","ErrorNotification","removeEventListener","wishlists","cartLabel","cartQtyLabel","logoLink","logoImage","shouldShowWishlistCount","disableTooltip","app","headerToggleClass","headerClassName","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","CommerceListLines","logo","wishListIconDesktop","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","wishListIconMobile","cartIcon","navIcon","menuBar","search","siteOptions","HeaderTag","tag","HeaderContainer","HeaderTopBarContainer","Divider","MobileMenuContainer","wrapClassName","toggle","MobileMenuHeader","MobileMenuBodyContainer","MobileMenuLinksContainer","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","displayName","Popover","placement","signInLink","_getSigninButton","signOutLink","_getSignOutButton","accountInfoDropdownButton","_getAccountInfoDropdownButton","accountLinks","_getAccountLinks","slotName","signInLinkText","signInUrl","signInLinkAriaText","signOutLinkText","signOutUrl","signOutLinkAriaText","signUpCustomerNotFound","signUpMultipleCustomerFound","retailServerErrorCode","innerRef","map","cta","index","contentAction","etext","editableLink","role","additionalProperties","onTextChange","keyCode","_renderReactFragment","slot","Node","_renderDesktopAccountBlock","async","getValidProductImages","productId","channelId","actionContext","selectedProduct","actionInput","then","mediaLocations","all","mediaLocation","validateMediaLocaionAsync","pairs","filter","pair","exception","validateProductImages","imageData","src","Uri","altText","AltText","http","XMLHttpRequest","open","status","send","MediaGallery","_inlineZoomDivRef","Map","defaultGalleryImageSettings","sm","md","cropFocalRegion","defaultThumbnailImageSettings","onExiting","onExited","isLastItem","goToIndex","updateZoomedInImage","images","mediaGalleryItems","isFirstItem","_getCarouselItem","isInPopup","_getThumbnailItem","modifiedActiveIndex","ThumbnailItemContainerProps","tabIndex","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","_refHandler","divRef","which","preventDefault","openModalDialog","_toggleModal","imageModalSlider","ZoomView","product","_mapProductToImageData","modalIsOpen","carouselprops","item","_renderCarouselItemImageView","_zoomedImageSettings","previousScreenshotFlipperText","nextScreenshotFlipperText","showPaginationTooltip","hideIndicator","keyboard","isDisabledFunctionality","isMobileImageZoomed","carousel","imageModalSliderProps","ontoggle","galleryCarousel","classNames","isImageZoomed","zoomedImageSettings","galleryImageSettings","_onImageMouseOut","_inlineZoomImageOnHover","_onInlineImageClick","_onContainerZoomImageClick","_onMouseOutLensContainer","source","imageSource","shouldUpdateOnPartialDimensionSelection","mediaLocationsForSelectedVariant","thumbnailImageSettings","_setImages","RecordId","apiSettings","productVariant","ObjectExtensions","nextProps","nextState","isVertical","thumbnailsOrientation","isFullscreenAllowed","isMobile","allowFullScreen","zoomViewMode","imageZoom","mediaGalleryCarouselItems","_getMediaGalleryItems","mediaGalleryThumbnailCarouselItems","_getMediaGalleryThumbnailItems","Modal","callbackToggle","callbackThumbnailClick","callbackThumbnailKeyDown","CarouselProps","Thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","vertical","flipperPrevLabel","flipperNextLabel","parentId","useTabList","JSON","stringify","lastUpdate","defaultKey","_getEmptyThumbnailItem","zoomView","_renderEmptyImage","curatedImage","imagesToSet","shouldHideMasterProductImagesForVariant","incrementedIndex","imageIndex","includes","Date","now","_renderImageInContainerOnZoom","_renderImageFullScreenOnZoom","_renderImageInlineOnZoom","dataScale","onMouseOver","onMouseMove","String","currentTarget","mobileZoomedInImageClassName","style","transform","classList","remove","parentElement","overflow","bounds","getBoundingClientRect","Number","positionX","clientX","left","positionY","clientY","top","scaledPositionX","scaledPositionY","add","scrollTo","innerWidth","_handleMobileViewZoomedImageClick","onMouseOut","fullScreenTitleText","PrimaryImageUrl","parentDiv","children","querySelector","removeAttribute","_renderThumbnails","thumbnails","_renderThumbnailItem","thumbnail","OrderSummaryLine","price","label","toBeCalculatedText","freeText","cssLabel","PriceComponent","CustomerContextualPrice","freePriceText","_buildOrderSummarySection","_computedLoyaltyAmount","checkoutState","loyaltyAmount","getDeliveryMode","deliveryMode","featureSate","channelDeliveryOptionConfig","pickupDeliveryMode","PickupDeliveryModeCodes","find","dM","OrderSummary","SubtotalAmount","TaxAmount","DiscountAmountWithoutTax","TotalAmount","OtherChargeAmount","canShip","hasDeliveryMethod","hasShippingMethod","freightFee","channelConfiguration","retailMultiplePickUpOptionEnabled","pickupDeliveryModeCode","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","deliveryModes","CartLines","cartLine","DeliveryMode","ShippingChargeAmount","some","getDeliveryConfiguration","reactNodes","subtotal","subTotalLabel","tax","taxLabel","orderTotal","orderTotalLabel","otherCharge","otherChargeLabel","shipping","shippingLabel","giftCardAmount","giftCardTotalValue","giftCardExtends","reduce","count","giftCard","Balance","amount","Math","min","_computeGiftCardAmount","totalAmountAfterGiftCard","loyalty","loyaltyLabel","giftcardLabel","totalDiscounts","totalDiscountsLabel","ProductCollection","handleHeadingChange","heading","initProductState","productCollection","products","_getProduct","trace","allowBackNavigation","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","quickview","reviewCountAriaLabelValue","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","featureState","priceResources","priceRangeSeparator","ProductContainer","productComponent","ProductComponent","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","quickViewButton","IsEnabled","_getActivePrice","productsList","productPrices","enableAffiliationBasedPricing","isAuthenticated","isCarousel","layout","headingLabel","headingComponent","onEdit","updatedProducts","getProductData","productCollectionViewProps","ProductCollectionContainer","GridComponentProps","_renderCarousel","_renderProduct","_renderGrid","gridContainer","PromoBannerCloseButton","closeButtonAriaLabel","onClose","PromoBannerLinks","links","editableLinks","_mapEditableLinks","linkdata","forEach","push","PromoBannerText","PromoBanner","isVisible","handleTextChange","bannerMessages","_isLastItem","_isFirstItem","_onDismiss","closeButtonLabel","bannerText","onDismiss","handleLinks","handleText","promoBannerProps","promoBannerTextProps","promoBannerLinksProps","contentProps","promoBannerText","carouselProps","closeButton","slides","SocialShareItem","_getSocialShareItem","viewprops","SocialShareItemElement","icon","socialMedia","postUrl","document","URL","SocialShareItemView"],"sourceRoot":""}