telegram-tt/dist/477.51d8c60b6925b9015068.js

2 lines
282 KiB
JavaScript
Raw Normal View History

2021-12-25 12:42:29 +01:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[477],{9477:(e,t,n)=>{n.r(t),n.d(t,{ArchivedChats:()=>ja,AttachMenu:()=>sr,AttachmentModal:()=>Ts,BotCommandMenu:()=>ir,BotCommandTooltip:()=>or,CalendarModal:()=>Ye,ChatFolderModal:()=>qa,ContactList:()=>za,ContextMenuContainer:()=>ds,CustomSendMenu:()=>cr,DeleteMessageModal:()=>Ke,Dialogs:()=>De,DropArea:()=>dr.Z,EmojiTooltip:()=>hr,ForwardPicker:()=>Re,GifSearch:()=>kr,HeaderMenuContainer:()=>hs,HistoryCalendar:()=>je,InlineBotTooltip:()=>Cr,LeftSearch:()=>Vt,Management:()=>Yr,MediaViewer:()=>fe,MentionTooltip:()=>Ns,MessageSelectToolbar:()=>at,MobileSearch:()=>gs,NewChat:()=>Ha,NewChatStep1:()=>Ja,NewChatStep2:()=>_a,Notifications:()=>Ue,PaymentModal:()=>fo,PinMessageModal:()=>qe,PollModal:()=>As,PollResults:()=>Mr,ReceiptModal:()=>yo,RightSearch:()=>br,SafeLinkModal:()=>ze,SeenByModal:()=>st,Settings:()=>Oa,StickerSearch:()=>wr,StickerSetModal:()=>ms,StickerTooltip:()=>lr,SymbolMenu:()=>ar,TextFormatter:()=>mr.Z,UnpinAllMessagesModal:()=>We});var a=n(4050),s=n(5116),r=n(6137),o=n(1713),i=n(3716),l=n(2937),c=n(5326),d=n(8674),m=n(6590),u=n(9107),h=n(6202),Z=n(2566),P=n(7204),g=n(2858),v=n(1638),p=n(396),E=n(3989),C=n(1174),f=n(7361),b=n(782),I=n(3858),y=n(4399),S=n(935);function w(e,t){const n=document.createElement("div");n.classList.add("ghost");const a=new Image;if("string"==typeof e?a.src=e:e instanceof HTMLVideoElement?a.src=e.poster:a.src=e.src,n.appendChild(a),t===o.bZ.ProfileAvatar||t===o.bZ.SettingsAvatar){n.classList.add("ProfileInfo"),t===o.bZ.SettingsAvatar&&n.classList.add("self");const e=document.querySelector(t===o.bZ.ProfileAvatar?"#RightColumn .ProfileInfo .info":"#Settings .ProfileInfo .info");e&&n.appendChild(e.cloneNode(!0))}return n}function k(e,t){const n=document.querySelector(".Transition__slide--active > .MessageList");let a=e.offsetTop+t.closest(".content-inner, .WebPage").offsetTop;return e.id.includes("album-media-")&&(a+=e.parentElement.offsetTop+e.closest(".Message").offsetTop),a>n.scrollTop&&a+t.offsetHeight<n.scrollTop+n.offsetHeight}function N(e,t){Object.assign(e.style,t)}function M(e,t){let n,a;switch(e){case o.bZ.Album:case o.bZ.ScheduledAlbum:n=`.Transition__slide--active > .MessageList #album-media-${t.id}`,a=".full-media";break;case o.bZ.SharedMedia:n=`#shared-media${t.id}`,a="img";break;case o.bZ.SearchResult:n=`#search-media${t.id}`,a="img";break;case o.bZ.MiddleHeaderAvatar:n=".MiddleHeader .Transition__slide--active .ChatInfo .Avatar",a="img.avatar-media";break;case o.bZ.SettingsAvatar:n="#Settings .ProfileInfo .Transition__slide--active .ProfilePhoto",a="img.avatar-media";break;case o.bZ.ProfileAvatar:n="#RightColumn .ProfileInfo .Transition__slide--active .ProfilePhoto",a="img.avatar-media";break;case o.bZ.ScheduledInline:case o.bZ.Inline:default:n=`.Transition__slide--active > .MessageList #message${t.id}`,a=".message-content .full-media, .message-content .thumbnail"}const s=document.querySelector(n),r=s&&s.querySelectorAll(a);return{container:s,mediaEl:null==r?void 0:r[r.length-1]}}function T(e,t){switch(t){case o.bZ.Album:case o.bZ.ScheduledAlbum:case o.bZ.Inline:case o.bZ.ScheduledInline:e.classList.add("rounded-corners");break;case o.bZ.SharedMedia:case o.bZ.SettingsAvatar:case o.bZ.ProfileAvatar:case o.bZ.SearchResult:e.firstChild.style.objectFit="cover";break;case o.bZ.MiddleHeaderAvatar:e.classList.add("circle")}}var F=n(231),A=n(126),L=n(2255),R=n(3106),B=n(8964),$=n(9196);const D=(0,a.X$)((0,s.c$)(((e,{message:t})=>({isDownloading:!!t&&(0,v.te)(e,t)})),((e,t)=>(0,b.ei)(t,["downloadMessageMedia","cancelMessageMediaDownload"])))((({mediaData:e,isVideo:t,isZoomed:n,message:s,fileName:r,isAvatar:o,isDownloading:i,onCloseMediaViewer:l,onForward:c,onZoomToggle:d,downloadMessageMedia:m,cancelMessageMediaDownload:h})=>{const{loadProgress:P}=(0,Z.Z)(s&&(0,g.Ti)(s,"download"),!i),v=(0,a.I4)((()=>{i?h({message:s}):m({message:s})}),[h,m,i,s]),p=(0,u.Z)(),E=(0,a.Ye)((()=>({onTrigger:e,isOpen:t})=>a.ZP.createElement(F.Z,{round:!0,size:"smaller",color:"translucent",className:t?"active":void 0,onCl
//# sourceMappingURL=477.51d8c60b6925b9015068.js.map