2021-08-21 13:47:07 +02:00
|
|
|
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[484],{7854:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(6137),s=n(4399),o=n(3657),i=n(6202),c=n(8835),l=n(706),d=n(7799);const u={large:160,medium:128,small:104},m=({sticker:e,size:t="medium",observeIntersection:n,lastSyncTime:m,forceLoadPreview:h})=>{const f=(0,r.sO)(null),[v,p]=(0,l.Z)(),Z=`sticker${e.id}`,g=(0,o.Op)(f,n),E=e.thumbnail&&e.thumbnail.dataUri,P=(0,i.Z)(`${Z}?size=m`,!g&&!h,a.IU.BlobUrl,m),{transitionClassNames:y}=(0,c.Z)(P,"slow"),C=(0,i.Z)(Z,!g,a.IU.Lottie,m),b=Boolean(C),[N,w]=(0,r.eJ)(String(Math.random())),k=(0,r.I4)((()=>{w(String(Math.random()))}),[]),I=u[t],T=`width: ${I}px; height: ${I}px;`;return r.ZP.createElement("div",{ref:f,className:"AnimatedEmoji media-inner",style:T,onClick:k},!v&&E&&r.ZP.createElement("img",{src:E,className:e.id===s.wB?"like-sticker-thumb":void 0,alt:""}),!v&&P&&r.ZP.createElement("img",{src:P,className:y,alt:""}),b&&r.ZP.createElement(d.Z,{key:Z,id:Z,animationData:C,size:I,quality:1,play:g&&N,noLoop:!0,onLoad:p}))}},7799:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(9118),s=n(6752),o=n(8674),i=n(5332);let c,l;async function d(){return c||(c=n.e(941).then(n.bind(n,7941)),l=(await c).default),c}setTimeout(d,5e3);const u=(0,r.X$)((({className:e,id:t,animationData:n,play:c,playSegment:u,speed:m,noLoop:h,size:f,quality:v,isLowPriority:p,onLoad:Z})=>{const[g,E]=(0,r.eJ)(),P=(0,r.sO)(null),y=(0,r.sO)(!1),C=(0,r.sO)(!1),b=(0,r.sO)();b.current=c;const N=(0,r.sO)();N.current=u,(0,r.d4)((()=>{if(g||!n)return;const e=()=>{if(!P.current)return;const e=new l(t,P.current,n,{noLoop:h,size:f,quality:v,isLowPriority:p},Z);m&&e.setSpeed(m),E(e)};l?e():d().then((()=>{(0,a.T2)((()=>{P.current&&e()}))}))}),[g,n,t,p,h,Z,v,f,m]),(0,r.d4)((()=>()=>{g&&g.destroy()}),[g]);const w=(0,r.I4)(((e=!1)=>{g&&(b.current||N.current)&&(N.current?g.playSegment(N.current):e?g.goToAndPlay(0):g.play())}),[g]),k=(0,r.I4)((()=>{g&&g.pause()}),[g]),I=(0,r.I4)((()=>{C.current=!0,g&&(y.current||(y.current=g.isPlaying()),k())}),[g,k]),T=(0,r.I4)((()=>{y.current&&w(),y.current=!1,C.current=!1}),[w]),S=(0,r.I4)((()=>{(0,a.T2)(T)}),[T]);(0,r.d4)((()=>{g&&(c||u?C.current?y.current=!0:w(h):C.current?y.current=!1:k())}),[g,c,u,h,w,k]),(0,o.ZP)(I,T),(0,i.Z)(I,S);const M=(0,s.Z)("AnimatedSticker",e),x=f?`width: ${f}px; height: ${f}px;`:void 0;return r.ZP.createElement("div",{ref:P,className:M,style:x})}))},4752:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(4050),a=n(7361),s=n(790),o=n(2858),i=n(6752),c=n(2340),l=n(2761),d=n(1212),u=n(2019),m=n(3186),h=n(2619),f=n(9107),v=n(231),p=n(9196),Z=n(8033);const g=a.wB?20:25,E=a.wB?50:75;function P(e,t,{handleStartSeek:n,handleSeek:a,handleStopSeek:s}){return r.ZP.createElement("div",{className:"seekline no-selection",onMouseDown:n,onMouseMove:a,onMouseUp:s},r.ZP.createElement("span",{className:"seekline-buffered-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*t}%)`})),r.ZP.createElement("span",{className:"seekline-play-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),r.ZP.createElement("span",{className:"seekline-thumb"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const y=(0,r.X$)((({theme:e,message:t,senderTitle:n,uploadProgress:y,target:C,date:b,lastSyncTime:N,className:w,isSelectable:k,isSelected:I,onPlay:T,onReadMedia:S,onCancelUpload:M,onDateClick:x})=>{const{content:{audio:L,voice:$},isMediaUnread:A}=t,F=Boolean($),O=(0,r.sO)(!1),U=(0,f.Z)(),[D,R]=(0,r.eJ)(!1),B=N,{mediaData:V,downloadProgress:X}=(0,l.Z)((0,o.Ti)(t,"inline"),!B,(0,o.kG)(t,"inline")),{isBuffered:H,bufferedProgress:K,bufferingHandlers:q,checkBuffering:j}=(0,u.Z)(),{isPlaying:z,playProgress:J,playPause:Y,setCurrentTime:W,duration:_}=(0,m.Z)((0,o.Tp)(t),(0,o.XV)(t),V,q,j,D,(function(){R(!0),T(t.id,t.chatId)}),(0,o.CI)(t));(0,r.d4)((()=>{R(z)}),[z]);const{isDownloadStarted:G,downloadProgress:Q,handleDownloadClick:ee}=(0,h.Z)((0,o.Ti)(t,"download"),(0,o.I3)(t)),te=D&&!H,{isUploading:ne,isTransferring:re,transferProgress:ae}=(0,o.Sc)(t,G?Q:y||X,te||G),{shouldRender:se,tra
|