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,EAA8BE,mCACrDD,EAAUP,WAAaM,EAA8BG,+CANlDJ,EAHA,GAkBFK,EAAyBA,CAAClC,EAAkB1J,KACrD,GAAIA,SAAAA,EAAgB6L,UAAY7L,EAAe6L,SAASC,kBAAmB,CACvE,MAAMC,EAAM,IAAIX,IAAI1B,GACdsC,EAA6B,IAAIC,gBAAgBF,EAAIG,QAK3D,OAJIF,EAAUG,IAAI,WACdH,EAAUI,OAAO,UAErBL,EAAIG,OAASF,EAAUxB,WAChBuB,EAAIvB,UAAW,CAE1B,OAAOd,CAAQ,SC3cnB2C,EAAOC,QAAU1R,cCAjByR,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/eshop-custom-faq/eshop-custom-faq.tsx?e5f9","webpack://Msdyn365.Commerce.Online/./src/modules/eshop-custom-faq/eshop-custom-faq.view.tsx?c9c4","webpack://Msdyn365.Commerce.Online/./lib/eshop-custom-faq/module-registration.js?4d34","webpack://Msdyn365.Commerce.Online/../../../src/utilities/QueryResultSettingsProxy.ts?5e44","webpack://Msdyn365.Commerce.Online/../../../../src/utilities/extensions/array-extensions.ts?1a2a","webpack://Msdyn365.Commerce.Online/../../../../src/utilities/extensions/enum-extensions.ts?cf51","webpack://Msdyn365.Commerce.Online/../../../../src/utilities/extensions/string-extensions.ts?ab9f","webpack://Msdyn365.Commerce.Online/../../../../src/utilities/extensions/object-extensions.ts?6388","webpack://Msdyn365.Commerce.Online/../../../src/utilities/input-data-parser.ts?027a","webpack://Msdyn365.Commerce.Online/../../../src/utilities/utils.ts?fbc0","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { getHtmlByProductNumberAsync } from '../../actions/DataActionExtension.g';\r\n\r\nimport { IEshopCustomFaqData } from './eshop-custom-faq.data';\r\nimport { IEshopCustomFaqProps } from './eshop-custom-faq.props.autogenerated';\r\n\r\nexport interface IEshopCustomFaqViewProps extends IEshopCustomFaqProps {\r\n markup: string;\r\n}\r\n\r\n/**\r\n *\r\n * EshopCustomFaq component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass EshopCustomFaq extends React.PureComponent> {\r\n public state: any = { markup: '' };\r\n\r\n public async componentDidMount() {\r\n const { config } = this.props;\r\n \r\n let fileName = config.faqFileName;\r\n let value = ''\r\n\r\n if (fileName) {\r\n value = `${fileName + '.html'}`;\r\n }\r\n \r\n \r\n if (this.state.markup === '' && value !== '') {\r\n const result = await getHtmlByProductNumberAsync({ callerContext: this.props.context.actionContext }, config.env, config.entity, config.containerName, value);\r\n \r\n // If not html given, contents are \"\"}.\r\n const contents = ((result && result !== '' && (!this._isTemplateProvided(JSON.stringify(result))))? result:'');\r\n \r\n if (contents) {\r\n this.setState({ markup: result });\r\n } else {\r\n this.setState({ markup: '' });\r\n }\r\n } else {\r\n this.setState({ markup: '' });\r\n }\r\n }\r\n \r\n private _isTemplateProvided= (str: string): boolean => {\r\n try {\r\n const parsedJSON = JSON.parse(str);\r\n const parse = parsedJSON && parsedJSON !== ''&& parsedJSON['value'] == ''?'TemplateNotProvided':'';\r\n if(!parse) {\r\n return false;\r\n }\r\n } catch (e) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n \r\n public render(): JSX.Element | null {\r\n const EcommProductDescriptionView = {\r\n ...this.props,\r\n markup: this.state.markup\r\n }\r\n \r\n return this.props.renderView(EcommProductDescriptionView);\r\n }\r\n}\r\n\r\nexport default EshopCustomFaq;\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 {Helmet} from 'react-helmet';\r\n\r\nimport InnerHTML from 'dangerously-set-html-content';\r\n\r\nimport { IEshopCustomFaqViewProps } from './eshop-custom-faq';\r\n\r\nexport class EshopCustomFaqView extends React.PureComponent {\r\n public componentDidMount () {\r\n const script = document.createElement('script');\r\n \r\n script.src = 'https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js';\r\n script.integrity = 'sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj';\r\n script.crossOrigin = 'anonymous';\r\n \r\n document.body.appendChild(script);\r\n \r\n const bsScript = document.createElement('script');\r\n \r\n bsScript.src = 'https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js';\r\n bsScript.integrity = 'sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct';\r\n bsScript.crossOrigin = 'anonymous';\r\n \r\n document.body.appendChild(bsScript);\r\n }\r\n \r\n public render(): JSX.Element | null {\r\n const { markup } = this.props;\r\n \r\n if (markup === '') {\r\n return null;\r\n }\r\n \r\n // Find scripts from html and execute in .\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n const scriptsRegExp = new RegExp(`.*?`);\r\n const scripts = scriptsRegExp.exec(markup);\r\n \r\n return (\r\n <>\r\n {scripts?.map(script => { return {script}; })}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n \r\n export default EshopCustomFaqView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['eshop-custom-faq'] = {\n c: () => require('partner/modules/eshop-custom-faq/eshop-custom-faq.tsx'),\n $type: 'contentModule',\n da: [{name:'product', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'eshop-custom-faq',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/eshop-custom-faq'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-selected-variant');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|eshop-custom-faq|eshop-custom-faq'] = {\n c: () => require('partner/modules/eshop-custom-faq/eshop-custom-faq.view.tsx'),\n cn: '__local__-__local__-eshop-custom-faq'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICreateActionContext, IGeneric, IRequestContext } from '@msdyn365-commerce/core';\nimport { QueryResultSettings, SortColumn } from '@msdyn365-commerce/retail-proxy';\n\nimport { IQueryResultSettingsModuleConfig } from './IQueryResultSettingsModuleConfig';\n\n/**\n * Wrapper for query result settings, which guarantees some properties that are optional in the real subject\n * and includes some common utilities for data actions.\n */\nexport class QueryResultSettingsProxy {\n // Real subject\n private readonly queryResultSettings: QueryResultSettings;\n\n /**\n * Factory method for data actions.\n * @param inputData - Input data.\n * @returns - Returns query result settings proxy.\n */\n public static fromInputData(inputData: ICreateActionContext>): QueryResultSettingsProxy {\n const { requestContext, config } = inputData;\n return QueryResultSettingsProxy.fromModuleData(requestContext, config as IQueryResultSettingsModuleConfig);\n }\n\n /**\n * Factory method for modules.\n * @param requestContext - RequestContext.\n * @param config - Module config from props.\n * @returns - Returns query result settings proxy.\n */\n public static fromModuleData(requestContext: IRequestContext, config: IQueryResultSettingsModuleConfig): QueryResultSettingsProxy {\n const sortingCriteria = (config && config.sortingCriteria) || undefined;\n const query = requestContext && requestContext.query;\n const top = (query && query.top) || undefined;\n const skip = (query && query.skip) || undefined;\n\n const queryResultSettings = {\n Paging: {\n Skip: (skip && Number(skip)) || 0,\n Top: (top && Number(top)) || config?.itemsPerPage || 50\n },\n Sorting: sortingCriteria || {}\n };\n\n return new QueryResultSettingsProxy(queryResultSettings);\n }\n\n /**\n * Return the query result settings with default paging or with the passed value.\n * @param inputData - Input Data.\n * @returns - Query Result settings.\n */\n public static getPagingFromInputDataOrDefaultValue(inputData: ICreateActionContext>): QueryResultSettings {\n const config: IQueryResultSettingsModuleConfig | undefined = inputData.config;\n const defaultPageSize: number = 100;\n const queryResultSettings: QueryResultSettings = {\n Paging: {\n // eslint-disable-next-line max-len -- Disable max length for next line.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unnecessary-condition -- Reading from config.\n Top:\n config?.itemsPerPage ??\n Number.parseInt(inputData.requestContext?.app?.platform?.defaultPageSizeForAPI ?? defaultPageSize, 10)\n }\n };\n return queryResultSettings;\n }\n\n /**\n * Factory method.\n * @returns - Returns query result settings proxy.\n */\n public static getDefault(): QueryResultSettingsProxy {\n return new QueryResultSettingsProxy({ Paging: {}, Sorting: {} });\n }\n\n /**\n * Private constructor, expect instances to be created with the factory method.\n * @param queryResultSettings - Query result setting.\n */\n private constructor(queryResultSettings: QueryResultSettings) {\n this.queryResultSettings = queryResultSettings;\n }\n\n public get QueryResultSettings(): QueryResultSettings {\n return this.queryResultSettings;\n }\n\n /**\n * Gets the hints for the cache key based on query result settings.\n * @returns - Returns cache key hint.\n */\n public get cacheKeyHint(): string {\n // The factory method guarantees values are defined\n const topHint = `top-${this.queryResultSettings.Paging!.Top!}`;\n const skipHint = `skip-${this.queryResultSettings.Paging!.Skip!}`;\n const sortingHintData =\n (this.queryResultSettings.Sorting!.Columns || [])\n .map((column: SortColumn) => {\n return `${column.ColumnName}--${(column.IsDescending && 'desc') || 'asc'}`;\n })\n .join(',') || undefined;\n const sortingHint = `sortBy-${sortingHintData}`;\n return `${topHint}|${skipHint}|${sortingHint}`;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from './object-extensions';\n\n/**\n * Represents an array which is defined with at least one value.\n */\nexport type NonEmptyArray = [T, ...T[]];\n\n/**\n * Namespace which extends Array functionality.\n */\nexport namespace ArrayExtensions {\n /**\n * Verifies whether the object array has elements.\n * @param value - The array to examine.\n * @returns True if the object has at least one element in the array, false otherwise (if array is not defined or empty).\n */\n export function hasElements(value: NonEmptyArray | T[] | null | undefined): value is NonEmptyArray {\n const emptyArrayLength = 0;\n return !ObjectExtensions.isNullOrUndefined(value) && value.length > emptyArrayLength;\n }\n\n /**\n * Retrieves the first element in the array or default value if the array is empty.\n * @param values - The array with values.\n * @param defaultValue - Optional parameter to specify default value. If not specified, undefined will be used.\n * @returns First element or default value.\n */\n export function firstOrDefault(values: NonEmptyArray | T[] | null | undefined, defaultValue?: T): T | undefined {\n if (hasElements(values)) {\n return values[0];\n }\n return defaultValue;\n }\n\n /**\n * Remove duplicate elements in the array.\n * @param value - The array to examine.\n * @returns An array with only unique elements.\n */\n export function unique(value: T[]): T[] {\n if (!hasElements(value)) {\n return [];\n }\n\n return Array.from(new Set(value));\n }\n\n /**\n * Checks if all elements satisfy given condition.\n * @param value - The array to examine.\n * @param predicate - The function which checks an element.\n * @returns True if the array is empty or all the inner elements satisfy given condition,\n * false if at least one element does not pass the condition.\n */\n export function all(value: T[] | null | undefined, predicate: (value: T, index: number, array: T[]) => boolean): boolean {\n if (!hasElements(value)) {\n return true;\n }\n\n return value.filter(predicate).length === value.length;\n }\n\n /**\n * Filters out null and undefined values from the given array.\n * @param value - The array with possibly undefined/null items.\n * @returns All items which are not null or undefined.\n */\n export function validValues(value: (T | undefined | null)[] | undefined | null): T[] {\n if (!hasElements(value)) {\n return [];\n }\n\n return value.filter(item => !ObjectExtensions.isNullOrUndefined(item)) as T[];\n }\n\n /**\n * Merges items from 2-dimensional array into one array with all items.\n * @param value - The 2-dimensional array with the items.\n * @returns All items retrieved from all inner arrays.\n */\n export function flatten(value: ((T | undefined | null)[] | undefined | null)[]): T[] {\n let result: T[] = [];\n\n if (!hasElements(value)) {\n return result;\n }\n\n for (const arrayLine of value) {\n if (!ObjectExtensions.isNullOrUndefined(arrayLine)) {\n result = result.concat(validValues(arrayLine));\n }\n }\n\n return result;\n }\n\n /**\n * Check if two arrays are equal.\n * @param firstArray - The array with the items.\n * @param secondArray - Another array with the items.\n * @param comparator - The comparator which compares the values and returns true if two objects are equal, false otherwise.\n * @returns True if arrays have the same items, false otherwise.\n */\n export function equals(\n firstArray: T[],\n secondArray: T[],\n comparator?: (valueFromFirstArray: T, valueFromSecondArray: T) => boolean\n ): boolean {\n if (firstArray.length !== secondArray.length) {\n return false;\n }\n\n if (comparator === undefined) {\n return JSON.stringify(firstArray) === JSON.stringify(secondArray);\n }\n\n for (let index = 0; index < firstArray.length; ++index) {\n if (!comparator(firstArray[index], secondArray[index])) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Check if two arrays have the same elements irrespective of the order.\n * @param firstArray - The array with the items.\n * @param secondArray - Another array with the items.\n * @param comparator - The comparator which compares the values and returns true if two objects are equal, false otherwise.\n * @returns True if arrays have the same items, false otherwise.\n */\n export function haveSameItems(\n firstArray: T[],\n secondArray: T[],\n comparator: (valueFromFirstArray: T, valueFromSecondArray: T) => boolean = (valueFromFirstArray: T, valueFromSecondArray: T) =>\n valueFromFirstArray === valueFromSecondArray\n ): boolean {\n if (firstArray.length !== secondArray.length) {\n return false;\n }\n\n for (const item of firstArray) {\n if (!secondArray.some(otherItem => comparator(item, otherItem))) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Calculates a sum of elements in the given array.\n * @param data - List of items.\n * @returns Sum of elements.\n */\n export function calculateSum(data: NonEmptyArray): number {\n let result = data[0];\n for (let index = 1; index < data.length; ++index) {\n result += data[index];\n }\n\n return result;\n }\n\n /**\n * Reverses the elements in the array without modifying the original one.\n * @param array - The array with the items.\n * @returns A new array with reversed order.\n */\n export function reverse(array: T[]): T[] {\n const newArray: T[] = [];\n\n for (let index = array.length - 1; index >= 0; --index) {\n newArray.push(array[index]);\n }\n\n return newArray;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from './object-extensions';\n\n/**\n * Namespace which extends enum functionality.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport namespace EnumExtensions {\n /**\n * @description Returns a list of numeric values and enum names for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {(number | string)[]} An array of numeric values and enum names.\n */\n export function getValues(enumClass: any): (number | string)[] {\n if (ObjectExtensions.isNullOrUndefined(enumClass)) {\n return [];\n }\n\n return Object.keys(enumClass).map(item => enumClass[item]);\n }\n\n /**\n * @description Returns a list of enum names for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {(number | string)[]} An array of string values.\n */\n export function getNames(enumClass: any): string[] {\n return getValues(enumClass).filter(ObjectExtensions.isString);\n }\n\n /**\n * @description Returns a list of numeric values for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {number[]} An array of numeric values.\n */\n export function getNumericValues(enumClass: any): number[] {\n return getValues(enumClass).filter(ObjectExtensions.isNumber);\n }\n\n /**\n * @description Returns a list of enum values for the specified enum.\n * @param enumClass\n * @param {any} value The enum to examine.\n * @returns {number[]} An array of enum values.\n */\n export function getEnumValues(enumClass: any): T[] {\n return getNumericValues(enumClass).map(value => value);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ObjectExtensions } from './object-extensions';\n\n/**\n * Namespace which extends string functionality.\n */\nexport namespace StringExtensions {\n /**\n * Checks if string is null, undefined, empty, or whitespace.\n * @param {string | null | undefined} value The string to examine.\n * @returns {boolean} True if it's null, undefined, empty, or whitespace; false otherwise.\n */\n export function isNullOrWhitespace(value: string | null | undefined): boolean {\n return isNullOrEmpty(value) || value!.trim() === '';\n }\n\n /**\n * Checks if string is null, undefined, or empty.\n * @param {string | null | undefined} value The string to examine.\n * @returns {boolean} True if it's null, undefined, empty, or whitespace; false otherwise.\n */\n export function isNullOrEmpty(value: string | null | undefined): boolean {\n if (ObjectExtensions.isNullOrUndefined(value)) {\n return true;\n }\n\n if (!ObjectExtensions.isString(value)) {\n throw new Error('StringExtensions has received a non-string input.');\n }\n\n return value === '';\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Namespace which extends Object functionality.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport namespace ObjectExtensions {\n /**\n * @description Verifies whether the value is null or undefined.\n * @param {any} value The value to examine.\n * @returns {boolean} True if the value is null or undefined, false otherwise.\n */\n export function isNullOrUndefined(value: any): value is null | undefined {\n return value === null || value === undefined;\n }\n\n /**\n * @description Verifies whether the value is of type string.\n * @param {any} value The value to examine.\n * @returns {boolean} True if the value is a string, false otherwise.\n */\n export function isString(value: any): value is string {\n return typeof value === 'string';\n }\n\n /**\n * @description Verifies whether the value is of type number.\n * @param {any} value The value to examine.\n * @returns {boolean} True if the value is a number, false otherwise.\n */\n export function isNumber(value: any): value is number {\n return typeof value === 'number';\n }\n\n /**\n * Verifies whether the object is a function.\n * @param {any} object The object.\n * @param value\n * @returns {boolean} True if the object is a function, false otherwise.\n */\n export function isFunction(value: any): boolean {\n return typeof value === 'function';\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\n\nimport { QueryResultSettingsProxy } from './QueryResultSettingsProxy';\n\nexport interface ISearchData {\n q: string;\n skip: number;\n top: number;\n itemsPerPage: string;\n maxItems: string;\n channelId: number;\n queryResultSettings: QueryResultSettings;\n}\n\nexport const parseSearchData = (inputData: ICreateActionContext>): ISearchData => {\n // Query is of type 'IDictionary | undefined', so that q and skip are not recognized by tsc\n const {\n requestContext: {\n // @ts-expect-error:2339\n query: { q, top, skip },\n apiSettings: { channelId }\n },\n // @ts-expect-error:2339\n config: { maxItems, itemsPerPage }\n } = inputData;\n const queryResultSettings = QueryResultSettingsProxy.fromInputData(inputData).QueryResultSettings;\n return {\n q,\n skip: (skip && Number(skip)) || 0,\n top: (top && Number(top)) || 50,\n itemsPerPage, // TODO BUGBUG 21667361\n maxItems, // TODO BUGBUG 21667361\n channelId,\n queryResultSettings\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport msdyn365Commerce, {\n generateImageUrl as generateImageUrlFromSdk,\n IAny,\n ICommerceApiSettings,\n ICoreContext,\n ICreateActionContext,\n IGeneric,\n IRequestContext\n} from '@msdyn365-commerce/core';\nimport {\n AsyncResult,\n AttributeValue,\n CartLine,\n ChannelInventoryConfiguration,\n CommerceListLine,\n ProductDimension,\n ProductDimensionType,\n ProductSearchResult,\n QueryResultSettings,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\n\nimport { ProductDetailsCriteria } from '../get-full-products';\nimport { ArrayExtensions, StringExtensions } from './extensions';\nimport { parseSearchData } from './input-data-parser';\nimport { InventoryLevels } from './product-inventory-information';\n\nexport const wrapInResolvedAsyncResult = (input: T | null | undefined): AsyncResult => {\n return >{\n status: 'SUCCESS',\n result: input,\n metadata: {}\n };\n};\n\nexport const wrapInRejectedAsyncResult = (input: T | null | undefined): AsyncResult => {\n return >{\n status: 'FAILED',\n result: input,\n metadata: {}\n };\n};\n\nexport const buildQueryResultSettings = (inputData: ICreateActionContext, IGeneric>): QueryResultSettings => {\n try {\n const searchInputData = parseSearchData(inputData);\n const search = searchInputData.q;\n if (!search) {\n throw new Error('Query string ?q={searchText} is needed for search actions.');\n }\n const top = (searchInputData.maxItems && Number(searchInputData.maxItems)) || searchInputData.top;\n return { Paging: { Top: top, Skip: searchInputData.skip } };\n } catch {\n return {};\n }\n};\n\n/**\n * Utility function to extract the active productId in the following priority:\n * First query param (productId), then UrlToken (itemId), then module config.\n * @param inputData - The Action Input data.\n * @returns Productid or undefined.\n */\nexport const getSelectedProductIdFromActionInput = (inputData: ICreateActionContext>): string | undefined => {\n const context = inputData.requestContext;\n if (context.query?.productId) {\n return context.query.productId;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Exsiting code.\n } else if (\n context.urlTokens &&\n inputData.requestContext.urlTokens.itemId &&\n inputData.requestContext.urlTokens.pageType === 'Product'\n ) {\n return context.urlTokens.itemId;\n } else if (inputData && inputData.config && inputData.config.productId) {\n return inputData.config.productId;\n }\n return undefined;\n};\n\n/**\n * Generates a Image URL based on data return from retail server.\n * @param imageUrl The image url returned by Retail Server.\n * @param ctx The request context.\n * @param apiSettings\n */\nexport const generateImageUrl = (imageUrl: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\n return generateImageUrlFromSdk(apiSettings, imageUrl);\n};\n\n/**\n * Represents app configuration for dimensions.\n */\nexport interface IDimensionsConfig {\n dimensionsAsSwatchType?: DimensionTypes[];\n dimensionsInProductCard?: DimensionTypes[];\n inventoryLevel?: InventoryLevels;\n dimensionToPreSelectInProductCard?: DimensionTypes;\n enableStockCheck?: boolean;\n warehouseAggregation?: string;\n}\n\n/**\n * Represents app configuration for dimensions.\n */\nexport interface IDimensionsApp {\n config: IDimensionsConfig;\n}\n\n/**\n * Represents product dimension types.\n */\nexport enum DimensionTypes {\n none = 'none',\n color = 'color',\n configuration = 'configuration',\n size = 'size',\n style = 'style'\n}\n\n/**\n * Defines display configuration types.\n */\nexport enum DimensionSwatchDisplayTypes {\n default = 'default',\n productCard = 'productCard'\n}\n\n/**\n * Checks if rendering the particular dimensions is allowed.\n * @param dimensionType - Dimension to be displayed.\n * @param context - Core application context.\n * @param displayType - The swatch location, the component from which it comes from.\n * @returns Updates the state with new product page url.\n */\nexport const checkIfShouldDisplayAsSwatch = (\n dimensionType: DimensionTypes,\n context: ICoreContext,\n displayType: DimensionSwatchDisplayTypes = DimensionSwatchDisplayTypes.default\n): boolean => {\n // Additional checks for the product card since it has a separate config setting.\n if (displayType === DimensionSwatchDisplayTypes.productCard) {\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n if (\n !ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) ||\n dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) ||\n !dimensionsToDisplayOnProductCard.includes(dimensionType)\n ) {\n return false;\n }\n }\n\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n return (\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\n dimensionsToDisplayAsSwatch.includes(dimensionType)\n );\n};\n\n/**\n * Generates an image URL for a swatch.\n * @param imageUrl - The image url returned by Retail Server.\n * @param apiSettings - The request context.\n * @returns Full image url.\n */\nexport const generateSwatchImageUrl = (imageUrl: string, apiSettings: ICommerceApiSettings): string => {\n if (imageUrl.startsWith('http')) {\n return imageUrl;\n }\n\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrl);\n};\n\n/**\n * Generates a Image URL for a product based on data return from retail server.\n * @param product The Product returned by Retail Server.\n * @param ctx The request context.\n * @param apiSettings\n */\nexport const generateProductImageUrl = (\n product: SimpleProduct | ProductSearchResult,\n apiSettings: ICommerceApiSettings\n): string | undefined => {\n return generateImageUrl(product.PrimaryImageUrl, apiSettings);\n};\n\n/**\n * Creates a CartLine object from the passed data.\n * @param product The product.\n * @param quantity The quantity.\n * @param catalogId The catalog.\n */\nexport const buildCartLine = (product: SimpleProduct, quantity?: number, catalogId?: number): CartLine => {\n return {\n CatalogId: catalogId || 0,\n Description: product.Description,\n\n // TODO: Investigate this value and what it represents\n EntryMethodTypeValue: 3,\n ItemId: product.ItemId,\n ProductId: product.RecordId,\n Quantity: quantity || 1,\n TrackingId: '',\n UnitOfMeasureSymbol: product.DefaultUnitOfMeasure\n };\n};\n\n/**\n * Creates a CommerceListLine (also know as WishlistLine) object from the passed data.\n * @param productId The RecordId of the Product to be added.\n * @param customerId The account number of the customer.\n * @param wishlistId The Id of the commerce list.\n */\nexport const buildWishlistLine = (productId: number, customerId: string, wishlistId: number): CommerceListLine => {\n return {\n CommerceListId: wishlistId,\n ProductId: productId,\n CustomerId: customerId\n };\n};\n\n/**\n * Utility function to prepare the product details criteria before getting full product:\n * @param inputData The Action Input data\n */\nexport const getProductDetailsCriteriaFromActionInput = (inputData: ICreateActionContext>): ProductDetailsCriteria => {\n if (inputData && inputData.config) {\n return {\n getPrice: !inputData.config.hidePrice,\n getRating: !inputData.config.hideRating\n };\n }\n return {\n getPrice: true,\n getRating: true\n };\n};\n\n/**\n * Transforms search text into the expected 'search terms' format, expected by refiner APIs.\n * @param searchText Free-form text used for searching for products or categories of products.\n */\nexport const ensureSearchTextIsFormedProperly = (searchText: string): string => {\n const prefix = searchText.startsWith(\"'\") ? '' : \"'\";\n const suffix = searchText.endsWith(\"'\") ? '' : \"'\";\n return `${prefix}${searchText}${suffix}`;\n};\n\nexport const ensureSafeSearchText = (searchText: string): string => {\n return searchText.replace(/[^\\d\\sA-Za-z]+/g, '');\n};\n\nexport const buildCacheKey = (base: string, apiSettings: ICommerceApiSettings, locale?: string): string => {\n return `${base}-chanId:${apiSettings.channelId}-catId:${apiSettings.catalogId}${locale ? `-${locale}` : ''}`;\n};\n\nexport const buildCacheKeyWithUrlTokens = (base: string, requestContext: IRequestContext): string => {\n const urlTokens = requestContext.urlTokens;\n const defaultCacheKey = buildCacheKey(base, requestContext.apiSettings, requestContext.locale);\n return urlTokens ? `${defaultCacheKey}-${urlTokens.itemId}-${urlTokens.recordId}-${urlTokens.pageType}` : defaultCacheKey;\n};\n\n/**\n * Generates a key from set of arguments as inputs.\n *\n * @param args Argument list of pivots to generate key from.\n * @param handler Handler function for null/undefined values.\n */\n\ntype TKeyTypes = string | number | boolean | null | undefined;\ninterface IGenerateKeyOptions {\n separator?: string;\n handler?(input: null | undefined): string;\n}\nexport const generateKey = (args: TKeyTypes[], options?: IGenerateKeyOptions): string => {\n const { handler, separator }: IGenerateKeyOptions = { ...{ separator: '-', handler: undefined }, ...(options || {}) };\n return args\n .map(arg => {\n if (arg === null || arg === undefined) {\n if (handler) {\n return handler(arg);\n }\n }\n return arg;\n })\n .join(separator);\n};\n\n/**\n * Gets the fall back image url for a variant image.\n * @param itemId Item id of a product.\n * @param apiSettings Api setting from request context.\n */\nexport const getFallbackImageUrl = (itemId: string | undefined, apiSettings: ICommerceApiSettings): string | undefined => {\n if (!itemId) {\n return '';\n }\n\n const parsedItemId = itemId.trim().split(' ')[0];\n\n const productUrl = `Products/${parsedItemId}_000_001.png`;\n return generateImageUrl(productUrl, apiSettings);\n};\n\n/**\n * Converts retail proxy product dimension type to display dimension type.\n * @param productDimensionType - Product dimension type from retail proxy.\n * @returns Local dimension type.\n */\nexport const convertProductDimensionTypeToDimensionTypes = (productDimensionType: ProductDimensionType): DimensionTypes => {\n switch (productDimensionType) {\n case ProductDimensionType.Color:\n return DimensionTypes.color;\n case ProductDimensionType.Configuration:\n return DimensionTypes.configuration;\n case ProductDimensionType.Size:\n return DimensionTypes.size;\n case ProductDimensionType.Style:\n return DimensionTypes.style;\n default:\n return DimensionTypes.none;\n }\n};\n\n/**\n * Converts display dimension type to retail proxy product dimension type.\n * @param dimensionType - Local dimension type.\n * @returns Product dimension type from retail proxy.\n */\nexport const convertDimensionTypeToProductDimensionType = (dimensionType: DimensionTypes): ProductDimensionType => {\n switch (dimensionType) {\n case DimensionTypes.color:\n return ProductDimensionType.Color;\n case DimensionTypes.configuration:\n return ProductDimensionType.Configuration;\n case DimensionTypes.size:\n return ProductDimensionType.Size;\n case DimensionTypes.style:\n return ProductDimensionType.Style;\n default:\n return ProductDimensionType.None;\n }\n};\n\n/**\n * Sets dimensions to url.\n * @param inputUrl - Url to update.\n * @param productDimensions - Dimensions to set.\n */\nexport const setDimensionValuesToQuery = (inputUrl: URL, productDimensions: ProductDimension[]): void => {\n for (const dimension of productDimensions) {\n const dimensionValue = dimension.DimensionValue?.Value;\n if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\n inputUrl.searchParams.set(convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue), dimensionValue!);\n }\n }\n\n if (msdyn365Commerce.isBrowser) {\n window.history.replaceState(window.history.state, '', inputUrl.toString().replace(inputUrl.host, window.location.host));\n }\n};\n\n/**\n * Retrieves dimension value stored in url.\n * @param urlParameters - Url parameters.\n * @param productDimensionType - The dimension type to retrieve.\n * @returns Product dimension item.\n */\nconst parseDimensionFromUrl = (\n urlParameters: URLSearchParams,\n productDimensionType: ProductDimensionType\n): ProductDimension | undefined => {\n const localDimensionType = convertProductDimensionTypeToDimensionTypes(productDimensionType);\n const value = urlParameters.get(localDimensionType);\n if (!value) {\n return undefined;\n }\n return {\n DimensionTypeValue: productDimensionType,\n DimensionValue: {\n RecordId: 0,\n Value: value\n }\n };\n};\n\n/**\n * Retrieves all dimensions from URL.\n * @param urlParameters - Url parameters.\n * @returns Product dimensions stored in url.\n */\nconst parseDimensionsFromUrl = (urlParameters: URLSearchParams): ProductDimension[] => {\n const dimensionsToParse: ProductDimensionType[] = [\n ProductDimensionType.Color,\n ProductDimensionType.Configuration,\n ProductDimensionType.Size,\n ProductDimensionType.Style\n ];\n const parsedDimensions = dimensionsToParse.map(dimension => parseDimensionFromUrl(urlParameters, dimension));\n return ArrayExtensions.validValues(parsedDimensions);\n};\n\n/**\n * Utility function to extract the dimension values from input url querystring.\n * @param inputUrl - The request url.\n * @returns The selected dimension values.\n */\nexport const getDimensionValuesFromQuery = (inputUrl: URL): ProductDimension[] => {\n const urlWithIgnoredCase = new URL(inputUrl.toString().toLocaleLowerCase());\n const urlParameters = urlWithIgnoredCase.searchParams;\n const dimensions: ProductDimension[] = parseDimensionsFromUrl(urlParameters);\n return dimensions;\n};\n\n/**\n * Get attribute values by channel inventory configuration.\n * @param attributeValues - The attributeValues.\n * @param channelInventoryConfiguration - The channelInventoryConfiguration.\n * @returns The attributeValues filter by channel inventory configuration.\n */\nexport const getAttributeValuesByConfiguration = (\n attributeValues: AttributeValue[] | null,\n channelInventoryConfiguration: ChannelInventoryConfiguration | null\n): AttributeValue[] => {\n if (!attributeValues) {\n return [];\n }\n if (!channelInventoryConfiguration) {\n return attributeValues;\n }\n\n return attributeValues.filter(\n attribute =>\n attribute.RecordId !== channelInventoryConfiguration.InventoryProductAttributeRecordId &&\n attribute.RecordId !== channelInventoryConfiguration.ProductAvailabilitySortableAttributeRecordId\n );\n};\n\n/**\n * Utility function to remove domain querystring parameter from url.\n * @param inputUrl - The request url.\n * @returns The yrl after dropping domain querystring.\n */\nexport const removeDomainQspFromUrl = (inputUrl: string, requestContext: IRequestContext): string => {\n if (requestContext?.features && requestContext.features.remove_domain_qsp) {\n const Url = new URL(inputUrl);\n const urlParams: URLSearchParams = new URLSearchParams(Url.search);\n if (urlParams.has('domain')) {\n urlParams.delete('domain');\n }\n Url.search = urlParams.toString();\n return Url.toString();\n }\n return inputUrl;\n};\n","module.exports = React;","module.exports = ReactDOM;"],"names":["EshopCustomFaq","React","constructor","state","markup","_isTemplateProvided","str","parsedJSON","JSON","parse","e","async","config","this","props","fileName","faqFileName","value","result","getHtmlByProductNumberAsync","callerContext","context","actionContext","env","entity","containerName","stringify","setState","render","EcommProductDescriptionView","_objectSpread","renderView","EshopCustomFaqView","componentDidMount","script","document","createElement","src","integrity","crossOrigin","body","appendChild","bsScript","scripts","RegExp","exec","map","Helmet","defer","InnerHTML","html","className","id","descriptionAnchorTag","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","window","__bindings__","viewDictionary","cn","QueryResultSettingsProxy","queryResultSettings","static","inputData","requestContext","fromModuleData","sortingCriteria","undefined","query","top","skip","Paging","Skip","Number","Top","itemsPerPage","Sorting","_config$itemsPerPage","_inputData$requestCon","_inputData$requestCon2","parseInt","app","platform","defaultPageSizeForAPI","QueryResultSettings","cacheKeyHint","Columns","column","ColumnName","IsDescending","join","ArrayExtensions","hasElements","ObjectExtensions","isNullOrUndefined","length","validValues","filter","item","firstOrDefault","values","defaultValue","unique","Array","from","Set","all","predicate","flatten","arrayLine","concat","equals","firstArray","secondArray","comparator","index","haveSameItems","arguments","valueFromFirstArray","valueFromSecondArray","some","otherItem","calculateSum","data","reverse","array","newArray","push","EnumExtensions","StringExtensions","getValues","enumClass","Object","keys","getNumericValues","isNumber","getNames","isString","getEnumValues","isNullOrEmpty","isNullOrWhitespace","trim","isFunction","parseSearchData","q","apiSettings","channelId","maxItems","fromInputData","getSelectedProductIdFromActionInput","_context$query","productId","urlTokens","itemId","pageType","generateImageUrl","imageUrl","generateImageUrlFromSdk","DimensionTypes","DimensionSwatchDisplayTypes","checkIfShouldDisplayAsSwatch","dimensionType","displayType","productCard","dimensionsToDisplayOnProductCard","dimensionsInProductCard","includes","none","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","generateSwatchImageUrl","startsWith","baseImageUrl","encodeURIComponent","generateProductImageUrl","product","PrimaryImageUrl","buildWishlistLine","customerId","wishlistId","CommerceListId","ProductId","CustomerId","getProductDetailsCriteriaFromActionInput","getPrice","hidePrice","getRating","hideRating","buildCacheKey","base","locale","catalogId","buildCacheKeyWithUrlTokens","defaultCacheKey","recordId","generateKey","args","options","handler","separator","arg","getFallbackImageUrl","parsedItemId","split","convertProductDimensionTypeToDimensionTypes","productDimensionType","ProductDimensionType","Color","color","Configuration","configuration","Size","size","Style","style","convertDimensionTypeToProductDimensionType","None","setDimensionValuesToQuery","inputUrl","productDimensions","dimension","_dimension$DimensionV","dimensionValue","DimensionValue","Value","searchParams","set","DimensionTypeValue","msdyn365Commerce","isBrowser","history","replaceState","toString","replace","host","location","parseDimensionsFromUrl","urlParameters","parsedDimensions","parseDimensionFromUrl","localDimensionType","get","RecordId","getDimensionValuesFromQuery","URL","toLocaleLowerCase","getAttributeValuesByConfiguration","attributeValues","channelInventoryConfiguration","attribute","InventoryProductAttributeRecordId","ProductAvailabilitySortableAttributeRecordId","removeDomainQspFromUrl","features","remove_domain_qsp","Url","urlParams","URLSearchParams","search","has","delete","module","exports","ReactDOM"],"sourceRoot":""}