1import{b as S,r as a,j as t,L as k}from"./vendor-react-72e4a099.js";import{F as E,I as w,B as p,a as T,u as N}from"./Toast-43ee7788.js";import{a as A,e as y}from"./api-d8a57490.js";import{A as C,a as b,d as F,E as I}from"./AuthShell-619b6fc9.js";import{M as $}from"./mail-c07c6c62.js";import{E as z}from"./external-link-63c5a0ce.js";import{A as L}from"./arrow-left-6a250fbc.js";import"./createLucideIcon-581cd729.js";import"./eye-5711d0dd.js";import"./x-b9f3d093.js";import"./circle-check-63b159d4.js";import"./circle-alert-67975319.js";import"./buildLifecycle-a44b0e05.js";import"./Display-48adcc24.js";import"./promo-speaker-89d1d1d0.js";/* empty css */import"./link-2-36909ef8.js";import"./chevron-right-b4336544.js";import"./arrow-up-955249b3.js";import"./heart-469df115.js";import"./thumbs-up-f55ea202.js";const x=45,B=[[/^(gmail\.com|googlemail\.com)$/,"https://mail.google.com/"],[/^(yandex\.(ru|com|by|kz|ua|com\.tr)|ya\.ru|narod\.ru)$/,"https://mail.yandex.ru/"],[/^(mail\.ru|inbox\.ru|list\.ru|bk\.ru|internet\.ru|my\.com)$/,"https://e.mail.ru/inbox/"],[/^(outlook\.(com|ru)|hotmail\.com|live\.(com|ru)|msn\.com)$/,"https://outlook.live.com/mail/"],[/^(yahoo\.com|ymail\.com)$/,"https://mail.yahoo.com/"],[/^(icloud\.com|me\.com|mac\.com)$/,"https://www.icloud.com/mail/"],[/^(rambler\.ru|lenta\.ru|autorambler\.ru|ro\.ru)$/,"https://mail.rambler.ru/"],[/^(proton\.me|protonmail\.com|pm\.me)$/,"https://mail.proton.me/"]];function D(s){var r;const o=(r=s.split("@")[1])==null?void 0:r.trim().toLowerCase();if(!o)return null;const n=B.find(([e])=>e.test(o));return n?n[1]:null}function M({email:s,onResend:o,onChangeEmail:n}){const[r,e]=a.useState(x),[d,m]=a.useState(!1),h=N(),i=D(s);a.useEffect(()=>{if(r<=0)return;const l=window.setTimeout(()=>e(f=>f-1),1e3);return()=>window.clearTimeout(l)},[r]);const c=async()=>{m(!0);try{await o(),h.success("ÐÑпÑавили пиÑÑмо еÑÑ Ñаз"),e(x)}catch(l){h.error(y(l,"Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ Ð¿Ð¸ÑÑмо. ÐопÑобÑйÑе еÑÑ Ñаз."))}finally{m(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"sn-a-auth-sent-ico",style:{marginTop:44},"aria-hidden":"true",children:t.jsx($,{className:"sn-i sn-i-24"})}),t.jsx(b,{style:{marginTop:24},title:"ÐÑовеÑÑÑе поÑÑÑ",subtitle:t.jsxs(t.Fragment,{children:["ÐÑпÑавили ÑÑÑÐ»ÐºÑ Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ паÑÐ¾Ð»Ñ Ð½Ð° ",t.jsx("b",{style:{fontWeight:600,color:"var(--sn-ink)"},children:s}),". Ðна дейÑÑвÑÐµÑ 1 ÑаÑ."]})}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,marginTop:32},children:[i&&t.jsx(p,{href:i,target:"_blank",rel:"noreferrer",variant:"primary",size:"lg",block:!0,icon:t.jsx(z,{className:"sn-i"}),children:"ÐÑкÑÑÑÑ Ð¿Ð¾ÑÑÑ"}),r>0?t.jsxs(p,{variant:"quiet",size:"lg",block:!0,disabled:!0,style:{color:"var(--sn-ink-3)",background:"var(--sn-surface-2)",borderColor:"var(--sn-line)",opacity:1},children:["ÐÑпÑавиÑÑ ÐµÑÑ Ñаз ÑеÑез ",t.jsx("span",{className:"sn-mono",children:`0:${String(r).padStart(2,"0")}`})]}):t.jsx(p,{variant:i?"quiet":"primary",size:"lg",block:!0,loading:d,onClick:c,children:"ÐÑпÑавиÑÑ ÐµÑÑ Ñаз"})]}),t.jsxs("p",{style:{fontSize:14,color:"var(--sn-ink-3)",lineHeight:1.5,marginTop:20},children:["ÐиÑÑма неÑ? ÐаглÑниÑе в «Спам» или"," ",t.jsx("button",{type:"button",onClick:n,style:{border:0,background:"none",padding:0,color:"var(--sn-blue)",fontWeight:600,fontSize:14},children:"ÑмениÑе email"}),"."]}),t.jsxs(k,{to:"/login",className:"sn-a-auth-back",style:{marginTop:40,color:"var(--sn-ink-2)"},children:[t.jsx(L,{className:"sn-i"})," ÐеÑнÑÑÑÑÑ ÐºÐ¾ вÑ
одÑ"]})]})}function st(){const[s]=S(),[o,n]=a.useState(()=>s.get("email")||""),[r,e]=a.useState(null),[d,m]=a.useState(null),[h,i]=a.useState(!1),[c,l]=a.useState(null),f=async u=>{await A.post("/api/v1/auth/password/forgot",{email:u},{anonymous:!0})},j=async u=>{u.preventDefault();const g=o.trim();if(!g){e("УкажиÑе email");return}if(!I.test(g)){e("ÐÑовеÑÑÑе email â в нÑм оÑибка");return}i(!0),m(null);try{await f(g),l(g)}catch(v){m(y(v,"Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ Ð¿Ð¸ÑÑмо. ÐопÑобÑйÑе еÑÑ Ñаз."))}finally{i(!1)}};return t.jsx(C,{children:c?t.jsx(M,{email:c,onResend:()=>f(c),onChangeEmail:()=>l(null)}):t.jsxs(t.Fragment,{children:[t.jsx(b,{title:"ÐоÑÑÑановиÑÑ Ð¿Ð°ÑолÑ",subtitle:"УкажиÑе поÑÑÑ, Ñ ÐºÐ¾ÑоÑой вÑ
одиÑе в SNICH, â пÑиÑлÑм ÑÑÑÐ»ÐºÑ Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ паÑолÑ."}),t.jsxs("form",{className:"sn-a-auth-form",style:{marginTop:32},onSubmit:j,noValidate:!0,children:[d&&t.jsx(F,{children:d}),t.jsx(E,{label:"Email",htmlFor:"forgot-email",error:r||void 0,children:t.jsx(w,{id:"forgot-email",type:"email",name:"email",autoComplete:"email",placeholder:"[email protected]",value:o,autoFocus:!0,invalid:!!r,onChange:u=>{n(u.target.value),e(null)}})}),t.jsx(p,{type:"submit",variant:"primary",size:"lg",loading:h,children:"ÐÑпÑавиÑÑ ÑÑÑлкÑ"}),t.jsx(p,{to:"/login",variant:"text",style:{alignSelf:"center",color:"var(--sn-ink-2)"},children:"ÐеÑнÑÑÑÑÑ ÐºÐ¾ вÑ
одÑ"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",ga
1p:12,marginTop:28,padding:"14px 16px",borderRadius:14,background:"var(--sn-surface-2)",border:"1px solid var(--sn-line)"},children:[t.jsx(T,{className:"sn-i",style:{color:"var(--sn-ink-3)",marginTop:1}}),t.jsx("span",{style:{fontSize:14,color:"var(--sn-ink-2)",lineHeight:1.45},children:"ÐÑ
одили ÑеÑез Ð¯Ð½Ð´ÐµÐºÑ ID? ÐаÑÐ¾Ð»Ñ Ð½Ðµ нÑжен â пÑоÑÑо нажмиÑе «ÐойÑи Ñ Ð¯Ð½Ð´ÐµÐºÑ ID» на ÑÑÑаниÑе вÑ
ода."})]})]})})}export{st as default,D as webmailUrl};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.