telegram-tt/dist/133.7d3a22eccf9043dcf1d8.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2022-01-24 04:57:29 +01:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[133],{1133:(e,t,n)=>{n.r(t),n.d(t,{AuthCode:()=>f,AuthPassword:()=>P,AuthRegister:()=>w});var a=n(4050),o=n(5116),r=n(7361),s=n(782),i=n(2340),c=n(6590),l=n(9107),d=n(7687),u=n(4288),m=n(3716),p=n(7324),g=n(7799);const h=r.wB?m.qp:m.z7,Z=(0,a.X$)((({code:e,codeLength:t,trackingDirection:n,isTracking:o,isBig:r})=>{const[s,i]=(0,a.eJ)(),[c,l]=(0,a.eJ)(),[d,u]=(0,a.eJ)(!1),Z=165/t;(0,a.d4)((()=>{s||(0,p.Z)("MonkeyIdle").then(i)}),[s]),(0,a.d4)((()=>{c||(0,p.Z)("MonkeyTracking").then(l)}),[c]);const f=(0,a.I4)((()=>u(!0)),[]);return a.ZP.createElement("div",{id:"monkey",className:r?"big":""},!d&&a.ZP.createElement("div",{className:"monkey-preview"}),s&&a.ZP.createElement(g.Z,{id:"idleMonkey",size:r?m.K2:h,className:o?"hidden":void 0,animationData:s,play:!o,onLoad:f}),c&&a.ZP.createElement(g.Z,{id:"trackingMonkey",size:r?m.K2:h,className:o?"shown":"hidden",animationData:c,playSegment:o?function(){const a=e&&e.length>1||n<0?15+Z*(e.length-1):0,o=e.length===t?180:15+Z*e.length;return n<1?[o,a]:[a,o]}():void 0,speed:2,noLoop:!0}))})),f=(0,a.X$)((0,o.c$)((e=>(0,s.ei)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"])))((({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:n,authError:s})=>{const{setAuthCode:m,returnToAuthPhoneNumber:p,clearAuthError:g}=(0,o.uC)(),h=(0,l.Z)(),f=(0,a.sO)(null),[v,b]=(0,a.eJ)(""),[P,E]=(0,a.eJ)(!1),[y,w]=(0,a.eJ)(1);(0,a.d4)((()=>{r.$b||f.current.focus()}),[]),(0,c.ZP)(!0,p);const k=(0,a.I4)((e=>{s&&g();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==v&&(b(t.value),P?t.value.length||E(!1):E(!0),v&&v.length>t.value.length?w(-1):w(1),5===t.value.length&&m({code:t.value}))}),[s,g,v,P,m]);return a.ZP.createElement("div",{id:"auth-code-form",className:"custom-scroll"},a.ZP.createElement("div",{className:"auth-form"},a.ZP.createElement(Z,{code:v,codeLength:5,isTracking:P,trackingDirection:y}),a.ZP.createElement("h2",null,e,a.ZP.createElement("div",{className:"auth-number-edit",onClick:p,role:"button",tabIndex:0,title:h("WrongNumber")},a.ZP.createElement("i",{className:"icon-edit"}))),a.ZP.createElement("p",{className:"note"},(0,i.Z)(h(t?"SentAppCode":"Login.JustSentSms"),["simple_markdown"])),a.ZP.createElement(d.Z,{ref:f,id:"sign-in-code",label:h("Code"),onInput:k,value:v,error:s&&h(s),autoComplete:"one-time-code",inputMode:"numeric"}),n&&a.ZP.createElement(u.Z,null)))})));var v=n(3490),b=n(9364);const P=(0,a.X$)((0,o.c$)((e=>(0,s.ei)(e,["authIsLoading","authError","authHint"])))((({authIsLoading:e,authError:t,authHint:n})=>{const{setAuthPassword:r,clearAuthError:s}=(0,o.uC)(),i=(0,l.Z)(),[c,d]=(0,a.eJ)(!1),u=(0,a.I4)((e=>{d(e)}),[]),m=(0,a.I4)((e=>{r({password:e})}),[r]);return a.ZP.createElement("div",{id:"auth-password-form",className:"custom-scroll"},a.ZP.createElement("div",{className:"auth-form"},a.ZP.createElement(v.Z,{isPasswordVisible:c}),a.ZP.createElement("h2",null,i("Login.Header.Password")),a.ZP.createElement("p",{className:"note"},i("Login.EnterPasswordDescription")),a.ZP.createElement(b.Z,{clearError:s,error:t&&i(t),hint:n,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:u,onSubmit:m})))})));var E=n(231),y=n(710);const w=(0,a.X$)((0,o.c$)((e=>(0,s.ei)(e,["authIsLoading","authError"])))((({authIsLoading:e,authError:t})=>{const{signUp:n,clearAuthError:r,uploadProfilePhoto:s}=(0,o.uC)(),i=(0,l.Z)(),[c,u]=(0,a.eJ)(!1),[m,p]=(0,a.eJ)(),[g,h]=(0,a.eJ)(""),[Z,f]=(0,a.eJ)("");return a.ZP.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},a.ZP.createElement("div",{className:"auth-form"},a.ZP.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),n({firstName:g,lastName:Z}),m&&s({file:m})}},a.ZP.createElement(y.Z,{onChange:p}),a.ZP.createElement("h2",null,i("YourName")),a.ZP.createElement("p",{className:"note"},i("Login.Register.Desc")),a.ZP.createElement(d.Z,{id:"registration-first-name",label:i("Login.Register.FirstName.Placeholder"),onChange:function(e){t&&r();const{target:n}=e;h(n.value),u(n.val
2022-01-26 23:31:11 +01:00
//# sourceMappingURL=133.7d3a22eccf9043dcf1d8.js.map