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,EAAUpB,EAAgBI,EAAYtB,EAAGnlB,GAAKmlB,GAErE,GACQ,OAANyC,IACC3mB,EAAIyc,EAAI2G,EAASoD,EAAShC,WAAaY,EAAgBrmB,EAAI,IAAKmlB,EAAExmB,WAAaihB,EAEhF5f,EAAIwkB,EAAmBW,EAAGnlB,EAAG2nB,OACxB,CAEL,GADA3jB,EAAK0hB,EAAGe,EAAYtB,EAAGvF,EAAG5f,IACtB0lB,EAAE/mB,SAAWooB,EAAK,OAAOrB,EAC7B,IAAK,IAAIxc,EAAI,EAAGA,GAAK0e,EAAEjpB,OAAS,EAAGuK,IAEjC,GADAlF,EAAK0hB,EAAGkC,EAAE1e,IACNwc,EAAE/mB,SAAWooB,EAAK,OAAOrB,EAE/B1lB,EAAI4f,EAAI3e,GAIZ,OADA+C,EAAK0hB,EAAGe,EAAYtB,EAAGvF,IAChB8F,QA3H4BU,GAAM,WAE7C,IAAIyB,EAAK,OACLC,EAAeD,EAAGrB,KACtBqB,EAAGrB,KAAO,WAAc,OAAOsB,EAAalC,MAAM/e,KAAMkhB,YACxD,IAAI7oB,EAAS,KAAKjD,MAAM4rB,GACxB,OAAyB,IAAlB3oB,EAAOP,QAA8B,MAAdO,EAAO,IAA4B,MAAdA,EAAO,MAwHrBmnB,UC5JvC2B,EAAOC,QAAUnqB,cCAjBkqB,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/allRegex.ts?9889","webpack://mattressfirm/./src/Utilities/components/BVRatingSummary.tsx?6e2e","webpack://mattressfirm/./src/Utilities/emtpyChecker.ts?e2f5","webpack://mattressfirm/./src/Utilities/get-delivery-by-message.tsx?05db","webpack://mattressfirm/./src/Utilities/get-product-badge.tsx?635b","webpack://mattressfirm/./src/Utilities/get-view-port.tsx?4210","webpack://mattressfirm/./src/Utilities/product-search-result-utils.tsx?58f2","webpack://mattressfirm/./src/actions/get-mfrm-products-category-paths.action.ts?dc81","webpack://mattressfirm/./src/actions/TryInStoreDataServiceEntities.g.ts?ea57","webpack://mattressfirm/./src/actions/TryInStoreDataActionExtension.g.ts?c8db","webpack://mattressfirm/./src/actions/get-try-in-store-info.action.ts?dff9","webpack://mattressfirm/./src/data-actions/store-selector-state-data-action.ts?6df6","webpack://mattressfirm/./src/actions/ProductRecommendationDataServiceEntities.g.ts?8590","webpack://mattressfirm/./src/actions/ProductRecommendationDataActionExtension.g.ts?8c1d","webpack://mattressfirm/./src/modules/mfrm-product-recommendations/featured-content.tsx?59e9","webpack://mattressfirm/./src/modules/mfrm-product-recommendations/mfrm-product-recommendations.tsx?d3c1","webpack://mattressfirm/./src/modules/mfrm-product-recommendations/mfrm-product-recommendations.view.tsx?ecbf","webpack://mattressfirm/./src/themes/mattressfirm/views/components/rating.component.tsx?6883","webpack://mattressfirm/./lib/mfrm-product-recommendations/module-registration.js?e542","webpack://mattressfirm/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://mattressfirm/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://mattressfirm/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://mattressfirm/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.match.js?a69e","webpack://mattressfirm/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.split.js?9fc2","webpack://mattressfirm/external var \"React\"?0d3b","webpack://mattressfirm/external var \"ReactDOM\"?853b"],"sourcesContent":["import { ICoreContext } from '@msdyn365-commerce/core';\r\nexport const emailRegex = (emailValue: string) => {\r\n // eslint-disable-next-line security/detect-unsafe-regex\r\n const validationEmail = /^[-a-z0-9!#$%&'*+/=?^_`{|}~]+(?:\\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*@(?:[a-z0-9]+(?:-+[a-z0-9]+)*\\.)+(?:xn--[a-z0-9]+|[a-z]{2,16})$/i;\r\n\r\n return validationEmail.test(emailValue);\r\n};\r\n\r\n/**\r\n * Method to remove special characters for product name from product URL\r\n * @param str string\r\n * @param ctx ICoreContext\r\n * @returns string\r\n */\r\n\r\nexport const removeSpecialChars = (str: string, ctx: ICoreContext): string => {\r\n if (ctx && ctx.request.app?.config.removeSpecialCharsPDP) {\r\n return str?.replace(/[^a-zA-Z0-9- ]/g, '');\r\n }\r\n return str;\r\n};\r\n\r\n\r\n/**\r\n * Method to remove special characters for product URL's path\r\n * @param str string\r\n * @param ctx ICoreContext\r\n * @returns string\r\n */\r\n\r\nexport const removeSpecialCharsFromURLPath = (str: string, ctx: ICoreContext): string => {\r\n if (ctx && ctx.request.app?.config.removeSpecialCharsPDP) {\r\n const urlPath = decodeURIComponent(str.split('.p')[0])?.replace(/[^a-zA-Z0-9-/ ]/g, '');\r\n return `${urlPath}.p`;\r\n }\r\n return str;\r\n};\r\n\r\n/*\r\nThis regex object has 2 patterns:\r\n'nameRegex' matches names with letters, spaces, apostrophes, periods, and dashes.\r\n'addressInputRegex' matches alphanumeric characters and printable ASCII symbols.\r\n*/\r\nexport const inputRegexObj = {\r\n nameRegex: /^[\\p{L}\\s.'-]+$/u,\r\n addressInputRegex: /^[a-zA-Z0-9\\x20-\\x7E]*$/\r\n};","import React, { useState, useEffect, useRef } from 'react';\r\n\r\nexport const BVRatingSummary = ({\r\n itemId,\r\n onClick,\r\n variantId,\r\n hideReadReviewsButton\r\n}: {\r\n itemId: string | undefined;\r\n onClick?: () => void;\r\n variantId?: number | undefined;\r\n hideReadReviewsButton?: boolean\r\n}) => {\r\n const [dataBvProductIdAttr, setDataBvProductIdAttr] = useState(itemId);\r\n const wrapper = useRef(null);\r\n const interval = useRef(-1);\r\n const [numReviews, setNumReviews] = useState();\r\n\r\n useEffect(() => {\r\n setDataBvProductIdAttr(itemId);\r\n }, [itemId]);\r\n\r\n useEffect(() => {\r\n setDataBvProductIdAttr('bv-refresh');\r\n }, [variantId]);\r\n\r\n useEffect(() => {\r\n if (dataBvProductIdAttr === 'bv-refresh') {\r\n setDataBvProductIdAttr(itemId);\r\n }\r\n }, [dataBvProductIdAttr]);\r\n useEffect(() => {\r\n const pollInterval = window.setInterval(() => {\r\n const numReviewsHTML = wrapper.current?.querySelector('.bv_numReviews_text')?.innerHTML.match(/\\(([^)]+)\\)/)?.[1];\r\n if (numReviewsHTML) {\r\n setNumReviews(numReviewsHTML);\r\n clearInterval(pollInterval);\r\n }\r\n }, 0);\r\n });\r\n useEffect(() => {\r\n if (wrapper.current) {\r\n numReviews === '0' ? wrapper.current.style.display = 'none' : wrapper.current.style.display = 'flex';\r\n }\r\n }, [numReviews]);\r\n\r\n return (\r\n {\r\n if (hideReadReviewsButton) {\r\n interval.current = window.setInterval(() => {\r\n const button: Element | undefined = Array.from(document.querySelectorAll('.bv_button_buttonFull')).find((button) => {\r\n return button?.innerHTML === `Read ${numReviews} Reviews`;\r\n });\r\n if (button) {\r\n button.outerHTML = '';\r\n }\r\n });\r\n }\r\n }}\r\n onMouseLeave={() => {\r\n if (hideReadReviewsButton) {\r\n clearInterval(interval.current);\r\n }\r\n }}\r\n data-bv-show='rating_summary'\r\n data-bv-product-id={dataBvProductIdAttr}\r\n onClick={onClick}\r\n ref={wrapper}\r\n />\r\n );\r\n};\r\n","// tslint:disable\r\nexport const hasArray = (values: any): any[] | undefined => {\r\n return (typeof values !== 'string') && values && values.length ? values : undefined;\r\n};","import { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport { IMFICLDeliveryScheduleParameters } from '../actions/CoreProductDataServiceEntities.g';\r\nimport getDeliveryMessageAction, { GetDeliveryMessageInput } from '../actions/get-delivery-message.action';\r\n\r\nconst _getDeliveryByMessage = async (request: IMFICLDeliveryScheduleParameters, context: ICoreContext>, isCached?: boolean) => {\r\n if (request) {\r\n const getDeliveryMessageActionInput = new GetDeliveryMessageInput(request, isCached);\r\n try {\r\n let result;\r\n // eslint-disable-next-line prefer-const\r\n result = await getDeliveryMessageAction(getDeliveryMessageActionInput, context.actionContext);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport default _getDeliveryByMessage;\r\n","import { IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\r\nimport dayjs from 'dayjs';\r\nimport tz from 'dayjs/plugin/timezone';\r\nimport utc from 'dayjs/plugin/utc';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\ndayjs.extend(tz);\r\ndayjs.extend(utc);\r\ndayjs.extend(isBetween);\r\nimport React from 'react';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nconst format = 'M/D/YYYY H:m:s';\r\n\r\nexport interface IBadgeData {\r\n src: string;\r\n alt: string;\r\n start: dayjs.Dayjs;\r\n end: dayjs.Dayjs;\r\n}\r\n\r\nconst defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `m=6`, w: 0, h: 0 }\r\n },\r\n disableLazyLoad: true\r\n};\r\n\r\nexport const parseBadgeData = (badgeData: string, requestContext: IRequestContext): IBadgeData | undefined => {\r\n let dataSegments;\r\n let scheduleStart;\r\n let scheduleEnd;\r\n let badgeType;\r\n let parsedScheduleStart;\r\n let startDate;\r\n let startTime;\r\n let parsedScheduleEnd;\r\n let endDate;\r\n let endTime;\r\n\r\n try {\r\n // split the data into its segments\r\n dataSegments = badgeData.split('#');\r\n scheduleStart = dataSegments[0];\r\n scheduleEnd = dataSegments[1];\r\n badgeType = dataSegments[2];\r\n\r\n // parse schedule start\r\n parsedScheduleStart = scheduleStart.split('_');\r\n startDate = parsedScheduleStart[0];\r\n startTime = parsedScheduleStart[1];\r\n\r\n // parse schedule end\r\n parsedScheduleEnd = scheduleEnd.split('_');\r\n endDate = parsedScheduleEnd[0];\r\n endTime = parsedScheduleEnd[1];\r\n } catch (e) {\r\n return;\r\n }\r\n\r\n const startMoment = `${startDate} ${startTime?.replace(/-/g, \":\")}`;\r\n const endMoment = `${endDate} ${endTime?.replace(/-/g, \":\")}`;\r\n\r\n const startMomentFormatted = dayjs(startMoment?.replace(/-/g, \"/\"));\r\n const endMomentFormatted = dayjs(endMoment?.replace(/-/g, \"/\"));\r\n\r\n // check if schedule is valid\r\n if (!(startMomentFormatted.isValid() && endMomentFormatted.isValid())) {\r\n return;\r\n }\r\n\r\n // parse badge type and create image src\r\n const baseUrl = requestContext.apiSettings.baseImageUrl.substring(0, requestContext.apiSettings.baseImageUrl.length - 1);\r\n if (badgeType) {\r\n const removed$ = badgeType.substring(1, badgeType.length - 1);\r\n const parsedBadgeType = removed$?.replace(' ', '-').toLowerCase();\r\n\r\n // remove page name portion\r\n const altText = removed$.split('-')[0];\r\n\r\n const src = `${baseUrl}${parsedBadgeType}.png`;\r\n return {\r\n src: src,\r\n alt: altText,\r\n start: convertTimeZone(startMomentFormatted),\r\n end: convertTimeZone(endMomentFormatted)\r\n };\r\n } else {\r\n return;\r\n }\r\n};\r\n\r\n// convert given time to Central Time (CT)\r\nconst convertTimeZone = (time: dayjs.Dayjs): dayjs.Dayjs => {\r\n return dayjs(time.format(format), format).tz('America/Chicago').local();\r\n};\r\n\r\nexport const buildProductBadge = (parsedBadgeData: IBadgeData, requestContext: IRequestContext): JSX.Element | undefined => {\r\n // only build image if it is scheduled\r\n const isScheduled = dayjs().isBetween(parsedBadgeData.start, parsedBadgeData.end);\r\n\r\n if (isScheduled) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const renderProductBadge = (\r\n attributeName: string | undefined,\r\n requestContext: IRequestContext\r\n): JSX.Element | undefined => {\r\n const badgeData = attributeName;\r\n if (!badgeData) {\r\n return;\r\n }\r\n // split badge data into its separate badges\r\n const badges = badgeData.split(',');\r\n // parse badge data to get its schedule and image src\r\n const parsedBadges = badges.map(badge => parseBadgeData(badge, requestContext));\r\n\r\n // build product badge image components\r\n const finalizedBadges = parsedBadges.map(parsedBadge => parsedBadge && buildProductBadge(parsedBadge, requestContext));\r\n\r\n return finalizedBadges ? <>{finalizedBadges} : <>;\r\n};\r\n\r\nexport const renderProductBadgeByFilteringAttributes = (\r\n attributeName: string | undefined,\r\n attributes: AttributeValue[] | undefined,\r\n requestContext: IRequestContext\r\n): JSX.Element | undefined => {\r\n const badgeData =\r\n attributeName &&\r\n attributes?.find(\r\n currAttribute => currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attributeName.toLowerCase().trim()\r\n )?.TextValue;\r\n if (!badgeData) {\r\n return;\r\n }\r\n\r\n // split badge data into its separate badges\r\n const badges = badgeData.split(',');\r\n\r\n // parse badge data to get its schedule and image src\r\n const parsedBadges = badges.map(badge => parseBadgeData(badge, requestContext));\r\n // build product badge image components\r\n const finalizedBadges = parsedBadges.map(parsedBadge => parsedBadge && buildProductBadge(parsedBadge, requestContext));\r\n\r\n return finalizedBadges && <>{finalizedBadges};\r\n};\r\n","import MsDyn365, { ICoreContext } from '@msdyn365-commerce/core';\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nconst _getViewPort = (context: ICoreContext): GridSize => {\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n } else {\r\n return 'xl';\r\n }\r\n }\r\n }\r\n return 'xs';\r\n};\r\n\r\nexport default _getViewPort;\r\n","import { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\r\nimport dayjs from 'dayjs';\r\nimport Cookies from 'universal-cookie';\r\nimport { IMFIATPInventoryEntity, IMFICartLine, IMFICLDeliveryScheduleParameters } from '../actions/CoreProductDataServiceEntities.g';\r\nimport { IMFIAvailablePromotionDescription, IMFIItem } from '../actions/EyebrowMessageDataServiceEntities.g';\r\nimport getEyebrowAction, { GetEyebrowMessageInput } from '../actions/get-eyebrow-message.action';\r\nimport _getDeliveryByMessage from './get-delivery-by-message';\r\nimport { IMFIATPInventoryEntityPLP } from '../actions/BatchCoreProductDataServiceEntities.g';\r\n\r\nexport const _getEyebrowMessage = async (products: IMFIItem[], context: ICoreContext>) => {\r\n const priceGroupForAPICall = context.app && context.app.config.priceGroup;\r\n if (products && products.length > 0 && (priceGroupForAPICall !== '' || priceGroupForAPICall !== undefined)) {\r\n const items: IMFIItem[] | undefined = [];\r\n products.map(item => {\r\n const singleItem: IMFIItem = {\r\n ItemId: item.ItemId,\r\n DistinctProductVariant: item.DistinctProductVariant\r\n };\r\n items.push(singleItem);\r\n });\r\n\r\n const requestBody: IMFIAvailablePromotionDescription = {\r\n PriceGroup: priceGroupForAPICall,\r\n Items: items\r\n };\r\n const getEyebrowMessageInput = new GetEyebrowMessageInput(requestBody, undefined, true);\r\n try {\r\n const result = await getEyebrowAction(getEyebrowMessageInput, context.actionContext);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const _makeDeliveryMessage = (days: string) => {\r\n if (days === '' || days === undefined || days === null) {\r\n return '';\r\n }\r\n\r\n let deliveryByMessage = '';\r\n let date = new Date();\r\n const daysSpan = days.split('-');\r\n let deliveryDate = Date.now();\r\n if (daysSpan && daysSpan[1] !== undefined && daysSpan.length) {\r\n let deliveryByMessageRange = '';\r\n daysSpan.map((item: string) => {\r\n date = new Date();\r\n deliveryDate = Date.now();\r\n if (parseInt(item, 10) > 0) {\r\n let numberOfDays = parseInt(item, 10);\r\n let newDate = deliveryDate;\r\n while (numberOfDays > 0) {\r\n newDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(newDate).format('d') !== '0' && dayjs(newDate).format('d') !== '6') {\r\n numberOfDays--;\r\n }\r\n }\r\n deliveryByMessage = dayjs(newDate).format('MMM D');\r\n if (deliveryByMessageRange !== '') {\r\n deliveryByMessageRange = `${deliveryByMessageRange} to ${deliveryByMessage}`;\r\n } else {\r\n deliveryByMessageRange = deliveryByMessage;\r\n newDate = date.setDate(date.getDate() - parseInt(item[0], 10));\r\n }\r\n }\r\n });\r\n return `Delivery by ${deliveryByMessageRange}`;\r\n } else {\r\n deliveryByMessage = dayjs(deliveryDate).format('MMM D');\r\n let numberOfDays = parseInt(days, 10);\r\n let newDate = deliveryDate;\r\n let flag = true;\r\n while (numberOfDays > 0) {\r\n newDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(newDate).format('d') !== '0' && dayjs(newDate).format('d') !== '6') {\r\n numberOfDays--;\r\n } else {\r\n flag = false;\r\n }\r\n }\r\n deliveryByMessage =\r\n flag && days === '1'\r\n ? `Tomorrow ${dayjs(Date.now()).format('MMM D')}`\r\n : dayjs(newDate).format('ddd MMM, D');\r\n return `Delivery by ${deliveryByMessage}`;\r\n }\r\n};\r\n\r\n// tslint:disable-next-line: no-any\r\nexport const _coreProductATPCall = async (\r\n itemLines: IMFICartLine[],\r\n setCoreProductATPData: React.Dispatch,\r\n context: ICoreContext>\r\n) => {\r\n const cookies = new Cookies();\r\n const zipcode = cookies.get('zip_code');\r\n if (itemLines && itemLines.length === 0) {\r\n setCoreProductATPData([]);\r\n }\r\n const currentDate = Date.now();\r\n const requestBody: IMFICLDeliveryScheduleParameters = {\r\n InventoryType: 'Delivery',\r\n Weeks: context.app.config.weeksPDPforATPCall,\r\n StoreId: '',\r\n Page: 'plp',\r\n RequestedDate: dayjs(currentDate).format('MM/DD/YYYY'),\r\n ZipCode: zipcode,\r\n ItemLines: itemLines\r\n };\r\n const getDeliveryByMessage = _getDeliveryByMessage(requestBody, context);\r\n getDeliveryByMessage\r\n .then(result => {\r\n if (result !== undefined && result?.ATPInventoryData && result?.ATPInventoryData.length > 0) {\r\n setCoreProductATPData(result?.ATPInventoryData);\r\n } else {\r\n setCoreProductATPData([]);\r\n }\r\n })\r\n .catch(e => {\r\n console.log('Error', e);\r\n });\r\n};\r\n\r\nconst _setTime = (time: string | undefined) => {\r\n if (time !== undefined && time !== '') {\r\n const temp = time.split(' ');\r\n if (temp && temp.length > 0) {\r\n let newDatewithTime = dayjs(Date.now()).format('M/D/YYYY');\r\n newDatewithTime = `${newDatewithTime} ${temp[0]}:00 ${temp[1].toUpperCase()}`;\r\n return newDatewithTime;\r\n }\r\n }\r\n return '';\r\n};\r\n\r\nexport interface IATPInventoryData {\r\n deliveryByMessage: string;\r\n locationId: string;\r\n}\r\n\r\nexport const _getSoonestDeliveryDate = (coreProductATPData: IMFIATPInventoryEntity[]): IATPInventoryData => {\r\n let deliveryDetails = {\r\n deliveryByMessage: '',\r\n locationId: ''\r\n };\r\n if (!coreProductATPData || !coreProductATPData.length) {\r\n return deliveryDetails;\r\n }\r\n for (let index = 0; index < coreProductATPData.length; index++) {\r\n const item = coreProductATPData[index];\r\n if (item.Available === 'YES' && item.ATPQuantity !== undefined && parseInt(item.ATPQuantity, 10) > 0) {\r\n const date = new Date();\r\n const today = dayjs(Date.now()).format('D M YY');\r\n const deliveryDate = dayjs(item.SlotDate).format('D M YY');\r\n const currHour = dayjs(Date.now()).format('H');\r\n if (today === deliveryDate) {\r\n const deliveryMessage =\r\n _setTime(item.StartTime) !== ''\r\n ? parseInt(dayjs(_setTime(item.StartTime)).format('H'), 10) < 14 && parseInt(currHour, 10) < 14\r\n ? `Delivery by Today ${dayjs(Date.now()).format('MMM D')}`\r\n : `Delivery by Tomorrow ${dayjs(date.setDate(date.getDate() + 1)).format('MMM D')}`\r\n : '';\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n break;\r\n } else {\r\n const deliveryMessage = `Delivery by ${dayjs(item.SlotDate).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n return deliveryDetails;\r\n};\r\n\r\nexport const _getDeliveryDate = (coreProductATPData: IMFIATPInventoryEntityPLP) => {\r\n let deliveryDetails = {\r\n deliveryByMessage: '',\r\n locationId: ''\r\n };\r\n const item = coreProductATPData;\r\n if (item.Available === 'YES' && item.ATPQuantity !== undefined && parseInt(item.ATPQuantity, 10) > 0) {\r\n const date = new Date();\r\n const today = dayjs(Date.now()).format('D M YY');\r\n const deliveryDate = dayjs(item.SlotDate).format('D M YY');\r\n const currHour = dayjs(Date.now()).format('H');\r\n const startTimeHour = item.StartTime?.substring(0,2) || \"14\";\r\n if (today === deliveryDate) {\r\n const deliveryMessage =\r\n parseInt(startTimeHour, 10) < 14 && parseInt(currHour, 10) < 14\r\n ? `Delivery by Today ${dayjs(Date.now()).format('MMM D')}`\r\n : `Delivery by Tomorrow ${dayjs(date.setDate(date.getDate() + 1)).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n } else {\r\n const deliveryMessage = `Delivery by ${dayjs(item.SlotDate).format('MMM D')}`;\r\n deliveryDetails = {\r\n deliveryByMessage: deliveryMessage,\r\n locationId: item.Location1!\r\n };\r\n }\r\n }\r\n return deliveryDetails;\r\n};\r\n\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\n// import { ICategoryPath, ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\r\nimport { getCategoryPathsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { CategoryPathLookup, CategoryPathResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { hasArray } from '../Utilities/emtpyChecker';\r\n\r\n/**\r\n * Category path input\r\n */\r\nexport class GetCategoryPathsInput implements IActionInput {\r\n public readonly ChannelId: number;\r\n public CatalogId?: number;\r\n public productIds?: number[];\r\n // public readonly categoryPathLooksups: CategoryPathLookup[];\r\n public readonly apiSettings: ICommerceApiSettings;\r\n // @ts-ignore\r\n private constructedCacheKey: string | undefined;\r\n\r\n constructor(context: IRequestContext, catalogId?: number, productIds?: number[]) {\r\n this.ChannelId = context.apiSettings.channelId;\r\n this.CatalogId = catalogId; // context.apiSettings.catalogId || 0;\r\n this.productIds = productIds;\r\n // this.categoryPathLooksups = categoryPathLooksups;\r\n this.apiSettings = context.apiSettings;\r\n this.constructedCacheKey = '';\r\n // categoryPathLooksups.forEach(categoryPath=> {\r\n // this.constructedCacheKey+=`${categoryPath.ProductId && categoryPath.ProductId.toString()}|`;\r\n // });\r\n this.constructedCacheKey = this.productIds?.map(ids => ids).join('-').toString();\r\n this.constructedCacheKey += `${this.ChannelId?.toString()}|`;\r\n this.constructedCacheKey += `${this.CatalogId?.toString()}|`;\r\n }\r\n\r\n public getCacheKey = () => `MFRMProductCategoryPath-${this.constructedCacheKey}`;\r\n public getCacheObjectType = () => 'MFRMProductCategoryPath';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the getCategoryPath retail api call\r\n */\r\nexport const createGetCategoryPathsInput = (\r\n inputData: GetCategoryPathsInput,\r\n context: ICreateActionContext>\r\n): IActionInput => {\r\n const productId = inputData.productIds;\r\n if (productId) {\r\n return new GetCategoryPathsInput(context.requestContext, inputData.CatalogId, inputData.productIds);\r\n } else {\r\n throw new Error('Unable to create SelectedVariantInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the category path for a product\r\n */\r\nexport async function getProductsCategoryPathsAction(input: GetCategoryPathsInput, ctx: IActionContext): Promise {\r\n const catPaths: CategoryPathLookup[] = [];\r\n if (!hasArray(input.productIds)) {\r\n return [];\r\n }\r\n for (let productsIter = 0; productsIter < input.productIds!.length; productsIter++) {\r\n catPaths.push({ ProductId: input.productIds![productsIter] });\r\n }\r\n try {\r\n return await getCategoryPathsAsync({ callerContext: ctx, queryResultSettings: { Paging: { Top: input.productIds!.length }, Sorting: {} } }, input.ChannelId, input.CatalogId!, catPaths);\r\n } catch (err) {\r\n console.log(err);\r\n return [];\r\n }\r\n}\r\n\r\nexport const getCategoryPathsActionDataAction = createObservableDataAction({\r\n id: 'GetMFRMProductsCategoryPaths',\r\n action: >getProductsCategoryPathsAction,\r\n input: createGetCategoryPathsInput\r\n});\r\n\r\nexport default getCategoryPathsActionDataAction;\r\n","// tslint:disable\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/**\r\n * MFITryInStore entity interface.\r\n */\r\nexport interface IMFITryInStore {\r\n ZipCode?: string;\r\n StoreId: string;\r\n Products?: string;\r\n Limit: number;\r\n Radius: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n}\r\n\r\n/**\r\n * MFITryInStoreInfoResponse entity interface.\r\n */\r\nexport interface IMFITryInStoreInfoResponse {\r\n Status?: string;\r\n Message?: string;\r\n StoreId?: string;\r\n Inventory?: string[];\r\n}\r\n\r\n/**\r\n * MFITryInStore entity class.\r\n */\r\nexport class MFITryInStoreExtensionClass implements IMFITryInStore {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ZipCode: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StoreId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Products: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Limit: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Radius: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ZipCode = odataObject.ZipCode;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StoreId = odataObject.StoreId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Products = odataObject.Products;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Limit = odataObject.Limit;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Radius = odataObject.Radius;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (let i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n let className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat('Class');\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * MFITryInStoreInfoResponse entity class.\r\n */\r\nexport class MFITryInStoreInfoResponseExtensionClass implements IMFITryInStoreInfoResponse {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Status: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StoreId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Inventory: string[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Status = odataObject.Status;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StoreId = odataObject.StoreId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory = undefined;\r\n if (odataObject.Inventory) {\r\n this.Inventory = [];\r\n for (let i = 0; i < odataObject.Inventory.length; i++) {\r\n if (odataObject.Inventory[i]) {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory[i] = odataObject.Inventory[i];\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Inventory[i] = undefined;\r\n }\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 * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n// tslint:disable\r\nimport { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n// @ts-ignore\r\nimport * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as DataServiceEntities from './TryInStoreDataServiceEntities.g';\r\n\r\n// @ts-ignore\r\nfunction tryInStoresQuery(storeId?: string): DataServiceQuery {\r\n const key = storeId ? { StoreId: storeId } : null;\r\n return new DataServiceQuery('TryInStores', 'MFITryInStore', DataServiceEntities.MFITryInStoreExtensionClass, key);\r\n}\r\n\r\nexport function createMFIGetTryInStoreInfoInput(tryInStoreProductIDs: DataServiceEntities.IMFITryInStore): IDataServiceRequest {\r\n const query = tryInStoresQuery();\r\n return query.createDataServiceRequestForOperation(\r\n 'MFIGetTryInStoreInfo',\r\n true,\r\n DataServiceEntities.MFITryInStoreInfoResponseExtensionClass,\r\n 'false',\r\n { bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFITryInStoreInfoResponse' },\r\n { tryInStoreProductIDs: tryInStoreProductIDs }\r\n );\r\n}\r\n\r\nexport function mFIGetTryInStoreInfoAsync(\r\n context: IContext,\r\n tryInStoreProductIDs: DataServiceEntities.IMFITryInStore\r\n): AsyncResult {\r\n const request = createMFIGetTryInStoreInfoInput(tryInStoreProductIDs);\r\n return callActionOrExecute(request, context.callerContext);\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { mFIGetTryInStoreInfoAsync } from './TryInStoreDataActionExtension.g';\r\nimport { IMFITryInStore, IMFITryInStoreInfoResponse } from './TryInStoreDataServiceEntities.g';\r\n\r\n/**\r\n * GetTryInStoreInfo Input Action\r\n */\r\n\r\nexport class GetTryInStoreInfoInput implements Msdyn365.IActionInput {\r\n // Construct the input needed to run the action\r\n public input: IMFITryInStore;\r\n constructor(input: IMFITryInStore) {\r\n this.input = input;\r\n }\r\n\r\n // Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n public getCacheKey = () =>\r\n `Try-In-Store${this.input.StoreId}-${this.input.ZipCode}-${this.input.Radius}-${this.input.Limit}-${this.input.Products}`;\r\n public getCacheObjectType = () => 'GetTryInStoreInfo';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\n// const createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n// return new GetTryInStoreInfoInput();\r\n// };\r\n\r\n/**\r\n * Use this function to call your action and process the results as needed\r\n */\r\nasync function getTryInStoreAction(\r\n request: GetTryInStoreInfoInput,\r\n ctx: Msdyn365.IActionContext\r\n): Promise {\r\n if (request.input) {\r\n try {\r\n const result = await mFIGetTryInStoreInfoAsync({ callerContext: ctx }, request.input);\r\n if (result) {\r\n return result;\r\n }\r\n } catch (error) {\r\n console.log('Error', error);\r\n }\r\n }\r\n return {};\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getTryInStoreAction,\r\n // Give your data action a unique id\r\n id: 'GetTryInStoreInfo'\r\n // input: createInput\r\n // Uncomment the below line if this is a meant to be a batched data action\r\n // isBatched: true\r\n});\r\n","import MsDyn365, {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IStoreSelectorState } from './store-selector-state';\r\n/**\r\n * storeSelectorState - action input\r\n */\r\nexport class StoreSelectorStateInput implements IActionInput {\r\n public getCacheKey = () => `storeSelectorState`;\r\n public getCacheObjectType = () => 'storeSelectorState';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * StoreSelectorStateInput - action\r\n */\r\nexport async function storeSelectorStateAction(input: StoreSelectorStateInput, ctx: IActionContext): Promise {\r\n const prefferedStore: OrgUnitLocation =\r\n MsDyn365.isBrowser && localStorage.getItem('_mfrm__prefferedStore_')\r\n ? JSON.parse(localStorage.getItem('_mfrm__prefferedStore_') || '')\r\n : {};\r\n return { isModalOpen: false, prefferedStore: prefferedStore };\r\n}\r\n\r\n/**\r\n * StoreSelectorStateInput - create new input for create action\r\n */\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n return new StoreSelectorStateInput();\r\n};\r\n\r\n/**\r\n * StoreSelectorStateInput - create action\r\n */\r\nexport default createObservableDataAction({\r\n id: 'StoreSelectorState',\r\n action: >storeSelectorStateAction,\r\n input: createInput\r\n});\r\n","\r\n // tslint:disable\r\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n import * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdParameters entity interface.\r\n */\r\n export interface IMFIGetProductRecommendationByStoreIdParameters {\r\n StoreId?: string;\r\n NumberOfProducts: number;\r\n Id?: number;\r\n ExtensionProperties?: Entities.CommerceProperty[];\r\n }\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdResponse entity interface.\r\n */\r\n export interface IMFIGetProductRecommendationByStoreIdResponse {\r\n ProuctdRecommendationsData?: Entities.ProductSearchResult[];\r\n Message?: string;\r\n }\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdParameters entity class.\r\n */\r\n export class MFIGetProductRecommendationByStoreIdParametersExtensionClass implements IMFIGetProductRecommendationByStoreIdParameters {\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public StoreId: string;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public NumberOfProducts: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Id: number;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ExtensionProperties: Entities.CommerceProperty[];\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.StoreId = odataObject.StoreId;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.NumberOfProducts = odataObject.NumberOfProducts;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Id = odataObject.Id;\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties = undefined;\r\n if (odataObject.ExtensionProperties) {\r\n this.ExtensionProperties = [];\r\n for (var i = 0; i < odataObject.ExtensionProperties.length; i++) {\r\n if (odataObject.ExtensionProperties[i]) {\r\n if (odataObject.ExtensionProperties[i]['@odata.type']) {\r\n var className: string = odataObject.ExtensionProperties[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ExtensionProperties[i] = new EntityClasses[className](odataObject.ExtensionProperties[i]);\r\n }\r\n } else {\r\n this.ExtensionProperties[i] = new EntityClasses.CommercePropertyClass(odataObject.ExtensionProperties[i]);\r\n }\r\n\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ExtensionProperties[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n /**\r\n * MFIGetProductRecommendationByStoreIdResponse entity class.\r\n */\r\n export class MFIGetProductRecommendationByStoreIdResponseExtensionClass implements IMFIGetProductRecommendationByStoreIdResponse {\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public ProuctdRecommendationsData: Entities.ProductSearchResult[];\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n public Message: string;\r\n\r\n // Navigation properties names\r\n\r\n /**\r\n * Construct an object from odata response.\r\n * @param {any} odataObject The odata result object.\r\n */\r\n constructor(odataObject?: any) {\r\n odataObject = odataObject || {};\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ProuctdRecommendationsData = undefined;\r\n if (odataObject.ProuctdRecommendationsData) {\r\n this.ProuctdRecommendationsData = [];\r\n for (var i = 0; i < odataObject.ProuctdRecommendationsData.length; i++) {\r\n if (odataObject.ProuctdRecommendationsData[i]) {\r\n if (odataObject.ProuctdRecommendationsData[i]['@odata.type']) {\r\n var className: string = odataObject.ProuctdRecommendationsData[i]['@odata.type'];\r\n className = className.substr(className.lastIndexOf('.') + 1).concat(\"Class\");\r\n if (EntityClasses[className]) {\r\n this.ProuctdRecommendationsData[i] = new EntityClasses[className](odataObject.ProuctdRecommendationsData[i]);\r\n }\r\n } else {\r\n this.ProuctdRecommendationsData[i] = new EntityClasses.ProductSearchResultClass(odataObject.ProuctdRecommendationsData[i]);\r\n }\r\n\r\n } else {\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.ProuctdRecommendationsData[i] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // @ts-ignore - TODO bug fix #23427261 - remove ts-ignore - https://microsoft.visualstudio.com/DefaultCollection/OSGS/_workitems/edit/23427261/\r\n this.Message = odataObject.Message;\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 * THIS FILE IS AN AUTOGENERATED TYPESCRIPT PROXY EXTENSION.\r\n * TO USE THIS FILE, IT MUST BE ADDED TO A D365COMMERCE APPLICATION\r\n */\r\n // tslint:disable\r\n import { AsyncResult, callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest } from '@msdyn365-commerce/retail-proxy';\r\n // @ts-ignore\r\n import * as EntityClasses from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\n import * as DataServiceEntities from './ProductRecommendationDataServiceEntities.g';\r\n\r\n // @ts-ignore\r\n function productRecommendationsQuery(id?: number): DataServiceQuery {\r\n const key = (id) ? { Id: id } :null;\r\n return new DataServiceQuery(\"ProductRecommendations\", \"MFIGetProductRecommendationByStoreIdParameters\", DataServiceEntities.MFIGetProductRecommendationByStoreIdParametersExtensionClass, key);\r\n }\r\n\r\n export function createMFIGetProductRecommendationByStoreIdInput(productRecommendationParam: DataServiceEntities.IMFIGetProductRecommendationByStoreIdParameters): IDataServiceRequest {\r\n const query = productRecommendationsQuery();\r\n return query.createDataServiceRequestForOperation('MFIGetProductRecommendationByStoreId', true, DataServiceEntities.MFIGetProductRecommendationByStoreIdResponseExtensionClass, 'false', {bypassCache: 'get', returnEntity: 'DataServiceEntities.IMFIGetProductRecommendationByStoreIdResponse'}, {productRecommendationParam: productRecommendationParam });\r\n }\r\n\r\n export function mFIGetProductRecommendationByStoreIdAsync(context: IContext, productRecommendationParam: DataServiceEntities.IMFIGetProductRecommendationByStoreIdParameters): AsyncResult {\r\n const request = createMFIGetProductRecommendationByStoreIdInput(productRecommendationParam);\r\n return callActionOrExecute(request, context.callerContext);\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, { RichTextComponent } from '@msdyn365-commerce/core';\r\n\r\nimport * as React from 'react';\r\nimport classname from 'classnames';\r\nimport { useInView } from 'react-intersection-observer';\r\n\r\ninterface IProductData {\r\n image: JSX.Element | null;\r\n price: number | undefined;\r\n carouselIndex: number;\r\n description: string | undefined;\r\n ratingComp: JSX.Element | null;\r\n promoBadge: JSX.Element | undefined;\r\n linkTo: string | undefined;\r\n productID: string | undefined;\r\n productCategory: string | undefined;\r\n productBrand: string | undefined;\r\n productVariant: string | undefined;\r\n enhancedEcommTracking: string | undefined;\r\n productListName: string | undefined;\r\n deliveryMessage: string | undefined;\r\n availableInStoreMessage: string | undefined;\r\n productInventoryLoadStatus: boolean;\r\n}\r\n\r\nexport default (props: IProductData) => {\r\n const styles = 'mfrm-recommendation-module__';\r\n\r\n const {\r\n image,\r\n description,\r\n promoBadge,\r\n linkTo,\r\n price,\r\n ratingComp,\r\n productBrand,\r\n productCategory,\r\n productID,\r\n carouselIndex,\r\n productVariant,\r\n enhancedEcommTracking,\r\n productListName,\r\n deliveryMessage,\r\n availableInStoreMessage,\r\n productInventoryLoadStatus\r\n } = props;\r\n\r\n const listProductName = productListName ? productListName : 'Most Popular Mattresses Module';\r\n\r\n const handleClick = () => {\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n //@ts-ignore\r\n utag.link({\r\n event: 'product-click',\r\n enhanced_action: 'product_click',\r\n event_category: 'ecommerce',\r\n event_action: 'product click',\r\n event_label: `${productID}: ${description}`,\r\n event_noninteraction: 'false',\r\n product_list_name: [listProductName],\r\n product_position: [carouselIndex + 1],\r\n product_id: [productID],\r\n product_name: [description],\r\n product_category: [productCategory],\r\n product_brand: [productBrand],\r\n product_variant: [productVariant]\r\n });\r\n }\r\n if (MsDyn365.isBrowser && linkTo) {\r\n window.location.href = linkTo;\r\n }\r\n };\r\n\r\n const productRecommendationref = React.useRef();\r\n const reviewRatingRef = React.useRef();\r\n\r\n React.useEffect(() => {\r\n productCategory && productRecommendationref.current && productRecommendationref.current.addEventListener('click', handleClick);\r\n if (Number(ratingComp?.props.ratingCount) === 0) {\r\n reviewRatingRef.current.style.visibility = \"hidden\";\r\n }\r\n }, [productCategory, ratingComp]);\r\n\r\n const [productRecommendationViewRef, inView] = useInView({\r\n triggerOnce: true,\r\n rootMargin: '25px'\r\n });\r\n\r\n const isProduct = enhancedEcommTracking === 'product';\r\n\r\n React.useEffect(() => {\r\n if (isProduct && inView && productCategory) {\r\n const pagePath = MsDyn365.isBrowser\r\n ? window.location.href.split(location.host)[1].includes('?')\r\n ? window.location.href.split(location.host)[1].split('?')[0]\r\n : window.location.href.split(location.host)[1]\r\n : '';\r\n //@ts-ignore\r\n utag.link({\r\n event: 'product-impression',\r\n event_category: 'ecommerce',\r\n event_action: 'product impression',\r\n event_label: `${pagePath}`,\r\n event_noninteraction: 'true',\r\n product_impression_list_name: [listProductName],\r\n product_impression_position: [carouselIndex + 1],\r\n product_impression_id: [productID],\r\n product_impression_name: [description],\r\n product_impression_category: [productCategory],\r\n product_impression_brand: [productBrand],\r\n product_impression_variant: [productVariant],\r\n product_impression_price: [price]\r\n });\r\n }\r\n }, [inView, productCategory]);\r\n\r\n const devlieryIndicator = deliveryMessage !== 'Delivery in 6+ Weeks' ?
\r\n :
;\r\n const availableInStoreIndicator = availableInStoreMessage?.slice(0, 9) === 'Available' ?
:\r\n availableInStoreMessage?.slice(0, 13) === 'Not available' ?
:\r\n null;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { ICoreContext, IRequestContext, IImageData, IImageSettings, IGridSettings, Image, IAny, IGeneric } from '@msdyn365-commerce/core';\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { mFIGetProductRecommendationByStoreIdAsync } from '../../actions/ProductRecommendationDataActionExtension.g';\r\nimport { AttributeValue, ProductSearchResult } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getOrgUnitLocationsByArea, GetOrgUnitLocationsByAreaInput, IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\r\nimport dayjs from 'dayjs';\r\nimport { observer } from 'mobx-react';\r\nimport { reaction, observable } from 'mobx';\r\nimport FeaturedSale from './featured-content';\r\nimport { RatingComponent } from '../../themes/mattressfirm/views/components/rating.component';\r\nimport { IMfrmProductRecommendationsData } from './mfrm-product-recommendations.data';\r\nimport { IMfrmProductRecommendationsProps } from './mfrm-product-recommendations.props.autogenerated';\r\nimport * as DataServiceEntities from '../../actions/ProductRecommendationDataServiceEntities.g';\r\nimport { GetCategoryPathsInput, getProductsCategoryPathsAction } from './../../actions/get-mfrm-products-category-paths.action';\r\nimport { IMFITryInStore, IMFITryInStoreInfoResponse } from '../../actions/TryInStoreDataServiceEntities.g';\r\nimport getTryInStoreAction, { GetTryInStoreInfoInput } from '../../actions/get-try-in-store-info.action';\r\nimport { buildProductBadge, parseBadgeData } from '../../Utilities/get-product-badge';\r\nimport { _getDeliveryDate } from '../../Utilities/product-search-result-utils';\r\nimport { getZipCode, getGeoLocationZipCode } from '../../Utilities/get-zipcode';\r\nimport { mFIATPInventoryPLPAsync } from '../../actions/BatchCoreProductDataActionExtension.g';\r\nimport { IMFIATPInventoryPLPResponse, IMFICartLine, IMFIDeliveryScheduleParameters } from '../../actions/BatchCoreProductDataServiceEntities.g';\r\nimport { getAttributeValuesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { BVRatingSummary } from '../../Utilities/components/BVRatingSummary';\r\nimport { removeSpecialChars } from '../../Utilities/allRegex';\r\nexport interface IMfrmProductRecommendationsViewProps extends IMfrmProductRecommendationsProps {\r\n carouselItems: React.ReactNode[] | null;\r\n}\r\nexport interface IFetchedCategoryIds {\r\n productId?: number;\r\n categoryId?: number;\r\n categoryName?: string;\r\n}\r\nexport interface IProductAvailability {\r\n productId?: string;\r\n deliveryMessage?: string;\r\n availableInStore?: boolean;\r\n}\r\n\r\nexport interface IproductInventoryData {\r\n StoreId?: string;\r\n productId?: string;\r\n availableInStore?: boolean;\r\n}\r\n\r\nexport interface IProductRecommendationState {\r\n categoryData: IFetchedCategoryIds[];\r\n productData: ProductSearchResult[] | undefined;\r\n productAvailabilityData: IProductAvailability[];\r\n productInventoryData: IproductInventoryData[];\r\n productInventoryLoadStatus: boolean;\r\n storeId: string;\r\n}\r\n@observer\r\nclass MfrmProductRecommendations extends React.PureComponent<\r\nIMfrmProductRecommendationsProps,\r\nIProductRecommendationState\r\n> {\r\n constructor(props: IMfrmProductRecommendationsProps) {\r\n super(props);\r\n\r\n this.state = {\r\n categoryData: [],\r\n productData: [],\r\n productAvailabilityData: [],\r\n productInventoryData: [],\r\n productInventoryLoadStatus: false,\r\n storeId: ''\r\n };\r\n }\r\n public async componentDidMount() {\r\n await this.getModuleData();\r\n\r\n const {\r\n data: { storeSelectorStateManager: storeSelectorStateManager }\r\n } = this.props;\r\n\r\n reaction(\r\n () => storeSelectorStateManager.result && storeSelectorStateManager.result.preferredStore?.StoreId,\r\n async () => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n await this.getModuleData();\r\n }\r\n );\r\n }\r\n\r\n public getModuleData = async (): Promise => {\r\n this.setState({\r\n categoryData: [],\r\n productData: [],\r\n productAvailabilityData: [],\r\n productInventoryLoadStatus: false\r\n });\r\n\r\n const getManualProductData = async () => {\r\n const actionContext = this.props.context.actionContext;\r\n const apiSettings = actionContext.requestContext.apiSettings;\r\n const pIds =\r\n this.props.config.featuredProductList &&\r\n this.props.config.featuredProductList.map(function (product) {\r\n return {\r\n ItemId: product.productID\r\n };\r\n });\r\n\r\n const pIdsSorted =\r\n this.props.config.featuredProductList &&\r\n this.props.config.featuredProductList.map(function (product) {\r\n return product.productID;\r\n });\r\n\r\n const searchCriteriaInput: any = {\r\n Context: {\r\n ChannelId: apiSettings.channelId,\r\n CatalogId: apiSettings.catalogId\r\n },\r\n IncludeAttributes: true,\r\n SkipVariantExpansion: true,\r\n SearchCondition: '*',\r\n ItemIds: pIds\r\n };\r\n\r\n const searchResult = await ProductsDataActions.searchByCriteriaAsync(\r\n { callerContext: actionContext },\r\n searchCriteriaInput\r\n );\r\n const sortedSearchResult = searchResult.sort((a, b) => pIdsSorted.indexOf(a.ItemId) - pIdsSorted.indexOf(b.ItemId));\r\n this.setState({ productData: sortedSearchResult });\r\n };\r\n\r\n const categoryNameFromSlug = (this.props?.data?.category?.result?.Name && this.props?.data?.category?.result?.Name) || '';\r\n const displayManualProduct = this.props?.config.displayMethod === 'manual';\r\n try {\r\n if (displayManualProduct) {\r\n await getManualProductData();\r\n } else {\r\n var productRecommendationParam: DataServiceEntities.IMFIGetProductRecommendationByStoreIdParameters =\r\n {\r\n NumberOfProducts: this.props.config.numberOfProducts,\r\n StoreId: await this.getStoreID()\r\n };\r\n await mFIGetProductRecommendationByStoreIdAsync(\r\n { callerContext: this.props.context.actionContext },\r\n productRecommendationParam\r\n ).then(async response => {\r\n if (response.ProuctdRecommendationsData && response.ProuctdRecommendationsData?.length > 3) {\r\n this.setState({ productData: response.ProuctdRecommendationsData });\r\n } else {\r\n await getManualProductData();\r\n }\r\n });\r\n }\r\n await this.getProductsCategories(this.props.context, this._getIsCategoryPage(), categoryNameFromSlug).then(result => {\r\n this.setState({\r\n categoryData: result\r\n });\r\n });\r\n await this.getStoreInventoryData();\r\n await this.getDeliveryMessageData();\r\n } catch (error) {\r\n console.error('Error loading Product Recommendation Module');\r\n }\r\n };\r\n\r\n public getStoreInventoryData = async (): Promise => {\r\n const { context: { app, actionContext } } = this.props;\r\n const ZipCode = getZipCode(actionContext) || '';\r\n const products = this.state.productData;\r\n const result: IproductInventoryData[] = [];\r\n const StoreId = await this.getStoreID() || '';\r\n\r\n products?.map(async (product) => {\r\n const { AttributeValues, ItemId } = product;\r\n const itemLinesArray: IMFICartLine[] = [];\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n const itemLine: IMFICartLine = {\r\n ItemId: ItemId,\r\n Quantity: 1,\r\n VariantRecordId: lowestPriceVariantRecordId\r\n };\r\n itemLinesArray.push(itemLine);\r\n\r\n const tryInStoreProductIDs: IMFITryInStore = {\r\n ZipCode,\r\n StoreId,\r\n Products: ItemId,\r\n Limit: app.config.tryInStoreLimit || 10,\r\n Radius: app.config.tryInStoreLookupRadius || 50\r\n };\r\n\r\n const getTryInStoreInfoInput = new GetTryInStoreInfoInput(tryInStoreProductIDs);\r\n await getTryInStoreAction(getTryInStoreInfoInput, actionContext).then(response => {\r\n const data: IMFITryInStoreInfoResponse = response;\r\n result.push({ StoreId: StoreId, productId: ItemId, availableInStore: data.Inventory && data.Inventory.length > 0 });\r\n });\r\n this.setState({ productInventoryData: result });\r\n });\r\n };\r\n public getDeliveryMessageData = async (): Promise => {\r\n const { context: { app, actionContext } } = this.props;\r\n const ZipCode = getZipCode(actionContext) || '';\r\n const products = this.state.productData;\r\n const result: IProductAvailability[] = [];\r\n const itemLinesArray: IMFICartLine[] = [];\r\n products?.map(async product => {\r\n const { AttributeValues, ItemId } = product;\r\n const shippingInformation = AttributeValues?.find(attr => attr.Name?.trim() === \"shippingInformation\");\r\n if (shippingInformation?.TextValue === \"Delivery\") {\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n const itemLine: IMFICartLine = {\r\n ItemId: ItemId,\r\n Quantity: 1,\r\n VariantRecordId: lowestPriceVariantRecordId!\r\n };\r\n itemLinesArray.push(itemLine);\r\n }\r\n });\r\n const requestBody: IMFIDeliveryScheduleParameters = {\r\n CustomerRequestTime: dayjs().format('MM/DD/YY HH:MM:ss'),\r\n Id: 0,\r\n InventoryType: 'Delivery',\r\n Weeks: 6,\r\n StoreId: '',\r\n NoOfPriorityDC: 0,\r\n RequestedDate: dayjs().format('MM/DD/YYYY'),\r\n ZipCode,\r\n ItemLines: itemLinesArray\r\n };\r\n await mFIATPInventoryPLPAsync({ callerContext: this.props.context.actionContext }, requestBody).then((response: IMFIATPInventoryPLPResponse) => {\r\n const ATPInventoryPLPData = response.ATPInventoryPLPData;\r\n ATPInventoryPLPData?.map(product => {\r\n result.push({ productId: product.ItemId, deliveryMessage: _getDeliveryDate(product).deliveryByMessage, availableInStore: false });\r\n });\r\n });\r\n this.setState({ productAvailabilityData: result, productInventoryLoadStatus: true });\r\n products?.map(async product => {\r\n const massterProductId = product.MasterProductId ? product.MasterProductId : 0;\r\n const productSpecificationData: AttributeValue[] = await getAttributeValuesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n massterProductId,\r\n this.props.context.request.apiSettings.channelId,\r\n 0\r\n );\r\n const shippingInformation = productSpecificationData.find(attr => attr.Name?.trim() === \"shippingInformation\");\r\n if (shippingInformation?.TextValue === \"Drop Ship\") {\r\n var foundIndex = result.findIndex(item => item.productId === product.ItemId);\r\n const leadTime = productSpecificationData.find(attr => attr.Name?.trim() === \"leadTime\");\r\n const date = new Date();\r\n const deliveryDate = date.setDate(date.getDate());\r\n let firstDeliveryDate = deliveryDate;\r\n let lastDeliveryDate = deliveryDate;\r\n let firstDayInt = (leadTime?.TextValue?.split(\"-\")[0] && parseInt(leadTime?.TextValue?.split(\"-\")[0], 10));\r\n let secondDayInt = leadTime?.TextValue?.split(\"-\")[1] && parseInt(leadTime?.TextValue?.split(\"-\")[1], 10);\r\n while (firstDayInt && firstDayInt > 0 && secondDayInt && secondDayInt > 0) {\r\n firstDeliveryDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(firstDeliveryDate).format('d') !== '0' && dayjs(firstDeliveryDate).format('d') !== '6') {\r\n firstDayInt--;\r\n secondDayInt--;\r\n }\r\n }\r\n while (secondDayInt && secondDayInt > 0) {\r\n lastDeliveryDate = date.setDate(date.getDate() + 1);\r\n if (dayjs(lastDeliveryDate).format('d') !== '0' && dayjs(lastDeliveryDate).format('d') !== '6') {\r\n secondDayInt--;\r\n }\r\n }\r\n const newDeliveryMessage = `Delivery by ${dayjs(firstDeliveryDate).format('MMM D')} to ${dayjs(lastDeliveryDate).format('MMM D')}`;\r\n if (result.length > 0 && foundIndex >= 0) {\r\n result[foundIndex].deliveryMessage = newDeliveryMessage;\r\n }\r\n this.setState({ productAvailabilityData: result });\r\n }\r\n });\r\n };\r\n\r\n @observable\r\n public getStoreID = async (): Promise => {\r\n const {\r\n context: { actionContext },\r\n data: { storeSelectorStateManager }\r\n } = this.props;\r\n let defaultStoreId: string | undefined;\r\n const storeObj = localStorage.getItem('_msdyn365__preferredStore_');\r\n const selectedStoreID = storeObj && JSON.parse(storeObj);\r\n\r\n if (selectedStoreID) {\r\n defaultStoreId = selectedStoreID.StoreId;\r\n } else {\r\n const zipCode = getGeoLocationZipCode(actionContext) || '';\r\n\r\n const location = await (await storeSelectorStateManager).geoLocate(zipCode, actionContext);\r\n const lat = location?.latitude || 0;\r\n const long = location?.longitude || 0;\r\n const calRadius = 50;\r\n const distanceUnitValue = 0;\r\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(lat, long, calRadius, distanceUnitValue);\r\n\r\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\r\n if (orgUnitLocations) {\r\n defaultStoreId =\r\n orgUnitLocations &&\r\n orgUnitLocations[0]?.OrgUnitAvailability &&\r\n orgUnitLocations[0].OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber;\r\n }\r\n }\r\n this.setState({ storeId: defaultStoreId ? defaultStoreId : '' });\r\n return defaultStoreId;\r\n };\r\n\r\n public getRatingAriaLabel = (rating?: number, ratingAriaLabel?: string): string => {\r\n if (rating && ratingAriaLabel) {\r\n const roundedRating = rating.toFixed(2);\r\n return format(ratingAriaLabel || '', roundedRating, '5');\r\n }\r\n return '';\r\n };\r\n\r\n public renderRating = (\r\n context: ICoreContext,\r\n typeName: string,\r\n id: string,\r\n avgRating?: number,\r\n totalRatings?: number,\r\n ariaLabel?: string\r\n ): JSX.Element | null => {\r\n if (avgRating && avgRating !== 0) {\r\n const numRatings = (totalRatings && totalRatings.toString()) || '0';\r\n const ratingAriaLabel = this.getRatingAriaLabel(avgRating, ariaLabel);\r\n\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n public _getIsCategoryPage(): boolean {\r\n const { context } = this.props;\r\n const requestContext = context && context.request;\r\n const pageType =\r\n requestContext.urlTokens.pageType === 'Category' || (requestContext.query && requestContext.query.categoryId)\r\n ? 'Category'\r\n : 'Search';\r\n return pageType?.toLowerCase() === 'search' ? false : true;\r\n }\r\n\r\n public getProductsCategories = async (\r\n context: ICoreContext>,\r\n isCategoryPage: boolean,\r\n categoryNameFromSlug: string | undefined\r\n ): Promise => {\r\n if (this.state.productData && this.state.productData.length > 0) {\r\n let catName: string | undefined = '';\r\n if (isCategoryPage) {\r\n catName = categoryNameFromSlug;\r\n }\r\n // VSI Customization End - 42859\r\n const productIds: number[] = [];\r\n this.state.productData.forEach(prod => {\r\n const prodId = prod.AttributeValues?.find(attr => attr.KeyName?.trim() === 'EcomLowestPriceVariantRec')?.TextValue;\r\n prodId && productIds.push(Number(prodId));\r\n });\r\n\r\n const catalogId = context.actionContext.requestContext.apiSettings.catalogId;\r\n const productsCategories = await getProductsCategoryPathsAction(\r\n new GetCategoryPathsInput(context.request, catalogId, productIds),\r\n context.actionContext\r\n );\r\n const categoryIds: IFetchedCategoryIds[] = [];\r\n for (let productCategoriesIter = 0; productCategoriesIter < productsCategories.length; productCategoriesIter++) {\r\n if (\r\n productsCategories[productCategoriesIter] &&\r\n productsCategories[productCategoriesIter].CategoryPath &&\r\n productsCategories[productCategoriesIter].CategoryPath!.length > 0\r\n ) {\r\n const catPath = productsCategories[productCategoriesIter].CategoryPath;\r\n const catPathSegments = catPath![0].Segments;\r\n if (catPathSegments && catPathSegments.length > 0) {\r\n const catId = catPathSegments.length > 0 ? catPathSegments[catPathSegments.length - 1].CategoryId : -1;\r\n if (!isCategoryPage) {\r\n catName = catPathSegments.length > 0 ? catPathSegments[catPathSegments.length - 1].CategoryName : '';\r\n }\r\n\r\n categoryIds.push({\r\n productId: productsCategories[productCategoriesIter].ProductId,\r\n categoryId: catId,\r\n categoryName: catName\r\n });\r\n }\r\n }\r\n }\r\n return categoryIds;\r\n }\r\n return [];\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n if (!this.state.productData) {\r\n return null;\r\n }\r\n\r\n const viewProps: IMfrmProductRecommendationsViewProps = {\r\n ...(this.props as IMfrmProductRecommendationsProps),\r\n carouselItems: this._getCarouselItems()\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _getCarouselItems = (): React.ReactNode[] | null => {\r\n const storeObj = MsDyn365.isBrowser && localStorage.getItem('_mfrm__prefferedStore_');\r\n let preferedStore;\r\n if (!storeObj) {\r\n const {\r\n data: {\r\n storeLocations: { result: storeLocations },\r\n availabilitiesWithHours: { result: availabilitiesWithHours }\r\n }\r\n } = this.props;\r\n\r\n let stores: IFullOrgUnitAvailability[];\r\n if (storeLocations) {\r\n stores = storeLocations;\r\n } else {\r\n stores = availabilitiesWithHours!;\r\n }\r\n preferedStore = stores && stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.state.storeId);\r\n }\r\n const selectedStoreCity = storeObj ? (JSON.parse(storeObj)).city : preferedStore ? preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.City : '';\r\n if (this.state.productData?.length === 0) {\r\n return null;\r\n }\r\n return this.state.productData!.map((product, index) => {\r\n const { Name, AverageRating, TotalRatings, Price, AttributeValues, PrimaryImageUrl, ItemId } = product;\r\n const { context, id, typeName, config } = this.props;\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === context.app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n const isMasterProduct = product.IsMasterProduct;\r\n if (isMasterProduct && lowestPriceVariantRecordId !== undefined && lowestPriceVariantRecordId !== '') {\r\n product.RecordId = parseInt(lowestPriceVariantRecordId, 10);\r\n }\r\n const queryBasedSelection = context.app.config.queryBasedVariantSelection;\r\n let productUrl = getProductPageUrlSync(\r\n removeSpecialChars(product?.Name!, this.props.context) || '',\r\n queryBasedSelection ? product.MasterProductId || product.RecordId : product.RecordId,\r\n context && context.actionContext,\r\n undefined\r\n );\r\n if (queryBasedSelection) {\r\n const variantIdQueryParams = productUrl.includes('?') ? `&variantid=${product.RecordId}` : `?variantid=${product.RecordId}`;\r\n productUrl += variantIdQueryParams;\r\n }\r\n\r\n const renderProductBadge = (\r\n attributeName: string | undefined,\r\n attributes: AttributeValue[] | undefined,\r\n requestContext: IRequestContext\r\n ): JSX.Element | undefined => {\r\n const badgeData =\r\n attributeName &&\r\n attributes?.find(\r\n currAttribute =>\r\n currAttribute.Name && currAttribute.Name.toLowerCase().trim() === attributeName.toLowerCase().trim()\r\n )?.TextValue;\r\n if (!badgeData) {\r\n return;\r\n }\r\n\r\n // split badge data into its separate badges\r\n const badges = badgeData.split(',');\r\n\r\n // parse badge data to get its schedule and image src\r\n const parsedBadges = badges.map(badge => parseBadgeData(badge, requestContext));\r\n // build product badge image components\r\n const finalizedBadges = parsedBadges.map(parsedBadge => parsedBadge && buildProductBadge(parsedBadge, requestContext));\r\n\r\n return finalizedBadges && <>{finalizedBadges};\r\n };\r\n\r\n const renderProductPlacementImage = (\r\n imageSettings?: IImageSettings,\r\n gridSettings?: IGridSettings,\r\n imageUrl?: string,\r\n altText?: string\r\n ): JSX.Element | null => {\r\n if (!imageUrl || !gridSettings || !imageSettings) {\r\n return null;\r\n }\r\n const img: IImageData = {\r\n src: imageUrl,\r\n altText: altText ? altText : ''\r\n };\r\n const imageProps = {\r\n gridSettings,\r\n imageSettings\r\n };\r\n imageProps.imageSettings.cropFocalRegion = true;\r\n return ;\r\n };\r\n\r\n const badgeAttributeToUse = context.app.config.productBadgeAttribute;\r\n const brand = AttributeValues?.find(attr => attr.KeyName?.trim() === 'VendorBrand')?.TextValue;\r\n const productVariant = AttributeValues?.find(attr => attr.Name?.trim() === 'ProductVariant')?.TextValue;\r\n\r\n const matchedDeliveryProduct = this.state.productAvailabilityData.find(item => item.productId === ItemId);\r\n const matchedInventoryProduct = this.state.productInventoryData.find(item => item.productId === ItemId);\r\n\r\n const deliveryInfomation = matchedDeliveryProduct?.deliveryMessage ?\r\n matchedDeliveryProduct?.deliveryMessage\r\n : 'Delivery in 6+ Weeks';\r\n\r\n const availableInStoreInformation = !selectedStoreCity ? undefined :\r\n matchedInventoryProduct?.availableInStore ? `Available to try in ${selectedStoreCity}` :\r\n `Not available to try in ${selectedStoreCity}`;\r\n\r\n return (\r\n : this.renderRating(context, id, typeName, AverageRating, TotalRatings, 'AriaLabel')}\r\n productBrand={brand}\r\n productCategory={this.state.categoryData[index]?.categoryName}\r\n productID={ItemId}\r\n productVariant={productVariant}\r\n enhancedEcommTracking={this.props.config.enhancedEcommTracking}\r\n productListName={this.props.config.productListName}\r\n deliveryMessage={deliveryInfomation}\r\n availableInStoreMessage={availableInStoreInformation}\r\n productInventoryLoadStatus={this.state.productInventoryLoadStatus}\r\n />\r\n );\r\n });\r\n };\r\n}\r\n\r\nexport default MfrmProductRecommendations;\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\nimport Carousel from 'mfcl/Carousel';\r\nimport * as React from 'react';\r\nimport _getViewPort from '../../Utilities/get-view-port';\r\nimport { IMfrmProductRecommendationsViewProps } from './mfrm-product-recommendations';\r\nimport { Image } from '@msdyn365-commerce/core';\r\n\r\nexport default (props: IMfrmProductRecommendationsViewProps) => {\r\n const styles = 'mfrm-recommendation-module__';\r\n const [loaded, setIsLoaded] = React.useState(false);\r\n const hideLoader = () => {\r\n setIsLoaded(true);\r\n };\r\n const { carouselItems } = props;\r\n const minDesktop = carouselItems && carouselItems.length === 4 ? 'min-desktop' : '';\r\n const mobile = _getViewPort(props.context) === 'sm';\r\n\r\n React.useEffect(hideLoader, []);\r\n return (\r\n carouselItems &&\r\n carouselItems.length > 3 && (\r\n <>\r\n {props.config.avatarImage &&
\r\n
\r\n {props.config.avatarImage && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n {props.config.heading &&
{props.config.heading.text}
}\r\n {props.config.subHeading && (\r\n
{props.config.subHeading.text}
\r\n )}\r\n {props.config.link && (\r\n \r\n {props.config.link?.linkText}\r\n \r\n )}\r\n
\r\n
\r\n
}\r\n
\r\n
\r\n {mobile ? (\r\n
\r\n \r\n {carouselItems}\r\n \r\n
\r\n ) : (\r\n \r\n {carouselItems}\r\n \r\n )}\r\n
\r\n
\r\n \r\n )\r\n );\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\n\r\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\r\n\r\nexport interface IRatingComponentProps extends IComponentProps<{}> {\r\n readOnly: boolean;\r\n ariaLabel: string;\r\n avgRating: number;\r\n ratingCount?: string;\r\n initialRating?: number;\r\n hideCount?: boolean;\r\n className?: string;\r\n onChange?(value: number): void;\r\n}\r\nexport interface IRatingComponent extends IComponent {\r\n onSliderChanged(): (\r\n event: React.ChangeEvent,\r\n props: IRatingComponentProps,\r\n setRating: (rating: IRatingState) => void\r\n ) => void;\r\n onMouseOver(): (event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void) => void;\r\n onClick(): (event: React.MouseEvent, props: IRatingComponentProps, setRating: (rating: IRatingState) => void) => void;\r\n onMouseLeave(): (event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void) => void;\r\n}\r\n\r\ninterface IRatingState {\r\n rating: number;\r\n lastSelectedRating: number;\r\n}\r\n\r\nconst roundUpMin: number = 0.75;\r\nconst roundMidMin: number = 0.25;\r\nconst maxRating: number = 5;\r\n\r\nconst RatingComponentActions = {\r\n onSliderChanged(\r\n event: React.ChangeEvent,\r\n props: IRatingComponentProps,\r\n setRating: (rating: IRatingState) => void\r\n ): void {\r\n const value = Number.parseInt(event.target.value, 10);\r\n setRating({ rating: value, lastSelectedRating: value });\r\n\r\n if (props.onChange) {\r\n props.onChange(value);\r\n }\r\n },\r\n onMouseLeave(_event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void): void {\r\n setRating({ rating: rating.lastSelectedRating, lastSelectedRating: rating.lastSelectedRating });\r\n },\r\n onMouseOver(event: React.MouseEvent, rating: IRatingState, setRating: (rating: IRatingState) => void): void {\r\n setRating({ rating: getIndex(event), lastSelectedRating: rating.lastSelectedRating });\r\n },\r\n onClick(event: React.MouseEvent, props: IRatingComponentProps, setRating: (rating: IRatingState) => void): void {\r\n if (!props.readOnly) {\r\n const index = getIndex(event);\r\n setRating({ rating: index, lastSelectedRating: index });\r\n\r\n if (props.onChange) {\r\n props.onChange(index);\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst Rating: React.FC = (props: IRatingComponentProps) => {\r\n const initialRating = props.readOnly ? props.avgRating : props.initialRating || 0;\r\n const [rating, setRating] = useState({ rating: initialRating, lastSelectedRating: initialRating });\r\n useEffect(() => {\r\n const newRating = props.readOnly ? props.avgRating : props.initialRating || 0;\r\n setRating({ rating: newRating, lastSelectedRating: newRating });\r\n }, [props]);\r\n const onChange = (event: React.ChangeEvent) => {\r\n RatingComponentActions.onSliderChanged(event, props, setRating);\r\n };\r\n const onMouseLeave = (event: React.MouseEvent) => {\r\n RatingComponentActions.onMouseLeave(event, rating, setRating);\r\n };\r\n const onMouseOver = (event: React.MouseEvent) => {\r\n RatingComponentActions.onMouseOver(event, rating, setRating);\r\n };\r\n const onClick = (event: React.MouseEvent) => {\r\n RatingComponentActions.onClick(event, props, setRating);\r\n };\r\n\r\n return (\r\n
0 ? 'msc-no-ratings' : ''} ${props.className ? props.className : ''}`}>\r\n {starControl(props.readOnly, rating.rating, props.ariaLabel, onChange)}\r\n
\r\n {renderStars(rating.rating, props, onMouseOver, onClick)}\r\n
\r\n {/* VSI Customization - START */}\r\n \r\n ({props.ratingCount})\r\n \r\n {/* VSI Customization - END */}\r\n
\r\n );\r\n};\r\n\r\n// Set default props\r\nRating.defaultProps = {\r\n avgRating: 0\r\n} as Partial;\r\n\r\nconst starControl = (\r\n readOnly: boolean,\r\n currentRating: number,\r\n ariaLabel: string,\r\n onChange: (event: React.ChangeEvent) => void\r\n): JSX.Element => {\r\n if (readOnly) {\r\n return
{ariaLabel}
;\r\n }\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst renderStars = (\r\n rating: number,\r\n props: IRatingComponentProps,\r\n mouseOver: (event: React.MouseEvent) => void,\r\n onClick: (event: React.MouseEvent) => void\r\n): JSX.Element[] => {\r\n const floor = Math.floor(rating);\r\n const remainder = rating - floor;\r\n const filled = remainder < roundUpMin ? floor : floor + 1;\r\n const half = roundMidMin <= remainder && remainder < roundUpMin ? filled + 1 : 0;\r\n const stars = [];\r\n\r\n for (let i = 1; i <= maxRating; i++) {\r\n const glyphClass = filled >= i ? 'msc-rating__star' : half === i ? 'msc-rating__half-star' : 'msc-rating__empty-star';\r\n stars.push(\r\n \r\n );\r\n }\r\n\r\n return stars;\r\n};\r\n\r\nconst getIndex = (event: React.MouseEvent): number => {\r\n const target = event.target as HTMLElement;\r\n return Number.parseInt(target.getAttribute('data-index')!, 10);\r\n};\r\n\r\n// @ts-ignore\r\nexport const RatingComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'Rating',\r\n { component: Rating, ...RatingComponentActions }\r\n);\r\n\r\nexport default RatingComponent;\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['mfrm-product-recommendations'] = {\n c: () => require('partner/modules/mfrm-product-recommendations/mfrm-product-recommendations.tsx'),\n $type: 'contentModule',\n da: [{name:'availabilitiesWithHours', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-full-available-inventory-nearby', runOn: 1},{name:'category', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category', runOn: 0},{name:'storeLocations', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-store-location-information', runOn: 1},{name:'storeSelectorState', path:'data-actions/store-selector-state-data-action', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-product-recommendations',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-product-recommendations'\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-current-category';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-current-category');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-full-available-inventory-nearby';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-full-available-inventory-nearby');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-store-location-information';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-store-location-information');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'data-actions/store-selector-state-data-action';\n let dataAction = require('partner/data-actions/store-selector-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|mfrm-product-recommendations|mfrm-product-recommendations'] = {\n c: () => require('partner/modules/mfrm-product-recommendations/mfrm-product-recommendations.view.tsx'),\n cn: '__local__-__local__-mfrm-product-recommendations'\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 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","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","'use strict';\nvar apply = require('../internals/function-apply');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar isRegExp = require('../internals/is-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar getMethod = require('../internals/get-method');\nvar arraySlice = require('../internals/array-slice-simple');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar fails = require('../internals/fails');\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\nvar MAX_UINT32 = 0xFFFFFFFF;\nvar min = Math.min;\nvar $push = [].push;\nvar exec = uncurryThis(/./.exec);\nvar push = uncurryThis($push);\nvar stringSlice = uncurryThis(''.slice);\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = toString(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return call(nativeSplit, string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = call(regexpExec, separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n push(output, stringSlice(string, lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !exec(separatorCopy, '')) push(output, '');\n } else push(output, stringSlice(string, lastLastIndex));\n return output.length > lim ? arraySlice(output, 0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.es/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT);\n return splitter\n ? call(splitter, separator, O, limit)\n : call(internalSplit, toString(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (string, limit) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);\n\n if (res.done) return res.value;\n\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (UNSUPPORTED_Y ? 'g' : 'y');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;\n var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n push(A, stringSlice(S, p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n push(A, z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n push(A, stringSlice(S, p));\n return A;\n }\n ];\n}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);\n","module.exports = React;","module.exports = ReactDOM;"],"names":["emailRegex","emailValue","test","removeSpecialChars","str","ctx","request","app","config","removeSpecialCharsPDP","replace","removeSpecialCharsFromURLPath","decodeURIComponent","split","inputRegexObj","nameRegex","addressInputRegex","BVRatingSummary","itemId","onClick","variantId","hideReadReviewsButton","dataBvProductIdAttr","setDataBvProductIdAttr","useState","wrapper","useRef","interval","numReviews","setNumReviews","useEffect","pollInterval","window","setInterval","numReviewsHTML","current","querySelector","innerHTML","match","clearInterval","style","display","React","onMouseEnter","button","Array","from","document","querySelectorAll","find","outerHTML","onMouseLeave","ref","hasArray","values","length","undefined","async","context","isCached","getDeliveryMessageActionInput","GetDeliveryMessageInput","result","getDeliveryMessageAction","actionContext","error","console","log","dayjs","tz","utc","isBetween","format","defaultImageSettings","viewports","xs","q","w","h","disableLazyLoad","parseBadgeData","badgeData","requestContext","dataSegments","scheduleStart","scheduleEnd","badgeType","parsedScheduleStart","startDate","startTime","parsedScheduleEnd","endDate","endTime","e","startMoment","endMoment","startMomentFormatted","endMomentFormatted","isValid","baseUrl","apiSettings","baseImageUrl","substring","removed$","src","toLowerCase","alt","start","convertTimeZone","end","time","local","buildProductBadge","parsedBadgeData","Image","className","gridSettings","altText","title","imageSettings","renderProductBadge","attributeName","finalizedBadges","map","badge","parsedBadge","MsDyn365","innerWidth","sm","md","lg","_getEyebrowMessage","products","priceGroupForAPICall","priceGroup","items","item","singleItem","ItemId","DistinctProductVariant","push","requestBody","PriceGroup","Items","getEyebrowMessageInput","GetEyebrowMessageInput","getEyebrowAction","_makeDeliveryMessage","days","deliveryByMessage","date","Date","daysSpan","deliveryDate","now","deliveryByMessageRange","parseInt","numberOfDays","newDate","setDate","getDate","flag","_setTime","temp","newDatewithTime","toUpperCase","_getSoonestDeliveryDate","coreProductATPData","deliveryDetails","locationId","index","Available","ATPQuantity","today","SlotDate","currHour","StartTime","Location1","_getDeliveryDate","startTimeHour","GetCategoryPathsInput","constructor","catalogId","productIds","getCacheKey","this","constructedCacheKey","getCacheObjectType","dataCacheType","ChannelId","channelId","CatalogId","ids","join","toString","createGetCategoryPathsInput","inputData","Error","getProductsCategoryPathsAction","input","catPaths","productsIter","ProductId","getCategoryPathsAsync","callerContext","queryResultSettings","Paging","Top","Sorting","err","getCategoryPathsActionDataAction","createObservableDataAction","id","action","MFITryInStoreExtensionClass","odataObject","ZipCode","StoreId","Products","Limit","Radius","ExtensionProperties","i","substr","lastIndexOf","concat","EntityClasses","MFITryInStoreInfoResponseExtensionClass","Status","Message","Inventory","createMFIGetTryInStoreInfoInput","tryInStoreProductIDs","storeId","key","DataServiceQuery","DataServiceEntities","tryInStoresQuery","createDataServiceRequestForOperation","bypassCache","returnEntity","GetTryInStoreInfoInput","Msdyn365","callActionOrExecute","mFIGetTryInStoreInfoAsync","StoreSelectorStateInput","storeSelectorStateAction","isModalOpen","prefferedStore","localStorage","getItem","JSON","parse","MFIGetProductRecommendationByStoreIdParametersExtensionClass","NumberOfProducts","Id","MFIGetProductRecommendationByStoreIdResponseExtensionClass","ProuctdRecommendationsData","createMFIGetProductRecommendationByStoreIdInput","productRecommendationParam","productRecommendationsQuery","props","styles","image","description","promoBadge","linkTo","price","ratingComp","productBrand","productCategory","productID","carouselIndex","productVariant","enhancedEcommTracking","productListName","deliveryMessage","availableInStoreMessage","productInventoryLoadStatus","listProductName","handleClick","utag","link","event","enhanced_action","event_category","event_action","event_label","event_noninteraction","product_list_name","product_position","product_id","product_name","product_category","product_brand","product_variant","location","href","productRecommendationref","reviewRatingRef","addEventListener","Number","ratingCount","visibility","productRecommendationViewRef","inView","useInView","triggerOnce","rootMargin","isProduct","pagePath","host","includes","product_impression_list_name","product_impression_position","product_impression_id","product_impression_name","product_impression_category","product_impression_brand","product_impression_variant","product_impression_price","devlieryIndicator","availableInStoreIndicator","slice","classname","RichTextComponent","text","MfrmProductRecommendations","super","getModuleData","setState","categoryData","productData","productAvailabilityData","getManualProductData","pIds","featuredProductList","product","pIdsSorted","searchCriteriaInput","Context","IncludeAttributes","SkipVariantExpansion","SearchCondition","ItemIds","sortedSearchResult","ProductsDataActions","sort","a","b","indexOf","categoryNameFromSlug","data","category","Name","displayManualProduct","displayMethod","numberOfProducts","getStoreID","mFIGetProductRecommendationByStoreIdAsync","then","response","getProductsCategories","_getIsCategoryPage","getStoreInventoryData","getDeliveryMessageData","getZipCode","state","AttributeValues","lowestPriceVariantRecordId","attr","trim","EcomLowestPriceVariantRecIdKey","TextValue","Quantity","VariantRecordId","tryInStoreLimit","tryInStoreLookupRadius","getTryInStoreInfoInput","getTryInStoreAction","productId","availableInStore","productInventoryData","itemLinesArray","shippingInformation","itemLine","CustomerRequestTime","InventoryType","Weeks","NoOfPriorityDC","RequestedDate","ItemLines","mFIATPInventoryPLPAsync","ATPInventoryPLPData","massterProductId","MasterProductId","productSpecificationData","getAttributeValuesAsync","foundIndex","findIndex","leadTime","firstDeliveryDate","lastDeliveryDate","firstDayInt","secondDayInt","newDeliveryMessage","storeSelectorStateManager","defaultStoreId","storeObj","selectedStoreID","zipCode","getGeoLocationZipCode","geoLocate","lat","latitude","long","longitude","calRadius","distanceUnitValue","orgUnitLocationsInput","GetOrgUnitLocationsByAreaInput","orgUnitLocations","getOrgUnitLocationsByArea","OrgUnitAvailability","OrgUnitLocation","OrgUnitNumber","getRatingAriaLabel","rating","ratingAriaLabel","roundedRating","toFixed","renderRating","typeName","avgRating","totalRatings","ariaLabel","numRatings","RatingComponent","readOnly","isCategoryPage","catName","forEach","prod","prodId","KeyName","productsCategories","categoryIds","productCategoriesIter","CategoryPath","catPathSegments","Segments","catId","CategoryId","CategoryName","categoryId","categoryName","_getCarouselItems","preferedStore","storeLocations","availabilitiesWithHours","stores","store","selectedStoreCity","city","City","AverageRating","TotalRatings","Price","PrimaryImageUrl","IsMasterProduct","RecordId","queryBasedSelection","queryBasedVariantSelection","productUrl","getProductPageUrlSync","variantIdQueryParams","badgeAttributeToUse","productBadgeAttribute","brand","matchedDeliveryProduct","matchedInventoryProduct","deliveryInfomation","availableInStoreInformation","FeaturedSale","imageUrl","img","imageProps","cropFocalRegion","loadFailureBehavior","renderProductPlacementImage","URL","attributes","currAttribute","showBVRatings","reaction","preferredStore","pageType","urlTokens","query","render","viewProps","carouselItems","renderView","__decorate","observable","observer","loaded","setIsLoaded","minDesktop","mobile","_getViewPort","avatarImage","heading","subHeading","linkUrl","destinationUrl","target","openInNewTab","linkText","Carousel","itemsToShow","hideIndicators","hideControls","disableControls","disableAutoShift","controlStyle","controlClass","disableEndButtons","variableWidth","responsive","breakpoint","layoutGap","RatingComponentActions","onSliderChanged","setRating","value","lastSelectedRating","onChange","_event","onMouseOver","getIndex","Rating","initialRating","newRating","starControl","renderStars","tabIndex","defaultProps","currentRating","type","min","max","step","mouseOver","floor","Math","remainder","filled","half","stars","glyphClass","role","getAttribute","msdyn365Commerce","component","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","_readFromToCookie","storeInfo","_context","selectedStoreLocationId","storeName","writeToCookie","StoreName","Latitude","Longitude","_writeToCookie","stringify","lastInlineShownStoreInfo","_removeCookie","removeItem","setItem","cookieValue","computed","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","script","createElement","setAttribute","remove","resourceSets","resources","point","coordinates","body","appendChild","StringExtensions","getElementById","url","lang","market","reject","defer","mapAPIReady","isMapApiLoaded","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","getGenericAction","call","fixRegExpWellKnownSymbolLogic","anObject","isNullOrUndefined","toLength","requireObjectCoercible","getMethod","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","RegExp","string","rx","S","res","done","global","fullUnicode","unicode","lastIndex","A","matchStr","apply","uncurryThis","isRegExp","speciesConstructor","arraySlice","callRegExpExec","regexpExec","stickyHelpers","fails","UNSUPPORTED_Y","MAX_UINT32","$push","exec","stringSlice","SPLIT","nativeSplit","internalSplit","separator","limit","lim","lastLength","output","flags","ignoreCase","multiline","sticky","lastLastIndex","separatorCopy","source","splitter","C","unicodeMatching","z","re","originalExec","arguments","module","exports","ReactDOM"],"sourceRoot":""}