{"version":3,"sources":["webpack:///src/modules/header/header.view.tsx?40e5","webpack:///src/modules/header/header.tsx?4703","webpack:///src/store-selector-state-manager/base-store-selector-state-manager.ts?edbe","webpack:///src/store-selector-state-manager/map-store-selector-state-manager.ts?d1f8","webpack:///src/store-selector-state-manager/store-selector-state-manager-data-action.ts?22fb","webpack:///src/modules/header/utilities/mock-utilities.ts?f38b","webpack:///./lib/header/module-registration.js?4d67","webpack:///src/modules/fabrikam/views/header.view.tsx?1cde","webpack:///external \"React\"?c481","webpack:///external \"ReactDOM\"?4b2d","webpack:///./src/themes/sheikhzayedfestival/views/header.view.tsx?3455","webpack:///src/modules/adventureworks/views/header.view.tsx?abc8","webpack:///src/modules/header/components/header-preferred-store.tsx?9138","webpack:///src/modules/header/components/logo.tsx?be23","webpack:///src/modules/header/components/nav-icon.tsx?49a1","webpack:///../../src/get-employee.ts?b8bb","webpack:///src/index.ts?c6ae"],"names":["_renderReactFragment","items","React","length","map","slot","index","key","headerView","props","HeaderTag","HeaderContainer","HeaderTopBarContainer","MobileMenuContainer","MobileMenuBodyContainer","MobileMenuLinksContainer","Divider","Module","Object","assign","Node","navIcon","logo","search","preferredStore","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","link","context","telemetry","error","_renderDesktopAccountBlock","wishListIconDesktop","cartIcon","siteOptions","MobileMenuHeader","menuBar","wishListIconMobile","Header","constructor","super","handleLinkTextChange","linkIndex","event","_this$props$config$my","this","config","myAccountLinks","linkText","target","value","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","state","mobileMenuCollapsed","signinPopoverOpen","hasSigninerror","telemetryContent","getTelemetryObject","request","telemetryPageName","friendlyName","MsDyn365","workerName","customerName","_this$props$data$empl","worker","data","employee","result","Name","_this$props$data$acco","customer","accountInformation","undefined","FirstName","componentDidMount","isBrowser","window","addEventListener","reaction","cart","user","resources","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","instance","addNotification","ErrorNotification","componentWillUnmount","removeEventListener","render","id","typeName","wishlists","cartLabel","cartQtyLabel","logoLink","logoImage","shouldShowWishlistCount","disableTooltip","app","headerToggleClass","headerClassName","classnames","className","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","ArrayExtensions","hasElements","CommerceListLines","viewProps","_objectSpread","Logo","image","gridSettings","requestContext","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","CartIconComponent","NavIcon","isExpanded","targetId","toggleNavBar","moduleProps","headerAriaLabel","tag","Modal","isOpen","wrapClassName","toggle","ModalHeader","ModalBody","displayName","Popover","placement","_getSigninButton","_getSignOutButton","isOBORequest","switchCustomerLink","_getSwitchCustomerButton","_getAccountInfoDropdownButton","_getAccountLinks","HeaderPreferredStore","renderView","slotName","slots","payLoad","getPayloadObject","TelemetryConstant","SignIn","attributes","getTelemetryAttributes","Button","title","signInLinkText","href","signInUrl","signInLinkAriaText","onClick","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","signUpCustomerNotFound","signUpMultipleCustomerFound","retailServerErrorCode","MyProfile","innerRef","color","cta","contentAction","etext","editableLink","ariaLabel","linkUrl","destinationUrl","openInNewTab","additionalProperties","editProps","onTextChange","setState","keyCode","KeyCodes","Escape","__decorate","computed","observer","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","_readFromToCookie","storeInfo","JSON","parse","_unused","_context","input","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","Error","localStorage","removeItem","setItem","cookieValue","getItem","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","script","document","createElement","setAttribute","remove","resourceSets","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","lang","market","reject","_document2","_document3","type","async","defer","src","mapAPIReady","isMapApiLoaded","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","mockRequest","buildMockRequest","xs","w","h","sm","md","lg","xl","isAuthenticated","signUpUrl","mockAnonRequest","mockSigninErrorRequest","buildHydratedMockActionContext","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","renderCustomerName","renderForMobile","accountClassName","_renderAccountBlock","Collapse","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","_renderCollapseMenu","module","exports","ReactDOM","currentScrollY","scrollY","headerContainerDiv","getElementsByClassName","headerTag","getElementsByTagName","classList","add","handleScroll","passive","HeaderView","_configureStickyHeader","headerAlertsContainer","querySelector","bannerHeights","offsetHeight","headerElement","documentElement","scrollTop","stickyHeader","headerLogo","navStickyPos","_renderAccountDropdownLinks","menuNode","useStickyHeader","ref","_renderMobileLogo","_config$mobileLogoIma","mobileLogoImage","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","storeSelectorStateManager","storeSelector","headerPreferredStoreText","headerPreferredStoreAriaLabel","storeSelectorId","keys","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","catch","message","debug","_renderLogo","rel","_renderImage","Msdyn365","imageSettings","viewports","q","lazyload","loadFailureBehavior","moduleType","imagePropertyName","shouldSkipToMainImage","mobileHamburgerAriaLabel","GetEmployeeInput","getCacheKey","getCacheObjectType","dataCacheType","createGetEmployeeInput","getEmployeeAction","ctx","isOboRequest","StaffId","firstName","getEmployeeActionDataAction"],"mappings":";+JAkFA,SAASA,EAAqBC,GAC1B,OACIC,2BAAA,KACKD,GAASA,EAAME,OAAS,EACnBF,EAAMG,IAAI,CAACC,EAAuBC,IACvBJ,gBAACA,WAAc,CAACK,IAAKD,GAAQD,IAExC,MAKHG,UApFgCC,IAC3C,MAAM,UACFC,EAAS,gBACTC,EAAe,sBACfC,EAAqB,oBACrBC,EAAmB,wBACnBC,EAAuB,yBACvBC,EAAwB,QACxBC,GACAP,EACJ,OACIP,gBAACe,SAAMC,OAAAC,OAAA,GAAKT,GACRR,gBAACkB,OAAIF,OAAAC,OAAA,GAAKR,GACNT,gBAACkB,OAAIF,OAAAC,OAAA,GAAKP,GACLH,EAAMY,QACNZ,EAAMa,KACNtB,EAAqBS,EAAMc,QAC3Bd,EAAMe,eA0B3B,SAAoCf,GAChC,MAAM,mCACFgB,EAAkC,0CAClCC,EAAyC,0BACzCC,EAAyB,YACzBC,EAAW,WACXC,EAAU,aACVC,GACArB,EAEJ,GAAIgB,EAAoC,CACpC,GAAIC,EACA,OACIxB,gBAACkB,OAAIF,OAAAC,OAAA,GAAKM,GACLE,EACDzB,gBAACkB,OAAIF,OAAAC,OAAA,GAAKO,KACLI,GAAeA,EAAa1B,IAAI2B,GAAQA,GACxCH,IAIV,GAAIC,EACP,OAAO3B,gBAACkB,OAAIF,OAAAC,OAAA,GAAKM,GAAqCI,GAI9D,OADApB,EAAMuB,QAAQC,UAAUC,MAAM,gDACvB,KAnDUC,CAA2B1B,GAC3BA,EAAM2B,oBACPlC,gBAACkB,OAAIF,OAAAC,OAAA,GAAKH,IACTP,EAAM4B,SACNrC,EAAqBS,EAAM6B,cAEhCpC,gBAACkB,OAAIF,OAAAC,OAAA,GAAKN,GACNX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+L,IAGIM,a,oCCpEf,iG","file":"static/js/93.084dbdcf535d10fae773.chunk.js","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { 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 {signInLink};\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\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n KeyCodes,\n Modal,\n ModalBody,\n ModalHeader,\n onTelemetryClick,\n Popover,\n 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 switchCustomerLink?: React.ReactNode;\n isOBORequest?: boolean;\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 /**\n * The signed-in user name displayed in the header bar\n */\n @computed public get displayName(): Readonly {\n return MsDyn365.isOboRequest(this.props.context.request) ? this.workerName : this.customerName;\n }\n\n /**\n * OBO scenario. The name of worker who shops on behalf of customer.\n */\n @computed public get workerName(): Readonly {\n const worker = this.props.data.employee?.result;\n return worker?.Name;\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n if (MsDyn365.isOboRequest(this.props.context.request)) {\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\n return customer ? customer.Name : undefined;\n } else {\n return customer ? customer.FirstName || customer.Name : undefined;\n }\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(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\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: { user }\n },\n resources: { signUpCustomerNotFoundTitle, signUpMultipleCustomerFoundTitle, closeNotificationLabel }\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(signinNotificationError, closeNotificationLabel));\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, wishlists },\n context: {\n request: { user }\n },\n context,\n resources: { cartLabel, cartQtyLabel }\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 (\n !wishlists.result ||\n !ArrayExtensions.hasElements(wishlists.result) ||\n !wishlists.result[0].CommerceListLines ||\n !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)\n ) {\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 \n ),\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: ArrayExtensions.hasElements(cartIconSlot) ? (\n cartIconSlot[0]\n ) : (\n \n ),\n navIcon: (\n \n ),\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 'aria-label': this.props.resources.headerAriaLabel,\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 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: this.displayName\n ? {\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 }\n : undefined,\n signInLink: this._getSigninButton(user, this.props.resources),\n signOutLink: this._getSignOutButton(user, this.props.resources),\n isOBORequest: MsDyn365.isOboRequest(this.props.context.request),\n switchCustomerLink: this._getSwitchCustomerButton(user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(user, this.props.resources),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) && \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 user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSigninButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n !this.displayName && (\n \n \n {resources.signInLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n \n {resources.signOutLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSwitchCustomerButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SwitchCustomer);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const isOBOAccountSelected =\n MsDyn365.isOboRequest(this.props.context.request) && this.props.context.request.cookies.getAccountSelectionCookie();\n return (\n this.displayName &&\n isOBOAccountSelected && (\n this.props.context.request.cookies.removeAccountSelectionCookie()}\n {...attributes}\n >\n
\n
{format(resources.shoppingAsText, this.customerName)}
\n
{resources.switchCustomerLinkText}
\n
\n \n )\n );\n }\n\n private getBusinessPartnerSelectionUrl(): string | undefined {\n const route = MsDyn365.getUrlSync('businessPartnerSelection', this.props.context.actionContext);\n if (!route || !MsDyn365.msdyn365Commerce.isBrowser) {\n return undefined;\n }\n\n // MsDyn365.getUrlSync persists some params in the route and remove other params.\n // Among the persisted params, we need to remove catalogid.\n const persistedParamToRemove = ['catalogid'];\n const url = new URL(route, window.location.href);\n persistedParamToRemove.forEach(param => url.searchParams.delete(param));\n return url.href;\n }\n\n private _getSigninNotification(\n user: MsDyn365.IRequestContextUser | undefined,\n signUpMultipleCustomerFoundTitle: string,\n signUpCustomerNotFoundTitle: string\n ): 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(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n
\n
{this.displayName}
\n {MsDyn365.isOboRequest(this.props.context.request) && this.customerName && (\n
{format(resources.shoppingAsText, this.customerName)}
\n )}\n
\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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { buildHydratedMockActionContext, buildMockRequest, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, Customer, Employee } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderConfig, IHeaderResources } from '../header.props.autogenerated';\n\nconst mockRequest: IRequestContext = buildMockRequest();\nmockRequest.gridSettings = {\n xs: { w: 767, h: 0 },\n sm: { w: 991, h: 0 },\n md: { w: 1199, h: 0 },\n lg: { w: 1599, h: 0 },\n xl: { w: 1600, h: 0 }\n};\nmockRequest.user.isAuthenticated = true;\nmockRequest.user.signInUrl = '/signin';\nmockRequest.user.signOutUrl = '/signout';\nmockRequest.user.signUpUrl = '/signup';\n\nconst mockAnonRequest = buildMockRequest();\nmockAnonRequest.user.isAuthenticated = false;\nmockAnonRequest.user.signInUrl = '/signin';\nmockAnonRequest.user.signOutUrl = '/signout';\nmockAnonRequest.user.signUpUrl = '/signup';\n\nconst mockSigninErrorRequest = buildMockRequest();\nmockSigninErrorRequest.user.isAuthenticated = false;\nmockSigninErrorRequest.user.retailServerErrorCode = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\nmockSigninErrorRequest.user.signInUrl = '/signin';\nmockSigninErrorRequest.user.signOutUrl = '/signout';\nmockSigninErrorRequest.user.signUpUrl = '/signup';\n\nconst mockActionContext = buildHydratedMockActionContext();\n\n/**\n * Method to mock auth context.\n */\n// @ts-expect-error\nexport const mockAuthContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// @ts-expect-error\nexport const mockAnonContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockAnonRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Due to partial mock.\n// @ts-expect-error\nexport const mockSigninContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockSigninErrorRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\nexport const mockHeaderConfig: IHeaderConfig = {\n logoLink: {\n linkUrl: {\n destinationUrl: 'https://ppe.fabrikam.com/fe'\n },\n ariaLabel: 'fabrikam'\n },\n logoImage: {\n src: 'https://img-prod-cms-mr-microsoft-com.akamaized.net/cms/api/fabrikam/imageFileData/MA1G3L'\n }\n};\n\nexport const mockResources: IHeaderResources = {\n mobileHamburgerAriaLabel: 'Mobile view hamburger aria label',\n wishlistTooltipText: 'My wishlist',\n cartLabel: 'Shopping bag, ({0}) items',\n cartQtyLabel: '({0})',\n signInLinkText: 'Sign In',\n signInLinkAriaText: 'Sign In',\n signOutLinkText: 'Sign Out',\n signOutLinkAriaText: 'Sign Out',\n shoppingAsText: 'Shopping as {0}',\n switchCustomerLinkText: 'Switch customer',\n switchCustomerLinkAriaText: 'Switch customer',\n headerPreferredStoreText: 'Select store',\n headerPreferredStoreAriaLabel: 'select preferred store',\n signUpCustomerNotFoundTitle: 'Error message if cutsomer not found',\n signUpMultipleCustomerFoundTitle: 'Multiple customer found error msg',\n closeNotificationLabel: 'Close',\n wishlistCountLabel: '({0})',\n headerAriaLabel: 'Header'\n};\n\nexport const getMockData = (totalItemsInCart: number = 0, accountNumber: string = '2', firstName: string = ''): IHeaderData => {\n return {\n cart: >{\n status: 'SUCCESS',\n result: {\n totalItemsInCart\n }\n },\n employee: >{\n status: 'SUCCESS',\n result: {\n Name: 'Worker'\n }\n },\n accountInformation: >{\n status: 'SUCCESS',\n result: {\n AccountNumber: accountNumber,\n FirstName: firstName\n }\n },\n storeSelectorStateManager: >{\n status: 'SUCCESS',\n result: {}\n }\n };\n};\n\nexport const getMockErrorData = (): IHeaderData => {\n return {\n cart: >{\n status: 'FAILED',\n result: undefined\n },\n employee: >{\n status: 'FAILED',\n result: undefined\n },\n accountInformation: >{\n status: 'FAILED',\n result: undefined\n },\n storeSelectorStateManager: >{\n status: 'FAILED',\n result: undefined\n }\n };\n};\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['header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header'),\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:'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: true,\n ns: '@msdyn365-commerce-modules',\n n: 'header',\n p: 'header',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/header/dist/lib/modules/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-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__|themes|sheikhzayedfestival|views|header'] = {\n c: () => require('partner/themes/sheikhzayedfestival/views/header.view.tsx'),\n cn: '__local__-__local__-header'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|header'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/header.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-header'\n };\nviewDictionary['@msdyn365-commerce-modules|header|modules|header|header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header.view.js'),\n cn: '@msdyn365-commerce-modules-header-header'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|header'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/header.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-header'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","module.exports = React;","module.exports = ReactDOM;","/*!\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header/dist/types';\r\n\r\nconst headerView: React.FC = (props) => {\r\n const {\r\n HeaderTag,\r\n HeaderContainer,\r\n HeaderTopBarContainer,\r\n MobileMenuContainer,\r\n MobileMenuBodyContainer,\r\n MobileMenuLinksContainer,\r\n Divider,\r\n } = props;\r\n // const [loading, setLoading] = React.useState(true);\r\n React.useEffect(() => {\r\n const currentScrollY = window.scrollY;\r\n\r\n const headerContainerDiv = document.getElementsByClassName('header_szf');\r\n const headerTag = document.getElementsByTagName('header');\r\n if (currentScrollY > 0) {\r\n headerContainerDiv[0].classList.add('szf-solid-header');\r\n headerTag[0].classList.add('main-header-tag');\r\n }\r\n else {\r\n if (currentScrollY < 90) {\r\n headerContainerDiv[0].classList.remove('szf-solid-header');\r\n headerTag[0].classList.remove('main-header-tag');\r\n }\r\n }\r\n const handleScroll = () => {\r\n const currentScrollY = window.scrollY;\r\n // const headerContainerDiv = document.getElementsByClassName('ms-header__container');\r\n\r\n // Sunaina //\r\n\r\n const headerContainerDiv = document.getElementsByClassName('header_szf');\r\n const headerTag = document.getElementsByTagName('header');\r\n \r\n if (currentScrollY > 90) {\r\n headerContainerDiv[0].classList.add('szf-solid-header');\r\n headerTag[0].classList.add('main-header-tag');\r\n } else {\r\n if (currentScrollY < 90) {\r\n headerContainerDiv[0].classList.remove('szf-solid-header');\r\n headerTag[0].classList.remove('main-header-tag');\r\n }\r\n }\r\n };\r\n window.addEventListener('scroll', handleScroll, { passive: true });\r\n return () => window.removeEventListener('scroll', handleScroll);\r\n });\r\n\r\n return (\r\n <>\r\n {/* {!loading && */}\r\n \r\n \r\n \r\n {props.navIcon}\r\n {props.logo}\r\n {_renderReactFragment(props.search)}\r\n {props.preferredStore}\r\n {_renderDesktopAccountBlock(props)}\r\n {props.wishListIconDesktop}\r\n \r\n {props.cartIcon}\r\n {_renderReactFragment(props.siteOptions)}\r\n \r\n \r\n \r\n {props.MobileMenuHeader}\r\n {_renderReactFragment(props.menuBar)}\r\n \r\n {props.accountLinks ? props.accountLinks.map((link) => link) : false}\r\n {props.siteOptions}\r\n {props.wishListIconMobile}\r\n {props.signInLink}\r\n {props.signOutLink}\r\n \r\n \r\n \r\n {_renderReactFragment(props.menuBar)}\r\n \r\n \r\n {/* } */}\r\n \r\n );\r\n};\r\n\r\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\r\n const {\r\n AccountInfoDropdownParentContainer,\r\n AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signOutLink,\r\n signInLink,\r\n accountLinks,\r\n } = props;\r\n\r\n if (AccountInfoDropdownParentContainer) {\r\n if (AccountInfoDropdownPopoverConentContainer) {\r\n return (\r\n \r\n {accountInfoDropdownButton}\r\n \r\n {accountLinks ? accountLinks.map((link) => link) : false}\r\n {signOutLink}\r\n \r\n \r\n );\r\n } else if (signInLink) {\r\n return {signInLink};\r\n }\r\n }\r\n props.context.telemetry.error('Header content is empty, module wont render.');\r\n return null;\r\n}\r\n\r\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\r\n return (\r\n <>\r\n {items && items.length > 0\r\n ? items.map((slot: React.ReactNode, index: number) => {\r\n return {slot};\r\n })\r\n : null}\r\n \r\n );\r\n}\r\n\r\nexport default headerView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n *\n * HeaderView component.\n * @extends {React.PureComponent}\n */\nexport class HeaderView extends React.PureComponent> {\n private readonly menuNode: React.RefObject;\n\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\n super(props);\n this.menuNode = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this.props.config.useStickyHeader) {\n // Set header update methods to trigger on scroll\n if (MsDyn365.isBrowser) {\n window.addEventListener('scroll', () => {\n this._configureStickyHeader();\n });\n }\n this._configureStickyHeader();\n }\n }\n\n public render(): JSX.Element | null {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n Divider,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer\n } = this.props;\n\n return (\n \n \n \n
\n {this._renderReactFragment(this.props.menuBar)}\n
\n
{this.props.navIcon}
\n {this.props.logo}\n {this._renderMobileLogo()}\n {this._renderReactFragment(this.props.search)}\n {this.props.preferredStore}\n {this._renderAccountBlock(this.props)}\n \n {this.props.cartIcon}\n {this._renderReactFragment(this.props.siteOptions)}\n \n \n \n {this.props.MobileMenuHeader}\n {this._renderReactFragment(this.props.menuBar)}\n \n {this.props.accountLinks ? this.props.accountLinks.map(link => link) : false}\n {this.props.siteOptions}\n {this.props.wishListIconMobile}\n {this.props.signInLink}\n {this.props.signOutLink}\n \n \n \n
\n
\n );\n }\n\n /**\n * Function to update header.\n */\n private readonly _configureStickyHeader = (): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\n\n // Triggers opacity change of header\n const headerElement = document.querySelector('header .default-container');\n if (headerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\n headerElement.classList.add('lock-opaque');\n headerElement.classList.add('fixed');\n } else {\n headerElement.classList.remove('lock-opaque');\n headerElement.classList.remove('fixed');\n }\n }\n\n // Update sticky header position and opacity\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\n\n if (stickyHeader && headerLogo) {\n // Fix center sticky header\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\n stickyHeader.classList.add('fixed');\n } else {\n stickyHeader.classList.remove('fixed');\n }\n }\n };\n\n private _renderMobileLogo(): JSX.Element | null {\n const { config, context, typeName } = this.props;\n return (\n \n );\n }\n\n /**\n * Function to render account block.\n * @param props - IHeaderViewProps.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signInLink\n } = props;\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n {this._renderAccountDropdownLinks(props)}\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n };\n\n private readonly _renderAccountDropdownLinks = (props: IHeaderViewProps): JSX.Element | null => {\n const { isOBORequest, switchCustomerLink, accountLinks, signOutLink } = props;\n if (isOBORequest) {\n return (\n <>\n {switchCustomerLink}\n {signOutLink}\n {accountLinks ? : false}\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n \n );\n } else {\n return (\n <>\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n );\n }\n };\n\n /**\n * Function to render react fragment.\n * @param items - React nodes.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {ArrayExtensions.hasElements(items)\n ? items.map((slot: React.ReactNode) => {\n return <>{slot};\n })\n : null}\n \n );\n };\n}\n\nexport default HeaderView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE 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 =\n storeSelectorStateManager?.preferredStore && storeSelectorStateManager.preferredStore.StoreName\n ? storeSelectorStateManager.preferredStore.StoreName\n : resources.headerPreferredStoreText;\n\n return (\n
\n \n {storeName}\n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferredStoreOnClick(props: IHeaderProps): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n modules\n } = 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\n .openDialog({\n id: storeSelectorId,\n showMapViewLink: true,\n parentElementRef: this.modalCloseButtonRef,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\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.\n * All rights reserved. See LICENSE 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 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
{this._renderLogo(this.props)}
;\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 this._renderImage(config);\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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} 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 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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, isOboRequest } from '@msdyn365-commerce/core';\nimport { Employee } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Input class for the GetEmployeeInput data action.\n */\nexport class GetEmployeeInput implements IActionInput {\n /**\n * Get Cache Key.\n * @returns - Cache key string.\n */\n public getCacheKey = (): string => 'Employee';\n\n /**\n * Get Cache type Name.\n * @returns - Cache name string.\n */\n public getCacheObjectType = (): string => 'Employee';\n\n /**\n * Get Cache type.\n * @returns - CacheType enum.\n */\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CreateInput method for the getEmployee.\n * @returns - Input for data action.\n */\nexport const createGetEmployeeInput = (): IActionInput => {\n return new GetEmployeeInput();\n};\n\n/**\n * The action method for the getEmployee data action.\n * @param input -- The action input.\n * @param ctx -- The action context.\n * @returns -- Employee.\n */\nexport async function getEmployeeAction(input: GetEmployeeInput, ctx: IActionContext): Promise {\n // For now, we just need the name information of employee. When we need more information, we will invoke EmployeeDataActions.readAsync retail proxy API.\n if (isOboRequest(ctx.requestContext)) {\n const user = ctx.requestContext.user;\n return {\n StaffId: '',\n Name: user?.firstName || user?.name\n };\n }\n return;\n}\n\n/**\n * The getEmployee data action.\n * Gets the employee.\n * @returns Employee.\n */\nexport const getEmployeeActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-employee',\n action: getEmployeeAction as IAction,\n input: createGetEmployeeInput\n});\n\nexport default getEmployeeActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport Header from './modules/header/header';\nimport HeaderView from './modules/header/header.view';\n\nexport * from './modules/header/components';\nexport * from './modules/header/header';\nexport * from './modules/header/header.props.autogenerated';\nexport * from './modules/header/header.view';\nexport * from './modules/header/utilities/mock-utilities';\n\nexport { Header, HeaderView };\n"],"sourceRoot":""}