PageSourceSearch

https://selfpub.ru/_next/static/chunks/pages/publisher/restore-password/[id]/[token]-ef83c61589a0cec1.js

js selfpub.ru collected 2026-10-03 23:29:52 UTC 7,717 bytes, 2 lines download raw bytes

1try{let r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new r.Error).stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="9d4a59ae-7b7b-45d2-9688-d3c94bb69e13",r._sentryDebugIdIdentifier="sentry-dbid-9d4a59ae-7b7b-45d2-9688-d3c94bb69e13")}catch(r){}try{let r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new r.Error).stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="9d4a59ae-7b7b-45d2-9688-d3c94bb69e13",r._sentryDebugIdIdentifier="sentry-dbid-9d4a59ae-7b7b-45d2-9688-d3c94bb69e13")}catch(r){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5455],{45224:function(r,e,n){"use strict";n.d(e,{JV:function(){return o},YC:function(){return t},Yy:function(){return s}});var t={title:"Вход на сайт — Литрес Авторы",description:"Вход в личный кабинет на сайте Литрес Авторы - ⏩Издательская платформа для писателей, ☝с помощью которой можно опубликовать свою книгу"},s={title:"Регистрация — Литрес Авторы",description:"Регистрации на сайте Литрес Авторы - ⏩Издательская платформа для писателей, ☝с помощью которой можно опубликовать свою книгу"},o={title:"Восстановление пароля — Литрес Авторы",description:"Восстановление пароля на сайте Литрес Авторы - ⏩Издательская платформа для писателей, ☝с помощью которой можно опубликовать свою книгу"}},33700:function(r,e,n){"use strict";n.r(e),n.d(e,{default:function(){return R}});var t=n(50029),s=n(64687),o=n.n(s),u=n(67294),i=n(35407),a=n(62754),c=n(92170),d=n(86069),l=n.n(d),f=n(85893),w=function(r){var e=r.onRestorePassword,n=(0,u.useState)(""),t=n[0],s=n[1],o=(0,u.useState)(""),d=o[0],w=o[1],p=(0,u.useState)(!1)[0],b=(0,u.useState)([])[0],h=(0,u.useMemo)(function(){return t.length<6},[t,d]),_=(0,u.useMemo)(function(){return d!==t},[d,t]),m=!t||!d||h||_||p;return(0,f.jsxs)("form",{onSubmit:function(r){r.preventDefault(),t&&d&&t===d&&e(t)},children:[(0,f.jsxs)("div",{className:l().root,children:[(0,f.jsxs)("div",{className:l().firstPasswordWrapper,children:[(0,f.jsx)(a.o,{className:l().firstPasswordInput,labelText:"Новый пароль",value:t,type:"password",onChange:function(r){s(r)},errorMessage:t.length&&h?"Пароль должен состоять не менее, чем из ".concat(6," символов"):"",hasError:!!t.length&&h,dataTestId:"publisherRestorePasswordForm__passwordInput"}),!(t.length&&h||b.length)&&(0,f.jsx)(c.t,{password:t})]}),(0,f.jsx)(a.o,{labelText:"Подтвердите пароль",value:d,type:"password",onChange:function(r){w(r)},errorMessage:d.length&&_?"Пароль не совпадает. Пожалуйста, проверьте еще раз и повторите попытку":"",hasError:!!d.length&&_,dataTestId:"publisherRestorePasswordForm__passwordConfirmInput"})]}),(0,f.jsx)("div",{className:l().publisherLoginFormFooter,children:(0,f.jsx)(i.z,{size:"medium",type:"submit",disabled:m,dataTestId:"publisherRestorePasswordForm__updatePasswordButton",children:"Обновить пароль"})})]})},p=n(11163),b=n(3490),h=n(45224),_=n(63602),m=n(89637),P=n(63690),g=n(42221),y=n(87944),x=n.n(y),R=function(){var r,e=(0,p.useRouter)(),n=e.query.id,s=e.query.token,u=(r=(0,t.Z)(o().mark(function r(t){var u,i;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!(n&&s)){r.next=10;break}return u="confirmNewPassword",r.next=4,(0,g.B)({mode:"cors",apiPointName:u,body:{uidb64:String(n),token:String(s),new_password:t}});case 4:if(!((i=r.sent.errors).length>0)){r.next=9;break}return(0,_.x2)({message:i[0].messages[0]}),r.abrupt("return");case 9:e.push(b.J.login);case 10:case"end":return r.stop()}},r)})),function(e){return r.apply(this,arguments)});return(0,f.jsx)(P.T,{fullHeight:!0,seo:h.YC,children:(0,f.jsx)("div",{className:x().wrapperFormPage,children:(0,f.jsxs)("div",{className:x().form,children:[(0,f.jsx)(m.H1,{className:x().header,children:"Обновите пароль"}),(0,f.jsx)("div",{className:x().restorePasswordClarificationContainer,children:(0,f.jsx)(m.T,{children:"Придумайте новый пароль, который не используется на других сайтах"})}),(0,f.jsx)(w,{onRestorePassword:u})]})})})}},98047:function(r,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/publisher/restore-password/[id]/[token]",function(){return n(33700)}])}
1,86069:function(r){r.exports={root:"PublisherRestorePasswordForm_root__v3E28",firstPasswordInput:"PublisherRestorePasswordForm_firstPasswordInput__MCJX7",linkRestorePassword:"PublisherRestorePasswordForm_linkRestorePassword___ycq4",withError:"PublisherRestorePasswordForm_withError__3ic_C",publisherLoginFormFooter:"PublisherRestorePasswordForm_publisherLoginFormFooter__2G3SM",firstPasswordWrapper:"PublisherRestorePasswordForm_firstPasswordWrapper__6NWmJ"}},87944:function(r){r.exports={wrapperFormPage:"PublisherRestorePasswordPage_wrapperFormPage__b4beF",form:"PublisherRestorePasswordPage_form__6cWE3",header:"PublisherRestorePasswordPage_header__OkqRj",forgotPasswordText:"PublisherRestorePasswordPage_forgotPasswordText__H7JzU",restorePasswordClarificationContainer:"PublisherRestorePasswordPage_restorePasswordClarificationContainer__8MXIe"}},19302:function(r,e,n){"use strict";n.d(e,{Z:function(){return s}});var t=n(67294);function s(r,e,n){var s=this,o=(0,t.useRef)(null),u=(0,t.useRef)(0),i=(0,t.useRef)(null),a=(0,t.useRef)([]),c=(0,t.useRef)(),d=(0,t.useRef)(),l=(0,t.useRef)(r),f=(0,t.useRef)(!0);l.current=r;var w=!e&&0!==e&&"undefined"!=typeof window;if("function"!=typeof r)throw TypeError("Expected a function");e=+e||0;var p=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,h="maxWait"in n,_=h?Math.max(+n.maxWait||0,e):null;return(0,t.useEffect)(function(){return f.current=!0,function(){f.current=!1}},[]),(0,t.useMemo)(function(){var r=function(r){var e=a.current,n=c.current;return a.current=c.current=null,u.current=r,d.current=l.current.apply(n,e)},n=function(r,e){w&&cancelAnimationFrame(i.current),i.current=w?requestAnimationFrame(r):setTimeout(r,e)},t=function(r){if(!f.current)return!1;var n=r-o.current,t=r-u.current;return!o.current||n>=e||n<0||h&&t>=_},m=function(e){return(i.current=null,b&&a.current)?r(e):(a.current=c.current=null,d.current)},P=function(){var r=Date.now();if(t(r))return m(r);if(f.current){var s=r-o.current,i=r-u.current,a=e-s;n(P,h?Math.min(a,_-i):a)}},g=function(){for(var l=[],w=0;w<arguments.length;w++)l[w]=arguments[w];var b=Date.now(),_=t(b);if(a.current=l,c.current=s,o.current=b,_){if(!i.current&&f.current)return u.current=o.current,n(P,e),p?r(o.current):d.current;if(h)return n(P,e),r(o.current)}return i.current||n(P,e),d.current};return g.cancel=function(){i.current&&(w?cancelAnimationFrame(i.current):clearTimeout(i.current)),u.current=0,a.current=o.current=c.current=i.current=null},g.isPending=function(){return!!i.current},g.flush=function(){return i.current?m(Date.now()):d.current},g},[p,h,e,_,b,w])}}},function(r){r.O(0,[5455],function(){r.E(2052)},5),r.O(0,[5675,9593,2238,540,9081,2519,8410,3189,2675,7853,5579,5115,878,2888,9774,179],function(){return r(r.s=98047)}),_N_E=r.O()}]);
2//# sourceMappingURL=[token]-ef83c61589a0cec1.js.map

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.