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,aAEV,EAyCyDrG,mBAnEtC,WAAH,OACtBrB,EAAAA,EAAAA,KAAC2H,EAAAA,EAAY,CACX/E,SAAWA,EACXgF,MAAQC,EAAAA,EAAmBP,aAC3B5E,aAAeA,EACfG,QAAUA,EACVF,WAAaA,EACbG,UAAYA,EACZV,OAASuB,GACTV,KAAOA,EACPC,YAAcA,EACdC,UAAYA,EACZzE,KAAOA,GACP,SA0DN,CAsBA+D,GAAcqF,aAAe,CAC3BlF,SAAU,GACVmF,gBAAiB,KACjBjF,UAAW,KACXH,YAAY,EACZO,YAAa,KACbL,SAAS,EACTb,eAAgB,KAChBmB,UAAW,GACXzE,KAAM,EACNW,UAAW,KACX+D,OAAQ,MAGV,U,0hCClRA,IAcA,IAAe4E,EAAAA,EAAAA,KAAiBC,EAAAA,GAAAA,UAAkBC,EAAAA,EAAAA,KAd5B,SAAHxH,EAEhByH,GAAa,IAAAC,EADdC,EAAa3H,EAAb2H,cAAeC,EAAW5H,EAAX4H,YAAqBC,EAAI7H,EAAZ6H,KAAQA,KAEhBhE,EAA0C4D,EAAtDzL,SAAY6H,SAA2BhD,EAAe4G,EAA9BK,YAAejH,SAC/C,OAAAc,GAAAA,GAAA,GACKgG,EAAc9D,IAAS,IAC1B3B,UAAU6F,EAAAA,EAAAA,gCAAsD,QAAxBL,EAACC,EAAc9D,UAAS,IAAA6D,OAAA,EAAvBA,EAAyBxF,UAClEG,eAAe2F,EAAAA,EAAAA,kBAAiB,CAAEnH,SAAAA,IAClC0B,KAAMsB,EACNoE,QAASL,EAAYK,QACrBvF,OAAQmF,GAAQA,EAAKhI,IAEzB,GAIE,CACEmC,aAAAA,EAAAA,EACAM,mBAAAA,EAAAA,mBACAb,WAAAA,GAAAA,IAL8C+F,CAOhDzF,K","sources":["webpack://mba-web-client/./src/app/components/search_results/classes.module.scss?3454","webpack://mba-web-client/./src/app/components/search_results/search_results_util.js","webpack://mba-web-client/./src/app/components/search_results/search_results.js","webpack://mba-web-client/./src/app/components/search_results/index.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport default {\"container\":\"container--AaLr1\",\"pageTitleContainer\":\"pageTitleContainer--NPtmR\",\"pageTitleName\":\"pageTitleName--NrFxB\",\"pageTitleNameText\":\"pageTitleNameText--rzL_M\",\"pageTitleDescription\":\"pageTitleDescription--Gi5sc\",\"pageShortDescription\":\"pageShortDescription--zbOmD\",\"appliedFilterContainer\":\"appliedFilterContainer--M6X31\",\"clearFilterButton\":\"clearFilterButton--cDNca\",\"clearFilterImg\":\"clearFilterImg--bUicY\",\"filterStringContainer\":\"filterStringContainer--Ofuv7\",\"filterString\":\"filterString--PkhNX\",\"categoryIcon\":\"categoryIcon--psiAw\",\"categoryIconKA\":\"categoryIconKA--j2ph3\",\"noResultContainer\":\"noResultContainer--LzAc3\",\"noResultImg\":\"noResultImg--azARh\",\"noResultTitle\":\"noResultTitle--IgkLX\",\"noResultSubTitle\":\"noResultSubTitle--MmsBZ\",\"promotionLabelContainer\":\"promotionLabelContainer--c9PST\",\"animation-bzdot9\":\"animation-bzdot9--jmDfq\"};","import React from 'react';\nimport queryString from 'query-string';\nimport { filterIsApplied } from '../../config/util';\nimport { paramOrNul, toCamelCase } from '../../../common/config/utils';\nimport { readingViaFilters, numberOfReviewsFilters } from '../../config/const';\nimport classes from './classes.module.scss';\nimport ExpandedText from '../../../common/helpers/expanded_text';\nimport { SvgIcon } from '../../../common/sprites';\n\nconst shouldShowFilteredBy = (readingVia, minNumberOfReviewsGe, ppmLe, ppmGe, t) => {\n if (readingVia !== undefined\n || (minNumberOfReviewsGe !== undefined && minNumberOfReviewsGe !== '0')\n || ppmLe !== undefined || ppmGe !== undefined) {\n return t('filter.filtered_by');\n }\n return '';\n};\n\nexport const generateFilterString = (t) => {\n const {\n minNumberOfReviewsGe, ppmGe, ppmLe, readingVia, query\n } = toCamelCase(queryString.parse(window.location.search));\n const maxPrice = ppmLe || window.config.filterPricePerMinute.max;\n const minPrice = ppmGe || window.config.filterPricePerMinute.min;\n const queryValue = query !== undefined ? paramOrNul(`${ t('search') }: `, query) : null;\n const filters = [\n readingVia ? t(readingViaFilters[readingVia]) : null,\n minNumberOfReviewsGe !== '0' ? t(numberOfReviewsFilters[minNumberOfReviewsGe]) : null,\n !!ppmLe || !!ppmGe ? `$${ minPrice }-$${ maxPrice }` : null,\n ...Object.keys(queryValue || {}).map((key) => `${ key }${ queryValue[key] }`)\n ].filter((n) => n);\n return `${ shouldShowFilteredBy(readingVia, minNumberOfReviewsGe, ppmLe, ppmGe, t) } ${ filters.join(', ') }`;\n};\n\nexport const shouldTrackCategoryEvent = ({\n requestParams, analyticEvents, location\n}) => (requestParams || {}).categoryId\n && ((analyticEvents || {}).category || {}).categoryName\n && (location.state || {}).trackCategoryEvent;\n\nexport const getTitleMetaTagName = ({ name, t }) => {\n const search = queryString.parse(window.location.search);\n const { page } = search || {};\n const title = `${ t('app_name_title') } : ${ name || 'Psychics' }`;\n if (page > 1) return `${ title } - Page ${ page }`;\n return title;\n};\n\nexport const getTopGradientColor = ({ backgroundColor }) => {\n if (backgroundColor) return backgroundColor;\n return '#F5F5F5';\n};\n\nexport const getPageTitleNameText = ({ name, t, h1Title }) => h1Title ?? name ?? t('all_advisors_header');\n\nexport const getLoadingPage = ({ searchPage, page, needRefresh }) => {\n if (needRefresh) return 1;\n if (searchPage) return parseFloat(searchPage);\n return page;\n};\n\nexport const needRenderNoResults = ({ noResults }) => noResults && !filterIsApplied({ withSearch: true });\n\nexport const getCanonicalUrl = () => {\n const canonicalUrl = queryString.stringifyUrl({\n url: `${ window.location.origin }${ window.location.pathname }`\n });\n return canonicalUrl;\n};\n\nexport const appliedFilter = ({ t, clearFilter, clearFilterIconId }) => {\n if (!filterIsApplied({ withSearch: true })) return null;\n return (\n
\n \n {generateFilterString(t)}\n \n \n
\n );\n};\n\nexport const needLoadAdvisors = ({\n needRefresh, advisors, userId, prevUserId, loading, needReloadSearchResults\n}) => needRefresh || needReloadSearchResults || ((advisors.length <= 0 || userId !== prevUserId.props.value) && !loading);\n","import React, {\n useCallback, useEffect, useState\n} from 'react';\nimport PropTypes from 'prop-types';\nimport queryString from 'query-string';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport { Helmet } from 'react-helmet';\nimport { useTranslation } from 'react-i18next';\nimport classes from './classes.module.scss';\nimport AppLayout from '../shared/content';\nimport FiltersContainer from './inner_views/filters';\nimport AdvisorsList, { advisorsListThemes } from '../advisors_list';\nimport AffiliatePromoPopup from '../affiliate_promo_popup';\nimport {\n renderCanonicalLink\n} from '../../config/util';\nimport UsePreviousValue, {\n toCamelCase, toSnakeCase, isKA, toLowerCaseSpaced\n} from '../../../common/config/utils';\nimport {\n shouldTrackCategoryEvent, getTitleMetaTagName, getTopGradientColor,\n getPageTitleNameText, getLoadingPage, needRenderNoResults, getCanonicalUrl, appliedFilter,\n needLoadAdvisors\n} from './search_results_util';\nimport { trackPageVisit } from '../../actions/analytics';\nimport {\n appRoutes, dynamicRoutes, dynamicRoutesKeys, specialityRoutesKeys\n} from '../../config/app_routes';\nimport PromotionLabel from '../home_page/nested_views/promotion_label';\nimport { promotionLabelTypeScreens } from '../../config/const';\nimport { useCurrentPath } from '../routes/hooks/useCurrentPath';\nimport { updatePathTrailingSlashes } from '../routes/routes_helpers';\nimport { SvgIcon } from '../../../common/sprites';\n\nconst getTitleSectionImgClassName = () => {\n if (isKA()) return classes.categoryIconKA;\n return classes.categoryIcon;\n};\n\nconst renderTitleSectionImg = ({ iconUrl, iconName }) => {\n if (!iconUrl) return null;\n return ;\n};\n\nconst renderFiltersSections = ({\n t, clearFilter, history, noResults, location\n}) => {\n if (needRenderNoResults({ noResults })) return null;\n return (\n <>\n {appliedFilter({ t, clearFilter, clearFilterIconId: 'clear_filters' })}\n \n \n );\n};\n\nconst renderSearchResultsContent = ({ noResults, renderNoResults, renderAdvisorsList }) => {\n if (needRenderNoResults({ noResults })) return renderNoResults();\n return renderAdvisorsList();\n};\n\nconst trackCategoryPageVisit = (routeKey) => {\n const matchCategoryPag = specialityRoutesKeys.includes(routeKey);\n const matchAllAdvisors = routeKey === appRoutes.psychics;\n if (matchCategoryPag) trackPageVisit('category page');\n if (matchAllAdvisors) trackPageVisit('all advisors');\n};\n\nconst trackSpecialityPageVisit = (analyticEvents) => {\n if (analyticEvents?.category) {\n trackPageVisit('speciality page');\n }\n};\n\nconst trackSearchPageVisit = (analyticEvents, trackEvent) => {\n if (analyticEvents?.search) {\n trackPageVisit('search results');\n const params = analyticEvents.search;\n if (params) trackEvent('search', { ...toLowerCaseSpaced(params) });\n }\n};\n\nconst trackFavoritePageVisit = (analyticEvents) => {\n if (analyticEvents?.favoritesScreen) {\n trackPageVisit('favorite advisors');\n }\n};\n\nfunction SearchResults({\n loadAdvisors, isLastPage, advisors, loading, analytics, routeSettings,\n analyticEvents, trackCategoryEvent, path, lastPageNum, seenPages,\n page, noResults, userId, trackEvent\n}) {\n const {\n name, backgroundColor, iconUrl, textColor, description, params, shortDescription, h1Title, iconName\n } = routeSettings;\n const history = useNavigate();\n const location = useLocation();\n const { t } = useTranslation();\n const requestParams = (location.state && location.state.params) || params;\n const [userIdState, setuUserIdState] = useState(userId);\n const [searchParams, setSearchParams] = useState(analyticEvents);\n const { routeKey } = useCurrentPath();\n\n useEffect(() => {\n trackCategoryPageVisit(routeKey);\n }, [window.location.pathname]);\n\n useEffect(() => {\n trackFavoritePageVisit(analyticEvents);\n }, [!!(analyticEvents?.favoritesScreen)]);\n\n useEffect(() => {\n trackSpecialityPageVisit(analyticEvents);\n }, [!!(analyticEvents?.category)]);\n\n useEffect(() => {\n if (searchParams !== analyticEvents) {\n trackSearchPageVisit(analyticEvents, trackEvent);\n setSearchParams(analyticEvents);\n }\n }, [analyticEvents?.search]);\n\n useEffect(() => {\n if (shouldTrackCategoryEvent({ requestParams, analyticEvents, location })) {\n history(`${ location.pathname }?${ location.search }`, {\n state: { ...location.state, trackCategoryEvent: false },\n replace: true\n });\n const categoryEventParams = {\n categoryId: requestParams.categoryId,\n categoryName: analyticEvents.category.categoryName,\n clickSource: location.state.clickSource,\n advisorId: location.state.advisorId\n };\n trackCategoryEvent(categoryEventParams);\n }\n }, [analyticEvents]);\n\n useEffect(() => {\n window.scrollTo(0, 0);\n const needRefresh = !!(location.state || {}).needRefresh;\n const needReloadSearchResults = location.state?.needReloadSearchResults;\n if (userId !== userIdState) setuUserIdState(userId);\n const prevUserId = ;\n if (needLoadAdvisors({\n needRefresh, advisors, userId, prevUserId, loading, needReloadSearchResults\n })) {\n const search = toCamelCase(queryString.parse(location.search));\n const searchPage = typeof search.page !== 'undefined' && search.page;\n delete search.page;\n const searchWithPage = queryString.stringify({\n ...toSnakeCase(search),\n ...(searchPage && searchPage > 1 ? { page: needRefresh ? 1 : searchPage } : null)\n });\n history(`${ location.pathname }?${ searchWithPage }`, {\n state: { ...location.state, needRefresh: false, needReloadSearchResults: false },\n replace: true\n });\n const loadingPage = getLoadingPage({ searchPage, page, needRefresh });\n loadAdvisors({ ...requestParams, page: loadingPage }, path, searchPage, needRefresh);\n }\n }, [location.search, location.pathname, userId, location.state]);\n\n const clearFilter = () => {\n const search = toCamelCase(queryString.parse(location.search));\n const searchPage = typeof search.page !== 'undefined' && search.page;\n const param = queryString.stringify({\n ...(searchPage && searchPage > 1 ? { page: searchPage } : null)\n });\n history(`${ location.pathname }?${ param }`, {\n state: { needRefresh: true },\n replace: true\n });\n };\n\n const renderAdvisorsList = () => (\n \n );\n\n const renderNoResults = () => (\n
\n {/* noResults get from server */}\n \"NoResult\"\n
\n { noResults.title }\n
\n
\n { noResults.subtitle }\n
\n
\n );\n\n const renderTitleSection = () => (\n
\n
\n { renderTitleSectionImg({ iconUrl, iconName }) }\n

\n { getPageTitleNameText({ name, t, h1Title }) }\n

\n
\n
\n { description }\n
\n
\n {shortDescription}\n
\n
\n );\n\n const renderMetaRobotIfNeed = useCallback(() => {\n const match = dynamicRoutesKeys.filter(key => !dynamicRoutes[key].isSpeciality).includes(routeKey);\n if (match) return ;\n return null;\n }, [routeKey]);\n\n return (\n \n \n \n { getTitleMetaTagName({ name, t }) }\n \n {renderMetaRobotIfNeed()}\n \n { renderCanonicalLink(updatePathTrailingSlashes(getCanonicalUrl())) }\n
\n { renderTitleSection() }\n \n { renderFiltersSections({\n t, clearFilter, history, noResults, location\n }) }\n { renderSearchResultsContent({ noResults, renderNoResults, renderAdvisorsList }) }\n
\n
\n );\n}\n\nSearchResults.propTypes = {\n loadAdvisors:PropTypes.func.isRequired,\n advisors: PropTypes.array,\n analyticsEvents: PropTypes.object,\n analytics: PropTypes.object,\n isLastPage: PropTypes.bool,\n lastPageNum: PropTypes.number,\n loading: PropTypes.bool,\n routeSettings: PropTypes.object.isRequired,\n analyticEvents: PropTypes.object,\n trackCategoryEvent: PropTypes.func.isRequired,\n path: PropTypes.string.isRequired,\n t: PropTypes.func.isRequired,\n seenPages: PropTypes.array,\n page: PropTypes.number,\n noResults: PropTypes.object,\n userId: PropTypes.number,\n trackEvent: PropTypes.func.isRequired\n};\n\nSearchResults.defaultProps = {\n advisors: [],\n analyticsEvents: null,\n analytics: null,\n isLastPage: false,\n lastPageNum: null,\n loading: false,\n analyticEvents: null,\n seenPages: [],\n page: 1,\n noResults: null,\n userId: null\n};\n\nexport default SearchResults;\n","import { connect } from 'react-redux';\nimport { withLastLocation } from 'react-router-dom-last-location';\nimport { loadAdvisors } from '../../actions/search_results';\nimport SearchResults from './search_results';\nimport withPGTranslation from '../../config/withPGTranslation';\nimport { trackCategoryEvent } from '../../actions/analytics';\nimport { trackEvent } from '../../actions/mixpanel';\nimport { getRouteSettings, parseAdvisorsFromAdvisorsState } from '../../config/util';\n\nconst mapStateProps = ({\n searchResults, application, user: { user }\n}, ownProps) => {\n const { location: { pathname }, currentPath: { routeKey } } = ownProps;\n return {\n ...searchResults[pathname],\n advisors: parseAdvisorsFromAdvisorsState(searchResults[pathname]?.advisors),\n routeSettings: getRouteSettings({ routeKey }),\n path: pathname,\n newToPG: application.newToPG,\n userId: user && user.id\n };\n};\n\nexport default withLastLocation(withPGTranslation(connect(\n mapStateProps,\n {\n loadAdvisors,\n trackCategoryEvent,\n trackEvent\n }\n)(SearchResults)));\n"],"names":["generateFilterString","t","_toCamelCase","toCamelCase","queryString","parse","window","location","search","minNumberOfReviewsGe","ppmGe","ppmLe","readingVia","query","maxPrice","config","filterPricePerMinute","max","minPrice","min","queryValue","undefined","paramOrNul","concat","filters","readingViaFilters","numberOfReviewsFilters","_toConsumableArray","Object","keys","map","key","filter","n","shouldShowFilteredBy","join","getTitleMetaTagName","_ref2","name","page","title","getTopGradientColor","_ref4","backgroundColor","getPageTitleNameText","_ref5","_ref6","h1Title","needRenderNoResults","_ref8","noResults","filterIsApplied","withSearch","appliedFilter","_ref9","clearFilter","clearFilterIconId","_jsxs","className","classes","children","_jsx","ExpandedText","ellipsis","limit","type","onClick","SvgIcon","id","size","renderTitleSectionImg","_ref","iconUrl","iconName","isKA","renderFiltersSections","history","_Fragment","FiltersContainer","renderSearchResultsContent","_ref3","renderNoResults","renderAdvisorsList","trackCategoryPageVisit","routeKey","matchCategoryPag","specialityRoutesKeys","includes","matchAllAdvisors","appRoutes","psychics","trackPageVisit","trackSpecialityPageVisit","analyticEvents","category","trackSearchPageVisit","trackEvent","params","_objectSpread","toLowerCaseSpaced","trackFavoritePageVisit","favoritesScreen","SearchResults","loadAdvisors","isLastPage","advisors","loading","analytics","routeSettings","trackCategoryEvent","path","lastPageNum","seenPages","userId","textColor","description","shortDescription","useNavigate","useLocation","useTranslation","requestParams","state","_useState2","_slicedToArray","useState","userIdState","setuUserIdState","_useState4","searchParams","setSearchParams","useCurrentPath","useEffect","pathname","categoryId","categoryName","shouldTrackCategoryEvent","replace","categoryEventParams","clickSource","advisorId","_location$state","scrollTo","needRefresh","needReloadSearchResults","prevUserId","UsePreviousValue","value","_ref10","length","props","needLoadAdvisors","searchPage","searchWithPage","stringify","toSnakeCase","loadingPage","_ref7","parseFloat","getLoadingPage","renderMetaRobotIfNeed","useCallback","dynamicRoutesKeys","dynamicRoutes","isSpeciality","content","AppLayout","topGradientColor","AffiliatePromoPopup","Helmet","property","renderCanonicalLink","updatePathTrailingSlashes","stringifyUrl","url","origin","style","PromotionLabel","promotionLabelTypeScreen","promotionLabelTypeScreens","searchResult","param","src","alt","subtitle","AdvisorsList","theme","advisorsListThemes","defaultProps","analyticsEvents","withLastLocation","withPGTranslation","connect","ownProps","_searchResults$pathna","searchResults","application","user","currentPath","parseAdvisorsFromAdvisorsState","getRouteSettings","newToPG"],"sourceRoot":""}