(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(7),c=a(3),l=a(45),i=a(17),s=a(1),u=a(124),d=a(115);a(139);const m=o.k?s.rb:s.qb;var b=Object(n.h)(({code:e,codeLength:t,trackingDirection:a,isTracking:r,isBig:o})=>{const[c,l]=Object(n.r)(),[i,b]=Object(n.r)(),[h,p]=Object(n.r)(!1),f=165/t;Object(n.n)(()=>{c||Object(u.a)("MonkeyIdle").then(l)},[c]),Object(n.n)(()=>{i||Object(u.a)("MonkeyTracking").then(b)},[i]);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(d.a,{id:"idleMonkey",size:o?s.Bb:m,className:r?"hidden":void 0,animationData:c,play:!r,onLoad:g}),i&&n.a.createElement(d.a,{id:"trackingMonkey",size:o?s.Bb:m,className:r?"shown":"hidden",animationData:i,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}))}),h=a(79);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:s,clearAuthError:u})=>{const d=Object(n.q)(null),[m,p]=Object(n.r)(""),[f,g]=Object(n.r)(!1),[j,O]=Object(n.r)(1);Object(n.n)(()=>{o.l||d.current.focus()},[]),Object(h.a)(s);const v=Object(n.m)(e=>{r&&u();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==m&&(p(t.value),f?t.value.length||g(!1):g(!0),m&&m.length>t.value.length?O(-1):O(1),5===t.value.length&&c({code:t.value}))},[r,u,m,f,c]);return n.a.createElement("div",{id:"auth-code-form",className:"custom-scroll"},n.a.createElement("div",{className:"auth-form"},n.a.createElement(b,{code:m,codeLength:5,isTracking:f,trackingDirection:j}),n.a.createElement("h2",null,e,n.a.createElement("div",{className:"auth-number-edit",onClick:s,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:d,id:"sign-in-code",label:"Code",onInput:v,value:m,error:r,autoComplete:"off",inputMode:"decimal"}),a&&n.a.createElement(i.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,l]=Object(n.r)(!1),i=Object(n.m)(e=>{l(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:i,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:"",method:"post",onSubmit:function(e){e.preventDefault(),a({firstName:d,lastName:b}),s&&o({file:s})}},n.a.createElement(v.a,{onChange:u}),n.a.createElement("h2",null,"Your Name"),n.a.createElement("p",{className:"note"},"Enter your name and add",n.a.createElement("br",null),"a profile picture."),n.a.createElement(l.a,{id:"registration-first-name",label:"Name",onChange:function(e){t&&r();const{target:a}=e;m(a.value),i(a.value.length>0)},value:d,error:t,autoComplete:"given-name"}),n.a.createElement(l.a,{id:"registration-last-name",label:"Last Name (optional)",onChange:function(e){const{target:t}=e;h(t.value)},value:b,autoComplete:"family-name"}),c&&n.a.createElement(O.a,{type:"submit",ripple:!0,isLoading:e},"Start Messaging"))))}))},109:function(e,t,a){"use strict";var n=a(0),r=a(55);var o=a(8),c=a(48),l=a(35),i=a(58),s=a(26),u=a(23),d=a(121);a(149);t.a=e=>{const{title:t,className:a,isOpen:m,header:b,hasCloseButton:h,noBackdrop:p,children:f,onClose:g,onCloseAnimationEnd:j,onEnter:O}=e,{shouldRender:v,transitionClassNames:E}=Object(l.a)(m,j),y=Object(n.q)(null);Object(n.n)(()=>m?Object(r.a)({onEsc:g,onEnter:O}):void 0,[m,g,O]),Object(n.n)(()=>m&&y.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const a=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!a.length)return;const n=a.findIndex(e=>e.isSameNode(document.activeElement));let r=0;n>=0&&(r=t.shiftKey?n>0?n-1:a.length-1:n{document.removeEventListener("keydown",t,!1)}}(y.current):void 0,[m]),Object(i.a)(([e])=>(document.body.classList.toggle("has-open-dialog",m),(m||!m&&void 0!==e)&&Object(c.b)(200),()=>{document.body.classList.remove("has-open-dialog")}),[m]);const w=Object(s.a)();if(!v)return;const N=Object(o.a)("Modal",a,E,p&&"transparent-backdrop");return n.a.createElement(d.a,null,n.a.createElement("div",{ref:y,className:N,tabIndex:-1,role:"dialog"},n.a.createElement("div",{className:"modal-container"},n.a.createElement("div",{className:"modal-backdrop",onClick:g}),n.a.createElement("div",{className:"modal-dialog"},b||(t?n.a.createElement("div",{className:"modal-header"},h&&n.a.createElement(u.a,{round:!0,color:"translucent",size:"smaller",ariaLabel:w("Close"),onClick:g},n.a.createElement("i",{className:"icon-close"})),n.a.createElement("div",{className:"modal-title"},t)):void 0),n.a.createElement("div",{className:"modal-content custom-scroll"},f)))))}},115:function(e,t,a){"use strict";var n=a(0),r=a(9),o=a(8),c=a(48),l=a(126);let i,s;async function u(){return i||(i=a.e(7).then(a.bind(null,192)),s=(await i).default),i}setTimeout(u,5e3);t.a=Object(n.h)(({className:e,id:t,animationData:a,play:i,playSegment:d,speed:m,noLoop:b,size:h,quality:p,isLowPriority:f,onLoad:g})=>{const[j,O]=Object(n.r)(),v=Object(n.q)(null),E=Object(n.q)(!1),y=Object(n.q)(!1),w=Object(n.q)();w.current=i;const N=Object(n.q)();N.current=d,Object(n.n)(()=>{if(j||!a)return;const e=()=>{if(!v.current)return;const e=new s(t,v.current,a,{noLoop:b,size:h,quality:p,isLowPriority:f},g);m&&e.setSpeed(m),O(e)};s?e():u().then(()=>{Object(r.b)(()=>{v.current&&e()})})},[j,a,t,f,b,g,p,h,m]),Object(n.n)(()=>()=>{j&&j.destroy()},[j]);const k=Object(n.m)((e=!1)=>{j&&(w.current||N.current)&&(N.current?j.playSegment(N.current):e?j.goToAndPlay(0):j.play())},[j]),C=Object(n.m)(()=>{j&&j.pause()},[j]),L=Object(n.m)(()=>{y.current=!0,j&&(E.current||(E.current=j.isPlaying()),C())},[j,C]),A=Object(n.m)(()=>{E.current&&k(),E.current=!1,y.current=!1},[k]),P=Object(n.m)(()=>{Object(r.b)(A)},[A]);Object(n.n)(()=>{j&&(i||d?y.current?E.current=!0:k(b):y.current?E.current=!1:C())},[j,i,d,b,k,C]),Object(c.a)(L,A),Object(l.a)(L,P);const I=Object(o.a)("AnimatedSticker",e),M=h?`width: ${h}px; height: ${h}px;`:void 0;return n.a.createElement("div",{ref:v,className:I,style:M})})},121:function(e,t,a){"use strict";var n=a(0),r=a(66);t.a=({containerId:e,className:t,children:a})=>{const o=Object(n.q)(document.createElement("div"));return Object(n.o)(()=>{const a=document.querySelector(e||"#portals");if(!a)return;const n=o.current;return t&&n.classList.add(t),a.appendChild(n),()=>{r.a.render(void 0,n),a.removeChild(n)}},[t,e]),r.a.render(a,o.current)}},124:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(6),r=a(54);const o={MonkeyIdle:a.p+"TwoFactorSetupMonkeyIdle.dea4a492c144df84ddab778dc8a3f0cd.tgs",MonkeyTracking:a.p+"TwoFactorSetupMonkeyTracking.eb5a7a6f166fb7589c12e6248561fb58.tgs",MonkeyClose:a.p+"TwoFactorSetupMonkeyClose.604c4c833d322b7e6c3ea19bef058241.tgs",MonkeyPeek:a.p+"TwoFactorSetupMonkeyPeek.1905436b042520363d7e59f5d7f903ab.tgs",FoldersAll:a.p+"FoldersAll.3f9f9e243d19f0fbf9aaaff11cbd4572.tgs",FoldersNew:a.p+"FoldersNew.9a40d71c0c8be70f5bd14ff2d7bc1593.tgs",DiscussionGroups:a.p+"DiscussionGroupsDucks.9ea453d1be9d1b0ee77a992f8e587485.tgs"};function c(e){const t=o[e].replace(window.location.origin,"");return r.b("file"+t,n.ApiMediaFormat.Lottie)}},126:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e,t){Object(n.n)(()=>(document.hasFocus()||e(),window.addEventListener("blur",e),window.addEventListener("focus",t),()=>{window.removeEventListener("focus",t),window.removeEventListener("blur",e)}),[e,t])}},130:function(e,t,a){"use strict";var n=a(0),r=a(8),o=a(1),c=a(13),l=a(26),i=a(23),s=a(109),u=a(17);a(150);const d={type:"blob",quality:.8,format:"jpeg",circle:!1};let m,b,h;var p=Object(n.h)(({file:e,onChange:t,onClose:r})=>{const[p,f]=Object(n.r)(!1);Object(n.n)(()=>{e&&(p?async function(e){try{const t=document.getElementById("avatar-crop");if(!t)return;const{offsetWidth:a,offsetHeight:n}=t;h=new m(t,{enableZoom:!0,boundary:{width:a,height:n},viewport:{width:a-16,height:n-16,type:"circle"}});const r=await Object(c.a)(e);await h.bind({url:r})}catch(e){o.p&&console.error(e)}}(e):async function(){return b||(b=Promise.all([a.e(6),a.e(8)]).then(a.bind(null,316)),m=(await b).default),b}().then(()=>f(!0)))},[e,p]);const g=Object(l.a)();return n.a.createElement(s.a,{isOpen:Boolean(e),onClose:r,title:"Drag to reposition",className:"CropModal",hasCloseButton:!0},p?n.a.createElement("div",{id:"avatar-crop"}):n.a.createElement(u.a,null),n.a.createElement(i.a,{className:"confirm-button",round:!0,color:"primary",onClick:async function(){if(!h)return;const e=await h.result(d),a="string"==typeof e?e:Object(c.b)(e,"avatar.jpg");t(a)},ariaLabel:g("CropImage")},n.a.createElement("i",{className:"icon-check"})))});a(151);t.a=Object(n.h)(({title:e="Change your profile picture",disabled:t,currentAvatarBlobUrl:a,onChange:o})=>{const[c,l]=Object(n.r)(),[i,s]=Object(n.r)(a);Object(n.n)(()=>{s(a)},[a]);const u=Object(r.a)(i&&"filled",t&&"disabled");return n.a.createElement("div",{className:"AvatarEditable"},n.a.createElement("label",{className:u,role:"button",tabIndex:0,title:e},n.a.createElement("input",{type:"file",onChange:function(e){const t=e.target;t&&t.files&&t.files[0]&&(l(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),n.a.createElement("i",{className:"icon-camera-add"}),i&&n.a.createElement("img",{src:i,alt:"Avatar"})),n.a.createElement(p,{file:c,onClose:function(){l(void 0)},onChange:function(e){l(void 0),o(e),i&&URL.revokeObjectURL(i),s(URL.createObjectURL(e))}}))})},139:function(e,t,a){},147:function(e,t,a){"use strict";var n=a(0),r=a(1),o=a(7),c=a(124),l=a(115);a(139);const i=[0,50],s=[0,20],u=[20,0],d=o.k?r.rb:r.qb;t.a=Object(n.h)(({isPasswordVisible:e,isBig:t})=>{const[a,o]=Object(n.r)(),[m,b]=Object(n.r)(),[h,p]=Object(n.r)(!1),[f,g]=Object(n.r)(!1);Object(n.n)(()=>{a?setTimeout(()=>g(!0),2e3):Object(c.a)("MonkeyClose").then(o)},[a]),Object(n.n)(()=>{m||Object(c.a)("MonkeyPeek").then(b)},[m]);const j=Object(n.m)(()=>p(!0),[]);return n.a.createElement("div",{id:"monkey",className:t?"big":""},!h&&n.a.createElement("div",{className:"monkey-preview"}),a&&n.a.createElement(l.a,{id:"closeMonkey",size:t?r.Bb:d,className:f?"hidden":"shown",animationData:a,playSegment:i,noLoop:!0,onLoad:j}),m&&n.a.createElement(l.a,{id:"peekMonkey",size:t?r.Bb:d,className:f?"shown":"hidden",animationData:m,playSegment:e?s:u,noLoop:!0}))})},148:function(e,t,a){"use strict";var n=a(0),r=a(1),o=a(7),c=a(8),l=a(26),i=a(23);const s=o.k?550:400;t.a=Object(n.h)(({isLoading:e=!1,isPasswordVisible:t,error:a,hint:u,placeholder:d="Password",submitLabel:m="Next",clearError:b,onChangePasswordVisibility:h,onInputChange:p,onSubmit:f})=>{const g=Object(n.q)(null),j=Object(l.a)(),[O,v]=Object(n.r)(""),[E,y]=Object(n.r)(!1);return Object(n.n)(()=>{o.l||setTimeout(()=>{g.current.focus()},s)},[]),Object(n.n)(()=>{a&&requestAnimationFrame(()=>{g.current.focus(),g.current.select()})},[a]),n.a.createElement("form",{action:"",onSubmit:function(t){t.preventDefault(),e||E&&f(O)},autoComplete:"off"},n.a.createElement("div",{className:Object(c.a)("input-group password-input",O&&"touched",a&&"error"),dir:j.isRtl?"rtl":void 0},n.a.createElement("input",{ref:g,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:O||"",autoComplete:"current-password",onChange:function(e){a&&b();const{target:t}=e;v(t.value),y(t.value.length>=r.Y),p&&p(t.value)},dir:"auto"}),n.a.createElement("label",null,a||u||d),n.a.createElement("div",{className:"toggle-password",onClick:function(){h(!t)},role:"button",tabIndex:0,title:"Toggle password visibility"},n.a.createElement("i",{className:t?"icon-eye":"icon-eye-closed"}))),E&&n.a.createElement(i.a,{type:"submit",ripple:!0,isLoading:e},m))})},149:function(e,t,a){},150:function(e,t,a){},151:function(e,t,a){}}]); //# sourceMappingURL=5.298684feeb2e9eed0a1a.js.map