TelegramPWA/dist/7405.4ced78b0a9b523a5f8fc.js
Alexander Zinchuk b27739243f [Build]
2026-01-20 12:08:57 +01:00

2 lines
16 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[7405],{101:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(84051),o=r(87679),i=r(56863);function s(e){const t=(0,n.li)(),{result:r}=(0,i.A)(()=>{if(!e)return Promise.resolve(void 0);t.current&&URL.revokeObjectURL(t.current);const r=URL.createObjectURL(e);return t.current=r,(0,o.NN)(r)},[e]);return(0,n.vJ)(()=>()=>{t.current&&(URL.revokeObjectURL(t.current),t.current=void 0)},[]),{image:r}}},3178:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(84051),o=r(31481),i=r(36175),s=r(14737),a=r(43874),u=r(37661),c=r(18104),l=r(20021);const d=[0,50],p=[0,20],m=[20,0],h=(0,n.ph)(({isPasswordVisible:e,isBig:t})=>{const[r,h]=(0,u.A)(!1),[g,f]=(0,u.A)(!1),{isMobile:y}=(0,a.Ay)(),v=y?o.UyP:o.H6l;(0,s.A)(f,2e3);const b=(0,n.hb)(h,[h]);return(0,l.FD)("div",{id:"monkey",className:t?"big":"",children:[!r&&(0,l.Y)("div",{className:"monkey-preview"}),(0,l.Y)(c.A,{size:t?o.r2x:v,className:g?"hidden":"shown",tgsUrl:i.w.MonkeyClose,playSegment:d,noLoop:!0,onLoad:b}),(0,l.Y)(c.A,{size:t?o.r2x:v,className:g?"shown":"hidden",tgsUrl:i.w.MonkeyPeek,playSegment:e?p:m,noLoop:!0})]})})},10722:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(84051),o=r(61433),i=r(66644),s=r(96454),a=r(17712);function u(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const c=(e,t,r,c,l,d)=>{const[p,m]=(0,n.J0)(!1),[h,g]=(0,n.J0)(void 0),[f,y]=(0,n.J0)(void 0),v=(0,a.A)(e=>{t||2!==e.button||(0,i.RK)(()=>{(0,o.YM)(e.target,"no-selection")})}),b=(0,a.A)(e=>{(0,i.RK)(()=>{(0,o.HW)(e.target,"no-selection")}),t||r&&e.target.matches("a[href]")||(e.preventDefault(),e.stopPropagation(),h||(m(!0),g({x:e.clientX,y:e.clientY}),y(e.target)))}),A=(0,a.A)(()=>{m(!1)}),I=(0,a.A)(()=>{g(void 0)});return(0,n.vJ)(()=>{if(t||!s.TF||c||l&&!l())return;const n=e.current;if(!n)return;let o;const i=()=>{o&&(clearTimeout(o),o=void 0)},a=e=>{t||(d&&e.stopPropagation(),i(),o=window.setTimeout(()=>(e=>{i();const{clientX:t,clientY:n,target:o}=e.touches[0];h||r&&o.matches("a[href]")||(document.addEventListener("touchend",e=>{s.pz&&s._7&&setTimeout(()=>{document.removeEventListener("mousedown",u,{capture:!0}),document.removeEventListener("click",u,{capture:!0})},100),u(e)},{once:!0,capture:!0}),s._7&&s.pz&&(document.addEventListener("mousedown",u,{once:!0,capture:!0}),document.addEventListener("click",u,{once:!0,capture:!0})),m(!0),g({x:t,y:n}))})(e),200))};return n.addEventListener("touchstart",a,{passive:!0}),n.addEventListener("touchcancel",i,!0),n.addEventListener("touchend",i,!0),n.addEventListener("touchmove",i,{passive:!0}),()=>{i(),n.removeEventListener("touchstart",a),n.removeEventListener("touchcancel",i,!0),n.removeEventListener("touchend",i,!0),n.removeEventListener("touchmove",i)}},[h,t,c,e,r,l,d]),{isContextMenuOpen:p,contextMenuAnchor:h,contextMenuTarget:f,handleBeforeContextMenu:v,handleContextMenu:b,handleContextMenuClose:A,handleContextMenuHide:I}}},14680:(e,t,r)=>{r.d(t,{FD:()=>o,ZJ:()=>s,wb:()=>i});let n=0;function o(){n+=1}function i(){n-=1}function s(){return n>0}},14737:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(84051),o=r(17712);const i=function(e,t){const r=(0,o.A)(e);(0,n.vJ)(()=>{if("number"!=typeof t)return;const e=setTimeout(()=>r(),t);return()=>clearTimeout(e)},[t])}},15535:(e,t,r)=>{r.d(t,{A:()=>f});var n=r(84051),o=r(31481),i=r(66644),s=r(63495),a=r(96454),u=r(87357),c=r(83868),l=r(14737),d=r(43874),p=r(39351),m=r(64493),h=r(18276),g=r(20021);const f=(0,n.ph)(({isLoading:e=!1,isPasswordVisible:t,error:r,hint:f,placeholder:y,submitLabel:v,description:b,shouldShowSubmit:A,shouldResetValue:I,shouldDisablePasswordManager:w=!1,noRipple:P=!1,onClearError:C,onChangePasswordVisibility:T,onInputChange:S,onSubmit:N})=>{const L=(0,n.li)(),k=(0,p.A)(),{isMobile:U}=(0,d.Ay)(),[Y,D]=(0,n.J0)(""),[K,B]=(0,n.J0)(!1),x=U?550:400;return(0,n.vJ)(()=>{I&&D("")},[I]),(0,l.A)(()=>{a.TF||L.current.focus()},x),(0,n.vJ)(()=>{r&&(0,i.RK)(()=>{L.current.focus(),L.current.select()})},[r]),(0,g.FD)("form",{action:"",onSubmit:N?function(t){t.preventDefault(),e||K&&N(Y)}:c.A,autoComplete:"off",children:[(0,g.FD)("div",{className:(0,u.A)("input-group password-input",Y&&"touched",r&&"error"),dir:k.isRtl?"rtl":void 0,children:[w&&(0,g.Y)("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),(0,g.Y)("input",{ref:L,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:Y||"",autoComplete:w?"one-time-code":"current-password",spellCheck:!s.Vq&&void 0,onChange:function(e){r&&C();const{target:t}=e;D(t.value),B(t.value.length>=o.AGC),S&&S(t.value)},maxLength:256,dir:"auto"}),(0,g.Y)("label",{children:r||f||y||k("PasswordFormPlaceholder")}),(0,g.Y)("div",{className:"div-button toggle-password",onClick:function(){T(!t)},role:"button",tabIndex:0,title:k("AriaPasswordToggle"),"aria-label":k("AriaPasswordToggle"),children:(0,g.Y)(h.A,{name:t?"eye":"eye-crossed"})})]}),b&&(0,g.Y)("p",{className:"description",children:b}),N&&(K||A)&&(0,g.Y)(m.A,{type:"submit",ripple:!P,isLoading:e,disabled:!K,children:v||k("PasswordFormSubmit")})]})})},15640:(e,t,r)=>{function n(e){return"touches"in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}r.d(t,{A:()=>n})},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 o=0;n>=0&&(o=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[o].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})},32794:(e,t,r)=>{r.r(t),r.d(t,{AuthCode:()=>v,AuthPassword:()=>I,AuthRegister:()=>C});var n=r(84051),o=r(13439),i=r(96454),s=r(87894),a=r(26072),u=r(39351),c=r(18276),l=r(31481),d=r(36175),p=r(43874),m=r(18104),h=r(20021);const g=(0,n.ph)(({code:e,codeLength:t,trackingDirection:r,isTracking:o,isBig:i})=>{const[s,a]=(0,n.J0)(!1),{isMobile:u}=(0,p.Ay)(),c=165/t,g=u?l.UyP:l.H6l,f=(0,n.hb)(()=>a(!0),[]);return(0,h.FD)("div",{id:"monkey",className:i?"big":"",children:[!s&&(0,h.Y)("div",{className:"monkey-preview"}),(0,h.Y)(m.A,{size:i?l.r2x:g,className:o?"hidden":void 0,tgsUrl:d.w.MonkeyIdle,play:!o,onLoad:f}),(0,h.Y)(m.A,{size:i?l.r2x:g,className:o?"shown":"hidden",tgsUrl:d.w.MonkeyTracking,playSegment:o?function(){const n=e&&e.length>1||r<0?15+c*(e.length-1):0,o=e.length===t?180:15+c*e.length;return r<1?[o,n]:[n,o]}():void 0,speed:2,noLoop:!0})]})});var f=r(40664),y=r(52745);const v=(0,n.ph)((0,o.EK)(e=>(0,s.Up)(e,["auth"]))(({auth:e})=>{const{setAuthCode:t,returnToAuthPhoneNumber:r,clearAuthErrorKey:s}=(0,o.ko)(),{phoneNumber:l,isCodeViaApp:d,isLoading:p,errorKey:m}=e,v=(0,u.A)(),b=(0,n.li)(),[A,I]=(0,n.J0)(""),[w,P]=(0,n.J0)(!1),[C,T]=(0,n.J0)(1);(0,n.vJ)(()=>{i.TF||b.current.focus()},[]),(0,a.A)({isActive:!0,onBack:r});const S=(0,n.hb)(e=>{m&&s();const{currentTarget:r}=e;r.value=r.value.replace(/[^\d]+/,"").substr(0,5),r.value!==A&&(I(r.value),w?r.value.length||P(!1):P(!0),A&&A.length>r.value.length?T(-1):T(1),5===r.value.length&&t({code:r.value}))},[m,A,w]);return(0,h.Y)("div",{id:"auth-code-form",className:"custom-scroll",children:(0,h.FD)("div",{className:"auth-form",children:[(0,h.Y)(g,{code:A,codeLength:5,isTracking:w,trackingDirection:C}),(0,h.FD)("h1",{children:[l,(0,h.Y)("div",{className:"auth-number-edit div-button",onClick:function(){r()},role:"button",tabIndex:0,title:v("WrongNumber"),"aria-label":v("WrongNumber"),children:(0,h.Y)(c.A,{name:"edit"})})]}),(0,h.Y)("p",{className:"note",children:v(d?"SentAppCode":"LoginJustSentSms",void 0,{withNodes:!0,withMarkdown:!0})}),(0,h.Y)(f.A,{ref:b,id:"sign-in-code",label:v("Code"),onInput:S,value:A,error:m&&v.withRegular(m),autoComplete:"off",inputMode:"numeric"}),p&&(0,h.Y)(y.A,{})]})})}));var b=r(15535),A=r(3178);const I=(0,n.ph)((0,o.EK)(e=>(0,s.Up)(e,["auth"]))(({auth:e})=>{const{setAuthPassword:t,clearAuthErrorKey:r}=(0,o.ko)(),{isLoading:i,errorKey:s,hint:a}=e,c=(0,u.A)(),[l,d]=(0,n.J0)(!1),p=(0,n.hb)(e=>{d(e)},[]),m=(0,n.hb)(e=>{t({password:e})},[t]);return(0,h.Y)("div",{id:"auth-password-form",className:"custom-scroll",children:(0,h.FD)("div",{className:"auth-form",children:[(0,h.Y)(A.A,{isPasswordVisible:l}),(0,h.Y)("h1",{children:c("LoginHeaderPassword")}),(0,h.Y)("p",{className:"note",children:c("LoginEnterPasswordDescription")}),(0,h.Y)(b.A,{onClearError:r,error:s&&c.withRegular(s),hint:a,isLoading:i,isPasswordVisible:l,onChangePasswordVisibility:p,onSubmit:m})]})})}));var w=r(43434),P=r(64493);const C=(0,n.ph)((0,o.EK)(e=>(0,s.Up)(e,["auth"]))(({auth:e})=>{const{signUp:t,clearAuthErrorKey:r,uploadProfilePhoto:i}=(0,o.ko)(),{isLoading:s,errorKey:a}=e,c=(0,u.A)(),[l,d]=(0,n.J0)(!1),[p,m]=(0,n.J0)(),[g,y]=(0,n.J0)(""),[v,b]=(0,n.J0)(""),A=(0,n.hb)(e=>{a&&r();const{target:t}=e;y(t.value),d(t.value.length>0)},[a]),I=(0,n.hb)(e=>{const{target:t}=e;b(t.value)},[]);return(0,h.Y)("div",{id:"auth-registration-form",className:"custom-scroll",children:(0,h.Y)("div",{className:"auth-form",children:(0,h.FD)("form",{action:"",method:"post",onSubmit:function(e){e.preventDefault(),t({firstName:g,lastName:v}),p&&i({file:p})},children:[(0,h.Y)(w.A,{onChange:m}),(0,h.Y)("h2",{children:c("YourName")}),(0,h.Y)("p",{className:"note",children:c("LoginRegisterDesc")}),(0,h.Y)(f.A,{id:"registration-first-name",label:c("LoginRegisterFirstNamePlaceholder"),onChange:A,value:g,error:a&&c.withRegular(a),autoComplete:"given-name"}),(0,h.Y)(f.A,{id:"registration-last-name",label:c("LoginRegisterLastNamePlaceholder"),onChange:I,value:v,autoComplete:"family-name"}),l&&(0,h.Y)(P.A,{type:"submit",ripple:!0,isLoading:s,children:c("Next")})]})})})}))},37859:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(84051);const o=(e,t,r)=>{const o=(0,n.li)();return(0,n.Nf)(()=>{const r=o.current;return o.current=t,e(r||[])},t,r)}},86046:(e,t,r)=>{r.d(t,{D5:()=>h,HT:()=>u,M6:()=>m,MA:()=>c,Pc:()=>l,ZF:()=>p,hk:()=>d,j6:()=>g,jA:()=>a});var n=r(31481),o=r(5930),i=r(17142),s=r(91048);function a(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,o=(0,s.PVB)(e,n);if(!o)return;return{type:"stargiftResale",slug:r,peer:o,currency:t.currency}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:o,message:i,shouldUpgrade:a}=t,u=(0,s.PVB)(e,r);if(!u)return;return{type:"stargift",peer:u,shouldHideName:n,giftId:o,message:i,shouldUpgrade:a}}if("starsgift"===t.type){const{userId:r,stars:n,amount:o,currency:i}=t,a=(0,s.mBe)(e,r);if(!a)return;return{type:"stars",purpose:{type:"starsgift",user:a,stars:n,amount:o,currency:i}}}if("stars"===t.type){const{stars:r,amount:n,currency:o,spendPurposePeerId:i}=t;return{type:"stars",purpose:{type:"stars",stars:r,amount:n,currency:o,spendPurposePeer:i?(0,s.PVB)(e,i):void 0}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,s.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:o}=t,i=(0,s.mBe)(e,n);if(!i)return;return{type:"premiumGiftStars",months:r,message:o,user:i}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:o,currency:i,option:a,message:u}=t;return{type:"giveaway",option:a,purpose:{type:"giftcode",amount:o,currency:i,users:r.map(t=>(0,s.mBe)(e,t)).filter(Boolean),boostChannel:n?(0,s.hds)(e,n):void 0,message:u}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:o,currency:i,untilDate:a,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:m}=t,h=(0,s.hds)(e,r);if(!h)return;const g=n?.map(t=>(0,s.hds)(e,t)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:o,currency:i,chat:h,additionalChannels:g,untilDate:a,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:l,prizeDescription:d,stars:p,users:m}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:o,currency:i,option:a,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}=t,m=(0,s.hds)(e,r);if(!m)return;const h=n?.map(t=>(0,s.hds)(e,t)).filter(Boolean);return{type:"giveaway",option:a,purpose:{type:"giveaway",amount:o,currency:i,chat:m,additionalChannels:h,untilDate:u,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,o=u(e,r);if(!o)return;return{type:"stargiftUpgrade",inputSavedGift:o,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,o=u(e,r),i=(0,s.PVB)(e,n);if(!o||!i)return;return{type:"stargiftTransfer",inputSavedGift:o,recipient:i}}if("stargiftDropOriginalDetails"===t.type){const{inputSavedGift:r}=t,n=u(e,r);if(!n)return;return{type:"stargiftDropOriginalDetails",inputSavedGift:n}}if("stargiftPrepaidUpgrade"===t.type){const{peerId:r,hash:n}=t,o=(0,s.PVB)(e,r);if(!o)return;return{type:"stargiftPrepaidUpgrade",peer:o,hash:n}}if("stargiftAuctionBid"===t.type){const{giftId:r,bidAmount:n,peerId:o,message:i,shouldHideName:a,isUpdateBid:u}=t;return{type:"stargiftAuctionBid",giftId:r,bidAmount:n,peer:o?(0,s.PVB)(e,o):void 0,message:i,shouldHideName:a,isUpdateBid:u}}}function u(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,s.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function c(e){return"peer"!==e.peer.type||Boolean(e.isPostsSearch)}function l(e){const{peer:t}=e,r=e.amount.currency===n.ykW;return e.isPostsSearch?{avatarIcon:"search",isCustomPeer:!0,title:"",peerColorId:5}:"appStore"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===t.type?r?{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Gift.Received.Title",subtitleKey:"Stars.Intro.Transaction.Gift.UnknownUser",customPeerAvatarColor:"#000000"}:{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===t.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===t.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 d(e,t){if(t.currency===n.OUy){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}if(t.currency===n.ykW){const r=(0,i.wD)(t.amount),n=Math.abs(r);return r<0?`- ${e.preciseNumber(n)}`:`+ ${e.preciseNumber(n)}`}}function p(e,t){return e.number(t.amount+t.nanos/1e9)}function m(e){const{action:t}=e.content;if("giftStars"===t?.type){const{transactionId:r,stars:o}=t;return{id:r,amount:{currency:n.OUy,amount:o,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}if("giftTon"===t?.type){const{transactionId:r,cryptoAmount:o}=t;return{id:r,amount:{currency:n.ykW,amount:o},peer:{type:"fragment"},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}}function h(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:o,boostPeerId:i}=t;return{id:r,amount:{currency:n.OUy,amount:o,nanos:0},peer:{type:"peer",id:i},date:e.date,giveawayPostId:e.id}}function g(e,t){return(0,o.A)(e,t)}}}]);
//# sourceMappingURL=7405.4ced78b0a9b523a5f8fc.js.map