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AAV+O,EAAsBX,EAAaW,IAAU,EACvD,GAAY,IAARC,EAAW,MAAO,GACtB,GAAiB,IAAbhC,EAAE/M,OAAc,OAAuC,OAAhC8N,EAAe2B,EAAU1C,GAAc,CAACA,GAAK,GAIxE,IAHA,IAAItB,EAAI,EACJmE,EAAI,EACJrC,EAAI,GACDqC,EAAI7C,EAAE/M,QAAQ,CACnByP,EAASpC,UAAYa,EAAgB,EAAI0B,EACzC,IACIpT,EADAqT,EAAI/B,EAAe2B,EAAUvB,EAAgBM,EAAYzB,EAAG6C,GAAK7C,GAErE,GACQ,OAAN8C,IACCrT,EAAI4R,EAAIlC,EAASuD,EAASpC,WAAaa,EAAgB0B,EAAI,IAAK7C,EAAE/M,WAAayL,EAEhFmE,EAAIvD,EAAmBU,EAAG6C,EAAGD,OACxB,CAEL,GADA/N,EAAK2L,EAAGiB,EAAYzB,EAAGtB,EAAGmE,IACtBrC,EAAEvN,SAAW+O,EAAK,OAAOxB,EAC7B,IAAK,IAAIuC,EAAI,EAAGA,GAAKD,EAAE7P,OAAS,EAAG8P,IAEjC,GADAlO,EAAK2L,EAAGsC,EAAEC,IACNvC,EAAEvN,SAAW+O,EAAK,OAAOxB,EAE/BqC,EAAInE,EAAIjP,GAIZ,OADAoF,EAAK2L,EAAGiB,EAAYzB,EAAGtB,IAChB8B,QA3H4BU,GAAM,WAE7C,IAAI8B,EAAK,OACLC,EAAeD,EAAGxB,KACtBwB,EAAGxB,KAAO,WAAc,OAAOyB,EAAavC,MAAM7E,KAAMqH,YACxD,IAAI3C,EAAS,KAAK9N,MAAMuQ,GACxB,OAAyB,IAAlBzC,EAAOtN,QAA8B,MAAdsN,EAAO,IAA4B,MAAdA,EAAO,MAwHrBY,UC5JvCgC,EAAOC,QAAUpK,cCAjBmK,EAAOC,QAAUC","sources":["webpack://mattressfirm/./src/Utilities/analytics/clickTrack.ts?bce2","webpack://mattressfirm/./src/Utilities/analytics/htmlToText.ts?c3c7","webpack://mattressfirm/./src/Utilities/analytics/promotionClickTrack.ts?a0bd","webpack://mattressfirm/./src/Utilities/analytics/utagCaller.ts?3814","webpack://mattressfirm/./src/Utilities/countdown-schedule.ts?0d48","webpack://mattressfirm/./src/Utilities/get-view-port.tsx?4210","webpack://mattressfirm/./src/Utilities/plp-url-utils.ts?728b","webpack://mattressfirm/./src/modules/mfrm-content-reel/featured-content.tsx?a852","webpack://mattressfirm/./src/modules/mfrm-content-reel/analytics.ts?8605","webpack://mattressfirm/./src/modules/mfrm-content-reel/mfrm-content-reel.tsx?8e5e","webpack://mattressfirm/./src/modules/mfrm-content-reel/mfrm-content-reel.view.tsx?8a1b","webpack://mattressfirm/./lib/mfrm-content-reel/module-registration.js?f65c","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 { callUtagLink } from \"./utagCaller\";\r\n\r\nexport interface IUtagPromoConfig {\r\n promotion_impression_name?: string[];\r\n promotion_impression_id?: string[];\r\n promotion_impression_creative?: string[];\r\n promotion_impression_position?: (string | undefined)[];\r\n promotion_name?: string[];\r\n promotion_id?: string[];\r\n promotion_creative?: string[];\r\n promotion_position?: (string | undefined)[];\r\n}\r\n\r\nexport interface IUtagGeneralConfig {\r\n enhanced_action?: string | undefined;\r\n}\r\nexport interface ICustomerConfig {\r\n customer_email?: string;\r\n}\r\nexport interface IProductConfig {\r\n product_id?: string[];\r\n product_name?: string[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n product_list_name?: string[];\r\n product_position?: (number | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n checkout_step?: string;\r\n}\r\nexport interface IProductImpressionConfig {\r\n product_impression_brand?: (string | undefined)[];\r\n product_impression_list_name?: (string | undefined)[];\r\n product_impression_id?: string[];\r\n product_impression_name?: string[];\r\n product_impression_category?: string[];\r\n product_impression_variant?: (string | undefined)[];\r\n product_impression_position?: number[];\r\n product_impression_price?: number[];\r\n}\r\nexport interface IAnalyticsConfiguration {\r\n event?: string | null;\r\n eventName?: string | null;\r\n eventCategory?: string | null;\r\n eventAction?: string | null;\r\n eventLabel?: string | null;\r\n eventType?: string | null;\r\n eventNoninteraction?: string;\r\n enhancedAction?: string | null;\r\n searchTerm?: string | undefined | null;\r\n searchType?: string | undefined | null;\r\n generalConfig?: IUtagGeneralConfig;\r\n promoConfig?: IUtagPromoConfig;\r\n productConfig?: IProductConfig;\r\n customerConfig?: ICustomerConfig;\r\n productImpressionConfig?: IProductImpressionConfig;\r\n}\r\n\r\nexport const fireAnalyticsLink = ({\r\n searchTerm = null,\r\n searchType = null,\r\n eventName = null,\r\n eventCategory = null,\r\n eventAction = null,\r\n eventLabel = null,\r\n eventType = null,\r\n eventNoninteraction = 'false',\r\n enhancedAction = null,\r\n generalConfig = {},\r\n promoConfig = {},\r\n productConfig = {},\r\n customerConfig = {},\r\n productImpressionConfig = {}\r\n}: IAnalyticsConfiguration) => {\r\n void callUtagLink({\r\n ...generalConfig,\r\n ...promoConfig,\r\n ...productConfig,\r\n ...customerConfig,\r\n ...productImpressionConfig,\r\n event: eventName,\r\n event_category: eventCategory,\r\n event_action: eventAction,\r\n event_label: eventLabel,\r\n event_type: eventType,\r\n event_noninteraction: eventNoninteraction,\r\n enhanced_action: enhancedAction,\r\n search_term: searchTerm,\r\n search_type: searchType\r\n });\r\n};","\r\n// Convert Rich Text inner text to string for analytics tagging\r\n\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const htmltoText = (html: string) => {\r\n if(MsDyn365.isBrowser) {\r\n // Create a new div element\r\n const tempDivElement = document.createElement('div');\r\n\r\n // Set the HTML content with the given value\r\n // tslint:disable-next-line: no-inner-html\r\n tempDivElement.innerHTML = html;\r\n\r\n // Retrieve the text property of the element\r\n return tempDivElement.textContent || tempDivElement.innerText || '';\r\n } else {\r\n return '';\r\n }\r\n};","import { fireAnalyticsLink } from './clickTrack';\r\n\r\ninterface IPromotionConfigs {\r\n eventLabel: string;\r\n promotionName: string[];\r\n promotionId: string[];\r\n promotionCreative: string[];\r\n promotionPosition: (string | undefined)[];\r\n}\r\n\r\nexport const firePromotionImpression = ({ eventLabel = '', promotionName = [], promotionId = [], promotionCreative = [], promotionPosition = [] }: IPromotionConfigs) => {\r\n fireAnalyticsLink({\r\n eventName: 'promotion-impression',\r\n eventCategory: 'ecommerce',\r\n eventAction: 'promotion impression',\r\n eventLabel: eventLabel,\r\n eventNoninteraction: 'true',\r\n promoConfig: {\r\n promotion_impression_name: promotionName,\r\n promotion_impression_id: promotionId,\r\n promotion_impression_creative: promotionCreative,\r\n promotion_impression_position: promotionPosition\r\n }\r\n });\r\n};\r\n\r\nexport const firePromotionClick = ({ eventLabel = '', promotionName = [], promotionId = [], promotionCreative = [], promotionPosition = [] }: IPromotionConfigs) => {\r\n fireAnalyticsLink({\r\n eventName: 'promotion-click',\r\n eventCategory: 'ecommerce',\r\n eventAction: 'promotion click',\r\n eventLabel: eventLabel,\r\n eventNoninteraction: 'false',\r\n promoConfig: {\r\n promotion_name: promotionName,\r\n promotion_id: promotionId,\r\n promotion_creative: promotionCreative,\r\n promotion_position: promotionPosition\r\n }\r\n });\r\n};","import { IAnalyticsConfiguration } from './clickTrack';\r\n\r\n// Interface for 3rd-party function. AKA utag.\r\ninterface ITealium {\r\n link(data: {}): void | false;\r\n view(data: {}): void | false;\r\n data(data: {}): void | false;\r\n}\r\n\r\nexport interface IPromotionConfig {\r\n event?: string | null;\r\n event_name?: string | null;\r\n search_term?: string | null;\r\n search_type?: string | null;\r\n event_category?: string | null;\r\n event_action?: string | null;\r\n event_label?: string | null;\r\n event_type?: string | null;\r\n event_noninteraction?: string;\r\n enhanced_action?: string | null;\r\n customer_email?: string | undefined;\r\n customer_phone_number?: string | undefined;\r\n first_name?: string | undefined;\r\n last_name?: string | undefined;\r\n address1?: string | undefined;\r\n address2?: string | undefined;\r\n city?: string | undefined;\r\n state?: string | undefined;\r\n zip_code?: string | undefined;\r\n order_subtotal?: string | undefined;\r\n order_currency?: string | undefined;\r\n country?: string | undefined;\r\n // productConfig?: IProductDataConfig;\r\n checkout_step?: string;\r\n checkout_option?:(string | undefined)[];\r\n checkout_type?:(string | undefined)[];\r\n product_id?: (string | undefined)[];\r\n product_name?: (string | undefined)[];\r\n product_category?: (string | undefined)[];\r\n product_brand?: (string | undefined)[];\r\n product_variant?: (string | undefined | number)[];\r\n product_price?: (string | undefined)[];\r\n product_quantity?: (string | undefined)[];\r\n product_url?: (string | undefined)[];\r\n product_size?: (string | undefined)[];\r\n product_image_url?: (string | undefined)[];\r\n core_item_flag?: string | null;\r\n funnel_type?: string | null;\r\n ga_title?: string | null;\r\n ga_location?: string | null;\r\n order_quantity?: string | null;\r\n}\r\n\r\ninterface IProductDataConfig {\r\n product_variant?: (string | undefined)[];\r\n product_price?: (string | undefined)[];\r\n}\r\n\r\nexport interface IAnalyticsConfigurationData {\r\n productConfig?: IProductDataConfig;\r\n}\r\n\r\n\r\n// Legacy function\r\nexport const callUtag = async (objToCall: IPromotionConfig) => {\r\n void await callUtagLink(objToCall);\r\n};\r\n\r\n/**\r\n * Tealium dispatch click tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagLink = async (objToCall: IPromotionConfig | IAnalyticsConfiguration) => {\r\n try {\r\n Object.keys(objToCall).forEach(\r\n key => {\r\n if (objToCall[key] === null) {\r\n delete objToCall[key];\r\n }\r\n }\r\n );\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.link(objToCall); }\r\n\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Tealium dispatch view tracking.\r\n * @param objToCall\r\n */\r\nexport const callUtagView = async (objToCall: {}) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n if(utag) { utag.view(objToCall); }\r\n } catch (e) {\r\n console.log('utag View Error', e);\r\n }\r\n};\r\n\r\n/**\r\n * Not currently implemented.\r\n * @param objToCall\r\n * @param dataType\r\n */\r\nexport const callUtagData = ({ productConfig = {} }: IAnalyticsConfigurationData , dataType: string) => {\r\n try {\r\n // If utag doesn't exist in the global scope, set as false.\r\n const utag: ITealium = global.hasOwnProperty('utag') ? global[\"utag\"] : false;\r\n switch (dataType) {\r\n case 'data':\r\n // @ts-ignore\r\n if('utag' in window) { utag.data = {...utag.data, ...productConfig}; }\r\n break;\r\n case '_data':\r\n // @ts-ignore\r\n utag_data = {...utag_data , ...productConfig};\r\n break;\r\n default:\r\n null;\r\n }\r\n } catch (e) {\r\n console.log('Utag Error', e);\r\n }\r\n};","import dayjs from 'dayjs';\r\nconst format = 'M/D/YYYY H:m:s';\r\n\r\nexport interface IScheduleData {\r\n enableCountdown?: boolean;\r\n startDate?: string;\r\n endDate?: string;\r\n startTime?: string;\r\n endTime?: string;\r\n timeZone?: string | undefined;\r\n}\r\n\r\n// convert timezone choice to matching timezone in moment-timezone\r\nexport const getTimeZone = (timeZone: string): string | undefined => {\r\n switch (timeZone) {\r\n case 'hawaii':\r\n return 'America/Adak';\r\n case 'alaska':\r\n return 'America/Anchorage';\r\n case 'pacific':\r\n return 'America/Los_Angeles';\r\n case 'mountain':\r\n return 'America/Denver';\r\n case 'central':\r\n return 'America/Chicago';\r\n case 'eastern':\r\n return 'America/New_York';\r\n default:\r\n return undefined;\r\n }\r\n};\r\n\r\n// convert time to local time\r\nexport const convertToLocal = (time: dayjs.Dayjs, schedule: IScheduleData): dayjs.Dayjs | undefined => {\r\n const timeZone = schedule.timeZone;\r\n\r\n return !timeZone ? time : dayjs(time.format(format), format).tz(timeZone).local();\r\n};\r\n\r\n// checks if countdown/banner is currently scheduled\r\nexport const isScheduled = (schedule: IScheduleData, showExpired = false): Boolean => {\r\n if (!schedule.enableCountdown) {\r\n return false;\r\n }\r\n // let isScheduled = false;\r\n\r\n let start = schedule.startDate && schedule.startTime && dayjs(`${schedule.startDate} ${schedule.startTime}`, format);\r\n let end = schedule.endDate && schedule.endTime && dayjs(`${schedule.endDate} ${schedule.endTime}`, format);\r\n\r\n // check if schedule is valid\r\n const validStart = start && start.isValid();\r\n const validEnd = end && end.isValid();\r\n\r\n if (!validStart || !validEnd) {\r\n return false;\r\n }\r\n\r\n const now = dayjs();\r\n\r\n // convert to local time\r\n start = start && convertToLocal(start, schedule);\r\n end = end && convertToLocal(end, schedule);\r\n\r\n if (showExpired) {\r\n return now.isAfter(start);\r\n } else {\r\n return now.isBetween(start, end);\r\n }\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 { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IRequestContext } from '@msdyn365-commerce/core';\r\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\r\nexport interface IVirtualRefinersConfig {\r\n order: number;\r\n refinerName: string;\r\n enableForMattresses: boolean;\r\n enableForOtherCategories: boolean;\r\n allowDuplicate: boolean;\r\n}\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const origin = requestUrl.origin;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `${origin}/${filteredPath}`;\r\n};\r\n\r\nexport const filteredURL = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n const filteredPath = urlParts?.join('/');\r\n\r\n return `/${filteredPath}`;\r\n};\r\n\r\n/**\r\n * This will create the canonicalURL as per 7924 requirement\r\n * @param requestContext\r\n * @returns string of canonical URL\r\n */\r\nexport const canonicalURLWithoutBaseUrl = (requestContext: IRequestContext): string => {\r\n const requestUrl = requestContext.url.requestUrl;\r\n const path = requestUrl.pathname.toLowerCase();\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('\\/').splice(1);\r\n\r\n // remove double values containing pipe sign\r\n if (path.match(/%7c/)) {\r\n urlParts = removePipeSignValue(urlParts);\r\n }\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n return urlParts?.join('\\/');\r\n};\r\n\r\n/**\r\n * This will remove the Pipe sign value set from urlParts\r\n * @param urlParts\r\n * @returns\r\n */\r\nexport const removePipeSignValue = (urlParts: string[]) => {\r\n // urlParts.forEach((part, index) => {\r\n // const indexOfValue = urlParts.indexOf('%7c');\r\n // if (indexOfValue !== -1) {\r\n // urlParts.splice(indexOfValue, 1);\r\n // }\r\n // });\r\n\r\n if (urlParts !== undefined && urlParts.length > 0) {\r\n urlParts = urlParts.filter(urlPart => urlPart.indexOf('%7c') === -1);\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will remove the keywords from urlParts array which were received from\r\n * the app.settings.json/CMS Extensions\r\n * @param urlParts\r\n * @param requestContext\r\n * @returns urlParts array filtered\r\n */\r\nexport const removeKeywords = (urlParts: string[], requestContext: IRequestContext): string[] => {\r\n const removeKeywordFromUrl = requestContext.app.config.removeKeywordFromUrl;\r\n\r\n if (urlParts.length > 0 && removeKeywordFromUrl && removeKeywordFromUrl.length > 0) {\r\n const removeKeywordFromUrlArray: string[] = removeKeywordFromUrl?.trim().split(',');\r\n removeKeywordFromUrlArray?.length > 0 &&\r\n urlParts.forEach(_part => {\r\n removeKeywordFromUrlArray.forEach(removeKeyword => {\r\n const trimmedKeyword = removeKeyword.trim().toLowerCase();\r\n const indexOfValue = urlParts.indexOf(trimmedKeyword);\r\n if (trimmedKeyword.length > 0 && indexOfValue !== -1) {\r\n urlParts.splice(indexOfValue, 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return urlParts;\r\n};\r\n\r\n/**\r\n * This will sort the Virtual refiner config based on order and return\r\n * only active virtual refiner configs based on isMattress category will\r\n * be returned\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getSortedVirtualRefinerConfig = (\r\n requestContext: IRequestContext,\r\n isMattressesCategory: boolean | undefined\r\n): IVirtualRefinersConfig[] | undefined => {\r\n let appConfigSorted = getVirtualRefinerConfig(requestContext);\r\n\r\n // sort the config by provided config\r\n if (appConfigSorted) {\r\n if (isMattressesCategory === true) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForMattresses;\r\n });\r\n } else if (isMattressesCategory === false) {\r\n appConfigSorted = appConfigSorted.filter(appConfig => {\r\n return appConfig.enableForOtherCategories;\r\n });\r\n }\r\n appConfigSorted.sort((a: IVirtualRefinersConfig, b: IVirtualRefinersConfig) => {\r\n return a.order - b.order;\r\n });\r\n }\r\n\r\n return appConfigSorted;\r\n};\r\n\r\n/**\r\n * Virtual refiner names from the app.settings.json will be returned which can be used\r\n * to filter out refiners data based upon active virtual refiners\r\n * @param requestContext\r\n * @param isMattressesCategory boolean | undefined\r\n * @returns string[]\r\n */\r\nexport const getVirtualRefinerNames = (requestContext: IRequestContext, isMattressesCategory: boolean | undefined): string[] => {\r\n const sortedVirtualRefinerConfig = getSortedVirtualRefinerConfig(requestContext, isMattressesCategory);\r\n\r\n const appConfigRefinerNames: string[] = [];\r\n\r\n sortedVirtualRefinerConfig &&\r\n sortedVirtualRefinerConfig.forEach(sortedConfig => {\r\n appConfigRefinerNames.push(sortedConfig.refinerName.trim().toLowerCase());\r\n });\r\n\r\n return appConfigRefinerNames;\r\n};\r\n\r\n/**\r\n * This will return the value of virtual refiner configuration\r\n * @param requestContext\r\n * @returns IVirtualRefinersConfig[] | undefined\r\n */\r\nexport const getVirtualRefinerConfig = (requestContext: IRequestContext): IVirtualRefinersConfig[] => {\r\n return requestContext.app.config.urlModifications;\r\n};\r\n\r\nexport async function getVirtualRefinerValues(\r\n requestContext: IRequestContext,\r\n virtualRefiners: IProductRefinerHierarchy[]\r\n): Promise {\r\n const virtualRefinerValues: ProductRefinerValue[] = [];\r\n if (virtualRefiners.length === 0) {\r\n return virtualRefinerValues;\r\n }\r\n const requestUrl = requestContext.url.requestUrl;\r\n // const origin = requestUrl.origin;\r\n const path = requestUrl.pathname;\r\n\r\n // separate out url parts split on forward / and remove first empty index\r\n let urlParts = path?.split('/').splice(1);\r\n\r\n // remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // remove category id {categoryid}.c\r\n const categoryIdToken = requestContext.urlTokens.recordId;\r\n const categoryId = categoryIdToken ? `${categoryIdToken}.c` : undefined;\r\n\r\n if (categoryId) {\r\n urlParts.splice(-1);\r\n }\r\n\r\n // run loop for each url part and get values from refiners for further usage\r\n const finalizedUrlParts: string[] = [];\r\n urlParts.forEach(plainUrlPart => {\r\n const urlPart = decodeURIComponent(plainUrlPart);\r\n if (urlPart.indexOf('|') !== -1) {\r\n const splitOnPipeSign = urlPart?.split('|');\r\n const filteredParts = splitOnPipeSign.filter(part => part.length > 0);\r\n filteredParts.forEach(filteredPart => {\r\n finalizedUrlParts.push(filteredPart.toLowerCase().trim());\r\n });\r\n }\r\n finalizedUrlParts.push(urlPart);\r\n });\r\n finalizedUrlParts.forEach((urlPart) => {\r\n virtualRefiners.forEach((mainRefiner) => {\r\n mainRefiner.Values.forEach((refinerValue) => {\r\n const refinerValueKeyName = refinerValue.LeftValueBoundString?.toLowerCase().trim().split(' ')?.join('-')?.replace(/\\&/g, 'and')?.replace(regExSpecialChars(requestContext.app.config.canonicalUrlspecialCharIncludeList), '-');\r\n if (refinerValueKeyName && refinerValueKeyName === urlPart) {\r\n virtualRefinerValues.push(refinerValue);\r\n }\r\n });\r\n });\r\n });\r\n\r\n return virtualRefinerValues;\r\n}\r\n\r\n/**\r\n * For navigation menu links, it will remove keywords configured in global configurations from the navigation link\r\n * and clp link and return url path string\r\n * @param link\r\n * @param requestContext\r\n * @returns string\r\n */\r\nexport const navLinkKeywordRemoval = (link: string, requestContext: IRequestContext): string => {\r\n // Using the rest operator in case there is a weirdly formatted URL with multiple question marks.\r\n const [linkBase, ...linkParams] = link?.split('?');\r\n\r\n // Only apply to category links and product links, which end in .c or .p. Check that a keyword is configured.\r\n if (!linkBase.endsWith('.c') && !linkBase.endsWith('.p') || !requestContext.app.config) {\r\n return link;\r\n }\r\n\r\n // Separate out url parts split on forward /\r\n let urlParts = linkBase?.split('\\/');\r\n\r\n // Remove unwanted keywords from url\r\n urlParts = removeKeywords(urlParts, requestContext);\r\n\r\n // Glue the URL params back together\r\n const linkParam = linkParams.map(param => `?${param}`)?.join('');\r\n\r\n // Rebuild URL by joining with forward slash and appending any URL parameters\r\n const filteredLink = `${urlParts?.join('/')}${linkParam}`;\r\n return `${filteredLink}`;\r\n};\r\nexport const regExSpecialChars = (includeConfigList: string): RegExp => {\r\n let includeConfig = '';\r\n if (includeConfigList !== undefined && includeConfigList !== '') {\r\n includeConfig = includeConfigList?.trim().split(',')?.join('\\\\\\\\');\r\n includeConfig = includeConfig && includeConfig !== '' ? `\\\\\\\\${includeConfig}` : '';\r\n const pattern = `[^\\\\w\\\\&\\\\|${includeConfig}]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\r\n } else {\r\n\r\n const pattern = `[^\\\\w\\\\&\\\\|]`;\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(pattern, 'gi');\r\n }\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport MsDyn365, { IGridSettings, IImageData, Image, RichText, RichTextComponent } from '@msdyn365-commerce/core';\r\n\r\nimport * as React from 'react';\r\nimport { useInView } from 'react-intersection-observer';\r\n\r\nimport Badge from 'mfcl/Badge';\r\nimport Countdown, { CountdownRenderProps, zeroPad } from 'react-countdown';\r\nimport { fireAnalyticsLink } from '../../Utilities/analytics/clickTrack';\r\nimport { htmltoText } from '../../Utilities/analytics/htmlToText';\r\nimport { firePromotionClick, firePromotionImpression } from '../../Utilities/analytics/promotionClickTrack';\r\nimport { getAnalyticsConfig, getPromoAnalyticsConfig } from './analytics';\r\nimport { ITealiumEventData, ITealiumPromotionData } from './mfrm-content-reel.props.autogenerated';\r\nimport classname from 'classnames';\r\n\r\ninterface ISaleData {\r\n image: IImageData | undefined;\r\n iconImage: IImageData | undefined;\r\n carouselIndex: number;\r\n title: RichText;\r\n gridSettings: IGridSettings;\r\n description: RichText | undefined;\r\n promoBadge: string | undefined;\r\n countdown: Date | undefined;\r\n linkTo: string;\r\n salesTitle: boolean;\r\n enhancedEcommTracking: string;\r\n tealiumEvent: ITealiumEventData | undefined;\r\n tealiumPromotion: ITealiumPromotionData | undefined;\r\n cardShape: string;\r\n cardColor: string;\r\n titleColor: string;\r\n descriptionColor: string;\r\n}\r\n\r\nexport default (props: ISaleData) => {\r\n const styles = 'mfrm-content-reel__';\r\n const {\r\n image,\r\n iconImage,\r\n title,\r\n gridSettings,\r\n description,\r\n promoBadge = '',\r\n countdown = '',\r\n linkTo,\r\n salesTitle,\r\n carouselIndex,\r\n tealiumEvent,\r\n tealiumPromotion,\r\n enhancedEcommTracking,\r\n cardShape,\r\n cardColor,\r\n titleColor,\r\n descriptionColor\r\n } = props;\r\n\r\n const promoName = htmltoText(title.toString()).trim();\r\n\r\n const analyticsConfig = getAnalyticsConfig(promoName, carouselIndex, tealiumEvent);\r\n const promoAnalyticsConfig = getPromoAnalyticsConfig(promoName, image, linkTo, carouselIndex, tealiumPromotion);\r\n\r\n const isPromotion = enhancedEcommTracking === 'promotion';\r\n\r\n const button = !image ?
Start
: null;\r\n\r\n const handleAnalytics = () => {\r\n if (MsDyn365.isBrowser) {\r\n // @ts-ignore\r\n if ('utag' in window) {\r\n const pageURL = MsDyn365.isBrowser && window.location.pathname;\r\n // Note: Only Sleep Disruptors cards have square card shapes at the moment.\r\n if (cardShape === 'square' && button === null) {\r\n // @ts-ignore\r\n utag.link({\r\n event: 'main-sleep-disruptor-nav-module',\r\n event_category: 'main sleep disruptor nav module',\r\n event_action: `${promoName} click - position ${carouselIndex + 1}`,\r\n event_label: `sleep disruptor ${pageURL}`,\r\n event_noninteraction: 'false'\r\n });\r\n } else if (cardShape === 'square' && button !== null) {\r\n // @ts-ignore\r\n utag.link({\r\n event: 'mattress-matcher-tile-inside-main-sleep-disruptor-nav-module',\r\n event_category: 'main sleep disruptor nav module',\r\n event_action: 'Mattress Matcher start button CTA click',\r\n event_label: `sleep disruptor ${pageURL}`,\r\n event_noninteraction: 'false'\r\n });\r\n } else {\r\n fireAnalyticsLink({ ...analyticsConfig });\r\n }\r\n if (isPromotion) {\r\n firePromotionClick({ ...promoAnalyticsConfig });\r\n }\r\n }\r\n window.location.href = linkTo;\r\n }\r\n };\r\n\r\n const handleClick = (event: React.MouseEvent) => {\r\n event.preventDefault();\r\n handleAnalytics();\r\n };\r\n\r\n const [ref, inView] = useInView({\r\n triggerOnce: true,\r\n rootMargin: '25px'\r\n });\r\n\r\n React.useEffect(() => {\r\n if (isPromotion && inView) {\r\n firePromotionImpression({ ...promoAnalyticsConfig });\r\n }\r\n }, [inView]);\r\n\r\n const [countdownRunning, setCountdownRunning] = React.useState(!!countdown);\r\n const renderer = ({ days, hours, minutes, seconds, completed }: CountdownRenderProps) => {\r\n if (completed) {\r\n setCountdownRunning(false);\r\n return <>;\r\n } else {\r\n return (\r\n \r\n {days ? `${zeroPad(days, 2)}:` : null}\r\n {zeroPad(hours, 2)}:{zeroPad(minutes, 2)}:{zeroPad(seconds, 2)}\r\n \r\n );\r\n }\r\n };\r\n\r\n const cardBkgColor = cardColor === 'white' ? `${styles}cardBkgColor-white` : '';\r\n const colorOfTitle = titleColor ? `${styles}text-${titleColor}` : '';\r\n const colorOfDescription = descriptionColor ? `${styles}text-${descriptionColor}` : '';\r\n const imageIcon =\r\n typeof iconImage !== 'undefined' ? (\r\n
\r\n {iconImage?.altText}\r\n
\r\n ) : null;\r\n\r\n const bkgImage =\r\n typeof image !== 'undefined' ? (\r\n \r\n ) : null;\r\n\r\n return (\r\n \r\n \r\n {bkgImage}\r\n {imageIcon}\r\n \r\n \r\n \r\n \r\n {description && (\r\n \r\n )}\r\n {button}\r\n \r\n {promoBadge && {promoBadge}}\r\n {countdown && countdownRunning && (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n","import MsDyn365, { IImageData } from '@msdyn365-commerce/core';\r\nimport { ITealiumEventData, ITealiumPromotionData } from './mfrm-content-reel.props.autogenerated';\r\n\r\nexport const getAnalyticsConfig = (promoName: string, carouselIndex: number, tEvent: ITealiumEventData | undefined) => {\r\n // GENERAL ANALYTICS CONFIG\r\n if (tEvent) {\r\n return {\r\n eventName:\r\n tEvent.event ? tEvent.event : 'content-reel',\r\n eventCategory:\r\n tEvent.event_category ? tEvent.event_category : 'content-reel',\r\n eventAction:\r\n tEvent.event_action ? tEvent.event_action : `card ${carouselIndex + 1} click`,\r\n eventLabel:\r\n tEvent.event_label ? tEvent.event_label : promoName\r\n };\r\n } else {\r\n return {\r\n eventName: 'content-reel',\r\n eventCategory: 'content-reel',\r\n eventAction: `card ${carouselIndex + 1} click`,\r\n eventLabel: promoName\r\n };\r\n }\r\n};\r\n\r\nexport const getPromoAnalyticsConfig = (promoName: string, image: IImageData | undefined, linkTo: string, carouselIndex: number, tPromotion: ITealiumPromotionData | undefined) => {\r\n // PROMO ANALYTICS CONFIG\r\n const promotionCreative = image ? image.title || image.altText || '' : '';\r\n const pagePath = MsDyn365.isBrowser ? (window.location.href.split(location.host)[1].includes('?') ? window.location.href.split(location.host)[1].split('?')[0] : window.location.href.split(location.host)[1]) : '';\r\n\r\n if (tPromotion) {\r\n return {\r\n eventLabel:\r\n tPromotion.promotion_name ? `${tPromotion.promotion_name} from ${pagePath}` : `${promoName} from ${pagePath}`,\r\n promotionName:\r\n tPromotion.promotion_name ? [tPromotion.promotion_name] : [promoName],\r\n promotionId:\r\n tPromotion.promotion_id ? [tPromotion.promotion_id] : [linkTo],\r\n promotionCreative:\r\n tPromotion.promotion_creative_version ? [tPromotion.promotion_creative_version] : [promotionCreative],\r\n promotionPosition:\r\n tPromotion.promotion_position ? [tPromotion.promotion_position] : [`${carouselIndex + 1}`]\r\n };\r\n } else {\r\n return {\r\n eventLabel: `${promoName} from ${pagePath}`,\r\n promotionName: [promoName],\r\n promotionId: [linkTo],\r\n promotionCreative: [promotionCreative],\r\n promotionPosition: [`${carouselIndex + 1}`]\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\n\r\nimport { convertToLocal, getTimeZone, isScheduled } from '../../Utilities/countdown-schedule';\r\nimport FeaturedSale from './featured-content';\r\nimport { IMfrmContentReelData } from './mfrm-content-reel.data';\r\nimport { ICountdownScheduleData, IMfrmContentReelProps } from './mfrm-content-reel.props.autogenerated';\r\n\r\nimport dayjs from 'dayjs';\r\nimport { navLinkKeywordRemoval } from '../../Utilities/plp-url-utils';\r\nconst format = 'M/D/YYYY H:m:s';\r\n\r\nexport interface IMfrmContentReelViewProps extends IMfrmContentReelProps {\r\n carouselItems: React.ReactNode[];\r\n}\r\n\r\n/**\r\n *\r\n * MfrmContentReel component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass MfrmContentReel extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n if (!this.props.config.featuredContentList) {\r\n return null;\r\n }\r\n\r\n const viewProps: IMfrmContentReelViewProps = {\r\n ...(this.props as IMfrmContentReelProps),\r\n carouselItems: this._getCarouselItems()\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private _getNewCountdown = (countdownSchedule: ICountdownScheduleData) => {\r\n const { enableCountdown, startDate, endDate, startTime, endTime, timeZone = '' } = countdownSchedule;\r\n\r\n const formattedSchedule = {\r\n enableCountdown,\r\n startDate,\r\n endDate,\r\n startTime,\r\n endTime,\r\n timeZone: getTimeZone(timeZone)\r\n };\r\n // check if countdown is scheduled to show\r\n if (!isScheduled(formattedSchedule, true)) {\r\n return;\r\n }\r\n let countdown;\r\n\r\n const scheduleEnd = dayjs(`${endDate} ${endTime}`, format);\r\n const scheduleEndLocal = scheduleEnd && convertToLocal(scheduleEnd, formattedSchedule);\r\n if (scheduleEndLocal) {\r\n countdown = scheduleEndLocal.toDate();\r\n }\r\n return countdown;\r\n };\r\n\r\n private _getCarouselItems = (): React.ReactNode[] => {\r\n const {\r\n config: { featuredContentList, salesTitle = false, enhancedEcommTracking = '', cardShape = '' },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = this.props;\r\n\r\n return featuredContentList.map((sale, index) => {\r\n const { title: saleTitle, image, iconImage, description, promoBadge, link, countdownSchedule, tealiumEvent, tealiumPromotion, cardColor = '', titleColor = '', descriptionColor = ''} = sale;\r\n\r\n const countdown = countdownSchedule ? this._getNewCountdown(countdownSchedule) : undefined;\r\n\r\n return (\r\n \r\n );\r\n });\r\n };\r\n}\r\n\r\nexport default MfrmContentReel;\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 { IMfrmContentReelViewProps } from './mfrm-content-reel';\r\nimport classname from 'classnames';\r\n\r\nexport default (props: IMfrmContentReelViewProps) => {\r\n const [loaded, setIsLoaded] = React.useState(false);\r\n const hideLoader = () => {\r\n setIsLoaded(true);\r\n };\r\n const styles = 'mfrm-content-reel__';\r\n const {\r\n config: { heading, headingColor },\r\n carouselItems\r\n } = props;\r\n const minDesktop = carouselItems.length === 4 ? 'min-desktop' : '';\r\n const mobile = _getViewPort(props.context) === 'sm';\r\n\r\n let headingDisplay = null;\r\n if (heading && heading.text) {\r\n const HeadingTag = heading.tag ? (`${heading.tag}` as keyof JSX.IntrinsicElements) : 'h2';\r\n headingDisplay = (\r\n
\r\n {heading.text}\r\n
\r\n );\r\n }\r\n\r\n React.useEffect(hideLoader, []);\r\n if (props.config.cardShape === 'square' && !mobile) {\r\n return (\r\n
\r\n {headingDisplay}\r\n
\r\n \r\n {carouselItems}\r\n \r\n
\r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n {headingDisplay}\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","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['mfrm-content-reel'] = {\n c: () => require('partner/modules/mfrm-content-reel/mfrm-content-reel.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'mfrm-content-reel',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mfrm-content-reel'\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-content-reel|mfrm-content-reel'] = {\n c: () => require('partner/modules/mfrm-content-reel/mfrm-content-reel.view.tsx'),\n cn: '__local__-__local__-mfrm-content-reel'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\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":["fireAnalyticsLink","searchTerm","searchType","eventName","eventCategory","eventAction","eventLabel","eventType","eventNoninteraction","enhancedAction","generalConfig","promoConfig","productConfig","customerConfig","productImpressionConfig","callUtagLink","event","event_category","event_action","event_label","event_type","event_noninteraction","enhanced_action","search_term","search_type","htmltoText","html","MsDyn365","tempDivElement","document","createElement","innerHTML","textContent","innerText","firePromotionImpression","promotionName","promotionId","promotionCreative","promotionPosition","promotion_impression_name","promotion_impression_id","promotion_impression_creative","promotion_impression_position","firePromotionClick","promotion_name","promotion_id","promotion_creative","promotion_position","callUtag","async","objToCall","Object","keys","forEach","key","utag","global","hasOwnProperty","link","e","console","log","callUtagView","view","format","getTimeZone","timeZone","convertToLocal","time","schedule","dayjs","tz","local","isScheduled","showExpired","enableCountdown","start","startDate","startTime","end","endDate","endTime","validStart","isValid","validEnd","now","isAfter","isBetween","context","window","innerWidth","gridSettings","request","xs","w","sm","md","lg","canonicalURL","requestContext","requestUrl","url","origin","path","pathname","toLowerCase","urlParts","split","splice","match","removePipeSignValue","removeKeywords","join","filteredURL","undefined","length","filter","urlPart","indexOf","removeKeywordFromUrl","app","config","removeKeywordFromUrlArray","trim","_part","removeKeyword","trimmedKeyword","indexOfValue","getSortedVirtualRefinerConfig","isMattressesCategory","appConfigSorted","getVirtualRefinerConfig","appConfig","enableForMattresses","enableForOtherCategories","sort","a","b","order","getVirtualRefinerNames","sortedVirtualRefinerConfig","appConfigRefinerNames","sortedConfig","push","refinerName","urlModifications","getVirtualRefinerValues","virtualRefiners","virtualRefinerValues","categoryIdToken","urlTokens","recordId","finalizedUrlParts","plainUrlPart","decodeURIComponent","part","filteredPart","mainRefiner","Values","refinerValue","refinerValueKeyName","LeftValueBoundString","replace","regExSpecialChars","canonicalUrlspecialCharIncludeList","navLinkKeywordRemoval","linkBase","linkParams","endsWith","linkParam","map","param","includeConfigList","includeConfig","RegExp","props","styles","image","iconImage","title","description","promoBadge","countdown","linkTo","salesTitle","carouselIndex","tealiumEvent","tealiumPromotion","enhancedEcommTracking","cardShape","cardColor","titleColor","descriptionColor","promoName","toString","analyticsConfig","tEvent","getAnalyticsConfig","promoAnalyticsConfig","tPromotion","altText","pagePath","location","href","host","includes","promotion_creative_version","getPromoAnalyticsConfig","isPromotion","button","React","className","classname","ref","inView","useInView","triggerOnce","rootMargin","countdownRunning","setCountdownRunning","cardBkgColor","colorOfTitle","colorOfDescription","imageIcon","Image","alt","bkgImage","src","onClick","preventDefault","pageURL","handleAnalytics","RichTextComponent","text","Badge","type","Countdown","date","renderer","days","hours","minutes","seconds","completed","zeroPad","MfrmContentReel","constructor","_getNewCountdown","countdownSchedule","formattedSchedule","scheduleEnd","scheduleEndLocal","toDate","_getCarouselItems","featuredContentList","this","sale","index","saleTitle","FeaturedSale","linkUrl","destinationUrl","render","viewProps","carouselItems","renderView","loaded","setIsLoaded","heading","headingColor","minDesktop","mobile","_getViewPort","headingDisplay","HeadingTag","tag","Carousel","itemsToShow","ariaLabel","hideIndicators","hideControls","disableControls","disableAutoShift","controlStyle","controlClass","disableEndButtons","variableWidth","responsive","breakpoint","layoutGap","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","__bindings__","viewDictionary","cn","call","fixRegExpWellKnownSymbolLogic","anObject","isNullOrUndefined","toLength","requireObjectCoercible","getMethod","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","string","rx","S","res","done","value","fullUnicode","unicode","lastIndex","result","A","matchStr","apply","uncurryThis","isRegExp","speciesConstructor","arraySlice","callRegExpExec","regexpExec","stickyHelpers","fails","UNSUPPORTED_Y","MAX_UINT32","min","Math","$push","exec","stringSlice","slice","SPLIT","nativeSplit","internalSplit","separator","limit","lim","lastLength","output","flags","ignoreCase","multiline","sticky","lastLastIndex","separatorCopy","source","splitter","C","unicodeMatching","q","z","i","re","originalExec","arguments","module","exports","ReactDOM"],"sourceRoot":""}