const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C1ye5P3I.js","assets/vendor-query-D-sr233n.js","assets/vendor-react-BwKDLVNL.js","assets/vendor-i18n-C6wqqoou.js","assets/vendor-dayjs-5tvLiZdS.js","assets/vendor-sentry-B6ofghpF.js","assets/vendor-antd-core-4y2ghozH.js","assets/index-BTg7EMV0.css"])))=>i.map(i=>d[i]);
import{_ as g}from"./vendor-query-D-sr233n.js";import{x as h,u as f,r as i,j as e}from"./vendor-react-BwKDLVNL.js";import{aD as _,v as j,w as v,x as b,D as N,F as c,I as d,z as l,c as m}from"./index-C1ye5P3I.js";import"./vendor-dayjs-5tvLiZdS.js";import{S as P}from"./skeleton-NS0Jk4e5.js";import{M as S}from"./MarketingShell-pJlumM7K.js";import{u as w}from"./vendor-i18n-C6wqqoou.js";import"./vendor-sentry-B6ofghpF.js";import"./vendor-antd-core-4y2ghozH.js";import"./zap-Bd320S-h.js";import"./globe-C6LFgqFt.js";import"./shield-check-CUe1YrFZ.js";import"./users-BQu_O3JR.js";import"./file-text-cRwgk8Y4.js";import"./SiteFooter-CMa-vyJL.js";import"./send-BPZS28JS.js";import"./building-2-BaHHBpzk.js";const k=i.lazy(()=>g(()=>import("./index-C1ye5P3I.js").then(t=>t.cN),__vite__mapDeps([0,1,2,3,4,5,6,7])));function y(t){if(!t)return null;const a=t.trim();return a.length===0||a.length>512||!a.startsWith("/")||a.startsWith("//")||/\b(https?:|javascript:|data:)/i.test(a)?null:a}function G(){const{t}=w(),[a]=h(),n=f(),s=a.get("redirect"),r=y(s),[o,p]=i.useState(!0);i.useEffect(()=>{m("login_page_viewed",{hasRedirect:r!==null,rawRedirectBlocked:s!==null&&r===null})},[s,r]);const u=()=>{r?(m("login_redirect_followed",{target:r}),n(r,{replace:!0})):n("/",{replace:!0})},x=()=>{p(!1),n("/",{replace:!0})};return e.jsxs(S,{active:null,containerSize:"base",children:[e.jsxs(_,{children:[e.jsx("title",{children:t("loginPage.meta.title","Вход — Avalog")}),e.jsx("meta",{name:"robots",content:"noindex,follow"})]}),e.jsxs(j,{py:"lg",className:"relative overflow-hidden bg-bg-base",children:[e.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-[420px] bg-gradient-to-b from-primary-light/60 via-primary-light/15 to-transparent"}),e.jsx("div",{className:"absolute inset-0 opacity-60 [background-image:linear-gradient(to_right,var(--color-border)_1px,transparent_1px),linear-gradient(to_bottom,var(--color-border)_1px,transparent_1px)] [background-size:56px_56px] [mask-image:radial-gradient(ellipse_75%_50%_at_50%_0%,#000_55%,transparent_100%)]"})]}),e.jsx(v,{size:"base",className:"relative",children:e.jsxs(b,{gap:6,align:"center",className:"max-w-md mx-auto text-center",children:[e.jsx(N,{size:"lg",children:t("loginPage.heading","Вход в Avalog")}),s&&!r?e.jsx(c,{children:e.jsx(d,{className:"py-4",children:e.jsx(l,{className:"text-text-muted text-sm",children:t("loginPage.redirectBlocked","Параметр redirect был отклонён по соображениям безопасности. После входа вы попадёте на главную.")})})}):r?e.jsx(c,{children:e.jsx(d,{className:"py-4",children:e.jsx(l,{className:"text-text-muted text-sm",children:t("loginPage.redirectNotice","После входа мы перенаправим вас на запрошенную страницу.")})})}):null,e.jsx(i.Suspense,{fallback:e.jsx(P,{className:"h-64 w-full"}),children:e.jsx(k,{isOpen:o,onClose:x,onSuccess:u})}),o?null:e.jsx(l,{className:"text-sm text-text-muted",children:t("loginPage.windowClosed","Окно входа закрыто. Обновите страницу для повтора.")})]})})]})]})}export{G as default,y as safeRedirectTarget};