2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7405],{32794:(e,t,r)=>{r.r(t),r.d(t,{AuthCode:()=>f,AuthPassword:()=>v,AuthRegister:()=>w});var n=r(84051),a=r(13439),s=r(96454),o=r(87894),i=r(26072),l=r(39351),u=r(18276),c=r(31481),d=r(78376),p=r(43874),m=r(18104);const y=(0,n.ph)((({code:e,codeLength:t,trackingDirection:r,isTracking:a,isBig:s})=>{const[o,i]=(0,n.J0)(!1),{isMobile:l}=(0,p.Ay)(),u=165/t,y=l?c.UyP:c.H6l,h=(0,n.hb)((()=>i(!0)),[]);return n.Ay.createElement("div",{id:"monkey",className:s?"big":""},!o&&n.Ay.createElement("div",{className:"monkey-preview"}),n.Ay.createElement(m.A,{size:s?c.r2x:y,className:a?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!a,onLoad:h}),n.Ay.createElement(m.A,{size:s?c.r2x:y,className:a?"shown":"hidden",tgsUrl:d.w.MonkeyTracking,playSegment:a?function(){const n=e&&e.length>1||r<0?15+u*(e.length-1):0,a=e.length===t?180:15+u*e.length;return r<1?[a,n]:[n,a]}():void 0,speed:2,noLoop:!0}))}));var h=r(40664),g=r(52745);const f=(0,n.ph)((0,a.EK)((e=>(0,o.Up)(e,["authPhoneNumber","authIsCodeViaApp","authIsLoading","authErrorKey"])))((({authPhoneNumber:e,authIsCodeViaApp:t,authIsLoading:r,authErrorKey:o})=>{const{setAuthCode:c,returnToAuthPhoneNumber:d,clearAuthErrorKey:p}=(0,a.ko)(),m=(0,l.A)(),f=(0,n.li)(null),[A,b]=(0,n.J0)(""),[v,I]=(0,n.J0)(!1),[E,w]=(0,n.J0)(1);(0,n.vJ)((()=>{s.TF||f.current.focus()}),[]),(0,i.A)({isActive:!0,onBack:d});const S=(0,n.hb)((e=>{o&&p();const{currentTarget:t}=e;t.value=t.value.replace(/[^\d]+/,"").substr(0,5),t.value!==A&&(b(t.value),v?t.value.length||I(!1):I(!0),A&&A.length>t.value.length?w(-1):w(1),5===t.value.length&&c({code:t.value}))}),[o,A,v,c]);return n.Ay.createElement("div",{id:"auth-code-form",className:"custom-scroll"},n.Ay.createElement("div",{className:"auth-form"},n.Ay.createElement(y,{code:A,codeLength:5,isTracking:v,trackingDirection:E}),n.Ay.createElement("h1",null,e,n.Ay.createElement("div",{className:"auth-number-edit div-button",onClick:function(){d()},role:"button",tabIndex:0,title:m("WrongNumber"),"aria-label":m("WrongNumber")},n.Ay.createElement(u.A,{name:"edit"}))),n.Ay.createElement("p",{className:"note"},m(t?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})),n.Ay.createElement(h.A,{ref:f,id:"sign-in-code",label:m("Code"),onInput:S,value:A,error:o&&m.withRegular(o),autoComplete:"off",inputMode:"numeric"}),r&&n.Ay.createElement(g.A,null)))})));var A=r(15535),b=r(3178);const v=(0,n.ph)((0,a.EK)((e=>(0,o.Up)(e,["authIsLoading","authErrorKey","authHint"])))((({authIsLoading:e,authErrorKey:t,authHint:r})=>{const{setAuthPassword:s,clearAuthErrorKey:o}=(0,a.ko)(),i=(0,l.A)(),[u,c]=(0,n.J0)(!1),d=(0,n.hb)((e=>{c(e)}),[]),p=(0,n.hb)((e=>{s({password:e})}),[s]);return n.Ay.createElement("div",{id:"auth-password-form",className:"custom-scroll"},n.Ay.createElement("div",{className:"auth-form"},n.Ay.createElement(b.A,{isPasswordVisible:u}),n.Ay.createElement("h1",null,i("LoginHeaderPassword")),n.Ay.createElement("p",{className:"note"},i("LoginEnterPasswordDescription")),n.Ay.createElement(A.A,{clearError:o,error:t&&i.withRegular(t),hint:r,isLoading:e,isPasswordVisible:u,onChangePasswordVisibility:d,onSubmit:p})))})));var I=r(43434),E=r(64493);const w=(0,n.ph)((0,a.EK)((e=>(0,o.Up)(e,["authIsLoading","authErrorKey"])))((({authIsLoading:e,authErrorKey:t})=>{const{signUp:r,clearAuthErrorKey:s,uploadProfilePhoto:o}=(0,a.ko)(),i=(0,l.A)(),[u,c]=(0,n.J0)(!1),[d,p]=(0,n.J0)(),[m,y]=(0,n.J0)(""),[g,f]=(0,n.J0)(""),A=(0,n.hb)((e=>{t&&s();const{target:r}=e;y(r.value),c(r.value.length>0)}),[t]),b=(0,n.hb)((e=>{const{target:t}=e;f(t.value)}),[]);return n.Ay.createElement("div",{id:"auth-registration-form",className:"custom-scroll"},n.Ay.createElement("div",{className:"auth-form"},n.Ay.createElement("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),r({firstName:m,lastName:g}),d&&o({file:d})}},n.Ay.createElement(I.A,{onChange:p}),n.Ay.createElement("h2",null,i("YourName")),n.Ay.createElement("p",{className:"note"},i("LoginRegisterDesc")),n.Ay.createElement(h.A,{id:"registration-first-name",label:i("LoginRegisterFirstNamePlaceholder"),onChange:A,value:m,error:t&&i.withRegular(t),autoComplete:"given-name"}),n.Ay.createElement(h.A,{id:"registration-last-name",label:i("LoginRegisterLastNamePlaceholder"),onChange:b,value:g,autoComplete:"family-name"}),u&&n.Ay.createElement(E.A,{size:"smaller",type:"submit",ripple:!0,isLoading:e},i("Next")))))})))},15535:(e,t,r)=>{r.d(t,{A:()=>y});var n=r(84051),a=r(31481),s=r(66644),o=r(96454),i=r(87357),l=r(83868),u=r(14737),c=r(43874),d=r(59030),p=r(64493),m=r(18276);const y=(0,n.ph)((({isLoading:e=!1,isPasswordVisible:t,error:r,hint:y,placeholder:h="Password",submitLabel:g="Next",description:f,shouldShowSubmit:A,shouldResetValue:b,shouldDisablePasswordManager:v=!1,noRipple:I=!1,clearError:E,onChangePasswordVisibility:w,onInputChange:S,onSubmit:T})=>{const C=(0,n.li)(null),N=(0,d.A)(),{isMobile:P}=(0,c.Ay)(),[k,K]=(0,n.J0)(""),[L,U]=(0,n.J0)(!1),D=P?550:400;return(0,n.vJ)((()=>{b&&K("")}),[b]),(0,u.A)((()=>{o.TF||C.current.focus()}),D),(0,n.vJ)((()=>{r&&(0,s.RK)((()=>{C.current.focus(),C.current.select()}))}),[r]),n.Ay.createElement("form",{action:"",onSubmit:T?function(t){t.preventDefault(),e||L&&T(k)}:l.A,autoComplete:"off"},n.Ay.createElement("div",{className:(0,i.A)("input-group password-input",k&&"touched",r&&"error"),dir:N.isRtl?"rtl":void 0},v&&n.Ay.createElement("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),n.Ay.createElement("input",{ref:C,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:k||"",autoComplete:v?"one-time-code":"current-password",onChange:function(e){r&&E();const{target:t}=e;K(t.value),U(t.value.length>=a.AGC),S&&S(t.value)},maxLength:256,dir:"auto"}),n.Ay.createElement("label",null,r||y||h),n.Ay.createElement("div",{className:"div-button toggle-password",onClick:function(){w(!t)},role:"button",tabIndex:0,title:"Toggle password visibility","aria-label":"Toggle password visibility"},n.Ay.createElement(m.A,{name:t?"eye":"eye-crossed"}))),f&&n.Ay.createElement("p",{className:"description"},f),T&&(L||A)&&n.Ay.createElement(p.A,{size:"smaller",type:"submit",ripple:!I,isLoading:e,disabled:!L},g))}))},3178:(e,t,r)=>{r.d(t,{A:()=>m});var n=r(84051),a=r(31481),s=r(78376),o=r(14737),i=r(43874),l=r(37661),u=r(18104);const c=[0,50],d=[0,20],p=[20,0],m=(0,n.ph)((({isPasswordVisible:e,isBig:t})=>{const[r,m]=(0,l.A)(!1),[y,h]=(0,l.A)(!1),{isMobile:g}=(0,i.Ay)(),f=g?a.UyP:a.H6l;(0,o.A)(h,2e3);const A=(0,n.hb)(m,[m]);return n.Ay.createElement("div",{id:"monkey",className:t?"big":""},!r&&n.Ay.createElement("div",{className:"monkey-preview"}),n.Ay.createElement(u.A,{size:t?a.r2x:f,className:y?"hidden":"shown",tgsUrl:s.w.MonkeyClose,playSegment:c,noLoop:!0,onLoad:A}),n.Ay.createElement(u.A,{size:t?a.r2x:f,className:y?"shown":"hidden",tgsUrl:s.w.MonkeyPeek,playSegment:e?d:p,noLoop:!0}))}))},86046:(e,t,r)=>{r.d(t,{D5:()=>d,HT:()=>o,M6:()=>c,Pc:()=>i,ZF:()=>u,hk:()=>l,j6:()=>p,jA:()=>s});var n=r(5930),a=r(29807);function s(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,s=(0,a.PVB)(e,n);if(!s)return;return{type:"stargiftResale",slug:r,peer:s}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:s,message:o,shouldUpgrade:i}=t,l=(0,a.PVB)(e,r);if(!l)return;return{type:"stargift",peer:l,shouldHideName:n,giftId:s,message:o,shouldUpgrade:i}}if("starsgift"===t.type){const{userId:r,stars:n,amount:s,currency:o}=t,i=(0,a.mBe)(e,r);if(!i)return;return{type:"stars",purpose:{type:"starsgift",user:i,stars:n,amount:s,currency:o}}}if("stars"===t.type){const{stars:e,amount:r,currency:n}=t;return{type:"stars",purpose:{type:"stars",stars:e,amount:r,currency:n}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,a.hds)(e,t.chatId);if(!r)return;return{type:"message",chat:r,messageId:t.messageId}}if("premiumGiftStars"===t.type){const{months:r,userId:n,message:s}=t,o=(0,a.mBe)(e,n);if(!o)return;return{type:"premiumGiftStars",months:r,message:s,user:o}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:s,currency:o,option:i,message:l}=t;return{type:"giveaway",option:i,purpose:{type:"giftcode",amount:s,currency:o,users:r.map((t=>(0,a.mBe)(e,t))).filter(Boolean),boostChannel:n?(0,a.hds)(e,n):void 0,message:l}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:s,currency:o,untilDate:i,areWinnersVisible:l,countries:u,isOnlyForNewSubscribers:c,prizeDescription:d,stars:p,users:m}=t,y=(0,a.hds)(e,r);if(!y)return;const h=n?.map((t=>(0,a.hds)(e,t))).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:s,currency:o,chat:y,additionalChannels:h,untilDate:i,areWinnersVisible:l,countries:u,isOnlyForNewSubscribers:c,prizeDescription:d,stars:p,users:m}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:s,currency:o,option:i,untilDate:l,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:d,prizeDescription:p}=t,m=(0,a.hds)(e,r);if(!m)return;const y=n?.map((t=>(0,a.hds)(e,t))).filter(Boolean);return{type:"giveaway",option:i,purpose:{type:"giveaway",amount:s,currency:o,chat:m,additionalChannels:y,untilDate:l,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:d,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,a=o(e,r);if(!a)return;return{type:"stargiftUpgrade",inputSavedGift:a,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,s=o(e,r),i=(0,a.PVB)(e,n);if(!s||!i)return;return{type:"stargiftTransfer",inputSavedGift:s,recipient:i}}}function o(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,a.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function i(e){return"appStore"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===e.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function l(e,t){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}function u(e,t){return e.number(t.amount+t.nanos/1e9)}function c(e){const{action:t}=e.content;if("giftStars"!==t?.type)return;const{transactionId:r,stars:n}=t;return{id:r,stars:{amount:n,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}function d(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:n,boostPeerId:a}=t;return{id:r,stars:{amount:n,nanos:0},peer:{type:"peer",id:a},date:e.date,giveawayPostId:e.id}}function p(e,t){return(0,n.A)(e,t)}},14737:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(84051),a=r(17712);const s=function(e,t){const r=(0,a.A)(e);(0,n.vJ)((()=>{if("number"!=typeof t)return;const e=setTimeout((()=>r()),t);return()=>clearTimeout(e)}),[t])}},37859:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051);const a=(e,t,r)=>{const a=(0,n.li)();return(0,n.Nf)((()=>{const r=a.current;return a.current=t,e(r||[])}),t,r)}},14680:(e,t,r)=>{r.d(t,{FD:()=>a,ZJ:()=>o,wb:()=>s});let n=0;function a(){n+=1}function s(){n-=1}function o(){return n>0}},91034:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051);function a(e){return function(t){const r=(0,n.li)(t);return t.ignoreFreeze?e(t):(t.isOpen?r.current=t:r.current={...r.current,isOpen:!1},e(r.current))}}},29441:(e,t,r)=>{function n(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const r=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!r.length)return;const n=r.findIndex((e=>e.isSameNode(document.activeElement)));let a=0;n>=0&&(a=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})}}]);
|
|
//# sourceMappingURL=7405.b196aeacc3575c87dc6b.js.map
|