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aK,aAAaC,QAAQC,KAC9B,SAACC,GACG,IAAMC,EAAQC,EAAAA,GAAAA,KAAaC,EAAAA,IACrBC,EAAaF,EAAAA,GAAAA,KAAaG,EAAAA,IAE1BC,EAAU,CACZ,mBAAoB,kBAYxB,OATKN,EAAOM,QAAuB,eAAKL,IACpCK,EAAuB,cAAI,UAAkB,OAAPL,IAGtCG,IACAE,EAAQ,gBAAkBF,GAE9BJ,EAAOM,SAAU,UAAKN,EAAOM,QAAYA,GAElCN,KAEX,SAACO,G,OAAU/B,QAAQgC,OAAOD,MAO9B,IAAME,EAAiBC,OAAOC,OAAOnB,GAErCiB,EAAeG,IAAM,W,OAAA,4BAAMC,EAAKhE,G,wEACxBA,IACAA,EAAQiE,iBAAmBC,SAAAA,GACvB,OAAOC,EAAAA,EAAAA,WAAUD,K,kBAGlBvB,EAAaoB,IAAIC,EAAKhE,I,2DANNgE,EAAKhE,G,gCAAX,GAQrB,O,8LC9CO,IAAMoE,E,QAAMC,QAAAA,IAAAA,WAAU,C,6BAAVA,C,KACA,Y,QAAGC,Y,YAAW,IAAG,QAAK,KAC3B,Y,QAAGC,Y,YAAW,IAAG,GAAI,EAAqB,SAAW,S","sources":["webpack://_N_E/?af7c","webpack://_N_E/./pages/_site/[city]/internet/na-dachu/index.tsx","webpack://_N_E/./src/api/requests/contentRequest.js","webpack://_N_E/../../packages/ui-react/src/components/typography/formatting/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_site/[city]/internet/na-dachu\",\n function () {\n return require(\"private-next-pages/_site/[city]/internet/na-dachu/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/_site/[city]/internet/na-dachu\"])\n });\n }\n ","import { useSelector } from 'react-redux';\nimport { NextPage } from 'next';\n\nimport { tariffs } from '@r1-frontend/api-domru/api-content/v1/cities/tariffs';\nimport {\n TResponseDto as TTariffsResponseDto,\n} from '@r1-frontend/api-domru/api-content/v1/cities/tariffs/dto/ResponseDto';\nimport { ICurrentCity } from '@r1-frontend/entities/City/models/ICurrentCity';\n\nimport { COLORS } from '@r1-frontend/ui-react/tokens/colors';\n\nimport { getBanners } from '~/src/api/content/banners';\nimport { getPageView } from '~/src/api/content/page/view';\nimport { ITariff } from '~/src/entities/formattedTariff';\nimport Layout from '~/src/features/_layout';\nimport { SeoScriptAggregateRating, SeoScriptAggregateRatingWithOffer } from '~/src/features/_layout/SeoScripts';\nimport { ISeoScriptAggregateRating } from '~/src/features/_layout/SeoScripts/SeoScriptAggregateRating';\nimport { EPrivateHouse, InternetRepresent } from '~/src/features/internet/internet-represent';\nimport { IRepresentTopProps } from '~/src/features/internet/internet-represent/page-blocks/AddOpportunities';\nimport { initialProps } from '~/src/helpers/basePageFunc';\nimport { getCookie } from '~/src/helpers/cookie';\nimport getRequester from '~/src/helpers/getRequester';\nimport { saveTariffs } from '~/src/store/actions/bundles';\nimport { setBannerForInternet, setTariffsForInternet } from '~/src/store/actions/internet';\nimport { getCurrentCity, selectCompanyName } from '~/src/store/selectors/city';\nimport { selectMinCostedTariff } from '~/src/store/selectors/filteredBundles';\nimport selectProviderId from '~/src/store/selectors/selectProviderId';\n\nconst ADDITIONAL_OPPORTUNITIES_ID = '2911';\n\ntype TInternetPageProps = {\n currentCity: ICurrentCity,\n addOpportunities: IRepresentTopProps['addOpportunities'] | null,\n companyName: string,\n}\n\nconst InternetPage: NextPage = ({\n addOpportunities,\n currentCity,\n companyName,\n}): JSX.Element => {\n const cityText = currentCity.cityIn || '';\n const title = `Подключить интернет на даче от ${companyName} в ${cityText}`;\n const description = `Провести высокоскоростной интернет на дачу от провайдера ${companyName} в ${cityText} по доступной цене.` +\n `Скорость от 100 Мбит/с. Подробнее на сайте или по телефону: ${currentCity.phone}`;\n const minCostedTariff = useSelector(selectMinCostedTariff(\n (tariff: ITariff) => tariff.availableOnInternetPage && tariff.isCottage,\n ));\n\n const baseSeoData: ISeoScriptAggregateRating = {\n name: 'Интернет на дачу',\n ratingCount: '995',\n ratingValue: '4.7',\n };\n\n return (\n <>\n {minCostedTariff\n ? \n : \n }\n \n \n \n \n );\n};\n\nInternetPage.getInitialProps = async(options) => {\n const { validatedAccessToken } = await initialProps(options, { isNeedAuthData: true });\n\n const { store, req } = options;\n\n const state = store.getState();\n const {\n internet: {\n tariffs: internetTariffs,\n },\n bundles: {\n tariffs: { allIds: bundlesTariffs },\n },\n } = state;\n\n const providerId = Number(getCookie('providerId', req) || selectProviderId(state));\n\n const currentCity = getCurrentCity(state);\n const companyName = selectCompanyName(state);\n\n const hasTariffs = !!internetTariffs?.length && !!bundlesTariffs?.length;\n\n const doRequest = getRequester(req);\n\n const [respAddOpportunities, bannersResponse, tariffsResponse] = await Promise.all([\n getPageView(providerId, ADDITIONAL_OPPORTUNITIES_ID),\n getBanners({ providerId, isAuth: !!validatedAccessToken, tag: 'internet' }),\n hasTariffs\n ? null\n : doRequest.apiContent({\n ...tariffs({ providerId }),\n withProvider: false,\n }),\n ]);\n\n if (bannersResponse.isSuccess) {\n store.dispatch(setBannerForInternet(bannersResponse.payload[0]?.bannerInfo));\n }\n\n if (tariffsResponse?.isSuccess) {\n store.dispatch(setTariffsForInternet(tariffsResponse.payload.mono));\n store.dispatch(saveTariffs(tariffsResponse.payload.bundles));\n }\n\n const addOpportunities = respAddOpportunities.isSuccess ? respAddOpportunities.payload : null;\n\n return {\n addOpportunities,\n companyName,\n currentCity,\n };\n};\n\nexport default InternetPage;\n","import { isServerSide } from '@r1-frontend/shared/helpers/ssr';\nimport axios from 'axios';\nimport { stringify } from 'qs';\nimport cookies from 'react-cookies';\n\nimport { ACCESS_TOKEN_COOKIE, NO_CACHE_COOKIE } from '~/src/constants';\n\n/**\n * Запрос в ApiContent\n */\nconst axiosContent = axios.create({\n baseURL: isServerSide()\n ? process.env.NEXT_PUBLIC_HOST_API_CONTENT_INNER || process.env.NEXT_PUBLIC_HOST_API_CONTENT\n : process.env.NEXT_PUBLIC_HOST_API_CONTENT,\n});\n\naxiosContent.interceptors.request.use(\n (config) => {\n const token = cookies.load(ACCESS_TOKEN_COOKIE);\n const noCacheKey = cookies.load(NO_CACHE_COOKIE);\n\n const headers = {\n 'X-Requested-With': 'XMLHttpRequest',\n };\n\n if (!config.headers['Authorization'] && token) {\n headers['Authorization'] = `Bearer ${ token }`;\n }\n\n if (noCacheKey) {\n headers['no-cache-key'] = noCacheKey;\n }\n config.headers = { ...config.headers, ...headers };\n\n return config;\n },\n (error) => Promise.reject(error),\n);\n\n/**\n * @deprecated\n * @type {AxiosInstance}\n */\nconst contentRequest = Object.create(axiosContent);\n\ncontentRequest.get = async(url, options) => {\n if (options) {\n options.paramsSerializer = params => {\n return stringify(params);\n };\n }\n return axiosContent.get(url, options);\n};\nexport default contentRequest;\n","import styled, { CSSProperties } from 'styled-components';\n\ntype TPreProps = {\n $whiteSpace?: CSSProperties['whiteSpace'],\n $withIndent?: boolean,\n}\n\nexport const Pre = styled.pre`\n white-space: ${({ $whiteSpace = 'pre' }) => $whiteSpace};\n margin: ${({ $withIndent = true }) => $withIndent ? 'revert' : '0'};\n`;\n"],"names":["window","__NEXT_P","push","InternetPage","addOpportunities","currentCity","companyName","cityText","cityIn","title","description","phone","minCostedTariff","useSelector","selectMinCostedTariff","tariff","availableOnInternetPage","isCottage","baseSeoData","name","ratingCount","ratingValue","SeoScriptAggregateRatingWithOffer","SeoScriptAggregateRating","Layout","withMenu","withChat","withFooter","bgColor","COLORS","InternetRepresent","privateHouse","EPrivateHouse","getInitialProps","options","validatedAccessToken","store","req","state","internetTariffs","bundlesTariffs","providerId","hasTariffs","doRequest","respAddOpportunities","bannersResponse","tariffsResponse","initialProps","isNeedAuthData","getState","internet","tariffs","bundles","allIds","Number","getCookie","selectProviderId","getCurrentCity","selectCompanyName","length","getRequester","Promise","all","getPageView","getBanners","isAuth","tag","apiContent","withProvider","isSuccess","dispatch","setBannerForInternet","payload","bannerInfo","setTariffsForInternet","mono","saveTariffs","axiosContent","axios","baseURL","isServerSide","process","interceptors","request","use","config","token","cookies","ACCESS_TOKEN_COOKIE","noCacheKey","NO_CACHE_COOKIE","headers","error","reject","contentRequest","Object","create","get","url","paramsSerializer","params","stringify","Pre","styled","$whiteSpace","$withIndent"],"sourceRoot":""}