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,EAAKhD,QACdxD,QAASA,EACTpO,gBAAiBqY,EACjBnG,oBAAqBoG,EACrBxG,2BAA4BA,MAInCwJ,EACK1J,EAAQqJ,MACJ5M,GACEjP,IAAAA,cAACiO,EAAAA,EAA0B,CACvBa,SAAS,MACTI,UAAWA,GACXH,aAAcyD,EAAQqJ,MACtB7M,QAASA,EACTC,eAAgBA,EAChBM,qBAAiB/E,EACjBgF,eAAWhF,EACXiF,0BAAsBjF,IAG5ByE,EACJ,OA2B1B,IAA2BoN,KAnWG,KA0gB9B","sources":["webpack://mattressfirm/./src/Utilities/allRegex.ts?9889","webpack://mattressfirm/./src/Utilities/analytics/clickTrack.ts?bce2","webpack://mattressfirm/./src/Utilities/components/BVRatingSummary.tsx?6e2e","webpack://mattressfirm/./src/Utilities/get-bv-attributes.ts?f55a","webpack://mattressfirm/./src/Utilities/get-product-badge.tsx?635b","webpack://mattressfirm/./src/Utilities/select-financing-offer.tsx?5f53","webpack://mattressfirm/./src/common/components/error-boundary.tsx?6c0c","webpack://mattressfirm/./src/data-actions/financing-offer-state.action.ts?9faa","webpack://mattressfirm/./src/themes/mattressfirm/custom-components/CustomSkeleton/index.tsx?ef9d","webpack://mattressfirm/./src/themes/mattressfirm/custom-components/financing-per-month-component.tsx?fa70","webpack://mattressfirm/./src/themes/mattressfirm/views/components/delivery-message/deliverymessage.component.tsx?e440","webpack://mattressfirm/./src/themes/mattressfirm/views/components/product.component.tsx?8ce2","webpack://mattressfirm/./src/Utilities/convert-to-titlecase.ts?8d6f"],"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// Following phone format is used on customer info section at checkout page\r\nexport const customerInfoPhoneRegex = /^\\(?([2-9][0-8][0-9])\\)?[ . ]?([2-9][0-9]{2})[\\-\\. ]?([0-9]{4})(\\s*x[0-9]+)?$/; // Valid USA number in format (xxx) xxx-xxxx\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 phoneNumerRegex: customerInfoPhoneRegex\r\n};\r\n\r\n// This regex allows us to effectively validate and extract delivery messages\r\nexport const cartDeliveryMsgRegex = /[A-Za-z]{3} \\d{1,2}(?: - [A-Za-z]{3} \\d{1,2})?/;","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 wmap_type?: string;\r\n wmap_order_total?: number;\r\n wmap_amount_due?: number;\r\n wmap_paid?: number;\r\n wmap_pymt_amt?: number;\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};","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","import { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport const getBVAttributeValues = (attributeValues: AttributeValue[] | undefined, key: string): number => {\r\n const value = +(attributeValues?.find(attr => attr.Name?.trim() === key)?.TextValue || 0);\r\n return Math.round(value * 10) / 10;\r\n};\r\n\r\nexport const getBVAttributeValuesUnbxd = (attributeValues: any | undefined, key: string): number => {\r\n const value = +(attributeValues[key] ?? 0);\r\n return Math.round(value * 10) / 10;\r\n};\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 { RichText } from '@msdyn365-commerce/core';\r\n\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\nimport { calculateFinancing } from './checkout-utils';\r\ndayjs.extend(tz);\r\ndayjs.extend(utc);\r\ndayjs.extend(isBetween);\r\nconst format = 'M/D/YYYY';\r\n\r\nexport interface IFinancingOffer {\r\n offerName?: string;\r\n noInterestFor: number;\r\n minPurchase: number;\r\n everydayFinancingOfferMessage: string,\r\n limitedFinancingOfferMessage: string,\r\n lowCostFinancingOfferMessage: string,\r\n cashbackFinancingOfferMessage: string,\r\n monthlyOfferDetails?: RichText;\r\n financingOfferDescription: RichText;\r\n disclaimer: RichText;\r\n offerValidStartDate?: string;\r\n offerValidEndDate?: string;\r\n specialCampaignOffer?: IFinancingOfferCampaign;\r\n checkoutDisplay?: { heading: string; details: string; specialOffer?: string},\r\n FinancingOfferDataOnPage?: RichText;\r\n cashBackPercentageAmount?: number;\r\n cashbackBannerDetails?: RichText;\r\n planID?: number;\r\n specialCase36Months?: boolean;\r\n}\r\nexport interface ILowCostOffer {\r\n offerName?: string;\r\n maxPurchase: number;\r\n lowCostFinancingOfferMessage: string,\r\n financingOfferDescription: RichText;\r\n disclaimer: RichText;\r\n defaultNumberOfMonths: number;\r\n lowCostOfferDetailsOnCart?: RichText;\r\n}\r\n\r\n\r\nexport interface IFinancingOfferFormatted {\r\n lowCostOfferDetailsOnCart?: RichText;\r\n numOfMonths: number;\r\n costPerMonth: number;\r\n startDate?: string;\r\n endDate?: string;\r\n isLTO: boolean;\r\n monthlyOfferDetails?: RichText;\r\n minPurchase: number;\r\n lowCostFinancingOfferMessage?: string;\r\n everydayFinancingOfferMessage?: string;\r\n limitedFinancingOfferMessage?: string;\r\n cashbackFinancingOfferMessage?: string;\r\n financingOfferDescription: RichText;\r\n disclaimer: RichText;\r\n specialCampaign?: IFinancingOfferCampaign;\r\n offerName?: string;\r\n checkoutDisplay?: { heading: string; details: string; specialOffer?: string },\r\n FinancingOfferDataOnPage?: RichText;\r\n isCashBack?: boolean;\r\n cashBackPercentageAmount?: number;\r\n cashbackBannerDetails?: RichText;\r\n specialCase36Months?: boolean;\r\n}\r\n\r\nexport interface IFinancingOfferCampaign {\r\n initialMonthlyAmount: number;\r\n numOfDiscountedMonths: number;\r\n campaignValidStartDate: string;\r\n campaignValidEndDate: string;\r\n enableCampaign: boolean;\r\n showEverydayFlag: boolean;\r\n}\r\n\r\nexport interface ISelectFinancingOfferData {\r\n limitedTimeFinancingOffers: IFinancingOffer[];\r\n everydayFinancingOffers: IFinancingOffer[];\r\n lowCostOffer?: ILowCostOffer[]\r\n totalPrice: number | undefined;\r\n specialFinancingOffer?: IFinancingOffer[];\r\n synchronySpecialFinancingCondition?: boolean;\r\n specialFinancingEnable?: boolean;\r\n checkoutShowEveryDayOffers?: boolean;\r\n cashbackFinancingEnable?: boolean;\r\n cashBackFinancingOffer?: IFinancingOffer[];\r\n}\r\n\r\nexport interface ICampaignRemainingCost {\r\n cost: number;\r\n months: number;\r\n}\r\n\r\nexport const getValidSpecialCampaign = (financingOffer: IFinancingOfferFormatted): IFinancingOfferCampaign | undefined => {\r\n if (\r\n financingOffer.specialCampaign &&\r\n financingOffer.specialCampaign.enableCampaign &&\r\n financingOffer.specialCampaign.initialMonthlyAmount &&\r\n financingOffer.specialCampaign.numOfDiscountedMonths &&\r\n isCampaignScheduled(financingOffer)\r\n ) {\r\n return financingOffer.specialCampaign;\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const getCampaignRemainingCost = (\r\n campaign: IFinancingOfferCampaign,\r\n financingOffer: IFinancingOfferFormatted,\r\n totalPrice: number | undefined\r\n): ICampaignRemainingCost | undefined => {\r\n if (!totalPrice) {\r\n return undefined;\r\n }\r\n\r\n const initialCost = campaign.initialMonthlyAmount * campaign.numOfDiscountedMonths;\r\n const remainingCost = totalPrice - initialCost;\r\n const remainingMonths = financingOffer.numOfMonths - campaign.numOfDiscountedMonths;\r\n const monthlyCost = remainingCost / remainingMonths;\r\n\r\n return {\r\n cost: monthlyCost,\r\n months: remainingMonths\r\n };\r\n};\r\nexport const isValidLimitedTimeOffer = (offer: IFinancingOffer): boolean => {\r\n const startDate = dayjs(offer.offerValidStartDate, format);\r\n const endDate = dayjs(offer.offerValidEndDate, format).add(1, 'd');\r\n\r\n const startDateCentralTime = startDate.isValid() && dayjs(startDate.format(format), format).tz('America/Chicago').local();\r\n const endDateCentralTime = endDate.isValid() && dayjs(endDate.format(format), format).tz('America/Chicago').local();\r\n\r\n const now = dayjs();\r\n return startDateCentralTime && endDateCentralTime && now.isBetween(startDateCentralTime, endDateCentralTime);\r\n};\r\n\r\nexport const isCampaignScheduled = (offer: IFinancingOfferFormatted): boolean => {\r\n const tempOffer = Object.create(offer);\r\n if (tempOffer.specialCampaign?.campaignValidStartDate && tempOffer.specialCampaign?.campaignValidEndDate) {\r\n tempOffer.startDate = tempOffer.specialCampaign?.campaignValidStartDate;\r\n tempOffer.endDate = tempOffer.specialCampaign?.campaignValidEndDate;\r\n\r\n return isScheduled(tempOffer);\r\n }\r\n\r\n return false;\r\n};\r\n\r\nexport const isScheduled = (offer: IFinancingOfferFormatted): boolean => {\r\n const startDate = dayjs(offer.startDate, format);\r\n const endDate = dayjs(offer.endDate, format).add(1, 'd');\r\n\r\n const startDateCentralTime = startDate.isValid() && dayjs(startDate.format(format), format).tz('America/Chicago').local();\r\n const endDateCentralTime = endDate.isValid() && dayjs(endDate.format(format), format).tz('America/Chicago').local();\r\n\r\n const now = dayjs();\r\n\r\n return startDateCentralTime && endDateCentralTime && now.isBetween(startDateCentralTime, endDateCentralTime);\r\n};\r\n\r\nexport const selectFinancingOffer = ({ limitedTimeFinancingOffers = [], everydayFinancingOffers = [], lowCostOffer = [], totalPrice = 0, specialFinancingOffer = [], synchronySpecialFinancingCondition = false, specialFinancingEnable = false, checkoutShowEveryDayOffers, cashbackFinancingEnable = false, cashBackFinancingOffer = [] }: ISelectFinancingOfferData, returnCustomOfferArray?: boolean): IFinancingOfferFormatted | undefined => {\r\n let highestMinimumPurchase: number = 0;\r\n let bestOffer: IFinancingOfferFormatted = {\r\n numOfMonths: 0,\r\n costPerMonth: 0,\r\n isLTO: false,\r\n minPurchase: 0,\r\n everydayFinancingOfferMessage: '',\r\n limitedFinancingOfferMessage: '',\r\n cashbackFinancingOfferMessage: '',\r\n monthlyOfferDetails: '',\r\n financingOfferDescription: '',\r\n disclaimer: ''\r\n };\r\n let offerFound = false;\r\n\r\n let campaignFound: IFinancingOfferFormatted | undefined;\r\n\r\n const everydayOffers: IFinancingOfferFormatted[] | undefined = [];\r\n const specialOffer: IFinancingOfferFormatted[] | undefined = [];\r\n\r\n const validLimitedTimeFinancingOffers = limitedTimeFinancingOffers.filter((offer) => {\r\n return isValidLimitedTimeOffer(offer) && offer;\r\n });\r\n\r\n if (synchronySpecialFinancingCondition && specialFinancingEnable) {\r\n if (!offerFound || (!isScheduled(bestOffer) && specialFinancingOffer.length)) {\r\n // try default offer\r\n offerFound = false;\r\n highestMinimumPurchase = 0;\r\n specialFinancingOffer.forEach((offer: IFinancingOffer) => {\r\n const minPurchase = offer.minPurchase ? offer.minPurchase : 0;\r\n let currentOfferAccepted = false;\r\n if (totalPrice >= minPurchase && minPurchase >= highestMinimumPurchase) {\r\n bestOffer = {\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n startDate: offer.offerValidStartDate,\r\n endDate: offer.offerValidEndDate,\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n offerName: offer.offerName,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n FinancingOfferDataOnPage: offer?.FinancingOfferDataOnPage,\r\n checkoutDisplay: offer?.checkoutDisplay\r\n };\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n }\r\n if (returnCustomOfferArray && (totalPrice >= minPurchase)) {\r\n specialOffer?.push({\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n startDate: offer.offerValidStartDate,\r\n endDate: offer.offerValidEndDate,\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage: offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage: offer.limitedFinancingOfferMessage,\r\n cashbackFinancingOfferMessage: offer.cashbackFinancingOfferMessage,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n offerName: offer.offerName\r\n });\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n // @ts-ignore\r\n bestOffer = specialOffer;\r\n }\r\n // Do not use default if end date is defined and has expired\r\n if (currentOfferAccepted && offer.offerValidEndDate) {\r\n const endDate = dayjs(offer.offerValidEndDate, format);\r\n const now = dayjs();\r\n if (endDate.isValid() && now.isAfter(endDate)) {\r\n offerFound = false;\r\n }\r\n }\r\n });\r\n }\r\n } else {\r\n // if cashback enabled and has length check for cashback offer\r\n if (cashbackFinancingEnable && cashBackFinancingOffer?.length) {\r\n cashBackFinancingOffer.forEach((offer) => {\r\n const minPurchase = offer.minPurchase ? offer.minPurchase : 0;\r\n // if minimum purchase criteria is met, then create best offer\r\n if (totalPrice >= minPurchase) {\r\n const cashBackOffer = {\r\n numOfMonths: offer?.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer?.noInterestFor),\r\n startDate: offer?.offerValidStartDate,\r\n endDate: offer?.offerValidEndDate,\r\n isLTO: false,\r\n minPurchase: offer?.minPurchase || 0,\r\n offerName: offer?.offerName,\r\n financingOfferDescription: offer?.financingOfferDescription,\r\n disclaimer: offer?.disclaimer,\r\n FinancingOfferDataOnPage: offer?.FinancingOfferDataOnPage,\r\n isCashBack: cashbackFinancingEnable,\r\n checkoutDisplay: offer?.checkoutDisplay,\r\n cashBackPercentageAmount: offer?.cashBackPercentageAmount,\r\n cashbackBannerDetails: offer?.cashbackBannerDetails,\r\n cashbackFinancingOfferMessage: offer?.cashbackFinancingOfferMessage\r\n };\r\n offerFound = true;\r\n bestOffer = cashBackOffer;\r\n }\r\n\r\n // check if current offer expired\r\n if (offerFound && offer?.offerValidEndDate) {\r\n const endDate = dayjs(offer?.offerValidEndDate, format);\r\n const now = dayjs();\r\n if (endDate?.isValid() && now.isAfter(endDate)) {\r\n offerFound = false;\r\n }\r\n }\r\n });\r\n }\r\n // if no offer found then check limited time financing offers\r\n if (!offerFound || !isScheduled(bestOffer)) {\r\n validLimitedTimeFinancingOffers.forEach((offer: IFinancingOffer) => {\r\n const minPurchase = offer.minPurchase ? offer.minPurchase : 0;\r\n if (totalPrice >= minPurchase && minPurchase > highestMinimumPurchase) {\r\n const updatedOffer = calculateFinancing(totalPrice , offer.noInterestFor, offer.monthlyOfferDetails);\r\n const currentOffer: IFinancingOfferFormatted = {\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: updatedOffer?.monthlyPayment,\r\n startDate: offer.offerValidStartDate,\r\n endDate: offer.offerValidEndDate,\r\n isLTO: true,\r\n minPurchase: offer.minPurchase,\r\n everydayFinancingOfferMessage: offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage: offer.limitedFinancingOfferMessage,\r\n cashbackFinancingOfferMessage: offer.cashbackFinancingOfferMessage,\r\n monthlyOfferDetails: updatedOffer?.financingMessage,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n specialCampaign: offer.specialCampaignOffer,\r\n checkoutDisplay: offer.checkoutDisplay,\r\n offerName: offer.offerName,\r\n specialCase36Months: offer.noInterestFor === 36\r\n };\r\n bestOffer = currentOffer;\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n\r\n // check if campaign schedule is scheduled, otherwise fall back to parent offer\r\n const validCampaign = getValidSpecialCampaign(currentOffer);\r\n if (validCampaign) {\r\n currentOffer.startDate = validCampaign.campaignValidStartDate;\r\n currentOffer.endDate = validCampaign.campaignValidEndDate;\r\n campaignFound = currentOffer;\r\n }\r\n else {\r\n campaignFound = undefined;\r\n }\r\n }\r\n });\r\n }\r\n // if no offer found then check everyday financing offer\r\n if (!offerFound || (!isScheduled(bestOffer) && everydayFinancingOffers.length)) {\r\n // try default offer\r\n offerFound = false;\r\n highestMinimumPurchase = 0;\r\n\r\n everydayFinancingOffers.forEach((offer: IFinancingOffer) => {\r\n const minPurchase = checkoutShowEveryDayOffers ? 0 : offer.minPurchase ? offer.minPurchase : 0;\r\n let currentOfferAccepted = false;\r\n if (totalPrice >= minPurchase && minPurchase >= highestMinimumPurchase) {\r\n bestOffer = {\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage: offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage: offer.limitedFinancingOfferMessage,\r\n cashbackFinancingOfferMessage: offer.cashbackFinancingOfferMessage,\r\n offerName: offer.offerName,\r\n monthlyOfferDetails: offer.monthlyOfferDetails,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer\r\n };\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n }\r\n\r\n if (returnCustomOfferArray && (totalPrice >= minPurchase)) {\r\n everydayOffers?.push({\r\n numOfMonths: offer.noInterestFor,\r\n costPerMonth: Math.ceil(totalPrice / offer.noInterestFor),\r\n isLTO: false,\r\n minPurchase: offer.minPurchase || 0,\r\n everydayFinancingOfferMessage: offer.everydayFinancingOfferMessage,\r\n limitedFinancingOfferMessage: offer.limitedFinancingOfferMessage,\r\n cashbackFinancingOfferMessage: offer.cashbackFinancingOfferMessage,\r\n monthlyOfferDetails: offer.monthlyOfferDetails,\r\n financingOfferDescription: offer.financingOfferDescription,\r\n disclaimer: offer.disclaimer,\r\n offerName: offer.offerName\r\n });\r\n highestMinimumPurchase = offer.minPurchase;\r\n offerFound = true;\r\n currentOfferAccepted = true;\r\n // @ts-ignore\r\n bestOffer = everydayOffers;\r\n }\r\n // Do not use default if end date is defined and has expired\r\n if (currentOfferAccepted && offer.offerValidEndDate) {\r\n const endDate = dayjs(offer.offerValidEndDate, format);\r\n const now = dayjs();\r\n if (endDate.isValid() && now.isAfter(endDate)) {\r\n offerFound = false;\r\n }\r\n }\r\n });\r\n }\r\n if (lowCostOffer?.length) {\r\n lowCostOffer.forEach((offer: ILowCostOffer) => {\r\n if (totalPrice <= offer.maxPurchase && offer.offerName?.toLowerCase() === 'low cost offer') {\r\n const LCO = {\r\n offerName: offer.offerName,\r\n maxPurchase: offer.maxPurchase || 0,\r\n lowCostFinancingOfferMessage: offer.lowCostFinancingOfferMessage,\r\n financingOfferDescription: offer?.financingOfferDescription?.replace(/{defaultNumOfMonths}/g, `${offer?.defaultNumberOfMonths?.toString() || 6}`),\r\n disclaimer: offer.disclaimer,\r\n lowCostOfferDetailsOnCart: offer.lowCostOfferDetailsOnCart\r\n };\r\n highestMinimumPurchase = offer.maxPurchase;\r\n offerFound = true;\r\n // @ts-ignore\r\n bestOffer = LCO;\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (!offerFound) {\r\n return undefined;\r\n }\r\n if (campaignFound) {\r\n return campaignFound;\r\n }\r\n return bestOffer;\r\n};\r\n","import * as React from \"react\";\r\nimport { ITelemetry } from '@msdyn365-commerce/core';\r\ninterface ErrorBoundaryState {\r\n hasError: boolean;\r\n errorMessage: string;\r\n}\r\n\r\ninterface ErrorBoundaryProps {\r\n showMessage?: boolean | string; //true to show the error message, set to string to show custom message\r\n telemetry: ITelemetry\r\n}\r\n\r\n\r\n// Put this in a child component to mock an error in order to test ErrorBoundary.\r\nexport const MockError = (props: {message?: string}) => {\r\n throw new Error(props.message);\r\n};\r\n\r\nexport class ErrorBoundary extends React.Component {\r\n constructor(props: ErrorBoundaryProps) {\r\n super(props);\r\n this.state = {\r\n hasError: false,\r\n errorMessage: \"\"\r\n };\r\n }\r\n\r\n\r\n // @ts-ignore\r\n private static getDerivedStateFromError(error: any) {\r\n // Update state so the next render will show the fallback UI.\r\n return { hasError: true, errorMessage: error.message };\r\n }\r\n\r\n// public componentDidCatch(error: any, errorInfo: any) {\r\n// // You can also log the error to an error reporting service\r\n// logErrorToMyService(error, errorInfo);\r\n// }\r\n\r\n public render() {\r\n const bgColor = \"rgba(0,0,255)\";\r\n\r\n if (this.state.hasError) {\r\n const { showMessage } = this.props;\r\n const message = typeof showMessage === 'string' ? showMessage : showMessage ? this.state.errorMessage : false;\r\n this.props?.telemetry?.error(this.state?.errorMessage);\r\n // TODO design this custom UI fallback\r\n return message ?
{message}
: null;\r\n }\r\n\r\n return this.props.children || null;\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 Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nimport { IFinancingOfferFormatted } from '../Utilities/select-financing-offer';\r\n\r\n/**\r\n * FinancingOfferState Input Action\r\n */\r\n\r\nexport class FinancingOfferStateInput implements Msdyn365.IActionInput {\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 = () => `FinancingOfferState`;\r\n public getCacheObjectType = () => 'FinancingOfferState';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\n// Create a data model here or import one to capture the response of the action\r\nexport interface IFinancingOfferStateData {\r\n isOpen: boolean;\r\n totalPrice?: number;\r\n financingOffer?: IFinancingOfferFormatted;\r\n}\r\n\r\n/**\r\n * Use this function to create the input required to make the action call\r\n */\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new FinancingOfferStateInput();\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 action(input: FinancingOfferStateInput, ctx: Msdyn365.IActionContext): Promise {\r\n return { isOpen: false };\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'FinancingOfferState',\r\n input: createInput\r\n});\r\n","import React, { FunctionComponent } from 'react';\r\n\r\n\r\ninterface Props {\r\n /** Sets the skeleton-pulse style */\r\n type?: 'text' | 'image' | 'button' | 'button-secondary';\r\n /** Sets the width of the skeleton. Default unit is px. */\r\n width?: number | string;\r\n /** Sets the height of the skeleton. Default unit is px. */\r\n height?: number | string;\r\n /** Makes the skeleton look like a circle */\r\n circle?: boolean;\r\n /** Override classNames on wrapper */\r\n className?: string;\r\n /** Override styles on wrapper */\r\n style?: object;\r\n [rest: string]: unknown; // ...rest property\r\n}\r\n\r\nconst getValidCSSInput = (input: string | number) => {\r\n switch (typeof input) {\r\n case 'undefined':\r\n case 'boolean':\r\n return null;\r\n case 'number':\r\n return `${input}px`;\r\n default:\r\n const parsedInput = parseFloat(input);\r\n const unit = input.match(/%|em/);\r\n return isNaN(parsedInput) ? '' : unit ? `${parsedInput}${unit}` : `${parsedInput}px`;\r\n }\r\n};\r\n\r\nconst CustomSkeleton: FunctionComponent = ({\r\n width,\r\n height,\r\n circle,\r\n type = 'text',\r\n className = '',\r\n style = {},\r\n ...rest\r\n}) => {\r\n const isTextType = type === 'text';\r\n const classNames = `pulse ${!className ? type : ``} ${isTextType ? 'transform' : ''} ${type === 'button-secondary' && !className ? 'button' : ''} ${circle ? 'circle' : ''} ${className}`;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default CustomSkeleton;\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 * as React from 'react';\r\n\r\nimport { ICoreContext, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { FinancingOfferStateInput, IFinancingOfferStateData } from '../../../data-actions/financing-offer-state.action';\r\nimport { fireAnalyticsLink } from '../../../Utilities/analytics/clickTrack';\r\nimport {\r\n getCampaignRemainingCost,\r\n getValidSpecialCampaign,\r\n IFinancingOfferFormatted,\r\n selectFinancingOffer\r\n} from '../../../Utilities/select-financing-offer';\r\nimport { getQueryParamsFromQueryByName } from '../../../data-actions/utilities/utils';\r\nimport { variantQueryStringName } from '../../../Utilities/constants';\r\nimport CustomSkeleton from './CustomSkeleton';\r\n\r\nexport type FinancingComponentPageType = 'PDP' | 'PLP';\r\n\r\nexport interface IFinancingPerMonthComponentProps {\r\n pageType: FinancingComponentPageType;\r\n sellingPrice: number;\r\n // tslint:disable-next-line:no-any\r\n context: ICoreContext<{ [x: string]: any }>;\r\n priceComponent?: JSX.Element;\r\n // VSI Customization - START\r\n sizeValue?: string | undefined;\r\n dimensionPrice?: number | undefined;\r\n percentDiff?: number | undefined;\r\n discountAmount?: number;\r\n categoryName?: String | undefined,\r\n activeVariantId: number | undefined,\r\n productId: number | undefined,\r\n activeColorVariantId: number | undefined,\r\n isLoadedPriceComponent?: boolean | undefined,\r\n parentCategory?: string | undefined\r\n // VSI Customization - END\r\n}\r\n\r\nexport const FinancingPerMonthComponent: React.FC = ({\r\n pageType,\r\n sellingPrice,\r\n context,\r\n priceComponent,\r\n sizeValue,\r\n dimensionPrice,\r\n percentDiff,\r\n discountAmount,\r\n categoryName,\r\n activeVariantId,\r\n productId,\r\n activeColorVariantId,\r\n isLoadedPriceComponent,\r\n parentCategory\r\n}) => {\r\n const selectedFinancingOffer: IFinancingOfferFormatted | undefined = selectFinancingOffer({\r\n limitedTimeFinancingOffers: context.app.config.limitedTimeFinancingOffers,\r\n everydayFinancingOffers: context.app.config.everydayFinancingOffers,\r\n lowCostOffer: context.app.config.lowCostFinancingOffers,\r\n cashBackFinancingOffer: context.app.config.cashBackFinancingOffer,\r\n cashbackFinancingEnable: context.app.config.cashbackFinancingEnable,\r\n totalPrice: sellingPrice\r\n });\r\n\r\n if (!sellingPrice) {\r\n return null;\r\n }\r\n const monthlyCost = selectedFinancingOffer && Math.ceil(sellingPrice / selectedFinancingOffer.numOfMonths);\r\n const stateUpdate: IFinancingOfferStateData = {\r\n isOpen: true,\r\n totalPrice: sellingPrice,\r\n financingOffer: selectedFinancingOffer\r\n };\r\n const url = new URL(window.location.href.toString());\r\n const variantId = Number(getQueryParamsFromQueryByName(url, variantQueryStringName)) || undefined;\r\n const openModal = () => {\r\n fireAnalyticsLink({\r\n eventName: 'internal navigation',\r\n eventCategory: 'internal links',\r\n eventAction: 'to: Financing Per Month modal',\r\n eventLabel: `from ${pageType} Financing Per Month “Learn How” link`,\r\n eventNoninteraction: 'false'\r\n });\r\n context.actionContext.update(new FinancingOfferStateInput(), stateUpdate);\r\n };\r\n // format currency and strip trailing zeros\r\n // TODO: remove the cents portion in a dynamic way for all currencies\r\n const formattedMonthlyCost = monthlyCost && context.cultureFormatter.formatCurrency(monthlyCost);\r\n const monthlyCostStrippedZeros = formattedMonthlyCost && formattedMonthlyCost.substring(0, formattedMonthlyCost.length - 3);\r\n\r\n const campaign = selectedFinancingOffer && getValidSpecialCampaign(selectedFinancingOffer);\r\n const campaignRemainingCost =\r\n campaign && selectedFinancingOffer && getCampaignRemainingCost(campaign, selectedFinancingOffer, sellingPrice);\r\n\r\n const formattedCampaignCost =\r\n campaign && campaignRemainingCost && context.cultureFormatter.formatCurrency(Math.ceil(campaignRemainingCost.cost));\r\n const campaignCostStrippedZeros = formattedCampaignCost && formattedCampaignCost?.substring(0, formattedCampaignCost.length - 3);\r\n\r\n const cashbackFinancingMessage = context.app.config?.cashbackFinancingMessage;\r\n const pdpCashbackFinancingMessage = context.app.config?.pdpCashbackFinancingMessage;\r\n const everydayFinancingMessage = context.app.config.everydayFinancingMessage;\r\n const limitedFinancingMessage = context.app.config.limitedFinancingMessage;\r\n const limitedCampaignFinancingMessage = context.app.config.limitedCampaignFinancingMessage;\r\n\r\n const sellingPriceDollars = sellingPrice.toFixed(2).split('.')[0];\r\n const sellingPriceCents = sellingPrice.toFixed(2).split('.')[1];\r\n\r\n const dimensionDollars = dimensionPrice?.toFixed(2).split('.')[0];\r\n const dimensionCents = dimensionPrice?.toFixed(2).split('.')[1];\r\n const readyToShow = activeVariantId === productId || activeColorVariantId === productId || variantId === productId || pageType === \"PLP\";\r\n const promotionalPeriod = selectedFinancingOffer?.numOfMonths;\r\n const validThroughDate = selectedFinancingOffer && selectedFinancingOffer.isLTO && (promotionalPeriod === 36 || promotionalPeriod === 48 || promotionalPeriod === 60) ? '' : ` Valid thru ${selectedFinancingOffer?.endDate} `;\r\n const offerMinPurchase =\r\n selectedFinancingOffer && context.cultureFormatter.formatCurrency(Math.ceil(selectedFinancingOffer.minPurchase));\r\n const offerMinPurchaseStrippedZeros = offerMinPurchase && offerMinPurchase?.substring(0, offerMinPurchase.length - 3);\r\n // tslint:disable: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role\r\n return pageType === 'PDP' ? (\r\n
\r\n
\r\n
0 && Number(percentDiff) < 100 && discountAmount !== 0 ? 'product-price' : 'product-price-black'}>\r\n\r\n {Number(percentDiff) > 0 && discountAmount !== 0 ? readyToShow ?\r\n <>\r\n ${sellingPriceDollars}\r\n {sellingPriceCents}\r\n \r\n \r\n ${dimensionDollars}\r\n {dimensionCents}\r\n \r\n {percentDiff && percentDiff.toFixed()}% Off\r\n \r\n : : readyToShow ? priceComponent || (\r\n <>\r\n ${sellingPriceDollars}\r\n {sellingPriceCents}\r\n ) : \r\n }\r\n
\r\n
\r\n {selectedFinancingOffer && (\r\n <>\r\n {campaign && campaignRemainingCost ? (\r\n
\r\n {/* commented as per story no 21902 */}\r\n {/*
Pay as low as
*/}\r\n
or {`$${Math.ceil(\r\n campaign.initialMonthlyAmount\r\n )}/mo for the first ${campaign.numOfDiscountedMonths} months`}
\r\n {/* tslint:disable-next-line: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role*/}\r\n
e.stopPropagation()}>\r\n {/* {`Then $${Math.ceil(campaignRemainingCost.cost)}/mo for ${\r\n campaignRemainingCost?.months\r\n } months with 0% APR with Mattress Firm Credit Card.Limited Time.`} */}\r\n {limitedCampaignFinancingMessage &&\r\n limitedCampaignFinancingMessage\r\n ?.replace('{campaignCost}', campaignCostStrippedZeros)\r\n ?.replace('{campaignMonths}', campaignRemainingCost?.months)}\r\n \r\n Learn How\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n ) : selectedFinancingOffer.offerName?.toLowerCase() === 'low cost offer' ?\r\n
\r\n {/* tslint:disable-next-line: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role*/}\r\n
e.stopPropagation()}>\r\n {selectedFinancingOffer.lowCostFinancingOfferMessage}\r\n \r\n Learn How\r\n \r\n
\r\n
: (\r\n
\r\n {/* commented as per story no 21902 */}\r\n {/*
Pay as low as
*/}\r\n {/*
\r\n {pageType === 'PDP' ? `${monthlyCostStrippedZeros}/mo` : `${monthlyCostStrippedZeros} / mo`}\r\n
*/}\r\n {/* tslint:disable-next-line: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role*/}\r\n
e.stopPropagation()}>\r\n {/* {pageType === 'PDP' ? `${monthlyCostStrippedZeros}/mo` : `${monthlyCostStrippedZeros} / mo`} */}\r\n {selectedFinancingOffer?.isCashBack ? pdpCashbackFinancingMessage &&\r\n :\r\n selectedFinancingOffer.isLTO\r\n ? `${limitedFinancingMessage &&\r\n limitedFinancingMessage?.replace(\r\n '{numOfMonths}',\r\n selectedFinancingOffer.numOfMonths\r\n )}${(pageType === 'PDP' && validThroughDate)}`\r\n : everydayFinancingMessage &&\r\n everydayFinancingMessage\r\n ?.replace('{monthlyCostStrippedZeros}', monthlyCostStrippedZeros)\r\n ?.replace('{numOfMonths}', selectedFinancingOffer.numOfMonths)}\r\n {/* ? `0% Interest with ${\r\n selectedFinancingOffer.numOfMonths\r\n } equal monthly payments. Limited Time.${(pageType === 'PDP' &&\r\n ` Valid thru ${selectedFinancingOffer.endDate} `) ||\r\n ''}`\r\n :`Suggested payments with ${selectedFinancingOffer.numOfMonths} months special financing. `} */}\r\n \r\n Learn How\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n )}\r\n \r\n )}\r\n
\r\n ) : (\r\n
\r\n
\r\n {/* VSI Customization - START */}\r\n
{pageType === 'PLP' ? (sizeValue ? sizeValue : 'Starting at') : null}
\r\n {/* VSI Customization - END */}\r\n
{priceComponent || `${context.cultureFormatter.formatCurrency(sellingPrice)}`}
\r\n
\r\n {selectedFinancingOffer && (\r\n <>\r\n
\r\n OR\r\n
\r\n {campaign && campaignRemainingCost ? (\r\n
\r\n {/* commented as per story no 21902 */}\r\n {/*
Pay as low as
*/}\r\n
{`$${Math.ceil(\r\n campaign.initialMonthlyAmount\r\n )}/mo for the first ${campaign.numOfDiscountedMonths} months`}
\r\n {/* tslint:disable-next-line: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role*/}\r\n
e.stopPropagation()}>\r\n {/* {`Then $${Math.ceil(campaignRemainingCost.cost)}/mo for ${\r\n campaignRemainingCost?.months\r\n } months with 0% APR with Mattress Firm Credit Card.Limited Time.`} */}\r\n {limitedCampaignFinancingMessage &&\r\n limitedCampaignFinancingMessage\r\n ?.replace('{campaignCost}', campaignCostStrippedZeros)\r\n ?.replace('{campaignMonths}', campaignRemainingCost?.months)}\r\n \r\n
\r\n
\r\n )\r\n :\r\n selectedFinancingOffer.offerName?.toLowerCase() === 'low cost offer' ?\r\n
\r\n {/* tslint:disable-next-line: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role*/}\r\n
e.stopPropagation()}>\r\n

{selectedFinancingOffer.lowCostFinancingOfferMessage?.replace('.', '.\\n')}

\r\n \r\n
\r\n
\r\n : (\r\n
\r\n {/* tslint:disable-next-line: react-this-binding-issue jsx-no-lambda react-a11y-event-has-role*/}\r\n
\r\n {pageType === 'PLP' ? `${monthlyCostStrippedZeros}/mo` : `${monthlyCostStrippedZeros} / mo`}\r\n
\r\n
e.stopPropagation()}>\r\n {selectedFinancingOffer?.isCashBack ? cashbackFinancingMessage &&\r\n :\r\n selectedFinancingOffer.isLTO\r\n ? `${limitedFinancingMessage &&\r\n limitedFinancingMessage?.replace(\r\n '{numOfMonths}',\r\n selectedFinancingOffer.numOfMonths\r\n )?.replace('{monthlyCostStrippedZeros}', monthlyCostStrippedZeros)\r\n }`\r\n : everydayFinancingMessage &&\r\n everydayFinancingMessage\r\n ?.replace('{numOfMonths}', selectedFinancingOffer.numOfMonths)\r\n ?.replace('{monthlyCostStrippedZeros}', monthlyCostStrippedZeros)\r\n }\r\n \r\n
\r\n
\r\n )}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n","import { ICoreContext, IGeneric, IAny } from '@msdyn365-commerce/core';\r\nimport { AttributeValue, CommerceProperty } from '@msdyn365-commerce/retail-proxy';\r\nimport React from 'react';\r\nimport { IBrandListData } from '../../../../../modules/mfrm-buybox/mfrm-buybox.view';\r\nimport { _getSoonestDeliveryDate, _makeDeliveryMessage } from '../../../../../Utilities/product-search-result-utils';\r\nimport { ProductSearchResultExtended } from '../../../custom-components/product-search-result-items';\r\nimport CustomSkeleton from '../../../custom-components/CustomSkeleton';\r\ninterface IDeliveryMessage {\r\n product?: ProductSearchResultExtended;\r\n context: ICoreContext>;\r\n isMasterProduct?: boolean;\r\n attributeValues?: AttributeValue[];\r\n extensionProperties?: CommerceProperty[];\r\n lowestPriceVariantRecordId?: string;\r\n}\r\n\r\n//TODO: common method; move to general utility file. AND change return type to an Enumeration\r\nexport const _getProductType = (shippingInformation: string | undefined): string => {\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'delivery') {\r\n return 'Core';\r\n }\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'parcel') {\r\n return 'Small Parcel';\r\n }\r\n if (shippingInformation && shippingInformation.toLowerCase() === 'drop ship') {\r\n return 'Drop Ship';\r\n }\r\n return '';\r\n};\r\n\r\nexport const computeItemLines = (\r\n product: IDeliveryMessage['product'],\r\n defaultVariantId: number | undefined,\r\n lowestPriceVariantRecordId: string | undefined\r\n) => {\r\n if (product?.IsMasterProduct) {\r\n if (defaultVariantId && defaultVariantId !== 0) {\r\n return defaultVariantId.toString();\r\n }\r\n if (lowestPriceVariantRecordId && lowestPriceVariantRecordId !== '') {\r\n return lowestPriceVariantRecordId;\r\n }\r\n }\r\n return product?.RecordId.toString();\r\n};\r\n\r\nconst DeliveryMessage: React.FC = ({\r\n product,\r\n context,\r\n attributeValues,\r\n extensionProperties,\r\n lowestPriceVariantRecordId\r\n}) => {\r\n let productDeliveryMessage = '';\r\n const { app } = context;\r\n const shippingInformationSmall = attributeValues && attributeValues.find(\r\n (attr: AttributeValue) => attr.Name?.trim() === app.config.smallParcelAttributeKey\r\n )?.TextValue?.toLowerCase();\r\n\r\n const defaultVariantShippingInformation = extensionProperties && extensionProperties.find(\r\n (property: CommerceProperty) => property?.Key === \"Unbxd_DefaultVariantShippingInformation\"\r\n )?.Value?.StringValue;\r\n\r\n if ((_getProductType(defaultVariantShippingInformation || shippingInformationSmall)) === 'Core') {\r\n productDeliveryMessage = product?.deliveryByMessage ?? '';\r\n } else if ((\r\n (_getProductType(defaultVariantShippingInformation || shippingInformationSmall)) === 'Small Parcel' ||\r\n (_getProductType(defaultVariantShippingInformation || shippingInformationSmall)) === 'Drop Ship'\r\n )) {\r\n let deliveryDays =\r\n attributeValues && attributeValues.find(attr => attr.Name?.trim() === app.config.leadTime)?.TextValue;\r\n if (\r\n (deliveryDays === '' || deliveryDays === undefined || deliveryDays === null) &&\r\n app.config.brandList &&\r\n app.config.brandList.length > 0\r\n ) {\r\n const brand =\r\n attributeValues &&\r\n attributeValues.find(\r\n attr =>\r\n app.config.brandBackofficeAttributePlp &&\r\n attr.Name?.trim() === app.config.brandBackofficeAttributePlp\r\n )?.TextValue?.toLowerCase();\r\n\r\n if (brand !== undefined && brand !== null && brand !== '') {\r\n app.config.brandList.map((singleBrand: IBrandListData) => {\r\n if (singleBrand.brandName.toLowerCase() === brand) {\r\n deliveryDays =\r\n singleBrand.brandLeadtime !== undefined &&\r\n singleBrand.brandLeadtime !== '' &&\r\n singleBrand.brandLeadtime !== null\r\n ? singleBrand.brandLeadtime\r\n : '';\r\n }\r\n });\r\n }\r\n deliveryDays = app.config.brandList[0].brandLeadtime;\r\n }\r\n if (deliveryDays && productDeliveryMessage === '') {\r\n productDeliveryMessage = _makeDeliveryMessage(deliveryDays);\r\n }\r\n }\r\n\r\n return productDeliveryMessage ? (\r\n
\r\n {productDeliveryMessage}\r\n
\r\n ) : ;\r\n};\r\n\r\nexport default DeliveryMessage;","import { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ITelemetryContent,\r\n onTelemetryClick\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { PriceComponent, RatingComponent, IPriceComponentResources } from '@msdyn365-commerce/components';\r\nimport { CommerceProperty } from '@msdyn365-commerce/retail-proxy';\r\nimport MsDyn365, {\r\n IComponent,\r\n IComponentProps,\r\n ICoreContext,\r\n IGridSettings,\r\n IImageData,\r\n IImageSettings,\r\n IImageProps,\r\n Image,\r\n IRequestContext,\r\n msdyn365Commerce,\r\n RichTextComponent\r\n} from '@msdyn365-commerce/core';\r\nimport { AttributeValue, ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport React from 'react';\r\n// VSI Customization - starts\r\nimport { convertToTitlecase } from '../../../../Utilities/convert-to-titlecase';\r\nimport { getBVAttributeValues } from '../../../../Utilities/get-bv-attributes';\r\nimport { buildProductBadge, parseBadgeData } from '../../../../Utilities/get-product-badge';\r\nimport { parseBrandName } from '../../../../Utilities/get-product-brand';\r\nimport {\r\n _coreProductATPCall,\r\n _getEyebrowMessage,\r\n _getSoonestDeliveryDate,\r\n _makeDeliveryMessage\r\n} from '../../../../Utilities/product-search-result-utils';\r\nimport { FinancingPerMonthComponent } from '../../custom-components/financing-per-month-component';\r\nimport DeliveryMessage from './delivery-message';\r\nimport { BVRatingSummary } from '../../../../Utilities/components/BVRatingSummary';\r\nimport { removeSpecialChars } from '../../../../Utilities/allRegex';\r\nimport CustomSkeleton from '../../custom-components/CustomSkeleton';\r\nimport { ErrorBoundary } from '../../../../common/components/error-boundary';\r\n// VSI Customization - ends\r\nexport interface IProductComponentProps extends IComponentProps<{ product?: ProductSearchResult }> {\r\n className?: string;\r\n imageSettings?: IImageSettings;\r\n savingsText?: string;\r\n freePriceText?: string;\r\n originalPriceText?: string;\r\n currentPriceText?: string;\r\n ratingAriaLabel?: string;\r\n allowBack?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n quickViewButton?: React.ReactNode;\r\n eyebrowMessage?: string | undefined;\r\n badgeAttribute?: string;\r\n deliveryMessage?: string;\r\n isRefinersEnabled?: boolean;\r\n // VSI Customization - Copied following 3 props from OOTB product.component to be used in product recommendations for Cart\r\n ratingCountAriaLabel?: string;\r\n isPriceMinMaxEnabled?: boolean;\r\n priceResources?: IPriceComponentResources;\r\n // Customized props for product recommendation on Cart page\r\n displayShopNow?: boolean;\r\n showBvRatings?: boolean;\r\n shopNowBtnText?: string;\r\n}\r\n\r\nexport interface IEyebrowMessageDimensions {\r\n height: number;\r\n visibleHeight: number;\r\n}\r\n\r\nexport interface IProductComponent extends IComponent { }\r\n\r\nconst PriceComponentActions = {};\r\n\r\n// tslint:disable-next-line: max-func-body-length cyclomatic-complexity\r\nconst ProductCard: React.FC = ({\r\n data,\r\n context,\r\n imageSettings,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText,\r\n ratingAriaLabel,\r\n allowBack,\r\n typeName,\r\n id,\r\n telemetryContent,\r\n quickViewButton,\r\n eyebrowMessage,\r\n badgeAttribute,\r\n deliveryMessage,\r\n isRefinersEnabled,\r\n displayShopNow,\r\n shopNowBtnText,\r\n showBvRatings\r\n}) => {\r\n // VSI Customization - starts\r\n const {\r\n app: {\r\n config: { brandBackofficeAttributePlp, enableAttributeBasedRating }\r\n }\r\n } = context;\r\n const getEyebrowElementRef = React.useRef(null);\r\n const eyebrowElement = getEyebrowElementRef.current?.querySelector('.mfrm-eyebrow__button-plp') as Element;\r\n const [isTruncated, setTruncated] = React.useState({\r\n height: eyebrowElement?.scrollHeight,\r\n visibleHeight: eyebrowElement?.clientHeight\r\n });\r\n\r\n const badgeAttributeToUse = context.app.config.productBadgeAttribute;\r\n // VSI Customization - ends\r\n const product = data.product;\r\n if (!product) {\r\n return null;\r\n }\r\n // VSI Customization - starts\r\n /** When enabled rating values will be picked from BazaarVoice attributes created on product.\r\n * If disabled rating will be shown from OOTB properties on a product.\r\n * This will be used for PLP and product-collection/product recommendations\r\n */\r\n const { AttributeValues, ExtensionProperties } = product;\r\n let isBVratings = false;\r\n if (AttributeValues && AttributeValues?.find(attr => attr.Name?.trim() === \"BVAverageOverallRating\")) {\r\n isBVratings = true;\r\n }\r\n const averageRating = enableAttributeBasedRating && AttributeValues && isBVratings ? getBVAttributeValues(AttributeValues, 'BVAverageOverallRating') : _parseValue(product?.AverageRating);\r\n const totalRatings = enableAttributeBasedRating && AttributeValues && isBVratings ? getBVAttributeValues(AttributeValues, 'BVTotalReviewCount') : _parseValue(product?.TotalRatings);\r\n React.useEffect(() => {\r\n function handleResize(): void {\r\n setTruncated({\r\n height: eyebrowElement?.scrollHeight,\r\n visibleHeight: eyebrowElement?.clientHeight\r\n });\r\n }\r\n handleResize();\r\n if (MsDyn365.isBrowser) {\r\n window.addEventListener('resize', handleResize);\r\n return () => window.removeEventListener('resize', handleResize);\r\n } else {\r\n return () => null;\r\n }\r\n }, [eyebrowElement?.scrollHeight, eyebrowElement?.clientHeight]);\r\n // VSI Customization - ends\r\n const lowestPriceVariantRecordId = AttributeValues?.find(\r\n attr => attr.Name?.trim() === context.app.config.EcomLowestPriceVariantRecIdKey\r\n )?.TextValue;\r\n const unbxdDefaultVariant = product && product.ExtensionProperties?.find((property: CommerceProperty) => property?.Key === \"Unbxd_DefaultVariantID\")?.Value?.LongValue;\r\n const queryBasedSelection = context.app.config.queryBasedVariantSelection;\r\n const fallBackImage = context.app.config.placeholderImageName;\r\n const defaultOrLowestVariantRecordId = unbxdDefaultVariant! > 0 ? unbxdDefaultVariant : product.RecordId;\r\n let productUrl = getProductPageUrlSync(removeSpecialChars(product?.Name!, context) || '', queryBasedSelection ? product.MasterProductId || product.RecordId : product.RecordId, context && context.actionContext, undefined);\r\n\r\n if (allowBack) {\r\n productUrl = updateProductUrl(productUrl, context);\r\n }\r\n if (queryBasedSelection) {\r\n const variantIdQueryParams = productUrl.includes('?') ? `&variantid=${defaultOrLowestVariantRecordId}` : `?variantid=${defaultOrLowestVariantRecordId}`;\r\n productUrl += variantIdQueryParams;\r\n }\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', defaultOrLowestVariantRecordId!.toString());\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n // VSI Customization -starts\r\n // #17772: Check the master product, if false then add size Refinement property otherwise show Starting at\r\n let sizeValue =\r\n product && !product?.IsMasterProduct && product?.ExtensionProperties && product?.ExtensionProperties?.length > 0\r\n ? product?.ExtensionProperties.find(i => i.Key === \"Size\")?.Value?.StringValue\r\n : '';\r\n sizeValue = sizeValue && convertToTitlecase(sizeValue);\r\n\r\n // Flag used on cart page to display ratings & shop now button\r\n const isCustomizedDesign = displayShopNow;\r\n\r\n if (typeName === 'product-collection') {\r\n // VSI Customization -starts\r\n const brandName = parseBrandName(AttributeValues, brandBackofficeAttributePlp);\r\n const productTitleWithBrandname = brandName ? `${brandName} ${product.Name}` : product.Name;\r\n // VSI Customization -end\r\n // tslint:disable:max-line-length\r\n return (\r\n \r\n
\r\n \r\n {
{renderProductBadge(badgeAttributeToUse, AttributeValues, context.request)}
}\r\n
\r\n {renderProductPlacementImage(\r\n imageSettings, context.request.gridSettings, product.PrimaryImageUrl,\r\n product.PrimaryImageUrl, product.Name, context.actionContext.requestContext, fallBackImage)}\r\n
\r\n \r\n
\r\n {/* VSI Customization - START */}\r\n {/* (ADO:23447) Added only class name conditionally as discounted price based on product.component if BasePrice > Price then it will be discounted else not */}\r\n product.Price\r\n ? 'msc-product discounted'\r\n : 'msc-product'\r\n : 'msc-product'\r\n }\r\n href={productUrl}\r\n onClick={onTelemetryClick(telemetryContent!, payLoad, product.Name!)}\r\n aria-label={renderLabel(\r\n product.Name,\r\n context.cultureFormatter.formatCurrency(product.Price),\r\n product.AverageRating,\r\n ratingAriaLabel\r\n )}\r\n {...attribute}\r\n >\r\n {/* Todo: 'Starting at' string will be replaced with relevant resources */} {/* For cart page, price will be shown after name */}\r\n {!isCustomizedDesign &&\r\n <>\r\n {sizeValue ? sizeValue : product.Price !== 0 ? 'Starting at ' : ''}\r\n {renderPrice(\r\n context,\r\n typeName,\r\n id,\r\n product.BasePrice,\r\n product.Price,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText\r\n )}\r\n \r\n }\r\n {!isCustomizedDesign &&\r\n \r\n {productTitleWithBrandname && productTitleWithBrandname.length > 40\r\n ? `${productTitleWithBrandname.slice(0, 40)}...`\r\n : productTitleWithBrandname}\r\n \r\n }\r\n {isCustomizedDesign &&\r\n \r\n {productTitleWithBrandname}\r\n \r\n }\r\n {isCustomizedDesign &&\r\n
\r\n {renderPrice(\r\n context,\r\n typeName,\r\n id,\r\n product.BasePrice,\r\n product.Price,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText\r\n )}\r\n
\r\n }\r\n {/* todo : will be added when required in next sprints */}\r\n {!context.app.config.hideRating &&\r\n renderRating(context, typeName, id, averageRating, totalRatings, ratingAriaLabel)}\r\n {isCustomizedDesign &&\r\n \r\n }\r\n {/* VSI Customization - END */}\r\n \r\n
\r\n {/* OOB Quick View */}\r\n {/* {quickViewButton && renderQuickView(quickViewButton, product.RecordId)} */}\r\n
\r\n
\r\n );\r\n } else {\r\n const priceComponent = renderPrice(\r\n context,\r\n typeName,\r\n id,\r\n product.BasePrice,\r\n product.Price,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText\r\n );\r\n const isSearchResultContainer = typeName === 'search-result-container' || typeName === 'mfrm-search-result-container';\r\n const brandName = parseBrandName(AttributeValues, brandBackofficeAttributePlp);\r\n return (\r\n // tslint:disable-next-line: react-this-binding-issue jsx-no-lambda\r\n \r\n
setProductUrl(productUrl)}>\r\n \r\n {isSearchResultContainer && (\r\n
\r\n {renderProductBadge(badgeAttributeToUse, AttributeValues, context.request)}\r\n
\r\n )}\r\n
\r\n {renderProductPlacementImage(\r\n imageSettings, context.request.gridSettings, product.PrimaryImageUrl,\r\n product.PrimaryImageUrl, product.Name, context.actionContext.requestContext, fallBackImage)}\r\n
\r\n \r\n\r\n
\r\n {/* VSI Customization - START */}\r\n
\r\n {/* VSI Customization - END */}\r\n {isSearchResultContainer && eyebrowMessage && (\r\n
\r\n
\r\n \r\n {isTruncated.height > isTruncated.visibleHeight ? (\r\n \r\n ) : (\r\n false\r\n )}\r\n
\r\n
\r\n )}\r\n {isSearchResultContainer && !eyebrowMessage && eyebrowMessage?.length !== 0 && !showBvRatings && (\r\n \r\n )}\r\n {isSearchResultContainer && eyebrowMessage?.length === 0 && !showBvRatings && (\r\n
\r\n
 
\r\n
\r\n )}\r\n {!context.app.config.hideRating && (data.product && showBvRatings) ? :\r\n (renderRating(context, typeName, id, averageRating, totalRatings, ratingAriaLabel) ? renderRating(context, typeName, id, averageRating, totalRatings, ratingAriaLabel) :\r\n
\r\n
 
\r\n
\r\n )}\r\n {/* VSI Customization - START */}\r\n
\r\n {/* VSI Customization - END */}\r\n \r\n \r\n {brandName ? `${brandName} ${product.Name}` : product.Name}\r\n \r\n\r\n {/* original price */}\r\n {!isSearchResultContainer && priceComponent}\r\n {renderDescription(product.Description)}\r\n \r\n {/* {deliveryMessage && <>{deliveryMessage}} */}\r\n \r\n
\r\n {/* new price */}\r\n {isSearchResultContainer\r\n ? product.Price\r\n ? priceComponent && (\r\n \r\n )\r\n : priceComponent\r\n : null}\r\n {/* OOB Quick View */}\r\n {/* {quickViewButton && renderQuickView(quickViewButton, product.RecordId)} */}\r\n
\r\n
\r\n );\r\n }\r\n // VSI Customization - Ends here\r\n};\r\n// VSI Customization - Starts here\r\nfunction _parseValue(productRating?: string | number): number {\r\n const value = +(productRating || 0);\r\n return Math.round(value * 10) / 10;\r\n}\r\n// VSI Customization - Ends here\r\nfunction renderLabel(name?: string, price?: string, rating?: number, ratingAriaLabel?: string): string {\r\n name = name || '';\r\n price = price || '';\r\n return `${name} ${price} ${getRatingAriaLabel(rating, ratingAriaLabel)}`;\r\n}\r\n\r\nfunction setProductUrl(productUrl: string): void {\r\n if (MsDyn365.isBrowser) {\r\n window.location.href = productUrl;\r\n }\r\n}\r\n\r\nfunction renderDescription(description?: string): JSX.Element | null {\r\n return

{description}

;\r\n}\r\n\r\n// Render Quick View\r\n// function renderQuickView(quickview: React.ReactNode, item?: number): JSX.Element | undefined {\r\n// if (quickview === null) {\r\n// return undefined;\r\n// }\r\n// return React.cloneElement(quickview as React.ReactElement, { selectedProductId: item });\r\n// }\r\n\r\nfunction 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\nfunction updateProductUrl(productUrl: string, context: ICoreContext): string {\r\n const srcUrl = new URL(productUrl, context.request.apiSettings.baseUrl);\r\n const queryString = 'back=true';\r\n if (srcUrl.search) {\r\n srcUrl.search += `&${queryString}`;\r\n } else {\r\n srcUrl.search += queryString;\r\n }\r\n\r\n const updatedUrl = new URL(srcUrl.href);\r\n return updatedUrl.pathname + srcUrl.search;\r\n}\r\n\r\nfunction 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 = 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\nfunction renderPrice(\r\n context: ICoreContext,\r\n typeName: string,\r\n id: string,\r\n basePrice?: number,\r\n adjustedPrice?: number,\r\n savingsText?: string,\r\n freePriceText?: string,\r\n originalPriceText?: string,\r\n currentPriceText?: string\r\n): JSX.Element | null {\r\n const price: ProductPrice = {\r\n BasePrice: basePrice,\r\n AdjustedPrice: adjustedPrice,\r\n CustomerContextualPrice: adjustedPrice\r\n };\r\n return basePrice ? (\r\n \r\n ) : null;\r\n}\r\n\r\n/**\r\n * Gets the react component for product rating.\r\n * @param productCardimageSettings - Module image settings for product card.\r\n * @param gridSettings - Grid settings defined in theme.\r\n * @param imageUrl - Image url.\r\n * @param fallbackImageUrl - Fallback url for imge.\r\n * @param altText - Image Alt text.\r\n * @param requestContext - Request context using the component.\r\n * @param fallBackImage - Placeholder Image from App settings\r\n * @returns React component for product image.\r\n */\r\nfunction renderProductPlacementImage(\r\n productCardimageSettings?: IImageSettings, gridSettings?: IGridSettings,\r\n imageUrl?: string, fallbackImageUrl?: string, altText?: string, requestContext?: IRequestContext, fallBackImage?: string): JSX.Element | null {\r\n\r\n if (!imageUrl || !gridSettings || !productCardimageSettings) {\r\n return null;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Site level config can be of any type.\r\n const emptyPlaceHolderImage = fallBackImage || '';\r\n let fallbackImageSource = fallbackImageUrl;\r\n if (emptyPlaceHolderImage && fallbackImageUrl) {\r\n fallbackImageSource = `${fallbackImageUrl},${emptyPlaceHolderImage}`;\r\n }\r\n const image: IImageData = {\r\n src: imageUrl,\r\n altText: altText ? altText : '',\r\n fallBackSrc: fallbackImageSource\r\n };\r\n const imageProps: IImageProps = { gridSettings };\r\n\r\n imageProps.gridSettings = gridSettings;\r\n imageProps.imageSettings = productCardimageSettings;\r\n imageProps.imageSettings.cropFocalRegion = true;\r\n return (\r\n \r\n );\r\n}\r\n// VSI Customization - starts\r\n\r\nfunction 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 => 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// VSI Customization - ends\r\n\r\n// @ts-ignore\r\nexport const ProductComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride<\r\n IProductComponent\r\n>('Product', { component: ProductCard, ...PriceComponentActions });\r\n\r\nexport default ProductComponent;","export const convertToTitlecase = (stringValue?: string, stopConvert?: boolean) => {\r\n // this stopConvert flag will use to stop conversion in specific scenario\r\n return stopConvert\r\n ? stringValue\r\n : stringValue?.replace(/\\w\\S*/g, txt => {\r\n return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();\r\n });\r\n};\r\n"],"names":["emailRegex","emailValue","test","removeSpecialChars","str","ctx","_ctx$request$app","request","app","config","removeSpecialCharsPDP","replace","removeSpecialCharsFromURLPath","_ctx$request$app2","_decodeURIComponent","decodeURIComponent","split","customerInfoPhoneRegex","inputRegexObj","nameRegex","addressInputRegex","phoneNumerRegex","cartDeliveryMsgRegex","fireAnalyticsLink","_ref","searchTerm","searchType","eventName","eventCategory","eventAction","eventLabel","eventType","eventNoninteraction","enhancedAction","generalConfig","promoConfig","productConfig","customerConfig","productImpressionConfig","callUtagLink","_objectSpread","event","event_category","event_action","event_label","event_type","event_noninteraction","enhanced_action","search_term","search_type","BVRatingSummary","itemId","onClick","variantId","hideReadReviewsButton","dataBvProductIdAttr","setDataBvProductIdAttr","useState","wrapper","useRef","interval","numReviews","setNumReviews","useEffect","pollInterval","window","setInterval","_wrapper$current","numReviewsHTML","current","querySelector","innerHTML","match","clearInterval","style","display","React","onMouseEnter","button","Array","from","document","querySelectorAll","find","outerHTML","onMouseLeave","ref","getBVAttributeValues","attributeValues","key","_attributeValues$find","value","attr","_attr$Name","Name","trim","TextValue","Math","round","getBVAttributeValuesUnbxd","_attributeValues$key","dayjs","tz","utc","isBetween","format","defaultImageSettings","viewports","xs","q","w","h","disableLazyLoad","parseBadgeData","badgeData","requestContext","_startTime","_endTime","dataSegments","scheduleStart","scheduleEnd","badgeType","parsedScheduleStart","startDate","startTime","parsedScheduleEnd","endDate","endTime","e","startMoment","endMoment","startMomentFormatted","endMomentFormatted","isValid","baseUrl","apiSettings","baseImageUrl","substring","length","removed$","src","toLowerCase","alt","start","convertTimeZone","end","time","local","buildProductBadge","parsedBadgeData","Image","className","gridSettings","altText","title","imageSettings","renderProductBadge","attributeName","finalizedBadges","map","badge","parsedBadge","getValidSpecialCampaign","financingOffer","specialCampaign","enableCampaign","initialMonthlyAmount","numOfDiscountedMonths","isCampaignScheduled","getCampaignRemainingCost","campaign","totalPrice","remainingCost","remainingMonths","numOfMonths","cost","months","offer","_tempOffer$specialCam","_tempOffer$specialCam2","tempOffer","Object","create","_tempOffer$specialCam3","_tempOffer$specialCam4","campaignValidStartDate","campaignValidEndDate","isScheduled","add","startDateCentralTime","endDateCentralTime","now","selectFinancingOffer","returnCustomOfferArray","campaignFound","limitedTimeFinancingOffers","everydayFinancingOffers","lowCostOffer","specialFinancingOffer","synchronySpecialFinancingCondition","specialFinancingEnable","checkoutShowEveryDayOffers","cashbackFinancingEnable","cashBackFinancingOffer","highestMinimumPurchase","bestOffer","costPerMonth","isLTO","minPurchase","everydayFinancingOfferMessage","limitedFinancingOfferMessage","cashbackFinancingOfferMessage","monthlyOfferDetails","financingOfferDescription","disclaimer","offerFound","everydayOffers","specialOffer","validLimitedTimeFinancingOffers","filter","offerValidStartDate","offerValidEndDate","isValidLimitedTimeOffer","forEach","currentOfferAccepted","noInterestFor","ceil","offerName","FinancingOfferDataOnPage","checkoutDisplay","push","isAfter","cashBackOffer","isCashBack","cashBackPercentageAmount","cashbackBannerDetails","updatedOffer","calculateFinancing","currentOffer","monthlyPayment","financingMessage","specialCampaignOffer","specialCase36Months","validCampaign","undefined","_offer$offerName","maxPurchase","_offer$financingOffer","_offer$defaultNumberO","LCO","lowCostFinancingOfferMessage","defaultNumberOfMonths","toString","lowCostOfferDetailsOnCart","ErrorBoundary","constructor","props","super","this","state","hasError","errorMessage","error","message","render","_this$props","_this$state","showMessage","telemetry","background","padding","color","children","FinancingOfferStateInput","getCacheKey","getCacheObjectType","dataCacheType","Msdyn365","action","async","input","isOpen","id","args","getValidCSSInput","parsedInput","parseFloat","unit","isNaN","_getValidCSSInput","_getValidCSSInput2","width","height","circle","type","rest","_objectWithoutProperties","_excluded","classNames","assign","borderRadius","FinancingPerMonthComponent","_context$app$config","_context$app$config2","_limitedCampaignFinan","_selectedFinancingOff","_pdpCashbackFinancing","_everydayFinancingMes","_limitedCampaignFinan2","_selectedFinancingOff2","_selectedFinancingOff3","_cashbackFinancingMes","_limitedFinancingMess","_everydayFinancingMes2","pageType","sellingPrice","context","priceComponent","sizeValue","dimensionPrice","percentDiff","discountAmount","categoryName","activeVariantId","productId","activeColorVariantId","isLoadedPriceComponent","parentCategory","selectedFinancingOffer","lowCostFinancingOffers","monthlyCost","stateUpdate","url","URL","location","href","Number","getQueryParamsFromQueryByName","variantQueryStringName","openModal","actionContext","update","formattedMonthlyCost","cultureFormatter","formatCurrency","monthlyCostStrippedZeros","campaignRemainingCost","formattedCampaignCost","campaignCostStrippedZeros","cashbackFinancingMessage","pdpCashbackFinancingMessage","everydayFinancingMessage","limitedFinancingMessage","limitedCampaignFinancingMessage","sellingPriceDollars","toFixed","sellingPriceCents","dimensionDollars","dimensionCents","readyToShow","promotionalPeriod","validThroughDate","offerMinPurchase","offerMinPurchaseStrippedZeros","CustomSkeleton","stopPropagation","role","RichTextComponent","text","_getProductType","shippingInformation","computeItemLines","product","defaultVariantId","lowestPriceVariantRecordId","IsMasterProduct","RecordId","_extensionProperties$","extensionProperties","productDeliveryMessage","shippingInformationSmall","smallParcelAttributeKey","defaultVariantShippingInformation","property","Key","Value","StringValue","_product$deliveryByMe","deliveryByMessage","_attributeValues$find2","deliveryDays","_attr$Name2","leadTime","brandList","_attributeValues$find3","brand","_attr$Name3","brandBackofficeAttributePlp","singleBrand","brandName","brandLeadtime","_makeDeliveryMessage","_parseValue","productRating","renderLabel","name","price","rating","ratingAriaLabel","getRatingAriaLabel","roundedRating","renderRating","typeName","avgRating","totalRatings","ariaLabel","numRatings","RatingComponent","ratingCount","readOnly","data","renderPrice","basePrice","adjustedPrice","savingsText","freePriceText","originalPriceText","currentPriceText","BasePrice","AdjustedPrice","CustomerContextualPrice","PriceComponent","renderProductPlacementImage","productCardimageSettings","imageUrl","fallbackImageUrl","fallBackImage","emptyPlaceHolderImage","fallbackImageSource","image","fallBackSrc","imageProps","cropFocalRegion","loadFailureBehavior","bypassHideOnFailure","attributes","_attributes$find","currAttribute","ProductComponent","msdyn365Commerce","createComponentOverride","component","_getEyebrowElementRef","_AttributeValues$find","_product$ExtensionPro","_product$ExtensionPro2","_product$ExtensionPro3","allowBack","telemetryContent","quickViewButton","eyebrowMessage","badgeAttribute","deliveryMessage","isRefinersEnabled","displayShopNow","shopNowBtnText","showBvRatings","enableAttributeBasedRating","getEyebrowElementRef","eyebrowElement","isTruncated","setTruncated","scrollHeight","visibleHeight","clientHeight","badgeAttributeToUse","productBadgeAttribute","AttributeValues","ExtensionProperties","isBVratings","averageRating","AverageRating","TotalRatings","handleResize","MsDyn365","isBrowser","addEventListener","removeEventListener","EcomLowestPriceVariantRecIdKey","unbxdDefaultVariant","LongValue","queryBasedSelection","queryBasedVariantSelection","placeholderImageName","defaultOrLowestVariantRecordId","productUrl","getProductPageUrlSync","MasterProductId","srcUrl","queryString","search","pathname","updateProductUrl","variantIdQueryParams","includes","payLoad","getPayloadObject","attribute","getTelemetryAttributes","i","convertToTitlecase","stringValue","stopConvert","txt","charAt","toUpperCase","substr","isCustomizedDesign","parseBrandName","productTitleWithBrandname","onTelemetryClick","Price","PrimaryImageUrl","slice","hideRating","Button","isSearchResultContainer","setProductUrl","ItemId","description","Description","DeliveryMessage"],"sourceRoot":""}