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LC,GAAI,YACJC,EAAG,YACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,yBAOAlB,EAF4B,4HACXQ,EAAQ,KAQzBR,EAF4B,kEACXQ,EAAQ,KAQzBR,EAF4B,kEACXQ,EAAQ,OAQzBR,EAF4B,sEACXQ,EAAQ,MAQzBR,EAF4B,iFACXQ,EAAQ,MAQzBR,EAF4B,mFACXQ,EAAQ,MAMjCtU,OAAOiV,aAAejV,OAAOiV,cAAgB,GAC7CjV,OAAOiV,aAAazT,QAAO8I,EAAAA,EAAA,GACpBtK,OAAOiV,aAAazT,SAAW,IAC/BoS,EAAQpS,SAGXxB,OAAOiV,aAAapB,YAAWvJ,EAAAA,EAAA,GAC5BtK,OAAOiV,aAAapB,aAAe,IACnCD,EAAQC,aAEY,MAAMqB,EAAiB,GAC9BA,EAAe,mDAAqD,CAC5Eb,EAAGA,IAAMC,EAAQ,MACjBa,GAAI,iCAEpBnV,OAAOiV,aAAejV,OAAOiV,cAAgB,GAC7CjV,OAAOiV,aAAaC,eAAc5K,EAAAA,EAAA,GACPtK,OAAOiV,aAAaC,gBAAkB,IACtCA,UCtH3BE,EAAOC,QAAU7V,cCAjB4V,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/cz-header/components/cz-header-preferred-store.tsx?7c60","webpack://Msdyn365.Commerce.Online/./src/modules/cz-header/components/logo.tsx?8c0f","webpack://Msdyn365.Commerce.Online/./src/modules/cz-header/components/nav-icon.tsx?ecf3","webpack://Msdyn365.Commerce.Online/./src/modules/cz-header/cz-header.tsx?ab7a","webpack://Msdyn365.Commerce.Online/./src/modules/cz-header/cz-header.view.tsx?8b3b","webpack://Msdyn365.Commerce.Online/./lib/cz-header/module-registration.js?ff65","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ICzHeaderData } from '../cz-header.data';\r\nimport { ICzHeaderProps } from '../cz-header.props.autogenerated';\r\n\r\n/**\r\n * The header preferred store component.\r\n */\r\n@observer\r\nexport class HeaderPreferredStore extends React.PureComponent> {\r\n private readonly modalCloseButtonRef: React.RefObject = React.createRef();\r\n\r\n public componentDidMount(): void {\r\n window.addEventListener('quickViewEvent', (events: any) => {\r\n void this.handleClick();\r\n });\r\n }\r\n\r\n /**\r\n * Handle click on the store selector.\r\n * @returns : Promise void.\r\n */\r\n public handleClick = () => {\r\n return this._findPreferredStoreOnClick(this.props);\r\n };\r\n\r\n public render(): JSX.Element | undefined {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n },\r\n slots,\r\n resources,\r\n config\r\n } = this.props;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- slots can be undefined.\r\n if (ArrayExtensions.hasElements(slots?.storeSelector)) {\r\n const storeName =\r\n storeSelectorStateManager?.preferredStore && storeSelectorStateManager.preferredStore.StoreName\r\n ? `${storeSelectorStateManager.preferredStore.StoreName}${' '}${config.storeSuffix ?? ''}`\r\n : resources.headerPreferredStoreText;\r\n\r\n return (\r\n
\r\n \r\n {storeName}\r\n \r\n
Set your bakery to see local prices
\r\n {slots.storeSelector}\r\n
\r\n );\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n private async _findPreferredStoreOnClick(props: ICzHeaderProps): Promise {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n },\r\n modules\r\n } = props;\r\n if (!storeSelectorStateManager) {\r\n return;\r\n }\r\n let storeSelectorId: string = '';\r\n if (modules && Object.keys(modules).length > 0 && ArrayExtensions.hasElements(modules.storeSelector)) {\r\n storeSelectorId = modules.storeSelector[0].id;\r\n }\r\n await storeSelectorStateManager\r\n .openDialog({\r\n id: storeSelectorId,\r\n showMapViewLink: true,\r\n parentElementRef: this.modalCloseButtonRef,\r\n onLocationSelected: orgUnitLocation => {\r\n return Promise.resolve();\r\n }\r\n })\r\n .catch((error: Error) => {\r\n if (props.telemetry) {\r\n props.telemetry.error(error.message);\r\n props.telemetry.debug('Unable to set preferred store');\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default HeaderPreferredStore;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ILogoProps {\r\n image: Msdyn365.IImageData;\r\n gridSettings?: Msdyn365.IGridSettings;\r\n link?: ILinkData;\r\n className?: string;\r\n telemetryContent?: ITelemetryContent;\r\n requestContext: Msdyn365.IRequestContext;\r\n typeName?: string;\r\n}\r\n\r\nexport interface ILinkData {\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n linkText?: string;\r\n}\r\n\r\n/**\r\n *\r\n * Logo component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class Logo extends React.PureComponent {\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n constructor(props: ILogoProps) {\r\n super(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\r\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return
{this._renderLogo(this.props)}
;\r\n }\r\n\r\n private _renderLogo(config: ILogoProps): JSX.Element {\r\n if (config.link && config.link.linkUrl.destinationUrl) {\r\n return (\r\n \r\n {this._renderImage(config)}\r\n \r\n );\r\n }\r\n return this._renderImage(config);\r\n }\r\n\r\n private _renderImage(config: ILogoProps): JSX.Element {\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=132&h=28&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=160&h=48&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default Logo;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ICzHeaderResources } from '../cz-header.props.autogenerated';\r\n\r\nexport interface INavIconProps {\r\n resources: ICzHeaderResources;\r\n isExpanded: boolean;\r\n targetId: string;\r\n telemetryContent?: ITelemetryContent;\r\n toggleNavBar(): void;\r\n}\r\n\r\n/**\r\n *\r\n * NavIcon component.\r\n * @extends {React.PureComponent}\r\n */\r\n\r\n@observer\r\nexport class NavIcon extends React.PureComponent {\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n constructor(props: INavIconProps) {\r\n super(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\r\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { Customer, LoyaltyRewardPoint } from '@msdyn365-commerce/retail-proxy';\r\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n KeyCodes,\r\n Modal,\r\n ModalBody,\r\n ModalHeader,\r\n onTelemetryClick,\r\n Popover,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\r\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\r\nimport { ICzHeaderData } from './cz-header.data';\r\nimport { ICzHeaderProps, ICzHeaderResources, IMyAccountLinksData } from './cz-header.props.autogenerated';\r\n\r\nexport interface IHeaderState {\r\n mobileMenuCollapsed: boolean;\r\n signinPopoverOpen: boolean;\r\n hasSigninerror?: boolean;\r\n}\r\n\r\nexport interface IHeaderViewProps extends ICzHeaderProps, IHeaderState {\r\n logo: React.ReactNode;\r\n wishListIconDesktop: React.ReactNode;\r\n wishListIconMobile: React.ReactNode;\r\n cartIcon: React.ReactNode;\r\n navIcon: React.ReactNode;\r\n className: string;\r\n menuBar: React.ReactNode[];\r\n search: React.ReactNode[];\r\n siteOptions: React.ReactNode[];\r\n HeaderTag: IModuleProps;\r\n HeaderContainer: INodeProps;\r\n MobileMenuContainer: INodeProps;\r\n MobileMenuHeader: React.ReactNode;\r\n MobileMenuBodyContainer: INodeProps;\r\n MobileMenuLinksContainer: INodeProps;\r\n HeaderTopBarContainer: INodeProps;\r\n Divider: INodeProps;\r\n\r\n AccountInfoDropdownParentContainer?: INodeProps;\r\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\r\n accountInfoDropdownButton?: React.ReactNode;\r\n\r\n signOutLink?: React.ReactNode;\r\n signInLink?: React.ReactNode;\r\n switchCustomerLink?: React.ReactNode;\r\n isOBORequest?: boolean;\r\n accountLinks?: React.ReactNode[];\r\n preferredStore?: React.ReactNode;\r\n currentDistributor?: React.ReactNode;\r\n socialMedia: React.ReactNode[];\r\n}\r\n\r\n/**\r\n *\r\n * Header component.\r\n * @extends {React.PureComponent>}\r\n */\r\n@observer\r\nclass Header extends React.PureComponent, IHeaderState> {\r\n private readonly popOverRef: React.RefObject;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private cart: ICartState | undefined;\r\n\r\n private isB2BSite: boolean = false;\r\n\r\n /**\r\n * The signed-in user name displayed in the header bar\r\n */\r\n @computed\r\n public get displayName(): Readonly {\r\n return (\r\n (MsDyn365.isOboRequest(this.props.context.request) ? this.workerName : this.customerName) ||\r\n this.props.context.request?.user?.name\r\n );\r\n }\r\n\r\n /**\r\n * OBO scenario. The name of worker who shops on behalf of customer.\r\n */\r\n @computed\r\n public get workerName(): Readonly {\r\n const worker = this.props.data.employee?.result;\r\n return worker?.Name;\r\n }\r\n\r\n @computed\r\n public get customerName(): Readonly {\r\n const customer = this.props.data.accountInformation?.result;\r\n if (MsDyn365.isOboRequest(this.props.context.request)) {\r\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\r\n return customer ? customer.Name : undefined;\r\n } else {\r\n return customer ? customer.FirstName || customer.Name : undefined;\r\n }\r\n }\r\n\r\n public constructor(props: ICzHeaderProps) {\r\n super(props);\r\n this.popOverRef = React.createRef();\r\n this._toggleNavbar = this._toggleNavbar.bind(this);\r\n this._togglePopover = this._togglePopover.bind(this);\r\n this._keydown = this._keydown.bind(this);\r\n this.state = {\r\n mobileMenuCollapsed: true,\r\n signinPopoverOpen: false,\r\n hasSigninerror: false\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.isB2BSite = isChannelTypeB2B(this.props.context.request);\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (MsDyn365.msdyn365Commerce.isBrowser) {\r\n window.addEventListener('keydown', this._keydown);\r\n }\r\n reaction(\r\n () => {\r\n this.props.data.cart.result;\r\n },\r\n () => {\r\n this.cart = this.props.data.cart.result;\r\n }\r\n );\r\n\r\n const {\r\n context: {\r\n request: { user }\r\n },\r\n resources: {\r\n signUpCustomerNotFoundTitle,\r\n signUpMultipleCustomerFoundTitle,\r\n signInCustomerNotAuthorizedTitle,\r\n closeNotificationLabel\r\n }\r\n } = this.props;\r\n\r\n const signinNotificationError = this._getSigninNotification(\r\n user,\r\n signUpMultipleCustomerFoundTitle,\r\n signUpCustomerNotFoundTitle,\r\n signInCustomerNotAuthorizedTitle\r\n );\r\n if (signinNotificationError !== undefined && this.state.hasSigninerror === false) {\r\n // For signup show simple error notification.\r\n NotificationsManager.instance().addNotification(new ErrorNotification(signinNotificationError, closeNotificationLabel));\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.msdyn365Commerce.isBrowser) {\r\n window.removeEventListener('keydown', this._keydown, false);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n id,\r\n typeName,\r\n data: { accountInformation, wishlists },\r\n context: {\r\n request: { user }\r\n },\r\n context,\r\n resources: { cartLabel, cartQtyLabel }\r\n } = this.props;\r\n const { logoLink, logoImage, shouldShowWishlistCount } = this.props.config;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- app config is generic\r\n const disableTooltip = this.props.context.app.config.disableTooltip || false;\r\n const headerToggleClass = this.state.mobileMenuCollapsed ? '' : 'ms-header-open';\r\n const headerClassName = classnames('ms-header', this.props.config.className, headerToggleClass);\r\n const navbarKey = 'header-nav-mobile';\r\n const customer = accountInformation && accountInformation.result;\r\n const cartIconSlot = this._getSlot('cartIcon');\r\n const menuBarSlot = this._getSlot('menuBar');\r\n const searchSlot = this._getSlot('search');\r\n let wishlistCount = 0;\r\n const siteOptionsSlot = this._getSlot('siteOptions');\r\n const preferredStoreSlot = this._getSlot('storeSelector');\r\n const currentDistributorSlot = this._getSlot('distributorSelector');\r\n const socialMediaSlot = this._getSlot('socialMedia');\r\n\r\n if (wishlists !== undefined) {\r\n if (\r\n !wishlists.result ||\r\n !ArrayExtensions.hasElements(wishlists.result) ||\r\n !wishlists.result[0].CommerceListLines ||\r\n !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)\r\n ) {\r\n wishlistCount = 0;\r\n } else {\r\n wishlistCount = wishlists.result[0].CommerceListLines.length;\r\n }\r\n }\r\n const viewProps: IHeaderViewProps = {\r\n ...(this.props as ICzHeaderProps),\r\n ...this.state,\r\n logo: (\r\n \r\n ),\r\n wishListIconDesktop: (\r\n \r\n ),\r\n wishListIconMobile: (\r\n \r\n ),\r\n cartIcon: ArrayExtensions.hasElements(cartIconSlot) ? (\r\n cartIconSlot[0]\r\n ) : (\r\n \r\n ),\r\n navIcon: (\r\n \r\n ),\r\n menuBar: ArrayExtensions.hasElements(menuBarSlot) ? menuBarSlot : [],\r\n search: ArrayExtensions.hasElements(searchSlot) ? searchSlot : [],\r\n siteOptions: ArrayExtensions.hasElements(siteOptionsSlot) ? siteOptionsSlot : [],\r\n className: headerClassName,\r\n HeaderTag: {\r\n moduleProps: this.props,\r\n className: classnames(headerClassName),\r\n 'aria-label': this.props.resources.headerAriaLabel,\r\n tag: 'header'\r\n },\r\n HeaderContainer: {\r\n className: classnames('ms-header__container')\r\n },\r\n HeaderTopBarContainer: {\r\n className: classnames('ms-header__topbar')\r\n },\r\n Divider: {\r\n className: classnames('ms-header__divider')\r\n },\r\n MobileMenuContainer: {\r\n tag: Modal,\r\n id: navbarKey,\r\n className: 'ms-header__mobile-hamburger',\r\n isOpen: !this.state.mobileMenuCollapsed,\r\n wrapClassName: 'ms-header__modal',\r\n toggle: this._toggleNavbar\r\n },\r\n MobileMenuHeader: ,\r\n MobileMenuBodyContainer: {\r\n tag: ModalBody,\r\n className: 'ms-header__mobile-hamburger-menu-body'\r\n },\r\n MobileMenuLinksContainer: {\r\n className: 'ms-header__mobile-hamburger-menu-links'\r\n },\r\n AccountInfoDropdownParentContainer: {\r\n className: 'ms-header__account-info'\r\n },\r\n AccountInfoDropdownPopoverConentContainer: this.displayName\r\n ? {\r\n tag: Popover,\r\n id: 'myprofilePopover',\r\n className: 'ms-header__account-info-content',\r\n placement: 'bottom',\r\n isOpen: this.state.signinPopoverOpen,\r\n target: this.popOverRef,\r\n toggle: this._togglePopover\r\n }\r\n : undefined,\r\n signInLink: this._getSigninButton(user, this.props.resources),\r\n signOutLink: this._getSignOutButton(user, this.props.resources),\r\n isOBORequest: MsDyn365.isOboRequest(this.props.context.request),\r\n switchCustomerLink: this._getSwitchCustomerButton(user, this.props.resources),\r\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(user, this.props.resources),\r\n accountLinks: this._getAccountLinks(customer),\r\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) && ,\r\n currentDistributor: this.isB2BSite && ArrayExtensions.hasElements(currentDistributorSlot) ? currentDistributorSlot : undefined,\r\n socialMedia: ArrayExtensions.hasElements(socialMediaSlot) ? socialMediaSlot : []\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Handle link text change.\r\n * @param linkIndex - Link Index.\r\n * @returns : Void.\r\n */\r\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\r\n if (this.props.config.myAccountLinks?.[linkIndex]) {\r\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\r\n }\r\n };\r\n\r\n /**\r\n * Get the slot.\r\n * @param slotName - Name of the slot.\r\n * @returns The slot.\r\n */\r\n private _getSlot(slotName: string): React.ReactNode[] | null {\r\n const { slots } = this.props;\r\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\r\n }\r\n\r\n /**\r\n * Renders the sign in button.\r\n * @param user - Request context user.\r\n * @param resources - Resources.\r\n * @returns React Node.\r\n */\r\n private _getSigninButton(user: MsDyn365.IRequestContextUser | undefined, resources: ICzHeaderResources): React.ReactNode | undefined {\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\r\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n return (\r\n !this.displayName && (\r\n \r\n \r\n {resources.signInLinkText}\r\n \r\n \r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Renders the sign out button.\r\n * @param user - Request context user.\r\n * @param resources - Resources.\r\n * @returns React Node.\r\n */\r\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: ICzHeaderResources): React.ReactNode | undefined {\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\r\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n return (\r\n this.displayName && (\r\n \r\n \r\n {resources.signOutLinkText}\r\n \r\n \r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Renders the sign out button.\r\n * @param user - Request context user.\r\n * @param resources - Resources.\r\n * @returns React Node.\r\n */\r\n private _getSwitchCustomerButton(\r\n user: MsDyn365.IRequestContextUser | undefined,\r\n resources: ICzHeaderResources\r\n ): React.ReactNode | undefined {\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SwitchCustomer);\r\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n const isOBOAccountSelected =\r\n MsDyn365.isOboRequest(this.props.context.request) && this.props.context.request.cookies.getAccountSelectionCookie();\r\n return (\r\n this.displayName &&\r\n isOBOAccountSelected && (\r\n this.props.context.request.cookies.removeAccountSelectionCookie()}\r\n {...attributes}\r\n >\r\n
\r\n
{format(resources.shoppingAsText, this.customerName)}
\r\n
{resources.switchCustomerLinkText}
\r\n
\r\n \r\n )\r\n );\r\n }\r\n\r\n private getBusinessPartnerSelectionUrl(): string | undefined {\r\n const route = MsDyn365.getUrlSync('businessPartnerSelection', this.props.context.actionContext);\r\n if (!route || !MsDyn365.msdyn365Commerce.isBrowser) {\r\n return undefined;\r\n }\r\n\r\n // MsDyn365.getUrlSync persists some params in the route and remove other params.\r\n // Among the persisted params, we need to remove catalogid.\r\n const persistedParamToRemove = ['catalogid'];\r\n const url = new URL(route, window.location.href);\r\n persistedParamToRemove.forEach(param => url.searchParams.delete(param));\r\n return url.href;\r\n }\r\n\r\n private _getSigninNotification(\r\n user: MsDyn365.IRequestContextUser | undefined,\r\n signUpMultipleCustomerFoundTitle: string,\r\n signUpCustomerNotFoundTitle: string,\r\n signInCustomerNotAuthorizedTitle: string\r\n ): string | undefined {\r\n if (!user?.retailServerErrorCode) {\r\n return undefined;\r\n }\r\n\r\n const { signUpCustomerNotFound, signUpMultipleCustomerFound, signInCustomerNotAuthorized } = this.props.config;\r\n const notFoundError = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\r\n const multipleAccountError = 'Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountsFoundWithSameEmailAddress';\r\n const accountAuthorizationError = 'Microsoft_Dynamics_Commerce_Runtime_AuthorizationFailed';\r\n\r\n if (user?.retailServerErrorCode === notFoundError) {\r\n return signUpCustomerNotFound !== undefined ? signUpCustomerNotFound : signUpCustomerNotFoundTitle;\r\n } else if (user?.retailServerErrorCode === multipleAccountError) {\r\n return signUpMultipleCustomerFound !== undefined ? signUpMultipleCustomerFound : signUpMultipleCustomerFoundTitle;\r\n } else if (user?.retailServerErrorCode === accountAuthorizationError) {\r\n return signInCustomerNotAuthorized !== undefined ? signInCustomerNotAuthorized : signInCustomerNotAuthorizedTitle;\r\n }\r\n return user?.retailServerErrorMessage;\r\n }\r\n\r\n private _getAccountInfoDropdownButton(\r\n user: MsDyn365.IRequestContextUser | undefined,\r\n resources: ICzHeaderResources\r\n ): React.ReactNode | undefined {\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\r\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n const loyaltyDataLabel = this.props.config.loyaltyDataLabel;\r\n let points: any = 0;\r\n const { loyaltyCard } = this.props.data;\r\n if (loyaltyCard && loyaltyCard.result?.RewardPoints && loyaltyCard.result.RewardPoints.length > 0) {\r\n loyaltyCard.result.RewardPoints.forEach((rewardPoint: LoyaltyRewardPoint) => {\r\n points += rewardPoint.ActivePoints!;\r\n });\r\n }\r\n if (this.props.config.currencySign === '$') {\r\n points = `${this.props.config.currencySign || ''}${points.toFixed(2)}`;\r\n } else {\r\n points = `${points.toFixed(2).replace(/[.,]00$/, '')}`;\r\n }\r\n\r\n return (\r\n this.displayName && (\r\n <>\r\n \r\n
\r\n
{this.displayName}
\r\n {MsDyn365.isOboRequest(this.props.context.request) && this.customerName && (\r\n
{format(resources.shoppingAsText, this.customerName)}
\r\n )}\r\n
\r\n \r\n
\r\n \r\n {loyaltyDataLabel}: {points}\r\n \r\n \r\n )\r\n );\r\n }\r\n\r\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\r\n const { myAccountLinks } = this.props.config;\r\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\r\n if (!this.displayName || !myAccountLinks || !ArrayExtensions.hasElements(myAccountLinks)) {\r\n return undefined;\r\n }\r\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\r\n payLoad.contentAction.etext = cta.linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n const editableLink: MsDyn365.ILinksData = {\r\n ariaLabel: cta.ariaLabel,\r\n className: 'ms-signin-info__account-link-button',\r\n linkText: cta.linkText,\r\n linkUrl: cta.linkUrl.destinationUrl,\r\n openInNewTab: cta.openInNewTab,\r\n role: 'link',\r\n additionalProperties: attributes\r\n };\r\n\r\n return (\r\n \r\n );\r\n });\r\n }\r\n\r\n private _toggleNavbar(): void {\r\n this.setState({\r\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\r\n });\r\n }\r\n\r\n private _togglePopover(): void {\r\n this.setState({\r\n signinPopoverOpen: !this.state.signinPopoverOpen\r\n });\r\n }\r\n\r\n private _keydown(event: KeyboardEvent): void {\r\n if (event.keyCode === KeyCodes.Escape) {\r\n this.setState({ mobileMenuCollapsed: true });\r\n }\r\n }\r\n}\r\n\r\nexport default Header;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { Logo } from '@msdyn365-commerce-modules/header';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { addThrottledEvent, isMobile, Module, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IHeaderViewProps } from './cz-header';\r\nimport { IHeaderProps } from '@msdyn365-commerce-theme/adventureworks-theme-kit/dist/types/modules/adventureworks/definition-extensions/header.ext.props.autogenerated';\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n *\r\n * HeaderView component.\r\n * @extends {React.PureComponent}\r\n */\r\nclass HeaderView extends React.PureComponent, any> {\r\n private readonly menuNode: React.RefObject;\r\n\r\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\r\n this.state = {\r\n isOnlyMobile: viewport === 'xs' || viewport === 'sm' || viewport === 'md'\r\n };\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.useStickyHeader) {\r\n // Set header update methods to trigger on scroll\r\n if (MsDyn365.isBrowser) {\r\n window.addEventListener('scroll', () => {\r\n this._configureStickyHeader();\r\n });\r\n }\r\n this._configureStickyHeader();\r\n }\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n this.customResizeThrottledEventHandler();\r\n if (this.props.config.useStickyHeader) {\r\n // Set header update methods to trigger on scroll\r\n if (MsDyn365.isBrowser) {\r\n window.addEventListener('scroll', () => {\r\n this._configureStickyHeader();\r\n });\r\n }\r\n this._configureStickyHeader();\r\n }\r\n }\r\n\r\n private customResizeThrottledEventHandler() {\r\n addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n }\r\n\r\n private readonly _customUpdateViewport = (): void => {\r\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\r\n this.setState({\r\n isOnlyMobile: viewport === 'xs' || viewport === 'sm' || viewport === 'md'\r\n });\r\n };\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const {\r\n HeaderTag,\r\n HeaderContainer,\r\n HeaderTopBarContainer,\r\n Divider,\r\n MobileMenuContainer,\r\n MobileMenuBodyContainer,\r\n cartIcon,\r\n logo,\r\n menuBar,\r\n navIcon,\r\n preferredStore,\r\n currentDistributor,\r\n search,\r\n siteOptions,\r\n socialMedia\r\n } = this.props;\r\n\r\n return (\r\n \r\n {/*{true && (*/}\r\n {/* */}\r\n {/* */}\r\n {/* {this._renderReactFragment(siteOptions)}*/}\r\n {/* {preferredStore}*/}\r\n {/* {currentDistributor}*/}\r\n {/* /!*{this.props.currentDistributor}*!/*/}\r\n {/* {this._renderAccountBlock(this.props)}*/}\r\n {/* */}\r\n {/* */}\r\n {/*)}*/}\r\n \r\n \r\n {this._renderReactFragment(siteOptions)}\r\n {preferredStore}\r\n {currentDistributor}\r\n {/*{this.props.currentDistributor}*/}\r\n {this._renderAccountBlock(this.props)}\r\n \r\n \r\n \r\n \r\n
{navIcon}
\r\n {logo}\r\n {this._renderMobileLogo()}\r\n
\r\n {this._renderReactFragment(menuBar)}\r\n
\r\n {this._renderReactFragment(search)}\r\n \r\n {cartIcon}\r\n \r\n \r\n \r\n {this._renderReactFragment(menuBar)}\r\n {this._renderReactFragment(socialMedia)}\r\n {preferredStore}\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Function to update header.\r\n */\r\n private readonly _configureStickyHeader = (): void => {\r\n // Get heights of cookie and promotion banners\r\n const defaultValue = 0;\r\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\r\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\r\n\r\n // Triggers opacity change of header\r\n const headerElement = document.querySelector('header .default-container');\r\n if (headerElement) {\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\r\n headerElement.classList.add('lock-opaque');\r\n headerElement.classList.add('fixed');\r\n } else {\r\n headerElement.classList.remove('lock-opaque');\r\n headerElement.classList.remove('fixed');\r\n }\r\n }\r\n\r\n // Update sticky header position and opacity\r\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\r\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\r\n\r\n if (stickyHeader && headerLogo) {\r\n // Fix center sticky header\r\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\r\n stickyHeader.classList.add('fixed');\r\n } else {\r\n stickyHeader.classList.remove('fixed');\r\n }\r\n }\r\n };\r\n\r\n private _renderMobileLogo(): JSX.Element | null {\r\n const { config, context, typeName } = this.props;\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to render account block.\r\n * @param props - IHeaderViewProps.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const {\r\n AccountInfoDropdownParentContainer,\r\n AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signInLink\r\n } = props;\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\r\n if (AccountInfoDropdownPopoverConentContainer) {\r\n return (\r\n \r\n {accountInfoDropdownButton}\r\n {this._renderAccountDropdownLinks(props)}\r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n private readonly _renderAccountDropdownLinks = (props: IHeaderViewProps): JSX.Element | null => {\r\n const { isOBORequest, switchCustomerLink, accountLinks, signOutLink } = props;\r\n if (isOBORequest) {\r\n return (\r\n <>\r\n {switchCustomerLink}\r\n {signOutLink}\r\n {accountLinks ? : false}\r\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\r\n \r\n );\r\n } else {\r\n return (\r\n <>\r\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\r\n {signOutLink}\r\n \r\n );\r\n }\r\n };\r\n\r\n /**\r\n * Function to render react fragment.\r\n * @param items - React nodes.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\r\n return (\r\n <>\r\n {ArrayExtensions.hasElements(items)\r\n ? items.map((slot: React.ReactNode) => {\r\n return <>{slot};\r\n })\r\n : null}\r\n \r\n );\r\n };\r\n}\r\n\r\nexport default HeaderView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['cz-header'] = {\n c: () => require('partner/modules/cz-header/cz-header.tsx'),\n $type: 'containerModule',\n da: [{name:'accountInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action', runOn: 1},{name:'employee', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee', runOn: 0},{name:'loyaltyCard', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-loyalty-card', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'cz-header',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/cz-header'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-loyalty-card';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-loyalty-card');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|cz-header|cz-header'] = {\n c: () => require('partner/modules/cz-header/cz-header.view.tsx'),\n cn: '__local__-__local__-cz-header'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["HeaderPreferredStore","React","constructor","modalCloseButtonRef","handleClick","this","_findPreferredStoreOnClick","props","componentDidMount","window","addEventListener","events","render","data","storeSelectorStateManager","result","slots","resources","config","ArrayExtensions","hasElements","storeSelector","_config$storeSuffix","storeName","preferredStore","StoreName","storeSuffix","headerPreferredStoreText","className","color","headerPreferredStoreAriaLabel","onClick","ref","modules","storeSelectorId","Object","keys","length","id","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","Promise","resolve","catch","error","telemetry","message","debug","__decorate","observer","Logo","super","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","attributes","getTelemetryAttributes","_renderLogo","link","linkUrl","destinationUrl","assign","href","ariaLabel","target","openInNewTab","undefined","rel","_renderImage","Msdyn365","image","requestContext","gridSettings","imageSettings","viewports","xs","q","w","h","lg","lazyload","loadFailureBehavior","editProps","key","moduleType","typeName","imagePropertyName","shouldSkipToMainImage","NavIcon","Button","toggleNavBar","title","mobileHamburgerAriaLabel","isExpanded","targetId","Header","isB2BSite","handleLinkTextChange","linkIndex","event","_this$props$config$my","myAccountLinks","linkText","value","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","state","mobileMenuCollapsed","signinPopoverOpen","hasSigninerror","getTelemetryObject","context","request","telemetryPageName","friendlyName","isChannelTypeB2B","_this$props$context$r","MsDyn365","workerName","customerName","user","name","_this$props$data$empl","worker","employee","Name","_this$props$data$acco","customer","accountInformation","FirstName","isBrowser","reaction","cart","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","signInCustomerNotAuthorizedTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","instance","addNotification","ErrorNotification","componentWillUnmount","removeEventListener","wishlists","cartLabel","cartQtyLabel","logoLink","logoImage","shouldShowWishlistCount","disableTooltip","app","headerToggleClass","headerClassName","classnames","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","currentDistributorSlot","socialMediaSlot","CommerceListLines","viewProps","_objectSpread","logo","wishListIconDesktop","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","wishListIconMobile","cartIcon","CartIconComponent","navIcon","menuBar","search","siteOptions","HeaderTag","moduleProps","headerAriaLabel","tag","HeaderContainer","HeaderTopBarContainer","Divider","MobileMenuContainer","Modal","isOpen","wrapClassName","toggle","MobileMenuHeader","ModalHeader","MobileMenuBodyContainer","ModalBody","MobileMenuLinksContainer","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","displayName","Popover","placement","signInLink","_getSigninButton","signOutLink","_getSignOutButton","isOBORequest","switchCustomerLink","_getSwitchCustomerButton","accountInfoDropdownButton","_getAccountInfoDropdownButton","accountLinks","_getAccountLinks","currentDistributor","socialMedia","renderView","slotName","SignIn","signInLinkText","signInUrl","signInLinkAriaText","onTelemetryClick","_user$signOutUrl","SignOut","signOutLinkText","signOutUrl","signOutLinkAriaText","SwitchCustomer","isOBOAccountSelected","cookies","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","getBusinessPartnerSelectionUrl","role","removeAccountSelectionCookie","format","shoppingAsText","route","actionContext","url","URL","location","forEach","param","searchParams","delete","retailServerErrorCode","signUpCustomerNotFound","signUpMultipleCustomerFound","signInCustomerNotAuthorized","retailServerErrorMessage","_loyaltyCard$result","MyProfile","loyaltyDataLabel","points","loyaltyCard","RewardPoints","rewardPoint","ActivePoints","currencySign","toFixed","replace","innerRef","map","cta","index","contentAction","etext","editableLink","additionalProperties","onTextChange","setState","keyCode","KeyCodes","Escape","computed","HeaderView","_customUpdateViewport","viewport","isMobile","variant","VariantType","Browser","isOnlyMobile","_configureStickyHeader","headerAlertsContainer","document","querySelector","bannerHeights","offsetHeight","headerElement","documentElement","scrollTop","classList","add","remove","stickyHeader","headerLogo","navStickyPos","_renderAccountBlock","accountClassName","Node","_renderAccountDropdownLinks","_renderReactFragment","items","slot","menuNode","useStickyHeader","componentDidUpdate","customResizeThrottledEventHandler","addThrottledEvent","Module","_renderMobileLogo","_config$logoImage","binding","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","path","runOn","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}