{"version":3,"file":"static/chunks/pages/_site/[city]/user/login-1a096188302c256e.js","mappings":"uFACKA,OAAOC,SAAWD,OAAOC,UAAY,IAAIC,KAAK,CAC7C,2BACA,WACE,OAAO,EAAQ,W,wNCWjBC,EAAQC,KAAQ,W,OAAM,2DAAmC,C,wDAKzDC,EAAuC,CACzC,GAAI,6FAOFC,EAA8B,Y,IAAGC,EAAU,EAAVA,WAC7BC,GAAOC,EAAAA,EAAAA,IAAYC,EAAAA,IACnBC,GAAcF,EAAAA,EAAAA,IAAYG,EAAAA,IAEhC,OAAQ,SAACC,EAAAA,EAAM,CACPC,MAAO,mKAAmCH,EAC1CI,YAAa,mKAAmCJ,EAAnC,6mBAC+EA,EAC5FK,UAAU,EACVC,UAAU,EACVC,QAASC,EAAAA,EAAAA,O,UAET,SAAChB,EAAK,CAACiB,cAAeZ,EAAKY,YAAab,WAAYA,OAKhED,EAAUe,gBAAkB,W,OAAA,4BAAMC,G,IAGxBC,EACAC,EAGMC,E,kFANNC,EAAAA,EAAAA,GAAaJ,EAAS,CAAEK,gBAAgB,I,UAExCJ,EAAQD,EAAQM,MAAMC,WACtBL,GAAaM,EAAAA,EAAAA,GAAiBP,IAEhCQ,EAAAA,EAAAA,OACM,EAAUT,EAARG,KACRO,EAAAA,EAAAA,IAAqB,CACjBP,IAAAA,EACAQ,SAAUC,EAAAA,QAIdV,KAAcnB,GAAY,C,wCACnB,CAAEE,WAAYF,EAAamB,K,gCAG/B,I,2DAlBuBF,G,gCAAN,GAqB5B,c","sources":["webpack://_N_E/?3482","webpack://_N_E/./pages/_site/[city]/user/login.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_site/[city]/user/login\",\n function () {\n return require(\"private-next-pages/_site/[city]/user/login.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/_site/[city]/user/login\"])\n });\n }\n ","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { NextPage } from 'next';\nimport dynamic from 'next/dynamic';\n\nimport { COLORS } from '@r1-frontend/ui-react/tokens/colors';\n\nimport { USER_LOGIN_ROUTE } from '~/src/constants/routes';\nimport Layout from '~/src/features/_layout';\nimport { isSso } from '~/src/features/user/helpers';\nimport { initialProps } from '~/src/helpers/basePageFunc';\nimport { nonPermanentRedirect } from '~/src/helpers/url';\nimport { getCurrentCity, selectCompanyName } from '~/src/store/selectors/city';\nimport selectProviderId from '~/src/store/selectors/selectProviderId';\n\nconst Login = dynamic(() => import('~/src/features/user/Login'));\n\n/**\n * todo временное решение по WEB-43859, пока нет возможности определить кобренд и получить конкретный документ\n */\nconst COBRAND_DATA: Record = {\n 41: 'https://cdn-b2c.dom.ru/content/static/files/document/4e775a351712d527541bcaeeb6da13a2.pdf',\n};\n\ninterface IProps {\n policyLink?: string,\n}\n\nconst LoginPage: NextPage = ({ policyLink }) => {\n const city = useSelector(getCurrentCity);\n const companyName = useSelector(selectCompanyName);\n\n return (\n \n \n );\n};\n\nLoginPage.getInitialProps = async(options) => {\n await initialProps(options, { isNeedAuthData: true });\n\n const state = options.store.getState();\n const providerId = selectProviderId(state);\n\n if (isSso()) {\n const { res } = options;\n nonPermanentRedirect({\n res,\n location: USER_LOGIN_ROUTE,\n });\n }\n\n if (providerId in COBRAND_DATA) {\n return { policyLink: COBRAND_DATA[providerId] };\n }\n\n return {};\n};\n\nexport default LoginPage;\n"],"names":["window","__NEXT_P","push","Login","dynamic","COBRAND_DATA","LoginPage","policyLink","city","useSelector","getCurrentCity","companyName","selectCompanyName","Layout","title","description","withMenu","withChat","bgColor","COLORS","plAvailable","getInitialProps","options","state","providerId","res","initialProps","isNeedAuthData","store","getState","selectProviderId","isSso","nonPermanentRedirect","location","USER_LOGIN_ROUTE"],"sourceRoot":""}