mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-10 06:48:35 +01:00
2 lines
245 KiB
JavaScript
2 lines
245 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],Array(104).concat([function(e,t,a){"use strict";a.r(t),a.d(t,"MediaViewer",(function(){return de})),a.d(t,"ForwardPicker",(function(){return je})),a.d(t,"Errors",(function(){return ke})),a.d(t,"Notifications",(function(){return Ie})),a.d(t,"SafeLinkModal",(function(){return Pe})),a.d(t,"HistoryCalendar",(function(){return Te})),a.d(t,"CalendarModal",(function(){return Ae})),a.d(t,"DeleteMessageModal",(function(){return Re})),a.d(t,"PinMessageModal",(function(){return De})),a.d(t,"UnpinAllMessagesModal",(function(){return Be})),a.d(t,"MessageSelectToolbar",(function(){return qe})),a.d(t,"LeftSearch",(function(){return Nt})),a.d(t,"Settings",(function(){return on})),a.d(t,"ContactList",(function(){return mn})),a.d(t,"NewChat",(function(){return pn})),a.d(t,"NewChatStep1",(function(){return hn})),a.d(t,"NewChatStep2",(function(){return bn})),a.d(t,"ArchivedChats",(function(){return En})),a.d(t,"ContextMenuContainer",(function(){return Mn})),a.d(t,"StickerSetModal",(function(){return Fn})),a.d(t,"HeaderMenuContainer",(function(){return An})),a.d(t,"MobileSearch",(function(){return Dn})),a.d(t,"AttachmentModal",(function(){return Wn})),a.d(t,"PollModal",(function(){return Qn})),a.d(t,"SymbolMenu",(function(){return jr})),a.d(t,"AttachMenu",(function(){return Cr})),a.d(t,"MentionTooltip",(function(){return _n})),a.d(t,"StickerTooltip",(function(){return yr})),a.d(t,"BotKeyboardMenu",(function(){return kr})),a.d(t,"CustomSendMenu",(function(){return Nr})),a.d(t,"DropArea",(function(){return Ir.b})),a.d(t,"TextFormatter",(function(){return Sr.a})),a.d(t,"EmojiTooltip",(function(){return Pr})),a.d(t,"RightSearch",(function(){return Fr})),a.d(t,"StickerSearch",(function(){return Rr})),a.d(t,"GifSearch",(function(){return Dr})),a.d(t,"PollResults",(function(){return xr})),a.d(t,"Management",(function(){return Jr})),a.d(t,"PaymentModal",(function(){return kc})),a.d(t,"ReceiptModal",(function(){return Sc}));var n=a(0),r=a(2),c=a(5),s=a(19),l=a(1),o=a(7),i=a(116),d=a(6),m=a(4),u=a(3),h=a(133),b=a(47),g=a(178),p=a(27),v=a(109),E=a(121),O=a(193),f=a(38),j=a(48),C=a(147),y=a(56);function k(e,t,a,n){const{mediaEl:r}=P(t,n);if(!r)return;const{width:c}=y.a.get();let o,d=!1;if(n){const{photo:e,video:t,webPage:a}=Object(m.w)(n);d=Boolean(t),o=t?Object(m.cb)(t):Object(m.T)(e||a.photo)}else o=i.a;const{width:u,height:h}=Object(i.j)(e,d),{width:b,height:g}=Object(i.e)(u,h,o.width,o.height),p=(c-b)/2,v=function(e){const t=window.matchMedia(i.b);let a=4.125;e&&(a+=t.matches?.875:3.375);return a*i.c}(e)+(h-g)/2;let{top:E,left:O,width:f,height:j}=r.getBoundingClientRect();if([s.h.SharedMedia,s.h.Album,s.h.ScheduledAlbum,s.h.SearchResult].includes(t)){const e=function(e,t,a,n,r,c){if(e===t){const s=Math.max(r,c)*(e/t);n-=(s-r)/2,a-=(s-c)/2,r=s,c=s}else if(e>t){const a=r;n-=((r=c*(e/t))-a)/2}else if(t>e){const n=c;a-=((c=r*(t/e))-n)/2}return{top:a,left:n,width:r,height:c}}(b,g,E,O,f,j);E=e.top,O=e.left,f=e.width,j=e.height}const C=O+f/2-(p+b/2),k=E+j/2-(v+g/2),N=f/b,S=j/g,F=I(a||r);w(F,{top:v+"px",left:p+"px",width:b+"px",height:g+"px",transform:`translate3d(${C}px, ${k}px, 0) scale(${N}, ${S})`}),M(F,t),document.body.classList.add("ghost-animating"),requestAnimationFrame(()=>{document.body.appendChild(F),requestAnimationFrame(()=>{F.style.transform="",function(e){e.firstChild.style.objectFit="default",e.classList.remove("rounded-corners","circle")}(F),setTimeout(()=>{requestAnimationFrame(()=>{document.body.contains(F)&&document.body.removeChild(F),document.body.classList.remove("ghost-animating")})},200+l.c)})})}function N(e,t,a){const{container:n,mediaEl:r}=P(e,a);if(!r)return;const c=document.getElementById("MediaViewer").querySelector(".active .media-viewer-content img, .active .media-viewer-content video");if(!c||!r)return;const{top:o,left:i,width:d,height:m}=c.getBoundingClientRect(),{top:u,left:h,width:b,height:g}=r.getBoundingClientRect();let p=u;if(!function(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:a}=y.a.get();return t.top<=a&&t.top+t.height>=0
|
||
|
//# sourceMappingURL=3.15a238fb98ca11f71520.js.map
|