telegram-tt/dist/5.578ca6228346adc2e005.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2021-07-13 16:33:18 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{104:function(e,t,a){"use strict";a.r(t),a.d(t,"AuthCode",(function(){return p})),a.d(t,"AuthPassword",(function(){return j})),a.d(t,"AuthRegister",(function(){return E}));var n=a(0),r=a(2),o=a(5),c=a(3),i=a(35),l=a(46),s=a(17),u=a(1),d=a(126),m=a(115);a(139);const b=o.k?u.tb:u.sb;var h=Object(n.h)(({code:e,codeLength:t,trackingDirection:a,isTracking:r,isBig:o})=>{const[c,i]=Object(n.r)(),[l,s]=Object(n.r)(),[h,p]=Object(n.r)(!1),f=165/t;Object(n.n)(()=>{c||Object(d.a)("MonkeyIdle").then(i)},[c]),Object(n.n)(()=>{l||Object(d.a)("MonkeyTracking").then(s)},[l]);const g=Object(n.m)(()=>p(!0),[]);return n.a.createElement("div",{id:"monkey",className:o?"big":""},!h&&n.a.createElement("div",{className:"monkey-preview"}),c&&n.a.createElement(m.a,{id:"idleMonkey",size:o?u.Db:b,className:r?"hidden":void 0,animationData:c,play:!r,onLoad:g}),l&&n.a.createElement(m.a,{id:"trackingMonkey",size:o?u.Db:b,className:r?"shown":"hidden",animationData:l,playSegment:r?function(){const n=e&&e.length>1||a<0?15+f*(e.length-1):0,r=e.length===t?180:15+f*e.length;return a<1?[r,n]:[n,r]}():void 0,speed:2,noLoop:!0}))});var p=Object(n.h)(Object(r.h)(e=>Object(c.l)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["setAuthCode","returnToAuthPhoneNumber","clearAuthError"]))(({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:a,authError:r,setAuthCode:c,returnToAuthPhoneNumber:u,clearAuthError:d})=>{const m=Object(n.q)(null),[b,p]=Object(n.r)(""),[f,g]=Object(n.r)(!1),[j,O]=Object(n.r)(1);Object(n.n)(()=>{o.m||m.current.focus()},[]),Object(i.a)(!0,u);const v=Object(n.m)(e=>{r&&d();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==b&&(p(t.value),f?t.value.length||g(!1):g(!0),b&&b.length>t.value.length?O(-1):O(1),5===t.value.length&&c({code:t.value}))},[r,d,b,f,c]);return n.a.createElement("div",{id:"auth-code-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement(h,{code:b,codeLength:5,isTracking:f,trackingDirection:j}),n.a.createElement("h2",null,e,n.a.createElement("div",{className:"auth-number-edit",onClick:u,role:"button",tabIndex:0,title:"Sign In with another phone number"},n.a.createElement("i",{className:"icon-edit"}))),n.a.createElement("p",{className:"note"},t?n.a.createElement(n.a.Fragment,null,"We have sent the code to the Telegram app",n.a.createElement("br",null),"on your other device."):n.a.createElement(n.a.Fragment,null,"We have sent you an SMS",n.a.createElement("br",null),"with the code.")),n.a.createElement(l.a,{ref:m,id:"sign-in-code",label:"Code",onInput:v,value:b,error:r,autoComplete:"off",inputMode:"decimal"}),a&&n.a.createElement(s.a,null)))})),f=a(147),g=a(148);var j=Object(n.h)(Object(r.h)(e=>Object(c.l)(e,["authIsLoading","authError","authHint"]),(e,t)=>Object(c.l)(t,["setAuthPassword","clearAuthError"]))(({authIsLoading:e,authError:t,authHint:a,setAuthPassword:r,clearAuthError:o})=>{const[c,i]=Object(n.r)(!1),l=Object(n.m)(e=>{i(e)},[]),s=Object(n.m)(e=>{r({password:e})},[r]);return n.a.createElement("div",{id:"auth-password-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement(f.a,{isPasswordVisible:c}),n.a.createElement("h2",null,"Enter Your Password"),n.a.createElement("p",{className:"note"},"Your account is protected with",n.a.createElement("br",null),"an additional password."),n.a.createElement(g.a,{clearError:o,error:t,hint:a,isLoading:e,isPasswordVisible:c,onChangePasswordVisibility:l,onSubmit:s})))})),O=a(23),v=a(130);var E=Object(n.h)(Object(r.h)(e=>Object(c.l)(e,["authIsLoading","authError"]),(e,t)=>Object(c.l)(t,["signUp","clearAuthError","uploadProfilePhoto"]))(({authIsLoading:e,authError:t,signUp:a,clearAuthError:r,uploadProfilePhoto:o})=>{const[c,i]=Object(n.r)(!1),[s,u]=Object(n.r)(),[d,m]=Object(n.r)(""),[b,h]=Object(n.r)("");return n.a.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement("form",{action:
//# sourceMappingURL=5.578ca6228346adc2e005.js.map