telegram-tt/dist/3041.3651667772714402881a.js

2 lines
11 KiB
JavaScript
Raw Permalink Normal View History

2022-09-15 10:20:00 +02:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[3041],{51133:(e,t,a)=>{a.r(t),a.d(t,{AuthCode:()=>v,AuthPassword:()=>f,AuthRegister:()=>y});var n=a(14050),r=a(33555),o=a(77361),l=a(60782),s=a(32340),i=a(46590),c=a(59107),d=a(97687),u=a(34288),m=a(83716),h=a(13365),g=a(97799);const Z=o.wB?m.qp:m.z7,p=(0,n.X$)((e=>{let{code:t,codeLength:a,trackingDirection:r,isTracking:o,isBig:l}=e;const[s,i]=(0,n.eJ)(!1),c=165/a,d=(0,n.I4)((()=>i(!0)),[]);return n.ZP.createElement("div",{id:"monkey",className:l?"big":""},!s&&n.ZP.createElement("div",{className:"monkey-preview"}),n.ZP.createElement(g.Z,{size:l?m.K2:Z,className:o?"hidden":void 0,tgsUrl:h.l.MonkeyIdle,play:!o,onLoad:d}),n.ZP.createElement(g.Z,{size:l?m.K2:Z,className:o?"shown":"hidden",tgsUrl:h.l.MonkeyTracking,playSegment:o?function(){const e=t&&t.length>1||r<0?15+c*(t.length-1):0,n=t.length===a?180:15+c*t.length;return r<1?[n,e]:[e,n]}():void 0,speed:2,noLoop:!0}))})),v=(0,n.X$)((0,r.c$)((e=>(0,l.ei)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"])))((e=>{let{authPhoneNumber:t,authIsCodeViaApp:a,authIsLoading:l,authError:m}=e;const{setAuthCode:h,returnToAuthPhoneNumber:g,clearAuthError:Z}=(0,r.Sv)(),v=(0,c.Z)(),E=(0,n.sO)(null),[P,f]=(0,n.eJ)(""),[b,N]=(0,n.eJ)(!1),[y,C]=(0,n.eJ)(1);(0,n.d4)((()=>{o.$b||E.current.focus()}),[]),(0,i.Z)({isActive:!0,onBack:g});const w=(0,n.I4)((e=>{m&&Z();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==P&&(f(t.value),b?t.value.length||N(!1):N(!0),P&&P.length>t.value.length?C(-1):C(1),5===t.value.length&&h({code:t.value}))}),[m,Z,P,b,h]);return n.ZP.createElement("div",{id:"auth-code-form",className:"custom-scroll"},n.ZP.createElement("div",{className:"auth-form"},n.ZP.createElement(p,{code:P,codeLength:5,isTracking:b,trackingDirection:y}),n.ZP.createElement("h1",null,t,n.ZP.createElement("div",{className:"auth-number-edit",onClick:g,role:"button",tabIndex:0,title:v("WrongNumber")},n.ZP.createElement("i",{className:"icon-edit"}))),n.ZP.createElement("p",{className:"note"},(0,s.Z)(v(a?"SentAppCode":"Login.JustSentSms"),["simple_markdown"])),n.ZP.createElement(d.Z,{ref:E,id:"sign-in-code",label:v("Code"),onInput:w,value:P,error:m&&v(m),autoComplete:"off",inputMode:"numeric"}),l&&n.ZP.createElement(u.Z,null)))})));var E=a(93490),P=a(99364);const f=(0,n.X$)((0,r.c$)((e=>(0,l.ei)(e,["authIsLoading","authError","authHint"])))((e=>{let{authIsLoading:t,authError:a,authHint:o}=e;const{setAuthPassword:l,clearAuthError:s}=(0,r.Sv)(),i=(0,c.Z)(),[d,u]=(0,n.eJ)(!1),m=(0,n.I4)((e=>{u(e)}),[]),h=(0,n.I4)((e=>{l({password:e})}),[l]);return n.ZP.createElement("div",{id:"auth-password-form",className:"custom-scroll"},n.ZP.createElement("div",{className:"auth-form"},n.ZP.createElement(E.Z,{isPasswordVisible:d}),n.ZP.createElement("h1",null,i("Login.Header.Password")),n.ZP.createElement("p",{className:"note"},i("Login.EnterPasswordDescription")),n.ZP.createElement(P.Z,{clearError:s,error:a&&i(a),hint:o,isLoading:t,isPasswordVisible:d,onChangePasswordVisibility:m,onSubmit:h})))})));var b=a(231),N=a(90710);const y=(0,n.X$)((0,r.c$)((e=>(0,l.ei)(e,["authIsLoading","authError"])))((e=>{let{authIsLoading:t,authError:a}=e;const{signUp:o,clearAuthError:l,uploadProfilePhoto:s}=(0,r.Sv)(),i=(0,c.Z)(),[u,m]=(0,n.eJ)(!1),[h,g]=(0,n.eJ)(),[Z,p]=(0,n.eJ)(""),[v,E]=(0,n.eJ)(""),P=(0,n.I4)((e=>{a&&l();const{target:t}=e;p(t.value),m(t.value.length>0)}),[a,l]),f=(0,n.I4)((e=>{const{target:t}=e;E(t.value)}),[]);return n.ZP.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},n.ZP.createElement("div",{className:"auth-form"},n.ZP.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),o({firstName:Z,lastName:v}),h&&s({file:h})}},n.ZP.createElement(N.Z,{onChange:g}),n.ZP.createElement("h2",null,i("YourName")),n.ZP.createElement("p",{className:"note"},i("Login.Register.Desc")),n.ZP.createElement(d.Z,{id:"registration-first-name",label:i("Login.Register.FirstName.Placeholder"),onChange:P,value:Z,error:a&&i(a),autoComplete:"given-name"}),n.ZP.
2022-09-24 01:42:13 +02:00
//# sourceMappingURL=3041.3651667772714402881a.js.map