mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-30 04:39:00 +01:00
2 lines
123 KiB
JavaScript
2 lines
123 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[162],{7854:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(4050),r=n(6137),o=n(6752),i=n(3657),s=n(6202),l=n(692),c=n(5296),d=n(4399),u=n(7799);const m=(0,a.X$)((e=>{var t;let{sticker:n,effect:m,isOwn:h,soundId:v,size:f="medium",observeIntersection:p,lastSyncTime:g,forceLoadPreview:Z,messageId:E,chatId:P,activeEmojiInteractions:y}=e;const{markAnimationLoaded:C,isAnimationLoaded:b,ref:N,width:k,style:w,handleClick:I,playKey:S}=(0,c.Z)(f,P,E,v,y,h,void 0,null==m?void 0:m.emoji),T=`sticker${n.id}`,M=(0,i.Op)(N,p),x=null===(t=n.thumbnail)||void 0===t?void 0:t.dataUri,L=(0,s.Z)(`${T}?size=m`,!M&&!Z,r.IU.BlobUrl,g),$=(0,l.Z)(L),A=(0,s.Z)(T,!M,r.IU.Lottie,g),O=Boolean(A);return a.ZP.createElement("div",{ref:N,className:(0,o.Z)("AnimatedEmoji media-inner",n.id===d.wB&&"like-sticker-thumb"),style:w,onClick:I},!b&&x&&a.ZP.createElement("img",{src:x,alt:""}),!b&&L&&a.ZP.createElement("img",{src:L,className:$,alt:""}),O&&T&&a.ZP.createElement(u.Z,{key:T,id:T,animationData:A,size:k,quality:1,play:M&&S,forceOnHeavyAnimation:!0,noLoop:!0,onLoad:C}))}))},4752:(e,t,n)=>{n.d(t,{Z:()=>x});var a=n(4050),r=n(3555),o=n(6137),i=n(1713),s=n(7361),l=n(790),c=n(5806);function d(e,t,n,a){let{peak:r,fillStyle:o,progressFillStyle:i}=a;const s=4*t.length;e.width=2*s,e.height=46,e.style.width=`${s}px`,e.style.height="23px";const l=e.getContext("2d");l.scale(2,2),t.forEach(((e,a)=>{l.globalAlpha=a/t.length>=n?.5:1,l.fillStyle=n>a/t.length?i:o;const s=Math.max(2,e/Math.max(1,r)*23);!function(e,t,n,a,r,o){2<2*o&&(o=1),r<2*o&&(o=r/2),e.beginPath(),e.moveTo(t+o,n),e.arcTo(t+2,n,t+2,n-r,o),e.arcTo(t+2,n-r,t,n-r,o),e.arcTo(t,n-r,t,n,o),e.arcTo(t,n,t+2,n,o),e.closePath()}(l,4*a,23,0,s,1),l.fill()}))}var u=n(6752),m=n(2340),h=n(5376);function v(e){const t=8*e.length,n=Math.floor(t/5);if(!n)return[];const a=Array(n),r=e;for(let e=0,t=n-1;e!==t;++e){const t=Math.floor(5*e/8),n=Math.floor(5*e%8),o=r[t]+(r[t+1]<<8);a[e]=o>>n&31}const o=Math.floor(5*(n-1)/8),i=Math.floor(5*(n-1)%8),s=r[o]+(r[o+1]<<8);return a[n-1]=s>>i&31,a}function f(e,t){let n=0;const a=new Array(t),r=e.length/t,o=e[0],i=e[e.length-1];for(let d=0;d<t;d++){var s,l,c;const t=Math.floor(d*r),u=((null!==(s=e[t-1])&&void 0!==s?s:o)+(null!==(l=e[t])&&void 0!==l?l:o)+(null!==(c=e[t+1])&&void 0!==c?c:i))/3;a[d]=u,n<u&&(n=u)}return{data:a,peak:n}}var p=n(2566),g=n(1212),Z=n(2019),E=n(3186),P=n(9107),y=n(1174),C=n(6202),b=n(396),N=n(711),k=n(231),w=n(9196),I=n(8033);const S=s.wB?20:25,T=s.wB?50:75;function M(e,t,n){return a.ZP.createElement("div",{className:"seekline no-selection",ref:n},t.map((e=>{let{start:t,end:n}=e;return a.ZP.createElement("div",{className:"seekline-buffered-progress",style:`left: ${100*t}%; right: ${100-100*n}%`})})),a.ZP.createElement("span",{className:"seekline-play-progress"},a.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),a.ZP.createElement("span",{className:"seekline-thumb"},a.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const x=(0,a.X$)((e=>{let{theme:t,message:n,senderTitle:x,uploadProgress:L,origin:$,date:A,lastSyncTime:O,className:F,isSelectable:R,isSelected:D,isDownloading:B,onPlay:U,onReadMedia:X,onCancelUpload:Y,onDateClick:_}=e;const{cancelMessageMediaDownload:j,downloadMessageMedia:z}=(0,r.Sv)(),{content:{audio:V,voice:K,video:H},isMediaUnread:W}=n,q=Boolean(K||H),J=(0,a.sO)(!1),G=(0,a.sO)(null),Q=(0,P.Z)(),{isRtl:ee}=Q,[te,ne]=(0,a.eJ)(!1),ae=O,re=(0,c.Ti)(n,"pictogram"),oe=(0,C.Z)(re,!1,o.IU.BlobUrl),ie=(0,C.Z)((0,c.Ti)(n,"inline"),!ae,(0,c.kG)(n,"inline")),{loadProgress:se}=(0,p.Z)((0,c.Ti)(n,"download"),!B),le=(0,a.I4)((()=>{ne(!0),U(n.id,n.chatId)}),[n,U]),ce=(0,a.I4)((()=>{ne(!1)}),[]),{isBuffered:de,bufferedRanges:ue,bufferingHandlers:me,checkBuffering:he}=(0,Z.Z)(),{isPlaying:ve,playProgress:fe,playPause:pe,setCurrentTime:ge,duration:Ze}=(0,E.Z)((0,b.An)(n),(0,c.XV)(n),q?"voice":"audio",ie,me,void 0,he,te,le,ce,(0,c.CI)(n)),Ee=(0,c.B4)(n),Pe=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=(0,a.sO)(null),{data:i,peak:s}=(0,a.Ye)((()=>{if(!t)return;const{waveform:e,duration:n}=t;if(!e)return{data:new Array(Math.min(n,30)).fill(0),peak:0};const a=Math.min(n/10,1),r=Math.round(S+(T-S)*a);return f(v(new Uint8Array(e)),r)}),[t])||{};return(0,a.bt)((()=>{const t=o.current;t&&i&&void 0!==s&&d(t,i,n,{peak:s,fillStyle:r?"dark"===e?"#B7ABED":"#AEDFA4":"dark"===e?"#494A78":"#ADD3F7",progressFillStyle:r?"dark"===e?"#FFFFFF":"#4FAE4E":"dark"===e?"#8774E1":"#3390EC"})}),[r,s,n,i,e]),o}(t,K,W&&!Ee?1:fe,Ee),ye=ve||fe>0&&fe<1;(0,a.d4)((()=>{ne(ve)}),[ve]);const Ce=te&&!de,{isUploading:be,isTransferring:Ne,transferProgress:ke}=(0,c.Sc)(n,L||se,Ce||B),{shouldRender:we,transitionClassNames:Ie}=(0,g.Z)(Ne),Se=we&&(Ce||be),Te=(0,a.I4)((()=>{be?null==Y||Y():(ve||U(n.id,n.chatId),(0,r.Sv)().setAudioPlayerOrigin({origin:$}),ne(!te),pe())}),[be,ve,te,pe,Y,U,n.id,n.chatId,$]);(0,a.d4)((()=>{X&&W&&(ve||B)&&X()}),[ve,W,X,B]);const Me=(0,a.I4)((()=>{B?j({message:n}):z({message:n})}),[j,z,B,n]),xe=(0,a.I4)((e=>{if(J.current&&G.current){const{width:t,left:n}=G.current.getBoundingClientRect(),a=e instanceof MouseEvent?e.clientX:e.targetTouches[0].clientX;e.stopPropagation(),ge(Math.max(Math.min(Ze*((a-n)/t),Ze-.1),.001))}}),[Ze,ge]),Le=(0,a.I4)((e=>{e instanceof MouseEvent&&2===e.button||(J.current=!0,xe(e))}),[xe]),$e=(0,a.I4)((()=>{J.current=!1}),[]),Ae=(0,a.I4)((()=>{_(n.id,n.chatId)}),[_,n.id,n.chatId]);function Oe(){if(q)return x||"Voice";const{title:e,fileName:t}=V;return e||t}(0,a.d4)((()=>{if(G.current&&ye)return(0,y.sf)(G.current,{onCapture:Le,onRelease:$e,onClick:$e,onDrag:xe})}),[ye,Le,xe,$e]);const Fe=(0,u.Z)("Audio",F,Ee&&$===i.Cr.Inline&&"own",($===i.Cr.Search||$===i.Cr.SharedMedia)&&"bigger",D&&"audio-is-selected"),Re=["toggle-play"];Se?Re.push("loading"):Re.push(ve?"pause":"play");const De=(0,u.Z)("content",ye&&"with-seekline");function Be(){return a.ZP.createElement("div",{className:De},a.ZP.createElement("div",{className:"content-row"},a.ZP.createElement("p",{className:"title",dir:"auto",title:Oe()},(0,m.Z)(Oe())),a.ZP.createElement("div",{className:"message-date"},A&&a.ZP.createElement(I.Z,{className:"date",onClick:Ae},(0,l.VX)(Q,1e3*A)))),ye&&a.ZP.createElement("div",{className:"meta search-result",dir:ee?"rtl":void 0},a.ZP.createElement("span",{className:"duration with-seekline",dir:"auto"},fe<1&&`${(0,l.k9)(Ze*fe,Ze)}`),M(fe,ue,G)),!ye&&function(){if(q)return a.ZP.createElement("div",{className:"meta",dir:ee?"rtl":void 0},(0,l.k9)((K||H).duration));const{performer:e}=V;return a.ZP.createElement("div",{className:"meta",dir:ee?"rtl":void 0},(0,l.k9)(Ze),a.ZP.createElement("span",{className:"bullet"},"•"),e&&a.ZP.createElement("span",{className:"performer",title:e},(0,m.Z)(e)),e&&x&&a.ZP.createElement("span",{className:"bullet"},"•"),x&&a.ZP.createElement("span",{title:x},(0,m.Z)(x)))}())}return a.ZP.createElement("div",{className:Fe,dir:Q.isRtl?"rtl":"ltr"},R&&a.ZP.createElement("div",{className:"message-select-control"},D&&a.ZP.createElement("i",{className:"icon-select"})),a.ZP.createElement(k.Z,{round:!0,ripple:!s.wB,size:"smaller",color:oe?"translucent-white":"primary",className:Re.join(" "),ariaLabel:ve?"Pause audio":"Play audio",onClick:Te,isRtl:Q.isRtl,backgroundImage:oe},a.ZP.createElement("i",{className:"icon-play"}),a.ZP.createElement("i",{className:"icon-pause"})),we&&a.ZP.createElement("div",{className:(0,u.Z)("media-loading",Ie,Se&&"interactive")},a.ZP.createElement(w.Z,{progress:ke,transparent:!0,size:"m",onClick:Se?Te:void 0,noCross:!Se})),V&&!be&&a.ZP.createElement(k.Z,{round:!0,size:"tiny",className:"download-button",ariaLabel:B?"Cancel download":"Download",onClick:Me},a.ZP.createElement("i",{className:B?"icon-close":"icon-arrow-down"})),$===i.Cr.Search&&Be(),$!==i.Cr.Search&&V&&function(e,t,n,r,o,i,s,c,d,u,v){const{title:f,performer:p,fileName:g}=t,Z=r||o>0&&o<1,{isRtl:E}=N.i0;return a.ZP.createElement("div",{className:"content"},a.ZP.createElement("p",{className:"title",dir:"auto",title:f},(0,m.Z)(f||g)),Z&&a.ZP.createElement("div",{className:"meta",dir:E?"rtl":void 0},a.ZP.createElement("span",{className:"duration with-seekline",dir:"auto"},(0,l.k9)(n*o,n)),M(o,i,s)),!Z&&c&&a.ZP.createElement("div",{className:"meta",dir:E?"rtl":void 0},u?`${(0,h.yW)(t.size*u)} / `:void 0,(0,h.yW)(t.size)),!Z&&!c&&a.ZP.createElement("div",{className:"meta",dir:E?"rtl":void 0},a.ZP.createElement("span",{className:"duration",dir:"auto"},(0,l.k9)(n)),p&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"bullet"},"•"),a.ZP.createElement("span",{className:"performer",dir:"auto",title:p},(0,m.Z)(p))),d&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"bullet"},"•"),a.ZP.createElement(I.Z,{className:"date",onClick:v},(0,l.ZK)(e,1e3*d,!0)))))}(Q,V,Ze,ve,fe,ue,G,B||be,A,ke,_?Ae:void 0),$===i.Cr.SharedMedia&&(K||H)&&Be(),$===i.Cr.Inline&&K&&function(e,t,n,r,o){return a.ZP.createElement("div",{className:"content"},a.ZP.createElement("div",{className:"waveform",draggable:!1,ref:t},a.ZP.createElement("canvas",{ref:n})),a.ZP.createElement("p",{className:(0,u.Z)("voice-duration",o&&"unread"),dir:"auto"},0===r?(0,l.k9)(e.duration):(0,l.k9)(e.duration*r)))}(K,G,Pe,fe,W))}))},180:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(4050),r=n(3555),o=n(1192),i=n(5806),s=n(2340),l=n(4319),c=n(6272),d=n(9107),u=n(1876),m=n(3321);const h=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatOrUserId:n}=t;const{lastSyncTime:a,countryList:{phoneCodes:r}}=e,s=n?(0,o.Z1)(e,n):void 0,l=(0,i.YC)(n)?(0,o.dy)(e,n):void 0,c=s&&(0,i.i4)(s,(0,o.dZ)(e),(0,o.NJ)(e));return{lastSyncTime:a,phoneCodeList:r,chat:s,user:l,canInviteUsers:s&&!l&&(!(0,i.eA)(s)&&!(0,i.Mg)(s,"inviteUsers")||(0,i.VE)(s,"inviteUsers")),isMuted:c}}))((e=>{let{lastSyncTime:t,user:n,chat:o,forceShowSelf:h,canInviteUsers:v,isMuted:f,phoneCodeList:p}=e;const{loadFullUser:g,showNotification:Z,updateChatMutedState:E}=(0,r.Sv)(),{id:P,fullInfo:y,username:C,phoneNumber:b,isSelf:N}=n||{},{id:k}=o||{},w=(0,d.Z)();(0,a.d4)((()=>{t&&P&&g({userId:P})}),[g,P,t]);const I=(0,a.I4)((()=>{E({chatId:k,isMuted:!f})}),[k,f,E]);if(!o||o.isRestricted||N&&!h)return;function S(e,t){(0,l.TE)(e),Z({message:`${t} was copied`})}const T=b&&(0,c.WZ)(p,b),M=(0,i.hu)(o),x=(null==y?void 0:y.bio)||(0,i.GM)(o);return a.ZP.createElement("div",{className:"ChatExtra"},T&&Boolean(T.length)&&a.ZP.createElement(u.Z,{icon:"phone",multiline:!0,narrow:!0,ripple:!0,onClick:()=>S(T,w("Phone"))},a.ZP.createElement("span",{className:"title",dir:"auto"},T),a.ZP.createElement("span",{className:"subtitle"},w("Phone"))),C&&a.ZP.createElement(u.Z,{icon:"mention",multiline:!0,narrow:!0,ripple:!0,onClick:()=>S(`@${C}`,w("Username"))},a.ZP.createElement("span",{className:"title",dir:"auto"},(0,s.Z)(C)),a.ZP.createElement("span",{className:"subtitle"},w("Username"))),x&&Boolean(x.length)&&a.ZP.createElement(u.Z,{icon:"info",multiline:!0,narrow:!0,isStatic:!0},a.ZP.createElement("span",{className:"title",dir:"auto"},(0,s.Z)(x,["br","links","emoji"])),a.ZP.createElement("span",{className:"subtitle"},w(P?"UserBio":"Info"))),(v||!C)&&M&&a.ZP.createElement(u.Z,{icon:o.username?"mention":"link",multiline:!0,narrow:!0,ripple:!0,onClick:()=>S(M,w("SetUrlPlaceholder"))},a.ZP.createElement("div",{className:"title"},M),a.ZP.createElement("span",{className:"subtitle"},w("SetUrlPlaceholder"))),!h&&a.ZP.createElement(u.Z,{icon:"unmute",ripple:!0,onClick:I},a.ZP.createElement("span",null,w("Notifications")),a.ZP.createElement(m.Z,{id:"group-notifications",label:P?"Toggle User Notifications":"Toggle Chat Notifications",checked:!f,inactive:!0})))})))},329:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(4050),r=n(3555),o=n(1192),i=n(5806),s=n(9107),l=n(2340),c=n(172),d=n(3103),u=n(231);const m=(0,a.X$)((0,r.c$)(((e,t)=>{let{chat:n}=t;const a=(0,i.YC)(n.id),r=(0,o.FM)(e,n.id),s=a&&(0,o.dy)(e,(0,i.zX)(n)),l=s&&(0,i.cS)(s)&&!n.isSupport,c=a&&!r&&!l,d=a?(0,i.Vl)((0,o.dy)(e,(0,i.zX)(n))):void 0;return{isPrivateChat:a,isChatWithSelf:r,isBot:l,isChannel:(0,i.eA)(n),isBasicGroup:(0,i.G9)(n),isSuperGroup:(0,i.ZV)(n),currentUserId:e.currentUserId,canDeleteForAll:c,contactName:d}}))((e=>{let{isOpen:t,chat:n,isChannel:o,isPrivateChat:m,isChatWithSelf:h,isBot:v,isBasicGroup:f,isSuperGroup:p,currentUserId:g,canDeleteForAll:Z,contactName:E,onClose:P,onCloseAnimationEnd:y}=e;const{leaveChannel:C,deleteHistory:b,deleteChannel:N,deleteChatUser:k,blockContact:w}=(0,r.Sv)(),I=(0,s.Z)(),S=(0,i.U)(I,n),T=(0,a.I4)((()=>{b({chatId:n.id,shouldDeleteForAll:!0}),P()}),[b,n.id,P]),M=(0,a.I4)((()=>{b({chatId:n.id,shouldDeleteForAll:!0}),w({contactId:n.id,accessHash:n.accessHash}),P()}),[b,n.id,n.accessHash,w,P]),x=(0,a.I4)((()=>{m?b({chatId:n.id,shouldDeleteForAll:!1}):f?(k({chatId:n.id,userId:g}),b({chatId:n.id,shouldDeleteForAll:!1})):!o&&!p||n.isCreator?(o||p)&&n.isCreator&&N({chatId:n.id}):C({chatId:n.id}),P()}),[m,f,o,p,g,n.isCreator,n.id,P,b,k,C,N]),L=(0,a.I4)((()=>{o||p?(C({chatId:n.id}),P()):x()}),[n.id,x,o,p,C,P]);return a.ZP.createElement(d.Z,{isOpen:t,className:"DeleteChatModal",header:a.ZP.createElement("div",{className:"modal-header",dir:I.isRtl?"rtl":void 0},a.ZP.createElement(c.Z,{size:"tiny",chat:n,isSavedMessages:h}),a.ZP.createElement("h3",{className:"modal-title"},I(o&&!n.isCreator?"LeaveChannel":o&&n.isCreator?"ChannelDelete":f||p?"Group.LeaveGroup":"DeleteChatUser"))),onClose:P,onCloseAnimationEnd:y},o&&n.isCreator?a.ZP.createElement("p",null,(0,l.Z)(I("ChatList.DeleteAndLeaveGroupConfirmation",S),["simple_markdown"])):o&&!n.isCreator||f||p?a.ZP.createElement("p",null,(0,l.Z)(I("ChannelLeaveAlertWithName",S),["simple_markdown"])):a.ZP.createElement("p",null,(0,l.Z)(I("ChatList.DeleteChatConfirmation",E),["simple_markdown"])),v&&a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:M},I("DeleteAndStop")),Z&&a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:T},E?(0,l.Z)(I("ChatList.DeleteForEveryone",E)):I("DeleteForAll")),!m&&n.isCreator&&a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:x},I("DeleteForAll")),a.ZP.createElement(u.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:m?x:L},I(o&&!n.isCreator?"LeaveChannel":o&&n.isCreator?"Chat.Input.Delete":f||p?"Group.LeaveGroup":Z?"ChatList.DeleteForCurrentUser":"Delete")),a.ZP.createElement(u.Z,{className:"confirm-dialog-button",isText:!0,onClick:P},I("Cancel")))})))},2535:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(4050),r=n(3555),o=n(5376),i=n(5806),s=n(3657),l=n(2566),c=n(6202),d=n(706),u=n(7002);const m=(0,a.X$)((e=>{let{message:t,observeIntersection:n,smaller:m,canAutoLoad:h,autoLoadFileMaxSizeMb:v,uploadProgress:f,withDate:p,datetime:g,className:Z,sender:E,isSelected:P,isSelectable:y,onCancelUpload:C,onMediaClick:b,onDateClick:N,isDownloading:k}=e;const w=(0,r.Sv)(),I=(0,a.sO)(null),S=t.content.document,{fileName:T,size:M,timestamp:x}=S,L=(0,o.K2)(S)||"",$=(0,s.Op)(I,n),[A,O]=(0,d.Z)();(0,a.d4)((()=>{$&&O()}),[$,O]);const[F,R]=(0,a.eJ)(h&&(!v||M<=1048576*v)),D=Boolean(k||F&&A),B=(0,i.Ti)(t,"download"),{loadProgress:U,mediaData:X}=(0,l.Z)(B,!D,void 0,void 0,void 0,!0),Y=Boolean(X),{isUploading:_,isTransferring:j,transferProgress:z}=(0,i.Sc)(t,f||U,D&&!Y),V=(0,o.v6)(S),K=V?(0,i.DH)(t):void 0,H=V?S.previewBlobUrl:void 0,W=(0,c.Z)((0,i.Ti)(t,"pictogram"),!$),q=b&&Boolean(S.mediaType),J=(0,a.I4)((()=>{_?C&&C():k?w.cancelMessageMediaDownload({message:t}):j?R(!1):q?b():w.downloadMessageMedia({message:t})}),[_,k,j,q,C,w,t,b]),G=(0,a.I4)((()=>{N(t.id,t.chatId)}),[N,t.id,t.chatId]);return a.ZP.createElement(u.Z,{ref:I,name:T,extension:L,size:M,timestamp:p?g||x:void 0,thumbnailDataUri:K,previewData:H||W,smaller:m,isTransferring:j,isUploading:_,transferProgress:z,className:Z,sender:E,isSelectable:y,isSelected:P,actionIcon:q?(0,i.hC)(t)?"icon-play":"icon-eye":"icon-download",onClick:J,onDateClick:N?G:void 0})}))},8780:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9107),o=n(6752);const i=e=>{let{content:t,className:n}=e;const i=(0,r.Z)();return a.ZP.createElement("span",{className:(0,o.Z)("DotAnimation",n),dir:i.isRtl?"rtl":"auto"},t,a.ZP.createElement("span",{className:"ellipsis"}))}},685:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(9107);const o=(0,a.X$)((e=>{let{fakeType:t}=e;const n=(0,r.Z)();return a.ZP.createElement("span",{className:"FakeIcon"},n("fake"===t?"FakeMessage":"ScamMessage"))}))},7002:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(4050),r=n(1212),o=n(692),i=n(6752),s=n(790),l=n(5376),c=n(4399),d=n(2340),u=n(9107),m=n(9196),h=n(8033);const v=(0,a.X$)((e=>{let{ref:t,name:n,size:v,extension:f="",timestamp:p,sender:g,thumbnailDataUri:Z,previewData:E,className:P,smaller:y,isTransferring:C,isUploading:b,isSelectable:N,isSelected:k,transferProgress:w,actionIcon:I,onClick:S,onDateClick:T}=e;const M=(0,u.Z)();let x=(0,a.sO)(null);t&&(x=t);const L=(0,o.Z)(E),{shouldRender:$,transitionClassNames:A}=(0,r.Z)(C,void 0,!0),O=(0,l.Oh)(f),F=(0,l.yW)(v),{width:R,height:D}=(0,c.lE)(y),B=(0,i.Z)("File",P,y&&"smaller",S&&!b&&"interactive",k&&"file-is-selected");return a.ZP.createElement("div",{ref:x,className:B,dir:M.isRtl?"rtl":void 0},N&&a.ZP.createElement("div",{className:"message-select-control"},k&&a.ZP.createElement("i",{className:"icon-select"})),a.ZP.createElement("div",{className:"file-icon-container",onClick:b?void 0:S},Z||E?a.ZP.createElement("div",{className:"file-preview media-inner"},a.ZP.createElement("img",{src:Z,width:R,height:D,className:"thumbnail",alt:""}),a.ZP.createElement("img",{src:E,className:(0,i.Z)("full-media",L),width:R,height:D,alt:""})):a.ZP.createElement("div",{className:`file-icon ${O}`},f.length<=4&&a.ZP.createElement("span",{className:"file-ext",dir:"auto"},f)),$&&a.ZP.createElement("div",{className:(0,i.Z)("file-progress",O,A)},a.ZP.createElement(m.Z,{progress:w,size:y?"s":"m",onClick:b?S:void 0})),S&&a.ZP.createElement("i",{className:(0,i.Z)("action-icon",I||"icon-download",$&&"hidden")})),a.ZP.createElement("div",{className:"file-info"},a.ZP.createElement("div",{className:"file-title",dir:"auto"},(0,d.Z)(n)),a.ZP.createElement("div",{className:"file-subtitle",dir:"auto"},a.ZP.createElement("span",null,C&&w?`${Math.round(100*w)}%`:F),g&&a.ZP.createElement("span",{className:"file-sender"},(0,d.Z)(g)),!g&&p&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"bullet"}),a.ZP.createElement(h.Z,{onClick:T},(0,s.ZK)(M,1e3*p,!0))))),g&&p&&a.ZP.createElement(h.Z,{onClick:T},(0,s.VX)(M,1e3*p)))}))},8799:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(4050),r=n(3555),o=n(1713),i=n(5806),s=n(1192),l=n(2340),c=n(9107),d=n(172),u=n(9411),m=n(8729),h=n(8780),v=n(685);const f=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatId:n}=t;const{lastSyncTime:a}=e,r=(0,s.Z1)(e,n);return{lastSyncTime:a,chat:r,onlineCount:r?(0,s.YK)(e,r):void 0,areMessagesLoaded:Boolean((0,s.Zw)(e,n))}}))((e=>{let{typingStatus:t,avatarSize:n="medium",status:s,withDots:f,withMediaViewer:p,withUsername:g,withFullInfo:Z,withUpdatingStatus:E,withChatType:P,noRtl:y,chat:C,onlineCount:b,areMessagesLoaded:N,lastSyncTime:k}=e;const{loadFullChat:w,openMediaViewer:I}=(0,r.Sv)(),S=C&&(0,i.ZV)(C),{id:T,isMin:M,isRestricted:x}=C||{};(0,a.d4)((()=>{T&&!M&&Z&&k&&w({chatId:T})}),[T,M,k,Z,w,S]);const L=(0,a.I4)(((e,t)=>{C&&t&&(e.stopPropagation(),I({avatarOwnerId:C.id,origin:"jumbo"===n?o.bZ.ProfileAvatar:o.bZ.MiddleHeaderAvatar}))}),[C,n,I]),$=(0,c.Z)();if(C)return a.ZP.createElement("div",{className:"ChatInfo",dir:!y&&$.isRtl?"rtl":void 0},a.ZP.createElement(d.Z,{key:C.id,size:n,chat:C,onClick:p?L:void 0}),a.ZP.createElement("div",{className:"info"},a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",{dir:"auto"},(0,l.Z)((0,i.U)($,C))),C.isVerified&&a.ZP.createElement(u.Z,null),C.fakeType&&a.ZP.createElement(v.Z,{fakeType:C.fakeType})),function(){if(s)return f?a.ZP.createElement(h.Z,{className:"status",content:s}):a.ZP.createElement("span",{className:"status",dir:"auto"},s);if(E&&!N&&!x)return a.ZP.createElement(h.Z,{className:"status",content:$("Updating")});if(!C)return;if(t)return a.ZP.createElement(m.Z,{typingStatus:t});if(P)return a.ZP.createElement("span",{className:"status",dir:"auto"},$((0,i.l6)(C)));const e=g?C.username:void 0,n=function(e,t){const n=e((0,i.l6)(t)),{membersCount:a}=t;return t.isRestricted?"Channel"===n?"channel is inaccessible":"group is inaccessible":a?e("Channel"===n?"Subscribers":"Members",a,"i"):n}($,C),r=b?`, ${$("OnlineCount",b,"i")}`:void 0;return a.ZP.createElement("span",{className:"status"},e&&a.ZP.createElement("span",{className:"handle"},e),a.ZP.createElement("span",{className:"group-status"},n),r&&a.ZP.createElement("span",{className:"online-status"},r))}()))})))},6844:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(4050),r=n(790),o=n(9107),i=n(8018);const s=(0,a.X$)((e=>{let{message:t,outgoingStatus:n}=e;const s=(0,o.Z)();return a.ZP.createElement("div",{className:"LastMessageMeta"},n&&a.ZP.createElement(i.Z,{status:n}),a.ZP.createElement("span",{className:"time"},(0,r.VX)(s,1e3*t.date)))}))},3709:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(4050),r=n(790),o=n(3227),i=n(5806),s=n(6752),l=n(6202),c=n(692),d=n(3657);const u=(0,a.X$)((e=>{let{message:t,idPrefix:n="shared-media",isProtected:u,observeIntersection:m,onClick:h}=e;const v=(0,a.sO)(null),f=(0,d.Op)(v,m),p=(0,i.DH)(t),g=(0,l.Z)((0,i.Ti)(t,"pictogram"),!f),Z=(0,c.Z)(g),E=(0,i.b7)(t),P=(0,a.I4)((()=>{h(t.id,t.chatId)}),[t.id,t.chatId,h]);return a.ZP.createElement("div",{ref:v,id:`${n}${(0,i.d0)(t.id)}`,className:"Media scroll-item",onClick:h?P:void 0},a.ZP.createElement("img",{src:p,alt:"",draggable:!u,decoding:"async",onContextMenu:u?o.Z:void 0}),a.ZP.createElement("img",{src:g,className:(0,s.Z)("full-media",Z),alt:"",draggable:!u,decoding:"async",onContextMenu:u?o.Z:void 0}),E&&a.ZP.createElement("span",{className:"video-duration"},E.isGif?"GIF":(0,r.k9)(E.duration)),u&&a.ZP.createElement("span",{className:"protector"}))}))},8018:(e,t,n)=>{n.d(t,{Z:()=>i});var a,r=n(4050),o=n(2255);!function(e){e[e.failed=0]="failed",e[e.pending=1]="pending",e[e.succeeded=2]="succeeded",e[e.read=3]="read"}(a||(a={}));const i=(0,r.X$)((e=>{let{status:t}=e;return r.ZP.createElement("div",{className:"MessageOutgoingStatus"},r.ZP.createElement(o.Z,{name:"reveal",activeKey:a[t]},r.ZP.createElement("i",{className:`icon-message-${t}`})))}))},7262:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(4050),r=n(6752),o=n(1212),i=n(2340),s=n(9107);const l="Nothing found.",c=(0,a.X$)((e=>{let{text:t=l,description:n}=e;const c=(0,s.Z)(),{transitionClassNames:d}=(0,o.Z)(!0);return a.ZP.createElement("div",{className:(0,r.Z)("NothingFound",d,n&&"with-description")},t,n&&a.ZP.createElement("p",{className:"description"},(0,i.Z)(c(n),["br"])))}))},1820:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(4050),r=n(5806),o=n(1273),i=n(4605),s=n(7687),l=n(1876),c=n(6058),d=n(8799),u=n(9187),m=n(7407),h=n(9107),v=n(4288);const f=(0,a.X$)((e=>{let{itemIds:t,selectedIds:n,filterValue:f,filterPlaceholder:p,notFoundText:g,searchInputId:Z,isLoading:E,noScrollRestore:P,onSelectedIdsChange:y,onFilterChange:C,onLoadMore:b}=e;const N=(0,a.sO)(null),k=n.length>10;(0,a.d4)((()=>{setTimeout((()=>{requestAnimationFrame((()=>{N.current.focus()}))}),500)}),[]);const w=(0,a.I4)((e=>{const t=[...n];t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),y(t),C("")}),[n,y,C]),I=(0,a.I4)((e=>{const{value:t}=e.currentTarget;C(t)}),[C]),[S,T]=(0,m.Z)(b,t,Boolean(f)),M=(0,h.Z)();return a.ZP.createElement("div",{className:"Picker"},a.ZP.createElement("div",{className:"picker-header custom-scroll",dir:M.isRtl?"rtl":void 0},n.map(((e,t)=>a.ZP.createElement(u.Z,{chatOrUserId:e,isMinimized:k&&t<n.length-5,canClose:!0,onClick:w,clickArg:e}))),a.ZP.createElement(s.Z,{id:Z,ref:N,value:f,onChange:I,placeholder:p||M("SelectChat")})),null!=S&&S.length?a.ZP.createElement(o.Z,{className:"picker-list custom-scroll",items:S,onLoadMore:T,noScrollRestore:P},S.map((e=>a.ZP.createElement(l.Z,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>w(e),ripple:!0},a.ZP.createElement(i.Z,{label:"",checked:n.includes(e)}),(0,r.YC)(e)?a.ZP.createElement(c.Z,{userId:e}):a.ZP.createElement(d.Z,{chatId:e}))))):E||!S||S.length?a.ZP.createElement(v.Z,null):a.ZP.createElement("p",{className:"no-results"},g||"Sorry, nothing found."))}))},9187:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(4050),r=n(3555),o=n(1192),i=n(5806),s=n(2340),l=n(6752),c=n(9107),d=n(172);const u=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatOrUserId:n}=t;return n?{chat:n?(0,o.Z1)(e,n):void 0,user:(0,i.YC)(n)?(0,o.dy)(e,n):void 0}:{}}))((e=>{let{icon:t,title:n,isMinimized:r,canClose:o,onClick:u,clickArg:m,chat:h,user:v,className:f}=e;const p=(0,c.Z)();let g,Z;if(t&&n)g=a.ZP.createElement("div",{className:"item-icon"},a.ZP.createElement("i",{className:`icon-${t}`})),Z=n;else if(h||v){g=a.ZP.createElement(d.Z,{chat:h,user:v,size:"small",isSavedMessages:null==v?void 0:v.isSelf});const e=!h||v&&!v.isSelf?(0,i.Vl)(v):(0,i.U)(p,h,v);Z=e?(0,s.Z)(e):void 0}const E=(0,l.Z)("PickerSelectedItem",f,r&&"minimized",o&&"closeable");return a.ZP.createElement("div",{className:E,onClick:()=>u(m),title:r?Z:void 0,dir:p.isRtl?"rtl":void 0},g,!r&&a.ZP.createElement("div",{className:"item-name",dir:"auto"},Z),o&&a.ZP.createElement("div",{className:"item-remove"},a.ZP.createElement("i",{className:"icon-close"})))})))},6058:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(4050),r=n(3555),o=n(1713),i=n(1192),s=n(5806),l=n(2340),c=n(9107),d=n(172),u=n(9411),m=n(8729),h=n(8780),v=n(685);const f=(0,a.X$)((0,r.c$)(((e,t)=>{let{userId:n,forceShowSelf:a}=t;const{lastSyncTime:r,serverTimeOffset:o}=e,s=(0,i.dy)(e,n);return{lastSyncTime:r,user:s,userStatus:(0,i.ss)(e,n),isSavedMessages:!a&&s&&s.isSelf,areMessagesLoaded:Boolean((0,i.Zw)(e,n)),serverTimeOffset:o}}))((e=>{let{typingStatus:t,avatarSize:n="medium",status:i,withDots:f,withMediaViewer:p,withUsername:g,withFullInfo:Z,withUpdatingStatus:E,noStatusOrTyping:P,noRtl:y,user:C,userStatus:b,isSavedMessages:N,areMessagesLoaded:k,lastSyncTime:w,serverTimeOffset:I}=e;const{loadFullUser:S,openMediaViewer:T}=(0,r.Sv)(),{id:M}=C||{},x=(0,s.Js)(C);(0,a.d4)((()=>{Z&&w&&M&&S({userId:M})}),[M,S,w,Z]);const L=(0,a.I4)(((e,t)=>{C&&t&&(e.stopPropagation(),T({avatarOwnerId:C.id,origin:"jumbo"===n?o.bZ.ProfileAvatar:o.bZ.MiddleHeaderAvatar}))}),[C,n,T]),$=(0,c.Z)();if(C)return a.ZP.createElement("div",{className:"ChatInfo",dir:!y&&$.isRtl?"rtl":void 0},a.ZP.createElement(d.Z,{key:C.id,size:n,user:C,isSavedMessages:N,onClick:p?L:void 0}),a.ZP.createElement("div",{className:"info"},N?a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",null,$("SavedMessages"))):a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",{dir:"auto"},x&&(0,l.Z)(x)),(null==C?void 0:C.isVerified)&&a.ZP.createElement(u.Z,null),C.fakeType&&a.ZP.createElement(v.Z,{fakeType:C.fakeType})),(i||!N&&!P)&&(i?f?a.ZP.createElement(h.Z,{className:"status",content:i}):a.ZP.createElement("span",{className:"status",dir:"auto"},i):E&&!k?a.ZP.createElement(h.Z,{className:"status",content:$("Updating")}):C?t?a.ZP.createElement(m.Z,{typingStatus:t}):a.ZP.createElement("span",{className:"status "+((0,s.kM)(C,b)?"online":"")},g&&C.username&&a.ZP.createElement("span",{className:"handle"},C.username),a.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,s.Tq)($,C,b,I))):void 0)))})))},787:(e,t,n)=>{n.d(t,{Z:()=>C});var a=n(4050),r=n(3555),o=n(1713),i=n(7361),s=n(1192),l=n(5806),c=n(2340),d=n(1174),u=n(6752),m=n(6137),h=n(647),v=n(9107),f=n(9411),p=n(2155),g=n(6202),Z=n(9204);const E=(0,a.X$)((e=>{var t;let{chat:n,user:r,photo:o,isFirstPhoto:i,isSavedMessages:s,lastSyncTime:d,onClick:h}=e;const f=(0,v.Z)(),E=r&&(0,l.NB)(r),P=n&&(0,l.pK)(n.id);function y(e,t){if(o&&!t)return`photo${o.id}?size=c`;let a;return s||E||P||(r?a=(0,l.RT)(r,e):n&&(a=(0,l.RT)(n,e))),a}const C=(0,g.Z)(y("big"),!1,m.IU.BlobUrl,d),b=i&&!C?y("normal",!0):void 0,N=(0,g.Z)(b,!1,m.IU.BlobUrl,d),k=C||N||(null==o||null===(t=o.thumbnail)||void 0===t?void 0:t.dataUri);let w="";if(s)w=a.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(E)w=a.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(P)w=a.ZP.createElement("i",{className:"icon-reply-filled"});else if(k)w=a.ZP.createElement("img",{src:k,className:"avatar-media",alt:""});else if(r){const e=(0,l.Js)(r);w=e?(0,p.Xv)(e,2):void 0}else if(n){const e=(0,l.U)(f,n);w=e&&(0,p.Xv)(e,(0,l.YC)(n.id)?2:1)}else w=a.ZP.createElement("div",{className:"spinner-wrapper"},a.ZP.createElement(Z.Z,{color:"white"}));const I=(0,u.Z)("ProfilePhoto",`color-bg-${(0,l.Rs)(r||n)}`,s&&"saved-messages",E&&"deleted-account",P&&"replies-bot-account",!s&&!k&&"no-photo");return a.ZP.createElement("div",{className:I,onClick:k?h:void 0},"string"==typeof w?(0,c.Z)(w,["hq_emoji"]):w)}));var P=n(2255),y=n(685);const C=(0,a.X$)((0,r.c$)(((e,t)=>{let{userId:n,forceShowSelf:a}=t;const{connectionState:r,serverTimeOffset:o}=e,i=(0,s.dy)(e,n),l=(0,s.ss)(e,n),c=(0,s.Z1)(e,n),d=!a&&i&&i.isSelf,{animationLevel:u}=e.settings.byKey;return{connectionState:r,user:i,userStatus:l,chat:c,isSavedMessages:d,animationLevel:u,serverTimeOffset:o}}))((e=>{var t,n;let{forceShowSelf:s,user:p,userStatus:g,chat:Z,isSavedMessages:C,connectionState:b,animationLevel:N,serverTimeOffset:k}=e;const{loadFullUser:w,openMediaViewer:I}=(0,r.Sv)(),S=(0,v.Z)(),{id:T}=p||{},{id:M}=Z||{},x=p?(0,l.Js)(p):Z?Z.title:"",L=(null==p?void 0:p.photos)||(null==Z?void 0:Z.photos)||[],$=N>=1?S.isRtl?"slide-optimized-rtl":"slide-optimized":"none",[A,O]=(0,a.eJ)(0),F=C||L.length<=1||0===A,R=C||L.length<=1||A===L.length-1;(0,a.d4)((()=>{A>L.length&&O(Math.max(0,L.length-1))}),[A,L.length]),(0,a.d4)((()=>{"connectionStateReady"===b&&T&&!s&&w({userId:T})}),[T,w,b,s]),function(e,t,n){(0,a.d4)((()=>{t.slice(n,n+4).forEach((e=>{h.UV(`photo${e.id}?size=c`)||h.he(`photo${e.id}?size=c`,m.IU.BlobUrl)}))}),[n,t])}(0,L,A);const D=(0,a.I4)((()=>{I({avatarOwnerId:T||M,profilePhotoIndex:A,origin:s?o.bZ.SettingsAvatar:o.bZ.ProfileAvatar})}),[I,T,M,A,s]),B=(0,a.I4)((()=>{F||O(A-1)}),[A,F]),U=(0,a.I4)((()=>{R||O(A+1)}),[A,R]);if((0,a.d4)((()=>{const e=document.querySelector(".photo-wrapper");if(e)return(0,d.sf)(e,{selectorToPreventScroll:".Profile, .settings-content",onSwipe:i.$b?(e,t)=>t===d.eM.Right?(B(),!0):t===d.eM.Left&&(U(),!0):void 0})}),[U,B]),!p&&!Z)return;const X=null===(t=p||Z)||void 0===t?void 0:t.isVerified,Y=null===(n=p||Z)||void 0===n?void 0:n.fakeType;return a.ZP.createElement("div",{className:(0,u.Z)("ProfileInfo",s&&"self"),dir:S.isRtl?"rtl":void 0},a.ZP.createElement("div",{className:"photo-wrapper"},function(){if(!(C||!L||L.length<=1))return a.ZP.createElement("div",{className:"photo-dashes"},L.map(((e,t)=>a.ZP.createElement("span",{className:"photo-dash "+(t===A?"current":"")}))))}(),a.ZP.createElement(P.Z,{activeKey:A,name:$,className:"profile-slide-container"},function(){const e=!C&&L&&L.length>0?L[A]:void 0;return a.ZP.createElement(E,{key:A,user:p,chat:Z,photo:e,isSavedMessages:C,isFirstPhoto:F,onClick:D})}()),!F&&a.ZP.createElement("button",{type:"button",className:"navigation prev","aria-label":S("AccDescrPrevious"),onClick:B}),!R&&a.ZP.createElement("button",{type:"button",className:"navigation next","aria-label":S("Next"),onClick:U})),a.ZP.createElement("div",{className:"info",dir:S.isRtl?"rtl":"auto"},C?a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",{dir:"auto"},S("SavedMessages"))):a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",{dir:"auto"},x&&(0,c.Z)(x)),X&&a.ZP.createElement(f.Z,null),Y&&a.ZP.createElement(y.Z,{fakeType:Y})),!C&&(p?a.ZP.createElement("div",{className:"status "+((0,l.kM)(p,g)?"online":"")},a.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,l.Tq)(S,p,g,k))):a.ZP.createElement("span",{className:"status",dir:"auto"},(0,l.eA)(Z)?S("Subscribers",null!==(_=Z.membersCount)&&void 0!==_?_:0,"i"):S("Members",null!==(j=Z.membersCount)&&void 0!==j?j:0,"i")))));var _,j})))},8198:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(4050),r=n(3555),o=n(6137),i=n(6202),s=n(6752);const l=(0,a.X$)((e=>{var t,n,l;let{reaction:c,ref:d,className:u}=e;const m=null===(t=(0,r.Rd)().availableReactions)||void 0===t||null===(n=t.find((e=>e.reaction===c)))||void 0===n||null===(l=n.staticIcon)||void 0===l?void 0:l.id,h=(0,i.Z)(`document${m}`,!m,o.IU.BlobUrl);return a.ZP.createElement("img",{className:(0,s.Z)("ReactionStaticEmoji",u),ref:d,src:h,alt:""})}))},6534:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(4050),r=n(3555),o=n(9107),i=n(3103),s=n(231),l=n(4434),c=n(7687);const d=(0,a.X$)((e=>{let{isOpen:t,subject:n="messages",chatId:d,photo:u,messageIds:m,onClose:h,onCloseAnimationEnd:v}=e;const{reportMessages:f,reportPeer:p,reportProfilePhoto:g,exitMessageSelectMode:Z}=(0,r.Sv)(),[E,P]=(0,a.eJ)("spam"),[y,C]=(0,a.eJ)(""),b=(0,a.I4)((()=>{switch(n){case"messages":f({messageIds:m,reason:E,description:y}),Z();break;case"peer":p({chatId:d,reason:E,description:y});break;case"media":g({chatId:d,photo:u,reason:E,description:y})}h()}),[y,Z,m,u,h,f,E,d,g,p,n]),N=(0,a.I4)((e=>{P(e)}),[]),k=(0,a.I4)((e=>{C(e.target.value)}),[]),w=(0,o.Z)(),I=(0,a.Ye)((()=>[{value:"spam",label:w("lng_report_reason_spam")},{value:"violence",label:w("lng_report_reason_violence")},{value:"pornography",label:w("lng_report_reason_pornography")},{value:"childAbuse",label:w("lng_report_reason_child_abuse")},{value:"copyright",label:w("ReportPeer.ReasonCopyright")},{value:"illegalDrugs",label:"Illegal Drugs"},{value:"personalDetails",label:"Personal Details"},{value:"other",label:w("lng_report_reason_other")}]),[w]);if("messages"===n&&!m||"peer"===n&&!d||"media"===n&&(!d||!u))return;const S=w("messages"===n?"lng_report_message_title":"ReportPeer.Report");return a.ZP.createElement(i.Z,{isOpen:t,onClose:h,onEnter:t?b:void 0,onCloseAnimationEnd:v,className:"report",title:S},a.ZP.createElement(l.Z,{name:"report-message",options:I,onChange:N,selected:E}),a.ZP.createElement(c.Z,{label:w("lng_report_reason_description"),value:y,onChange:k}),a.ZP.createElement(s.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:b},w("lng_report_button")),a.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:h},w("Cancel")))}))},3547:(e,t,n)=>{n.d(t,{Z:()=>P});var a=n(4050),r=n(6137),o=n(6752),i=n(386),s=n(4753),l=n(7361),c=n(3657),d=n(6202),u=n(1212),m=n(706),h=n(9107),v=n(7240),f=n(3394),p=n(7799),g=n(231),Z=n(2328),E=n(8964);const P=(0,a.X$)((e=>{let{sticker:t,size:n,noAnimate:P,title:y,className:C,clickArg:b,noContextMenu:N,isSavedMessages:k,observeIntersection:w,onClick:I,onFaveClick:S,onUnfaveClick:T}=e;const M=(0,a.sO)(null),x=(0,h.Z)(),L=`sticker${t.id}`,$=`sticker-button-${t.id}`,A=(0,c.Op)(M,w),O=t.thumbnail?t.thumbnail.dataUri:void 0,F=(0,d.Z)(`${L}?size=m`,!A,r.IU.BlobUrl),R=A&&!P,D=(0,d.Z)(t.isLottie&&L,!R,r.IU.Lottie),[B,U,X]=(0,m.Z)(Boolean(D)),Y=B&&R,_=t.isVideo&&l.Hh,j=(0,d.Z)(_&&L,!R,r.IU.BlobUrl),z=Boolean(_&&j&&R),{transitionClassNames:V}=(0,u.Z)(Boolean(F||Y),void 0,void 0,"slow"),{isContextMenuOpen:K,contextMenuPosition:H,handleBeforeContextMenu:W,handleContextMenu:q,handleContextMenuClose:J,handleContextMenuHide:G}=(0,v.Z)(M),Q=(0,a.I4)((()=>M.current),[]),ee=(0,a.I4)((()=>M.current.closest(".custom-scroll, .no-scrollbar")),[]),te=(0,a.I4)((()=>M.current.querySelector(".sticker-context-menu .bubble")),[]),{positionX:ne,positionY:ae,transformOriginX:re,transformOriginY:oe,style:ie}=(0,f.Z)(H,Q,ee,te);(0,a.d4)((()=>{R||X()}),[X,R]),(0,a.d4)((()=>{if(!_||!M.current)return;const e=M.current.querySelector("video");e&&(z?(0,s.Z)(e):e.pause())}),[_,z]),(0,a.d4)((()=>{A||J()}),[J,A]);const se=(0,a.I4)((e=>{e.stopPropagation(),e.preventDefault(),T(t)}),[T,t]),le=(0,a.I4)((()=>{T(t)}),[T,t]),ce=(0,a.I4)((()=>{S(t)}),[S,t]),de=(0,a.I4)((()=>{null==I||I(b,!0)}),[b,I]),ue=(0,a.I4)((()=>{null==I||I(b,void 0,!0)}),[b,I]),me=(0,o.Z)("StickerButton",I&&"interactive",$,C),he=!O||Y||z?"":`background-image: url('${O}');`;return a.ZP.createElement("div",{ref:M,className:me,title:y||(null==t?void 0:t.emoji),style:he,"data-sticker-id":t.id,onMouseDown:e=>{(0,i.b)(e),W(e)},onClick:()=>{K||null==I||I(b)},onContextMenu:q},!Y&&!z&&a.ZP.createElement("img",{src:F,className:V}),_&&a.ZP.createElement("video",{className:V,src:j,autoPlay:z,loop:!0,playsInline:!0,muted:!0}),R&&D&&a.ZP.createElement(p.Z,{id:L,animationData:D,play:!0,size:n,isLowPriority:!0,onLoad:U}),!l.$b&&T&&a.ZP.createElement(g.Z,{className:"sticker-unfave-button",color:"dark",round:!0,onClick:se},a.ZP.createElement("i",{className:"icon-close"})),!N&&I&&void 0!==H&&a.ZP.createElement(Z.Z,{isOpen:K,transformOriginX:re,transformOriginY:oe,positionX:ne,positionY:ae,style:ie,className:"sticker-context-menu",autoClose:!0,onClose:J,onCloseAnimationEnd:G},T&&a.ZP.createElement(E.Z,{icon:"favorite",onClick:le},x("Stickers.RemoveFromFavorites")),S&&a.ZP.createElement(E.Z,{icon:"favorite",onClick:ce},x("AddToFavorites")),!k&&a.ZP.createElement(E.Z,{onClick:de,icon:"muted"},x("SendWithoutSound")),a.ZP.createElement(E.Z,{onClick:ue,icon:"calendar"},x(k?"SetReminder":"ScheduleMessage"))))}))},4851:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9203),o=n(8778);const i=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,o.Z)(r.gl.Extra,"StickerSetModal",!t);return n?a.ZP.createElement(n,e):void 0}))},8729:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(4050),r=n(3555),o=n(1192),i=n(5806),s=n(2340),l=n(9107),c=n(8780);const d=(0,a.X$)((0,r.c$)(((e,t)=>{let{typingStatus:n}=t;return n.userId?{typingUser:(0,o.dy)(e,n.userId)}:{}}))((e=>{let{typingStatus:t,typingUser:n}=e;const r=(0,l.Z)(),o=n&&!n.isSelf&&(0,i.Vl)(n),d=r(t.action).replace("{user}","").replace("{emoji}",t.emoji).trim();return a.ZP.createElement("p",{className:"typing-status",dir:r.isRtl?"rtl":"auto"},o&&a.ZP.createElement("span",{className:"sender-name",dir:"auto"},(0,s.Z)(o)),a.ZP.createElement(c.Z,{content:d}))})))},9411:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050);const r={__html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z" style="fill: var(--color-fill)"/><path class="lol" d="M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z" style="fill: var(--color-checkmark)"/></svg>'},o=()=>a.ZP.createElement("span",{className:"VerifiedIcon",dangerouslySetInnerHTML:r})},5418:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(4050),r=n(5806),o=n(6752),i=n(8035),s=n(2340),l=n(790),c=n(9107),d=n(996),u=n(3709),m=n(8033),h=n(88);const v=(0,a.X$)((e=>{let{message:t,senderTitle:n,isProtected:v,observeIntersection:f,onMessageClick:p}=e;const g=(0,c.Z)();let Z=(0,r.s1)(t);if(!Z){const e=(0,r.T7)(t);if(e){const{url:n,domain:a}=e;Z={siteName:a.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?`mailto:${n}`:`http://${n}`,formattedDescription:(0,r.UD)(t)!==n?(0,d.e)(g,t,void 0,void 0,170):void 0}}}const E=(0,a.I4)((()=>{p(t.id,t.chatId)}),[p,t.id,t.chatId]);if(!Z)return;const{siteName:P,url:y,displayUrl:C,title:b,description:N,formattedDescription:k,photo:w,video:I}=Z,S=!n&&N&&(0,i.Z)(N,170),T=(0,o.Z)("WebLink scroll-item",!w&&!I&&"without-media");return a.ZP.createElement("div",{className:T,"data-initial":(P||C)[0],dir:g.isRtl?"rtl":void 0},w&&a.ZP.createElement(u.Z,{message:t,isProtected:v,observeIntersection:f}),a.ZP.createElement("div",{className:"content"},a.ZP.createElement(m.Z,{isRtl:g.isRtl,className:"site-title",onClick:E},(0,s.Z)(b||P||C)),(S||k)&&a.ZP.createElement(m.Z,{isRtl:g.isRtl,className:"site-description",onClick:E},k||S&&(0,s.Z)(S)),a.ZP.createElement(h.Z,{url:y,className:"site-name",text:"",isRtl:g.isRtl},y.replace("mailto:","")||C),n&&a.ZP.createElement("div",{className:"sender-name"},(0,s.Z)(n))),n&&a.ZP.createElement("div",{className:"message-date"},a.ZP.createElement(m.Z,{className:"date",onClick:E,isRtl:g.isRtl},(0,l.VX)(g,1e3*t.date))))}))},4399:(e,t,n)=>{n.d(t,{Eh:()=>E,GC:()=>P,Gw:()=>l,L6:()=>s,PA:()=>N,Rj:()=>c,W7:()=>y,Wr:()=>b,fM:()=>Z,jg:()=>k,kc:()=>p,lE:()=>C,vY:()=>d,wB:()=>u});var a=n(3716),r=n(7361),o=n(3858),i=n(5806);const s="(max-height: 640px)",l=parseInt(getComputedStyle(document.documentElement).fontSize,10),c=240,d={width:640,height:640},u="4986041492570112461",m={width:100,height:100};let h,v,f;function p(e,t,n,a){const i=t||n?1.625:0,s=function(e,t){const n=e?30:29;if(!r.wB)return n;const{width:a}=o.Z.get();return h||(h=Math.min(30,a/l-4.5)),v||(v=Math.min(29,a/l-7)),f||(f=Math.min(29,a/l-4.5)),e?h:t?f:v}(e,a)-i;return s*l}function g(e){let{width:t,height:n,fromOwnMessage:a,isForwarded:r,isWebPagePhoto:o,isGif:i,noAvatars:s}=e;const c=n/t,d=p(a,r,o,s),u=function(e,t){return e&&t&&t>=.75&&t<=1.25?20*l:27*l}(i,c),m=i?Math.max(300,t):t;return k(d,u,m,i?n*(m/t):n)}function Z(e,t){const n=window.matchMedia(s),{width:a,height:i}=o.Z.get();let c=t&&n.matches?10:8.25;return e&&!r.$b&&(c=n.matches?10:12.5),{width:a,height:i-c*l}}function E(e,t,n,a,r){const{width:o,height:s}=(0,i.HV)(e)||m;return g({width:o,height:s,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:a,noAvatars:r})}function P(e,t,n,a){const{width:r,height:o}=(0,i.jC)(e)||m;return g({width:r,height:o,fromOwnMessage:t,isForwarded:n,isGif:e.isGif,noAvatars:a})}function y(){return{width:2*l,height:2*l}}function C(e){return e?{width:3*l,height:3*l}:{width:3.375*l,height:3.375*l}}function b(e){const{width:t}=e;let{height:n}=e;e.id===u&&(n=t);const o=n&&t&&n/t,i=l*(r.wB?a.w7:a.K7),s=o?i*o:i;return o&&s>i?{width:Math.round(i/o),height:i}:{width:i,height:s}}function N(e,t){let{width:n,height:a}=e,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{width:o,height:i}=Z(t,r);return k(o,i,n,a)}function k(e,t,n,a){const r=a/n,o=Math.min(n,e);return Math.round(o*r)>t?{width:Math.round(t/r),height:t}:{width:o,height:Math.round(o*r)}}},5296:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(4050),r=n(4753),o=n(3555),i=n(6202),s=n(706),l=n(1192);const c={large:160,medium:128,small:104};function d(e,t,n,d,u,m,h,v){const{interactWithAnimatedEmoji:f,sendEmojiInteraction:p,sendWatchingEmojiInteraction:g}=(0,o.Sv)(),Z=h||v,[E,P]=(0,s.Z)(),y=(0,a.sO)(null),C=(0,a.sO)(null),b=(0,i.Z)(d?`document${d}`:void 0,!d),N=c[e],k=`width: ${N}px; height: ${N}px;`,[w,I]=(0,a.eJ)(String(Math.random())),S=(0,a.sO)(void 0),T=(0,a.sO)(void 0),M=(0,a.I4)((()=>{y.current&&(p({chatId:t,messageId:n,localEffect:h,emoji:v,interactions:S.current}),T.current=void 0,S.current=void 0)}),[p,t,n,h,v]),x=(0,a.I4)((()=>{I(String(Math.random()));const e=C.current;b&&(e&&(e.pause(),e.remove()),C.current=new Audio,C.current.src=b,(0,r.Z)(C.current),C.current.addEventListener("ended",(()=>{C.current=void 0}),{once:!0}))}),[b]),L=(0,a.I4)((()=>{x();const e=y.current;if(!(Z&&e&&n&&t))return;const{x:a,y:r}=e.getBoundingClientRect();f({localEffect:h,emoji:v,x:a,y:r,startSize:N,isReversed:!m}),S.current||(S.current=[],T.current=performance.now(),setTimeout(M,1e3)),S.current.push(T.current?(performance.now()-T.current)/1e3:0)}),[t,v,Z,f,m,h,n,x,M,N]);return(0,a.d4)((()=>{const e=y.current;e&&u&&u.forEach((a=>{let{id:r,startSize:o,messageId:i}=a;if(o||n!==i)return;const{x:s,y:c}=e.getBoundingClientRect();g({id:r,chatId:t,emoticon:h?(0,l.ji)(h):v,startSize:N,x:s,y:c,isReversed:!m}),x()}))}),[u,t,v,m,h,n,x,g,N]),{playKey:w,ref:y,style:k,width:N,handleClick:L,markAnimationLoaded:P,isAnimationLoaded:E}}},742:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9203),o=n(8778);const i=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,o.Z)(r.gl.Extra,"ChatFolderModal",!t);return n?a.ZP.createElement(n,e):void 0}))},1080:(e,t,n)=>{n.d(t,{Z:()=>K});var a=n(4050),r=n(3555),o=n(3716),i=n(7361),s=n(782),l=n(6974),c=n(7204),d=n(7407),u=n(5616);let m;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(m||(m={}));var h=n(3541),v=n(1273),f=n(4288),p=n(9107),g=n(6137),Z=n(5806),E=n(1192),P=n(8005),y=n(2340),C=n(9118),b=n(6752),N=n(5790),k=n(1470),w=n(706),I=n(6202),S=n(996),T=n(172),M=n(9411),x=n(8729),L=n(6844),$=n(329),A=n(1876),O=n(2155),F=n(126);const R=(0,a.X$)((e=>{let{chat:t,isPinned:n,isMuted:r}=e;const o=Boolean(t.unreadCount||t.unreadMentionsCount||t.hasUnreadMark||n||t.unreadReactionsCount),i=Boolean(t.unreadCount||t.hasUnreadMark),s=(0,b.Z)("Badge",r&&"muted",!i&&n&&"pinned",i&&"unread");return a.ZP.createElement(F.Z,{isCustom:!0,className:"Badge-transition",isOpen:o},function(){const e=t.unreadReactionsCount&&a.ZP.createElement("div",{className:(0,b.Z)("Badge reaction",r&&"muted")},a.ZP.createElement("i",{className:"icon-heart"})),o=t.unreadMentionsCount&&a.ZP.createElement("div",{className:"Badge mention"},a.ZP.createElement("i",{className:"icon-mention"})),i=t.hasUnreadMark||t.unreadCount?a.ZP.createElement("div",{className:s},!t.hasUnreadMark&&(0,O.bi)(t.unreadCount)):void 0,l=[e,o,i,n&&!i&&!o&&!e&&a.ZP.createElement("div",{className:s},a.ZP.createElement("i",{className:"icon-pinned-chat"}))].filter(Boolean);if(0!==l.length)return 1===l.length?l[0]:a.ZP.createElement("div",{className:"Badge-wrapper"},l)}())}));var D=n(742);const B=(0,a.X$)((e=>{let{isSelected:t,isActive:n}=e;return a.ZP.createElement("div",{className:(0,b.Z)("ChatCallStatus",n&&"active",t&&!i.wB&&"selected")},a.ZP.createElement("div",{className:"indicator"},a.ZP.createElement("div",null),a.ZP.createElement("div",null),a.ZP.createElement("div",null)))}));var U=n(6534),X=n(685);const Y=(0,a.X$)((0,r.c$)(((e,t)=>{var n;let{chatId:a}=t;const r=(0,E.Z1)(e,a);if(!r||!r.lastMessage)return{};const{senderId:o,replyToMessageId:i,isOutgoing:s}=r.lastMessage,l=o?(0,E.dy)(e,o):void 0,c=(0,Z.N5)(r.lastMessage),d=c&&i?(0,E.hj)(e,r.id,i):void 0,{targetUserIds:u,targetChatId:m}=c||{},h=(0,Z.zX)(r),{chatId:v,threadId:f,type:p}=(0,E.Bt)(e)||{},P=a===v&&f===g._f;return{chat:r,isMuted:(0,Z.i4)(r,(0,E.dZ)(e),(0,E.NJ)(e)),lastMessageSender:l,actionTargetUserIds:u,actionTargetChatId:m,actionTargetMessage:d,draft:(0,E.Ms)(e,a,g._f),animationLevel:e.settings.byKey.animationLevel,isSelected:P,canScrollDown:P&&"thread"===p,canChangeFolder:Boolean(null===(n=e.chatFolders.orderedIds)||void 0===n?void 0:n.length),lastSyncTime:e.lastSyncTime,...s&&{lastMessageOutgoingStatus:(0,E.dT)(e,r.lastMessage)},...h&&{user:(0,E.dy)(e,h),userStatus:(0,E.ss)(e,h)}}}))((e=>{let{style:t,chatId:n,folderId:s,orderDiff:l,animationType:c,isPinned:d,chat:u,isMuted:h,user:v,userStatus:f,actionTargetUserIds:g,lastMessageSender:E,lastMessageOutgoingStatus:O,actionTargetMessage:F,actionTargetChatId:Y,draft:_,animationLevel:j,isSelected:z,canScrollDown:V,canChangeFolder:K,lastSyncTime:H}=e;const{openChat:W,focusLastMessage:q}=(0,r.Sv)(),J=(0,a.sO)(null),[G,Q,ee]=(0,w.Z)(),[te,ne,ae]=(0,w.Z)(),[re,oe,ie]=(0,w.Z)(),[se,le,ce]=(0,w.Z)(),[de,ue,me]=(0,w.Z)(),[he,ve,fe]=(0,w.Z)(),{lastMessage:pe,typingStatus:ge}=u||{},Ze=pe&&(0,Z.Lo)(pe);(0,N.Z)(n,Ze?pe.replyToMessageId:void 0,F);const Ee=pe&&!(0,Z.bf)(pe)?(0,Z.DH)(pe):void 0,Pe=(0,I.Z)(pe?(0,Z.Ti)(pe,"micro"):void 0),ye=Boolean(pe&&(0,Z.Y5)(pe)),Ce=(0,a.Ye)((()=>{if(!g)return;const e=(0,r.Rd)().users.byId;return g.map((t=>e[t])).filter(Boolean)}),[g]);(0,a.bt)((()=>{const e=J.current;if(0!==j&&e){if(c===m.Opacity)e.style.opacity="0",(0,C.T2)((()=>{e.classList.add("animate-opacity"),e.style.opacity="1"}));else{if(c!==m.Move)return;e.style.transform=`translate3d(0, ${100*-l}%, 0)`,(0,C.T2)((()=>{e.classList.add("animate-transform"),e.style.transform=""}))}setTimeout((()=>{(0,C.T2)((()=>{e.classList.remove("animate-opacity","animate-transform"),e.style.opacity="",e.style.transform=""}))}),200+o.fK)}}),[j,l,c]);const be=(0,a.I4)((()=>{W({id:n,shouldReplaceHistory:!0}),z&&V&&q()}),[z,V,W,n,q]),Ne=(0,a.I4)((()=>{le(),Q()}),[le,Q]),ke=(0,a.I4)((()=>{ue(),ne()}),[ue,ne]),we=(0,a.I4)((()=>{ve(),oe()}),[ve,oe]),Ie=(0,k.Z)({chat:u,user:v,handleDelete:Ne,handleChatFolderChange:ke,handleReport:we,folderId:s,isPinned:d,isMuted:h,canChangeFolder:K}),Se=(0,p.Z)();if(!u)return;const Te=(0,b.Z)("Chat chat-item-clickable",(0,Z.YC)(n)?"private":"group",z&&"selected");return a.ZP.createElement(A.Z,{ref:J,className:Te,style:t,ripple:!i.wB,contextActions:Ie,onClick:be},a.ZP.createElement("div",{className:"status"},a.ZP.createElement(T.Z,{chat:u,user:v,userStatus:f,isSavedMessages:null==v?void 0:v.isSelf,lastSyncTime:H}),u.isCallActive&&u.isCallNotEmpty&&a.ZP.createElement(B,{isSelected:z,isActive:0!==j})),a.ZP.createElement("div",{className:"info"},a.ZP.createElement("div",{className:"title"},a.ZP.createElement("h3",null,(0,y.Z)((0,Z.U)(Se,u,v))),u.isVerified&&a.ZP.createElement(M.Z,null),u.fakeType&&a.ZP.createElement(X.Z,{fakeType:u.fakeType}),h&&a.ZP.createElement("i",{className:"icon-muted"}),u.lastMessage&&a.ZP.createElement(L.Z,{message:u.lastMessage,outgoingStatus:O})),a.ZP.createElement("div",{className:"subtitle"},function(){if(ge&&pe&&ge.timestamp>1e3*pe.date)return a.ZP.createElement(x.Z,{typingStatus:ge});if(null!=_&&_.text.length)return a.ZP.createElement("p",{className:"last-message",dir:Se.isRtl?"auto":"ltr"},a.ZP.createElement("span",{className:"draft"},Se("Draft")),(0,y.Z)(_.text));if(!pe)return;if(Ze){const e=u&&((0,Z.eA)(u)||pe.senderId===pe.chatId);return a.ZP.createElement("p",{className:"last-message",dir:Se.isRtl?"auto":"ltr"},(0,P.D)(Se,pe,e?void 0:E,e?u:void 0,Ce,F,Y,{asTextWithSpoilers:!0}))}const e=(0,Z.zF)(Se,n,E);return a.ZP.createElement("p",{className:"last-message",dir:Se.isRtl?"auto":"ltr"},e&&a.ZP.createElement(a.ZP.Fragment,null,a.ZP.createElement("span",{className:"sender-name"},(0,y.Z)(e)),a.ZP.createElement("span",{className:"colon"},":")),function(e,t,n,r){return n?a.ZP.createElement("span",{className:"media-preview"},a.ZP.createElement("img",{src:n,alt:"",className:(0,b.Z)("media-preview--image",r&&"round")}),(0,Z.b7)(t)&&a.ZP.createElement("i",{className:"icon-play"}),(0,S.e)(e,t,!0)):(0,S.e)(e,t)}(Se,pe,Pe||Ee,ye))}(),a.ZP.createElement(R,{chat:u,isPinned:d,isMuted:h}))),se&&a.ZP.createElement($.Z,{isOpen:G,onClose:ee,onCloseAnimationEnd:ce,chat:u}),de&&a.ZP.createElement(D.Z,{isOpen:te,onClose:ae,onCloseAnimationEnd:me,chatId:n}),he&&a.ZP.createElement(U.Z,{isOpen:re,onClose:ie,onCloseAnimationEnd:fe,chatId:n,subject:"peer"}))})));var _=n(1713),j=n(231),z=n(7854);const V=(0,a.X$)((0,r.c$)(((e,t)=>{let{folderId:n,folderType:a}=t;return{chatFolder:n&&"folder"===a?(0,E.Mw)(e,n):void 0,animatedEmoji:(0,E.zB)(e,"📂")}}))((e=>{let{chatFolder:t,animatedEmoji:n,foldersDispatch:r,onScreenSelect:o}=e;const s=(0,p.Z)(),l=(0,a.I4)((()=>{r({type:"editFolder",payload:t}),o(_.MT.FoldersEditFolderFromChatList)}),[t,r,o]);return a.ZP.createElement("div",{className:"EmptyFolder"},a.ZP.createElement("div",{className:"sticker"},n&&a.ZP.createElement(z.Z,{sticker:n})),a.ZP.createElement("h3",{className:"title",dir:"auto"},s("FilterNoChatsToDisplay")),a.ZP.createElement("p",{className:"description",dir:"auto"},s(t?"ChatList.EmptyChatListFilterText":"Chat.EmptyChat")),t&&r&&o&&a.ZP.createElement(j.Z,{ripple:!i.wB,fluid:!0,pill:!0,onClick:l,size:"smaller",isRtl:s.isRtl},a.ZP.createElement("i",{className:"icon-settings"}),s("ChatList.EmptyChatListEditFilter")))}))),K=(0,a.X$)((e=>{let{folderType:t,folderId:n,isActive:p,foldersDispatch:g,onScreenSelect:Z}=e;const{openChat:E,openNextChat:P}=(0,r.Sv)(),y="all"===t?o.Nf:"archived"===t?o.WS:n,C=(0,u.d7)(y),b=(0,a.Ye)((()=>{if(C)return C.reduce(((e,t,n)=>(e[t]=n,e)),{})}),[C]),N=(0,c.Z)(b),k=(0,a.Ye)((()=>b&&N?(0,s.Q8)(b,((e,t)=>void 0!==N[t]?e-N[t]:-1/0)):{}),[b,N]),[w,I]=(0,d.Z)(void 0,C,void 0,o.t_),S=[];p&&null!=C&&C.length&&(S.push(["alt+ArrowUp",e=>{e.preventDefault(),P({targetIndexDelta:-1,orderedIds:C})}]),S.push(["alt+ArrowDown",e=>{e.preventDefault(),P({targetIndexDelta:1,orderedIds:C})}])),(0,h.A)(S),(0,a.d4)((()=>{if(p&&C&&i.fl)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){if((i.jm&&e.metaKey||!i.jm&&e.ctrlKey)&&e.code.startsWith("Digit")){const[,t]=e.code.match(/Digit(\d)/)||[];if(!t)return;const n=Number(t)-1;if(n>C.length-1)return;E({id:C[n],shouldReplaceHistory:!0})}}}),[p,E,P,C]);const T=function(e){return(0,a.Ye)((()=>{const t=Object.values(e),n=t.filter((e=>e<0)).length,a=t.filter((e=>e>0)).length;return t=>{const r=e[t];return 0===r?m.None:r===1/0||r===-1/0||n<=a&&r<0||a<n&&r>0?m.Opacity:m.Move}}),[e])}(k);return a.ZP.createElement(v.Z,{className:"chat-list custom-scroll",items:w,preloadBackwards:o.t_,withAbsolutePositioning:!0,maxHeight:((null==C?void 0:C.length)||0)*o.rS,onLoadMore:I},null!=w&&w.length?function(){const e=C.indexOf(w[0]),t=(0,l.aE)(y)||0;return w.map(((r,i)=>a.ZP.createElement(Y,{key:r,teactOrderKey:i,chatId:r,isPinned:e+i<t,folderId:n,animationType:T(r),orderDiff:k[r],style:`top: ${(e+i)*o.rS}px;`})))}():w&&!w.length?a.ZP.createElement(V,{folderId:n,folderType:t,foldersDispatch:g,onScreenSelect:Z}):a.ZP.createElement(f.Z,{key:"loading"}))}))},91:(e,t,n)=>{n.d(t,{F:()=>r});var a=n(5806);function r(e,t,n,r){const{senderId:o}=t;if(!o)return;const i=(0,a.YC)(o)?r[o]:n[o];let s=(0,a.OU)(e,i);const l=n[t.chatId];return l&&((0,a.YC)(o)&&i.isSelf?s=`${e("FromYou")} → ${(0,a.U)(e,l)}`:(0,a.Bf)(l)&&(s+=` → ${(0,a.U)(e,l)}`)),s}},7146:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9203),o=n(8778);const i=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,o.Z)(r.gl.Extra,"CustomSendMenu",!t);return n?a.ZP.createElement(n,e):void 0}))},2420:(e,t,n)=>{n.d(t,{t:()=>m,Z:()=>h});var a=n(4050),r=n(1212),o=n(6752),i=n(1262),s=n(3989),l=n(7204),c=n(2898),d=n(706);const u=(0,a.X$)((e=>{let{isQuick:t,onFileSelect:n}=e;const[r,i,s]=(0,d.Z)(),l=(0,o.Z)("DropTarget",r&&"hovered");return a.ZP.createElement("div",{className:l,onDrop:n,onDragEnter:()=>{i()},onDragLeave:e=>{const{relatedTarget:t}=e;t&&e.stopPropagation(),s()}},a.ZP.createElement("div",{className:"target-content"},a.ZP.createElement("div",{className:"icon icon-"+(t?"photo":"document")}),a.ZP.createElement("div",{className:"title"},"Drop files here to send them"),a.ZP.createElement("div",{className:"description"},t?"in a quick way":"without compression")))}));let m;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(m||(m={}));const h=(0,a.X$)((e=>{let{isOpen:t,withQuick:n,onHide:d,onFileSelect:m}=e;const h=(0,a.sO)(null),v=(0,l.Z)(n),{shouldRender:f,transitionClassNames:p}=(0,r.Z)(t);(0,a.d4)((()=>t?(0,s.Z)(d):void 0),[t,d]);const g=(0,a.I4)((async e=>{const{dataTransfer:t}=e;let n=[];if(!(t.files&&t.files.length>0)||t.items&&t.items.length){if(t.items&&t.items.length>0){const e=await(0,i.Z)(t.items);e.length&&(n=n.concat(e))}}else n=n.concat(Array.from(t.files));d(),m(n,!1)}),[m,d]),Z=(0,a.I4)((e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(d(),m(Array.from(t.files),!0))}),[m,d]),E=(0,a.I4)((e=>{e.stopPropagation();const{target:t,relatedTarget:n}=e;t.matches(".DropTarget, .DropArea")&&!n&&(h.current=window.setTimeout((()=>{d()}),150))}),[d]);if(!f)return;const P=(0,o.Z)("DropArea",p);return a.ZP.createElement(c.Z,{containerId:"#middle-column-portals"},a.ZP.createElement("div",{className:P,onDragLeave:E,onDragOver:()=>{h.current&&window.clearTimeout(h.current)},onDrop:d},a.ZP.createElement(u,{onFileSelect:g}),(n||v)&&a.ZP.createElement(u,{onFileSelect:Z,isQuick:!0})))}))},9830:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9203),o=n(8778);const i=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,o.Z)(r.gl.Extra,"EmojiTooltip",!t);return n?a.ZP.createElement(n,e):void 0}))},3616:(e,t,n)=>{n.d(t,{Z:()=>C});var a=n(4050),r=n(3555),o=n(3716),i=n(1192),s=n(9118),l=n(5723),c=n(6752),d=n(7361),u=n(517),m=n(2645),h=n(706),v=n(8674),f=n(6389),p=n(9107),g=n(4784),Z=n(6391),E=n(2340),P=n(2087);const y=d.wB?256:416,C=(0,a.X$)((0,r.c$)(((e,t)=>{let{chatId:n,threadId:a}=t;const{messageSendKeyCombo:r}=e.settings.byKey;return{messageSendKeyCombo:r,replyingToId:n&&a?(0,i.Yy)(e,n,a):void 0,noTabCapture:e.pollModal.isOpen||e.payment.isPaymentModalOpen}}))((e=>{let{id:t,chatId:n,threadId:i,isAttachmentModalInput:C,editableInputId:b,html:N,placeholder:k,forcedPlaceholder:w,canAutoFocus:I,shouldSuppressFocus:S,shouldSuppressTextFormatter:T,replyingToId:M,noTabCapture:x,messageSendKeyCombo:L,onUpdate:$,onSuppressedFocus:A,onSend:O}=e;const{editLastMessage:F,replyToNextMessage:R}=(0,r.Sv)(),D=(0,a.sO)(null),B=(0,a.sO)(null),U=(0,p.Z)(),X=(0,a.sO)(!1),[Y,_,j]=(0,h.Z)(),[z,V]=(0,a.eJ)(),[K,H]=(0,a.eJ)(),W=(0,f.Z)(n,i);(0,a.d4)((()=>{C&&ee(!1)}),[C]),(0,m.Z)((e=>{let[t]=e;N!==D.current.innerHTML&&(D.current.innerHTML=N),N!==B.current.innerHTML&&(B.current.innerHTML=N),void 0!==t&&t!==N&&ee(!N.length)}),[N]),(0,a.sO)(n).current=n;const q=(0,a.I4)((()=>{D.current&&((0,v.zG)()?setTimeout(q,350):(0,l.Z)(D.current))}),[]),J=(0,a.I4)((()=>{j(),function(){const e=window.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}()}),[j]);function G(){if(d.cj)return!1;const e=window.getSelection();if(!e||!e.rangeCount||X.current)return j(),!1;const t=e.getRangeAt(0),n=t.toString().trim();return!(T||!(0,Z.R)(t,b||o.R2)||!n||(0,g.Z)(n)||!t.START_TO_END)||(j(),!1)}function Q(){if(!G())return;const e=window.getSelection().getRangeAt(0),t=e.getBoundingClientRect(),n=D.current.getBoundingClientRect();let a=t.left+t.width/2-n.left;a<90?a=90:a>n.width-90&&(a=n.width-90),V({x:a,y:t.top-n.top}),H(e),_()}function ee(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=D.current,n=B.current,a=Number(t.style.height.replace("px","")),r=Math.min(n.scrollHeight,y);if(r===a)return;const o=Math.round(50*Math.log(Math.abs(r-a))),i=()=>{t.style.height=`${r}px`,t.style.transitionDuration=`${o}ms`,t.classList.toggle("overflown",n.scrollHeight>y)};e?requestAnimationFrame(i):i()}(0,a.d4)((()=>{d.$b||I&&q()}),[n,q,M,I]),(0,a.d4)((()=>{if(x)return;const e=(0,s.Ds)((e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(q))}),2e3,!0,!1);return(0,u.Z)({onTab:e})}),[q,x]),(0,a.d4)((()=>{const e=D.current;function t(){e.blur()}return S&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}}),[S]);const te=(0,c.Z)("form-control custom-scroll",N.length>0&&"touched",S&&"focus-disabled");return a.ZP.createElement("div",{id:t,onClick:S?A:void 0,dir:U.isRtl?"rtl":void 0},a.ZP.createElement("div",{ref:D,id:b||o.R2,className:te,contentEditable:!0,dir:"auto",onClick:q,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if($("<br>"===t?"":t),W({type:"typing"}),!d.$b&&(!n||!n.length)&&(d.op||!t.includes("emoji-small"))){const e=window.getSelection();e&&(D.current.blur(),e.removeAllRanges(),(0,l.Z)(D.current,!0))}},onKeyDown:function(e){if(!N.length&&(e.metaKey||e.ctrlKey)){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(t)return e.preventDefault(),void R({targetIndexDelta:t})}"Enter"!==e.key||e.shiftKey?"ArrowUp"!==e.key||N.length||e.metaKey||e.ctrlKey||e.altKey?e.target.addEventListener("keyup",(function t(){Q(),e.target.removeEventListener("keyup",t)})):(e.preventDefault(),F()):d.cj||d.wZ||!("enter"===L&&!e.shiftKey||"ctrl-enter"===L&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),j(),O())},onMouseDown:function(e){2===e.button?!0!==X.current&&(X.current=!0,document.addEventListener("mousedown",(function e(){setTimeout((()=>{X.current=!1}),100),window.removeEventListener("mouseup",e)})),document.addEventListener("keydown",(function e(t){"Esc"!==t.key&&"Escape"!==t.key||(setTimeout((()=>{X.current=!1}),100),window.removeEventListener("keydown",e))}))):e.target.addEventListener("mouseup",(function t(){Q(),e.target.removeEventListener("mouseup",t)}))},onContextMenu:d.wZ?function(e){G()&&(e.preventDefault(),e.stopPropagation())}:void 0,onTouchCancel:d.wZ?Q:void 0,"aria-label":k}),a.ZP.createElement("div",{ref:B,className:(0,c.Z)(te,"clone"),dir:"auto"}),!w&&a.ZP.createElement("span",{className:"placeholder-text",dir:"auto"},k),a.ZP.createElement(P.Z,{isOpen:Y,anchorPosition:z,selectedRange:K,setSelectedRange:H,onClose:J}),w&&a.ZP.createElement("span",{className:"forced-placeholder"},(0,E.Z)(w)))})))},2087:(e,t,n)=>{n.d(t,{Z:()=>p});var a=n(4050),r=n(6137),o=n(3716),i=n(6752),s=n(1396),l=n(3989),c=n(1212),d=n(8758),u=n(706),m=n(9107),h=n(231);const v={B:"bold",STRONG:"bold",I:"italic",EM:"italic",U:"underline",DEL:"strikethrough",CODE:"monospace",SPAN:"spoiler"},f=document.createElement("div"),p=(0,a.X$)((e=>{let{isOpen:t,anchorPosition:n,selectedRange:p,setSelectedRange:g,onClose:Z}=e;const E=(0,a.sO)(null),P=(0,a.sO)(null),{shouldRender:y,transitionClassNames:C}=(0,c.Z)(t),[b,N,k]=(0,u.Z)(),[w,I]=(0,a.eJ)(""),[S,T]=(0,a.eJ)(!1),[M,x]=(0,a.eJ)(),[L,$]=(0,a.eJ)({});(0,a.d4)((()=>t?(0,l.Z)(Z):void 0),[t,Z]),(0,d.Z)(t,E,Z),(0,a.d4)((()=>{b?P.current.focus():(I(""),T(!1))}),[b]),(0,a.d4)((()=>{y||(k(),$({}),x(void 0))}),[k,y]),(0,a.d4)((()=>{if(!t||!p)return;const e={};let{parentElement:n}=p.commonAncestorContainer;for(;n&&n.id!==o.R2;){const t=v[n.tagName];t&&(e[t]=!0),n=n.parentElement}$(e)}),[t,p,N]);const A=(0,a.I4)((()=>{if(!p)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(p))}),[p]),O=(0,a.I4)((()=>{const e=window.getSelection();e&&g(e.getRangeAt(0))}),[g]),F=(0,a.I4)((()=>{if(p)return f.innerText=p.toString(),f.innerHTML}),[p]),R=(0,a.I4)((()=>{if(p)return p.commonAncestorContainer.parentElement}),[p]);function D(){const e=P.current;if(!e)return;const{offsetWidth:t,scrollWidth:n,scrollLeft:a}=e;if(n<=t)return void x(void 0);let r="";a<n-t&&(r="mask-right"),a>0&&(r+=" mask-left"),x(r)}function B(e){if(L[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(L).some((t=>t!==e&&Boolean(L[t]))))return"disabled"}else if(L.monospace||L.strikethrough)return"disabled"}const U=(0,a.I4)((()=>{if(L.spoiler){const e=R();if(!p||!e||e.dataset.entityType!==r.Vv.Spoiler||!e.textContent)return;return e.replaceWith(e.textContent),void $((e=>({...e,spoiler:!1})))}const e=F();document.execCommand("insertHTML",!1,`<span class="spoiler" data-entity-type="${r.Vv.Spoiler}">${e}</span>`),Z()}),[R,F,Z,p,L.spoiler]),X=(0,a.I4)((()=>{$((e=>(document.execCommand(e.bold?"removeFormat":"bold"),Object.keys(e).forEach((t=>{"italic"!==t&&"underline"!==t||!Boolean(e[t])||document.execCommand(t)})),O(),{...e,bold:!e.bold})))}),[O]),Y=(0,a.I4)((()=>{document.execCommand("italic"),O(),$((e=>({...e,italic:!e.italic})))}),[O]),_=(0,a.I4)((()=>{document.execCommand("underline"),O(),$((e=>({...e,underline:!e.underline})))}),[O]),j=(0,a.I4)((()=>{if(L.strikethrough){const e=R();if(!p||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void $((e=>({...e,strikethrough:!1})))}const e=F();document.execCommand("insertHTML",!1,`<del>${e}</del>`),Z()}),[R,F,Z,p,L.strikethrough]),z=(0,a.I4)((()=>{if(L.monospace){const e=R();if(!p||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void $((e=>({...e,monospace:!1})))}const e=F();document.execCommand("insertHTML",!1,`<code class="text-entity-code" dir="auto">${e}</code>`),Z()}),[R,F,Z,p,L.monospace]),V=(0,a.I4)((()=>{const e=((0,s.X)(w)||"").split("%").map(encodeURI).join("%");if(S){const t=R();if(!t||"A"!==t.tagName)return;return t.href=e,void Z()}const t=F();A(),document.execCommand("insertHTML",!1,`<a href=${e} class="text-entity-link" dir="auto">${t}</a>`),Z()}),[R,F,S,w,Z,A]),K=(0,a.I4)((e=>{const t={k:N,b:X,u:_,i:Y,m:z,s:j,p:U}[function(e){const t="key"in e?e.key:e.code;return t.startsWith("Key")?t.slice(3).toLowerCase():t}(e)];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())}),[N,X,_,Y,z,j,U]);(0,a.d4)((()=>(t&&document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K))),[t,K]);const H=(0,m.Z)();if(!y)return;const W=(0,i.Z)("TextFormatter",C,b&&"link-control-shown"),q=(0,i.Z)("TextFormatter-link-url-confirm",Boolean(w.length)&&"shown"),J=n?`left: ${n.x}px; top: ${n.y}px;--text-formatter-left: ${n.x}px;`:"";return a.ZP.createElement("div",{ref:E,className:W,style:J,onKeyDown:function(e){"Enter"===e.key&&b&&(V(),e.preventDefault())}},a.ZP.createElement("div",{className:"TextFormatter-buttons"},a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Spoiler text",className:B("spoiler"),onClick:U},a.ZP.createElement("i",{className:"icon-eye-closed"})),a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Bold text",className:B("bold"),onClick:X},a.ZP.createElement("i",{className:"icon-bold"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Italic text",className:B("italic"),onClick:Y},a.ZP.createElement("i",{className:"icon-italic"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Underlined text",className:B("underline"),onClick:_},a.ZP.createElement("i",{className:"icon-underlined"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Strikethrough text",className:B("strikethrough"),onClick:j},a.ZP.createElement("i",{className:"icon-strikethrough"})),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:"Monospace text",className:B("monospace"),onClick:z},a.ZP.createElement("i",{className:"icon-monospace"})),a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:H("TextFormat.AddLinkTitle"),onClick:N},a.ZP.createElement("i",{className:"icon-link"}))),a.ZP.createElement("div",{className:"TextFormatter-link-control"},a.ZP.createElement("div",{className:"TextFormatter-buttons"},a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:H("Cancel"),onClick:k},a.ZP.createElement("i",{className:"icon-arrow-left"})),a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement("div",{className:(0,i.Z)("TextFormatter-link-url-input-wrapper",M)},a.ZP.createElement("input",{ref:P,className:"TextFormatter-link-url-input",type:"text",value:w,placeholder:"Enter URL...",autoComplete:"off",inputMode:"url",dir:"auto",onChange:function(e){I(e.target.value),D()},onScroll:D})),a.ZP.createElement("div",{className:q},a.ZP.createElement("div",{className:"TextFormatter-divider"}),a.ZP.createElement(h.Z,{color:"translucent",ariaLabel:H("Save"),className:"color-primary",onClick:V},a.ZP.createElement("i",{className:"icon-check"}))))))}))},1262:(e,t,n)=>{async function a(e){const t=[];function n(e,a){return new Promise((r=>{if(e instanceof File)t.push(e),r(e);else if(e.isFile){const n=a.getAsFile();e.file((e=>{t.push(e),r(e)}),(()=>{n&&t.push(n),r(n)}))}else e.isDirectory&&e.createReader().readEntries((e=>{const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r],a));r(Promise.all(t))}))}))}const a=[];for(let t=0;t<e.length;t++){const r=e[t];if("file"===r.kind){const e=r.webkitGetAsEntry()||r.getAsFile();e&&a.push(n(e,r))}}return await Promise.all(a),t}n.d(t,{Z:()=>a})},2400:(e,t,n)=>{n.d(t,{_:()=>s});const a=/(<br>|<br\s?\/>)/g,r=/( |\u00A0)/g,o=/(<div>|<\/div>)/gi,i=/\n$/i;function s(e){return e.replace(r," ").replace(a,"\n").replace(o,"").replace(i,"")}},6391:(e,t,n)=>{function a(e,t){const{commonAncestorContainer:n}=e;let a=n,r=1;for(;a&&a.id!==t&&r<5;)a=a.parentElement,r++;return Boolean(a&&a.id===t)}n.d(t,{R:()=>a})},3575:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(4050),r=n(3716),o=n(735),i=n(2400),s=n(4284),l=n(5723),c=n(782);const d=new WeakMap;function u(e){return function(){const t=d.get(e);for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];if(t&&(0,c.et)(t.lastArgs,a))return t.lastResult;const o=e(...a);return d.set(e,{lastArgs:a,lastResult:o}),o}}var m=n(706),h=n(2340);let v,f,p,g;const Z=u((function(e,t,n){return e&&t.length?Object.values((0,c.q0)(e,t)).slice(0,n):o.D})),E=u((function(e,t,n){const a=Object.values(e),r=(0,c.ee)(a,"native"),o=t?(0,c.Q8)(t,(e=>Object.values((0,c.q0)(r,e)))):{},i=n?(0,c.Q8)(n,(e=>Object.values((0,c.q0)(r,e)))):{},s={...o,...i},l=[].concat(Object.keys(o),Object.keys(i)),d=a.reduce(((e,t)=>(t.names.forEach((n=>{e[n]||(e[n]=[]),e[n].push(t)})),e)),{});return{byKeyword:s,keywords:l,byName:d,names:Object.keys(d)}})),P=u((function(e,t,n){const{byKeyword:a,keywords:r,byName:i,names:s}=e;let l=o.D;const d=r.filter((e=>e.startsWith(t))).sort();l=l.concat((0,c.xH)(Object.values((0,c.q0)(a,d))));const u=s.filter((e=>e.startsWith(t)));return l=l.concat((0,c.xH)(Object.values((0,c.q0)(i,u)))),l=(0,c.Tw)(l),l.slice(0,n)}));try{g=/(^|\s):[-+_:\p{L}\p{N}]*$/giu}catch(e){g=/(^|\s):[-+_:\d\wа-яё]*$/gi}function y(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.R2,s=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,d=arguments.length>6?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const[v,f,g]=(0,m.Z)(),[y,N]=(0,a.eJ)(),[k,w]=(0,a.eJ)(!1),[I,S]=(0,a.eJ)(o.D);(0,a.d4)((()=>{if(u)return;const e=()=>{N(p.emojis)};p?e():b().then(e)}),[u]);const T=t.current;(0,a.d4)((()=>{if(!e||!T||!y||u)return void g();const t=T.includes(":")&&C(T);if(!t)return S(o.D),void g();const a=t.length>2&&t.endsWith(":"),r=t.substr(1,a?t.length-2:void 0);let i=o.D;if(w(a),r){if(r.length>=2){const e=E(y,c,d);i=P(e,r,36)}}else i=Z(y,n,36);i.length?(a||f(),S(i)):g()}),[y,T,e,f,n,g,w,u,c,d]);const M=(0,a.I4)(((e,n)=>{const a=t.current,o=a.lastIndexOf(":",n?a.lastIndexOf(":")-1:void 0);if(-1!==o){let t;s(`${a.substr(0,o)}${(0,h.Z)(e,["emoji_html"])}`),t=i===r.R2?document.querySelector(r.Ed):document.getElementById(i),requestAnimationFrame((()=>{(0,l.Z)(t,!0,!0)}))}g()}),[t,i,s,g]);return(0,a.d4)((()=>{v&&k&&I.length&&M(I[0].native,!0)}),[I,M,v,k]),{isEmojiTooltipOpen:v,closeEmojiTooltip:g,filteredEmojis:I,insertEmoji:M}}function C(e){const t=(0,i._)(e).match(g);return t?t[0].trim():void 0}async function b(){return v||(v=n.e(501).then(n.t.bind(n,7501,19)),f=(await v).default,p=(0,s.NM)(f)),v}},9295:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(4050),r=n(3555),o=n(6137),i=n(3716),s=n(5806),l=n(2400),c=n(5723),d=n(706),u=n(782);const m=(0,n(9118).P2)((e=>e()),500,!0);let h;try{h=/(^|\s)@[-_\p{L}\p{M}\p{N}]*$/giu}catch(e){h=/(^|\s)@[-_\d\wа-яё]*$/gi}function v(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i.R2,h=arguments.length>4?arguments[4]:void 0,v=arguments.length>5?arguments[5]:void 0,g=arguments.length>6?arguments[6]:void 0;const[Z,E,P]=(0,d.Z)(),[y,C]=(0,a.eJ)(),b=(0,a.I4)(((e,t)=>{const n=(0,r.Rd)().users.byId;(h||v)&&n?m((()=>{const a=null==h?void 0:h.reduce(((e,t)=>(t.userId!==g&&e.push(t.userId),e)),[]),r=(0,s.kK)((0,u.Tw)([...t&&v||[],...a||[]]),n,e);C(Object.values((0,u.q0)(n,r)))})):C(void 0)}),[g,h,v]),N=t.current;(0,a.d4)((()=>{if(!e||!N.length)return void P();const t=N.includes("@")&&f(N);if(t){const e=t?t.substr(1):"";b(e,p(N))}else P()}),[e,b,E,P,N]),(0,a.d4)((()=>{null!=y&&y.length?E():P()}),[E,P,y]);const k=(0,a.I4)((function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e.username&&!(0,s.Vl)(e))return;const r=e.username?`@${e.username}`:`<a\n class="text-entity-link"\n data-entity-type="${o.Vv.MentionName}"\n data-user-id="${e.id}"\n contenteditable="false"\n dir="auto"\n >${(0,s.Vl)(e)}</a>`,i=t.current,d=i.lastIndexOf("@");if(-1!==d){n(`${i.substr(0,d)}${r} `);const e=document.getElementById(l);requestAnimationFrame((()=>{(0,c.Z)(e,a)}))}P()}),[t,l,n,P]);return{isMentionTooltipOpen:Z,closeMentionTooltip:P,insertMention:k,mentionFilteredUsers:y}}function f(e){const t=(0,l._)(e).match(h);return t?t[0].trim():void 0}function p(e){return e.startsWith("@")}},7891:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9290),o=n(5326);function i(e,t){const n=void 0===t,i=(0,a.sO)(n),s=(0,a.sO)(),l=(0,o.Z)();return(0,r.Z)((()=>{n||(i.current=!1,s.current&&(clearTimeout(s.current),s.current=void 0))}),e),(0,a.d4)((()=>{if(n||i.current)return;const e=()=>{i.current=!0,l()};t>0?s.current=window.setTimeout(e,t):e()}),e),i.current}},1218:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(4605);const o=(0,a.X$)((e=>{let{id:t,options:n,selected:o=[],disabled:i,round:s,loadingOptions:l,onChange:c}=e;const[d,u]=(0,a.eJ)(o||[]),m=(0,a.I4)((e=>{const{value:t,checked:n}=e.currentTarget;let a;a=n?[...d,t]:d.filter((e=>e!==t)),u(a),c(a)}),[c,d]);return a.ZP.createElement("div",{id:t,className:"radio-group"},n.map((e=>a.ZP.createElement(r.Z,{label:e.label,subLabel:e.subLabel,value:e.value,checked:-1!==o.indexOf(e.value),disabled:i,round:s,isLoading:l?-1!==l.indexOf(e.value):void 0,onChange:m}))))}))},7551:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(4050),r=n(9107),o=n(2313),i=n(3103),s=n(231);const l=(0,a.X$)((e=>{let{isOpen:t,onClose:n,onCloseAnimationEnd:l,title:c,header:d,text:u,textParts:m,confirmLabel:h="Confirm",confirmHandler:v,confirmIsDestructive:f,isButtonsInOneRow:p,children:g}=e;const Z=(0,r.Z)(),E=(0,a.sO)(null),P=(0,a.I4)((e=>{-1===e&&v()}),[v]),y=(0,o.Z)(E,t,P,".Button");return a.ZP.createElement(i.Z,{className:"confirm",title:c,header:d,isOpen:t,onClose:n,onCloseAnimationEnd:l},u&&u.split("\\n").map((e=>a.ZP.createElement("p",null,e))),m||g,a.ZP.createElement("div",{className:p?"dialog-buttons mt-2":"",ref:E,onKeyDown:y},a.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:v,color:f?"danger":"primary"},h),a.ZP.createElement(s.Z,{className:"confirm-dialog-button",isText:!0,onClick:n},Z("Cancel"))))}))},1151:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(6752),o=n(231);const i=e=>{let{isShown:t,className:n,color:i="primary",ariaLabel:s,disabled:l,onClick:c,children:d}=e;const u=(0,r.Z)("FloatingActionButton",t&&"revealed",n);return a.ZP.createElement(o.Z,{className:u,color:i,round:!0,disabled:l,onClick:t&&!l?c:void 0,ariaLabel:s,tabIndex:-1},d)}},1876:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(4050),r=n(7361),o=n(9118),i=n(6752),s=n(7240),l=n(3394),c=n(706),d=n(9107),u=n(8512),m=n(2328),h=n(8964),v=n(231);const f=e=>{let{ref:t,buttonRef:n,icon:f,secondaryIcon:p,className:g,style:Z,children:E,disabled:P,ripple:y,narrow:C,inactive:b,focus:N,destructive:k,multiline:w,isStatic:I,contextActions:S,onMouseDown:T,onClick:M,onSecondaryIconClick:x}=e,L=(0,a.sO)(null);t&&(L=t);const[$,A,O]=(0,c.Z)(),{isContextMenuOpen:F,contextMenuPosition:R,handleBeforeContextMenu:D,handleContextMenu:B,handleContextMenuClose:U,handleContextMenuHide:X}=(0,s.Z)(L,!S),Y=(0,a.I4)((()=>L.current),[]),_=(0,a.I4)((()=>L.current.closest(".custom-scroll")),[]),j=(0,a.I4)((()=>L.current.querySelector(".ListItem-context-menu .bubble")),[]),{positionX:z,positionY:V,transformOriginX:K,transformOriginY:H,style:W}=(0,l.Z)(R,Y,_,j),q=(0,a.I4)((e=>{!P&&M&&(M(e),r.$b&&!y&&(A(),(0,o.T2)(O)))}),[P,A,M,y,O]),J=e=>{P||0!==e.button||!x&&!S||(e.stopPropagation(),x?x(e):B(e))},G=(0,a.I4)((e=>{b||r.$b||(!S||2!==e.button&&M||D(e),0===e.button&&(M?q(e):B(e)))}),[b,S,M,D,B,q]),Q=(0,d.Z)(),ee=(0,i.Z)("ListItem",g,!I&&"no-selection",y&&"has-ripple",C&&"narrow",P&&"disabled",b&&"inactive",R&&"has-menu-open",N&&"focus",k&&"destructive",w&&"multiline",I&&"is-static");return a.ZP.createElement("div",{ref:L,className:ee,dir:Q.isRtl?"rtl":void 0,style:Z,onMouseDown:T},a.ZP.createElement("div",{className:(0,i.Z)("ListItem-button",$&&"active"),role:I?void 0:"button",ref:n,tabIndex:I?void 0:0,onClick:!b&&r.$b?q:void 0,onMouseDown:G,onContextMenu:!b&&S?B:void 0},f&&a.ZP.createElement("i",{className:`icon-${f}`}),w&&a.ZP.createElement("div",{className:"multiline-item"},E),!w&&E,!P&&!b&&y&&a.ZP.createElement(u.Z,null),p&&a.ZP.createElement(v.Z,{className:"secondary-icon",round:!0,color:"translucent",size:"smaller",onClick:r.$b?J:void 0,onMouseDown:r.$b?void 0:J},a.ZP.createElement("i",{className:`icon-${p}`}))),S&&void 0!==R&&a.ZP.createElement(m.Z,{isOpen:F,transformOriginX:K,transformOriginY:H,positionX:z,positionY:V,style:W,className:"ListItem-context-menu",autoClose:!0,onClose:U,onCloseAnimationEnd:X},S.map((e=>a.ZP.createElement(h.Z,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title)))))}},6937:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(4050),r=n(3716),o=n(1212),i=n(6752),s=n(3989),l=n(2898);const c=3e3,d=e=>{let{message:t,duration:n=c,containerId:d,onDismiss:u}=e;const[m,h]=(0,a.eJ)(!0),v=(0,a.sO)(null),{transitionClassNames:f}=(0,o.Z)(m),p=(0,a.I4)((()=>{h(!1),setTimeout(u,150+r.fK)}),[u]);(0,a.d4)((()=>m?(0,s.Z)(p):void 0),[m,p]),(0,a.d4)((()=>(v.current=window.setTimeout(p,n),()=>{v.current&&(clearTimeout(v.current),v.current=void 0)})),[n,p]);const g=(0,a.I4)((()=>{v.current&&(clearTimeout(v.current),v.current=void 0)}),[]),Z=(0,a.I4)((()=>{v.current=window.setTimeout(p,n)}),[n,p]);return a.ZP.createElement(l.Z,{className:"Notification-container",containerId:d},a.ZP.createElement("div",{className:(0,i.Z)("Notification",f),onClick:p,onMouseEnter:g,onMouseLeave:Z},a.ZP.createElement("div",{className:"content"},t)))}},9196:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(6752);const o={s:22,m:25,l:28,xl:20},i=(0,a.X$)((e=>{let{progress:t=0,size:n="l",square:i,transparent:s,noCross:l,onClick:c}=e;const d=o[n],u=d-4,m=d-1,h=2*u*Math.PI,v=(0,a.sO)(null);(0,a.d4)((()=>{if(!v.current)return;const e=v.current.firstElementChild,n=h-Math.min(Math.max(.05,t),1)*h;e?e.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):v.current.innerHTML=`<svg\n viewBox="0 0 ${2*m} ${2*m}"\n height="${2*m}"\n width="${2*m}"\n >\n <circle\n stroke="white"\n fill="transparent"\n stroke-width=2\n stroke-dasharray="${h} ${h}"}\n stroke-dashoffset="${n}"\n stroke-linecap="round"\n r=${u}\n cx=${m}\n cy=${m}\n />\n </svg>`}),[v,h,m,u,t]);const f=(0,r.Z)(`ProgressSpinner size-${n}`,s&&"transparent",i&&"square",l&&"no-cross");return a.ZP.createElement("div",{ref:v,className:f,onClick:c})}))},4434:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(4050),r=n(6752),o=n(9107),i=n(9204);const s=(0,a.X$)((e=>{let{id:t,label:n,subLabel:s,value:l,name:c,checked:d,disabled:u,hidden:m,isLoading:h,onChange:v}=e;const f=(0,o.Z)(),p=(0,r.Z)("Radio",u&&"disabled",m&&"hidden-widget",h&&"loading");return a.ZP.createElement("label",{className:p,dir:f.isRtl?"rtl":void 0},a.ZP.createElement("input",{type:"radio",name:c,value:l,id:t,checked:d,onChange:v,disabled:u||m}),a.ZP.createElement("div",{className:"Radio-main"},a.ZP.createElement("span",{className:"label",dir:f.isRtl?"auto":void 0},n),s&&a.ZP.createElement("span",{className:"subLabel",dir:f.isRtl?"auto":void 0},s)),h&&a.ZP.createElement(i.Z,null))})),l=(0,a.X$)((e=>{let{id:t,name:n,options:r,selected:o,disabled:i,loadingOption:l,onChange:c}=e;const d=(0,a.I4)((e=>{const{value:t}=e.currentTarget;c(t)}),[c]);return a.ZP.createElement("div",{id:t,className:"radio-group"},r.map((e=>a.ZP.createElement(s,{name:n,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===o,hidden:e.hidden,disabled:i,isLoading:l?l===e.value:void 0,onChange:d}))))}))},8051:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(6752),o=n(9107);const i=(0,a.X$)((e=>{let{options:t,min:n=0,max:i=(t?t.length-1:100),step:s=1,label:l,value:c,disabled:d,bold:u,className:m,renderValue:h,onChange:v}=e;const f=(0,o.Z)(),p=(0,a.I4)((e=>{v(Number(e.currentTarget.value))}),[v]),g=(0,r.Z)(m,"RangeSlider",d&&"disabled",u&&"bold"),Z=(0,a.Ye)((()=>t?c/(t.length-1)*100:(c-n)/((i-n)/s)*100),[t,c,i,n,s]);return a.ZP.createElement("div",{className:g},l&&a.ZP.createElement("div",{className:"slider-top-row",dir:f.isRtl?"rtl":void 0},a.ZP.createElement("span",{className:"label",dir:"auto"},l),!t&&a.ZP.createElement("span",{className:"value",dir:"auto"},h?h(c):c)),a.ZP.createElement("div",{className:"slider-main"},a.ZP.createElement("div",{className:"slider-fill-track",style:`width: ${Z}%`}),a.ZP.createElement("input",{min:n,max:i,value:c,step:s,type:"range",className:"RangeSlider__input",onChange:p}),t&&a.ZP.createElement("div",{className:"slider-options"},t.map(((e,t)=>a.ZP.createElement("div",{className:(0,r.Z)("slider-option no-selection",t===c&&"active"),onClick:()=>v(t)},e))))))}))},9589:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(4050),r=n(6752),o=n(706),i=n(9107),s=n(2515),l=n(4288),c=n(231),d=n(126);const u=(0,a.X$)((e=>{let{ref:t,children:n,parentContainerClassName:u,value:m,inputId:h,className:v,focused:f,isLoading:p,spinnerColor:g,spinnerBackgroundColor:Z,placeholder:E,disabled:P,autoComplete:y,canClose:C,autoFocusSearch:b,onChange:N,onReset:k,onFocus:w,onBlur:I,onSpinnerClick:S}=e,T=(0,a.sO)(null);t&&(T=t);const[M,x,L]=(0,o.Z)(f);(0,s.Z)(T,b,L),(0,a.d4)((()=>{T.current&&(f?T.current.focus():T.current.blur())}),[f,E]);const $=(0,i.Z)(),A=(0,a.I4)((e=>{if("ArrowDown"===e.key||"Enter"===e.key){const e=document.querySelector(`.${u} .ListItem-button`);e&&e.focus()}}),[u]);return a.ZP.createElement("div",{className:(0,r.Z)("SearchInput",v,M&&"has-focus"),dir:$.isRtl?"rtl":void 0},n,a.ZP.createElement("input",{ref:T,id:h,type:"text",dir:"auto",placeholder:E||$("Search"),className:"form-control",value:m,disabled:P,autoComplete:y,onChange:function(e){const{currentTarget:t}=e;N(t.value)},onFocus:function(){x(),w&&w()},onBlur:function(){L(),I&&I()},onKeyDown:A}),a.ZP.createElement("i",{className:"icon-search"}),a.ZP.createElement(d.Z,{isOpen:Boolean(p),className:"slow"},a.ZP.createElement(l.Z,{color:g,backgroundColor:Z,onClick:S})),!p&&(m||C)&&k&&a.ZP.createElement(c.Z,{round:!0,size:"tiny",color:"translucent",onClick:k},a.ZP.createElement("span",{className:"icon-close"})))}))},126:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(4050),r=n(1212),o=n(7204),i=n(6752);const s=e=>{let{isOpen:t,isCustom:n,id:s,className:l,onClick:c,children:d}=e;const{shouldRender:u,transitionClassNames:m}=(0,r.Z)(t,void 0,void 0,!n&&void 0),h=(0,o.Z)(t),v=(0,o.Z)(d),f=(0,a.sO)();return h&&!t&&(f.current=v),u&&a.ZP.createElement("div",{id:s,className:(0,i.Z)(l,m),onClick:c},t?d:f.current)}},3321:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(6752);const o=(0,a.X$)((e=>{let{id:t,name:n,value:o,label:i,checked:s=!1,disabled:l,inactive:c,noAnimation:d,onChange:u,onCheck:m}=e;const h=(0,a.I4)((e=>{u&&u(e),m&&m(e.currentTarget.checked)}),[u,m]),v=(0,r.Z)("Switcher",l&&"disabled",c&&"inactive",d&&"no-animation");return a.ZP.createElement("label",{className:v,title:i},a.ZP.createElement("input",{type:"checkbox",id:t,name:n,value:o,checked:s,disabled:l,onChange:h}),a.ZP.createElement("span",{className:"widget"}))}))},3133:(e,t,n)=>{n.d(t,{Z:()=>f});var a=n(4050),r=n(7361),o=n(1367),i=n(7204),s=n(8781),l=n(9107),c=n(6752),d=n(2972),u=n(2340);const m="Tab--active",h=(0,a.X$)((e=>{let{className:t,title:n,isActive:r,badgeCount:o,isBadgeActive:i,previousActiveTab:s,onClick:l,clickArg:h}=e;const v=(0,a.sO)(null);return(0,a.d4)((()=>{if(r&&void 0===s&&v.current&&v.current.classList.add(m),!r||void 0===s)return;const e=v.current,t=e.parentElement.children[s];if(!t)return;const n=e.querySelector("i"),a=t.querySelector("i"),o=a.parentElement.offsetLeft-n.parentElement.offsetLeft,i=a.clientWidth/n.clientWidth;a.classList.remove("animate"),n.classList.remove("animate"),n.style.transform=`translate3d(${o}px, 0, 0) scale3d(${i}, 1, 1)`,(0,d.Z)(n),n.classList.add("animate"),n.style.transform="none",t.classList.remove(m),e.classList.add(m)}),[r,s]),a.ZP.createElement("div",{className:(0,c.Z)("Tab",t),onClick:()=>l(h),ref:v},a.ZP.createElement("span",null,(0,u.Z)(n),Boolean(o)&&a.ZP.createElement("span",{className:(0,c.Z)("badge",i&&"Tab__badge--active")},o),a.ZP.createElement("i",null)))})),v=r.cj?450:r.wZ?400:300,f=(0,a.X$)((e=>{let{tabs:t,activeTab:n,big:r,onSwitchTab:c}=e;const d=(0,a.sO)(null),u=(0,i.Z)(n);(0,s.Z)(d.current),(0,a.d4)((()=>{const e=d.current,{scrollWidth:t,offsetWidth:a,scrollLeft:r}=e;if(t<=a)return;const i=e.childNodes[n];if(!i)return;const{offsetLeft:s,offsetWidth:l}=i,c=s-a/2+l/2;Math.abs(c-r)<16||(0,o.Z)(e,c,v)}),[n]);const m=(0,l.Z)();return a.ZP.createElement("div",{className:"TabList no-selection no-scrollbar "+(r?"big":""),ref:d,dir:m.isRtl?"rtl":void 0},t.map(((e,t)=>a.ZP.createElement(h,{key:e.title,title:m(e.title),isActive:t===n,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:u,onClick:c,clickArg:t}))))}))},2255:(e,t,n)=>{n.d(t,{Z:()=>h});var a=n(4050),r=n(3555),o=n(3716),i=n(6752),s=n(2972),l=n(1279),c=n(5326),d=n(7204),u=n(8674);const m="Transition__slide--active",h=e=>{let{ref:t,activeKey:n,name:h,direction:v="auto",renderCount:f,shouldRestoreHeight:p,shouldCleanup:g,cleanupExceptionKey:Z,id:E,className:P,onStart:y,onStop:C,children:b}=e;const{animationLevel:N}=(0,r.Rd)().settings.byKey,k=(0,a.sO)();let w=(0,a.sO)(null);t&&(w=t);const I=(0,a.sO)({}),S=(0,d.Z)(n),T=(0,c.Z)(),M=void 0!==S&&n!==S;!f&&M&&(I.current={[S]:I.current[S]}),I.current[n]=b,(0,a.bt)((()=>{function e(){if(!g)return;const e=void 0!==Z?I.current[Z]:void 0;I.current=e?{[Z]:e}:{},T()}const t=w.current,a=t.children;if(1===a.length&&!M)return h.startsWith("slide-optimized")&&(a[0].style.transition="none",a[0].style.transform="translate3d(0, 0, 0)"),void a[0].classList.add(m);const r=Array.from(t.childNodes);if(!M||!r.length)return;k.current=n;const i=-1===v||"auto"===v&&S>n||"inverse"===v&&S<n,c=Object.keys(I.current).map(Number),d=f?S:c.indexOf(S),E=f?n:c.indexOf(n);if("slide-optimized"===h||"slide-optimized-rtl"===h)return void function(e,t,n,a,r,i,c,d,h,v,f,p){if(!p||!f)return;if(e===o.oB)return p.style.transition="none",p.style.transform="",p.classList.remove(m),f.style.transition="none",f.style.transform="translate3d(0, 0, 0)",f.classList.add(m),void a();"slide-optimized-rtl"===t&&(n=!n);const g=(0,u.YW)();requestAnimationFrame((()=>{null==h||h(),p.style.transition="none",p.style.transform="translate3d(0, 0, 0)",f.style.transition="none",f.style.transform=`translate3d(${n?"-":""}100%, 0, 0)`,(0,s.Z)(f),p.style.transition="",p.style.transform=`translate3d(${n?"":"-"}100%, 0, 0)`,f.style.transition="",f.style.transform="translate3d(0, 0, 0)",p.classList.remove(m),f.classList.add(m),(0,l.L)(p,(()=>{r===i.current&&(p.style.transition="none",p.style.transform="",d&&(f.style.height="auto",c.style.height=`${f.clientHeight}px`),null==v||v(),g(),a())}))}))}(N,h,i,e,n,k,t,p,y,C,r[E],r[d]);if(t.classList.remove("animating"),t.classList.toggle("backwards",i),"none"===h||N===o.oB)return r.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle(m,t===E))})),void e();r.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove(m),e.classList.toggle("from",t===d),e.classList.toggle("through",t>d&&t<E||t<d&&t>E),e.classList.toggle("to",t===E))}));const P=(0,u.YW)();requestAnimationFrame((()=>{var a;function o(){requestAnimationFrame((()=>{if(n===k.current){if(t.classList.remove("animating","backwards"),r.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle(m,t===E))})),p){const e=t.querySelector(`.${m}`);e&&(e.style.height="auto",t.style.height=`${e.clientHeight}px`)}null==C||C(),P(),e()}}))}t.classList.add("animating"),null==y||y();const s="mv-slide"===h?null===(a=r[E])||void 0===a?void 0:a.firstChild:"reveal"===h&&i?r[d]:r[E];s?(0,l.f)(s,o):o()}))}),[n,S,M,v,h,y,C,f,p,g,Z,N,T]),(0,a.bt)((()=>{if(p){const e=w.current,t=e.querySelector(`.${m}`)||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=`${t.clientHeight}px`,e.style.flexBasis=`${t.clientHeight}px`)}}),[p,b]);const x=I.current,L=Object.keys(f?new Array(f).fill(void 0):x).map(Number).map((e=>{const t=x[e];if(t)return a.ZP.createElement("div",{key:e,teactOrderKey:e},"function"==typeof t?t(e===n,e===S,n):t)}));return a.ZP.createElement("div",{ref:w,id:E,className:(0,i.Z)("Transition",P,h),teactFastList:!f},L)}},3455:(e,t,n)=>{n.d(t,{Yy:()=>i,ZP:()=>h,fi:()=>o,vb:()=>c});var a=n(1090),r=n(782);const o=[{icon:"user",title:"FilterContacts",key:"contacts"},{icon:"non-contacts",title:"FilterNonContacts",key:"nonContacts"},{icon:"group",title:"FilterGroups",key:"groups"},{icon:"channel",title:"FilterChannels",key:"channels"},{icon:"bots",title:"FilterBots",key:"bots"}],i=[{icon:"mute",title:"FilterMuted",key:"excludeMuted"},{icon:"archive",title:"FilterArchived",key:"excludeArchived"},{icon:"readchats",title:"FilterRead",key:"excludeRead"}],s=["includedChatIds","bots","channels","groups","contacts","nonContacts"],l=["excludedChatIds","excludeArchived","excludeMuted","excludeRead"];function c(e,t,n){let a=[],o=[];if("included"===t){const{includedChatIds:t,...i}=n?e.includeFilters||{}:(0,r.ei)(e.folder,s);a=t||[],o=Object.keys(i).filter((e=>Boolean(i[e])))}else{const{excludedChatIds:t,...i}=n?e.excludeFilters||{}:(0,r.ei)(e.folder,l);a=t||[],o=Object.keys(i).filter((e=>Boolean(i[e])))}return{selectedChatIds:a,selectedChatTypes:o}}function d(e){if(e){const{includedChatIds:t,...n}=e;if(Object.values(n).filter(Boolean).length>1||null!=t&&t.length)return"";if(n.bots)return"Bots";if(n.groups)return"Groups";if(n.channels)return"Channels";if(n.contacts)return"Contacts";if(n.nonContacts)return"Non-Contacts"}return""}const u={mode:"create",chatFilter:"",folder:{title:"",includedChatIds:[],excludedChatIds:[]}},m=(e,t)=>{switch(t.type){case"setTitle":return{...e,folder:{...e.folder,title:t.payload},isTouched:!0};case"editIncludeFilters":return{...e,includeFilters:(0,r.ei)(e.folder,s)};case"editExcludeFilters":return{...e,excludeFilters:(0,r.ei)(e.folder,l)};case"setIncludeFilters":return{...e,includeFilters:t.payload,chatFilter:""};case"setExcludeFilters":return{...e,excludeFilters:t.payload,chatFilter:""};case"saveFilters":return e.includeFilters?{...e,folder:{...(0,r.CE)(e.folder,s),title:e.folder.title?e.folder.title:d(e.includeFilters),...e.includeFilters},includeFilters:void 0,chatFilter:"",isTouched:!0}:e.excludeFilters?{...e,folder:{...(0,r.CE)(e.folder,l),...e.excludeFilters},excludeFilters:void 0,chatFilter:"",isTouched:!0}:e;case"editFolder":{const{id:e,description:n,...a}=t.payload;return{mode:"edit",folderId:e,folder:a,chatFilter:""}}case"setChatFilter":return{...e,chatFilter:t.payload};case"setIsLoading":return{...e,isLoading:t.payload};case"setError":return{...e,error:t.payload};case"reset":return u;default:return e}},h=()=>(0,a.Z)(m,u)},3186:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(4050),r=n(3555),o=n(396),i=n(274),s=n(5266),l=n(9290),c=n(4532);function d(e){let t={};if(e&&e.current){const{play:n,pause:a,setCurrentTime:o,proxy:i,requestNextTrack:s,requestPreviousTrack:l,isFirst:c,isLast:d}=e.current;t={play:()=>{n(i.src)},pause:()=>{a()},stop:()=>{a(),o(0),(0,r.Sv)().closeAudioPlayer()},seekbackward:e=>{const t=e.seekOffset||10;o(Math.max(i.currentTime-t,0))},seekforward:e=>{const t=e.seekOffset||10;o(Math.min(i.currentTime+t,i.duration))},seekTo:e=>{e.seekTime&&o(e.seekTime)}},d()||(t.nexttrack=()=>{s()}),c()||(t.previoustrack=()=>{l()})}return t}const u=function(e,t,n,u,m,h,v){let f=arguments.length>7&&void 0!==arguments[7]&&arguments[7],p=arguments.length>8?arguments[8]:void 0,g=arguments.length>9?arguments[9]:void 0,Z=arguments.length>10&&void 0!==arguments[10]&&arguments[10],E=arguments.length>11&&void 0!==arguments[11]&&arguments[11];const P=(0,a.sO)(null),[y,C]=(0,a.eJ)(!1);let b=y;const[N,k]=(0,a.eJ)(0),w=(0,a.I4)((()=>{C(!1),g&&g()}),[g]);(0,l.Z)((()=>{P.current=(0,o.z2)(e,n,((e,a)=>{var o;switch(e){case"onPlay":{const{setVolume:e,setPlaybackRate:t,toggleMuted:a,proxy:o}=P.current;C(!0),(0,c.N)(h,d(P)),(0,c.pC)("playing"),e((0,r.Rd)().audioPlayer.volume),a(Boolean((0,r.Rd)().audioPlayer.isMuted)),"voice"===n&&t((0,r.Rd)().audioPlayer.playbackRate),(0,c.NS)({duration:o.duration||0,playbackRate:o.playbackRate,position:o.currentTime});break}case"onRateChange":{const{proxy:e}=P.current;(0,c.NS)({duration:e.duration||0,playbackRate:e.playbackRate,position:e.currentTime});break}case"onPause":C(!1),(0,c.pC)("paused");break;case"onTimeUpdate":{const{proxy:e}=P.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;E||k(e.currentTime/n);break}case"onEnded":(0,c.pC)("paused")}null==m||null===(o=m[e])||void 0===o||o.call(m,a)}),p,w);const{proxy:a}=P.current;y||a.paused||(C(!0),b=!0),v&&v(a)}),[e]),(0,a.d4)((()=>{y&&h&&(0,c.Ym)(h)}),[h,y]);const{play:I,pause:S,setCurrentTime:T,proxy:M,destroy:x,setVolume:L,stop:$,isFirst:A,isLast:O,requestNextTrack:F,requestPreviousTrack:R,setPlaybackRate:D,toggleMuted:B}=P.current,U=M.duration&&Number.isFinite(M.duration)?M.duration:t;(0,a.d4)((()=>{!U||(0,s.z)(M)||E||k(M.currentTime/U)}),[U,N,M,E]),(0,a.d4)((()=>()=>{x(Z)}),[x,Z]),(0,i.Z)((e=>{let[t,n]=e;t===f&&u===n||M.src&&M.paused||f&&u&&!y&&I(u)}),[f,u,y,I,M.src,M.paused]);const X=(0,a.I4)((()=>{u&&I(u)}),[u,I]),Y=(0,a.I4)((()=>{y?S():X()}),[S,X,y]),_=(0,a.I4)((e=>{T(e),U&&k(M.currentTime/U)}),[U,M,T]);return{isPlaying:b,playProgress:N,playPause:Y,pause:S,play:X,stop:$,setCurrentTime:_,setVolume:L,audioProxy:M,duration:U,requestNextTrack:F,requestPreviousTrack:R,isFirst:A,isLast:O,setPlaybackRate:D,toggleMuted:B}}},2019:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(4050),r=n(9118),o=n(5266);function i(e,t){const n=[];for(let a=0;a<e.length;a++)n.push({start:e.start(a)/t,end:e.end(a)/t});return n}const s=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const[t,n]=(0,a.eJ)(!e),[s,l]=(0,a.eJ)(0),[c,d]=(0,a.eJ)([]),u=(0,a.Ye)((()=>(0,r.Ds)(n,200,!1,!0)),[]),m=(0,a.I4)((e=>{const t=e.currentTarget;if(!(0,o.z)(t)){if(t.buffered.length){const e=i(t.buffered,t.duration);d(e);const n=e.reduce(((e,t)=>{let{start:n,end:a}=t;return e+a-n}),0);l(n/t.duration)}u(t.readyState>=3||t.currentTime>0)}}),[u]),h={onLoadedData:m,onPlaying:m,onLoadStart:m,onPause:m,onTimeUpdate:m,onProgress:m};return{isBuffered:t,bufferedProgress:s,bufferedRanges:c,bufferingHandlers:h,checkBuffering(e){u(e.readyState>=3)}}}},5866:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(4050),r=n(6264),o=n(5326),i=n(7361);function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const s=(0,a.sO)(null),l=(0,o.Z)();return(0,a.d4)((()=>{const a=s.current;if(!e||!a||t)return;const o=new Image,l=()=>{a.width=o.width,a.height=o.height;const e=a.getContext("2d",{alpha:!1});i.vX&&(e.filter="blur(2px)"),e.drawImage(o,-4,-4,a.width+8,a.height+8),i.vX||(0,r.Z)(e,0,0,a.width,a.height,2,2)};o.onload=()=>{n?requestAnimationFrame(l):l()},o.src=e}),[s,e,l,t,n]),s}},1470:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(4050),r=n(3555),o=n(3716),i=n(5806),s=n(782),l=n(9107);const c=function(e){let{chat:t,user:n,folderId:c,isPinned:d,isMuted:u,canChangeFolder:m,handleDelete:h,handleChatFolderChange:v,handleReport:f}=e,p=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const g=(0,l.Z)(),{isSelf:Z}=n||{},E=(null==n?void 0:n.id)===o.aw;return(0,a.Ye)((()=>{if(!t)return;const{toggleChatPinned:e,updateChatMutedState:a,toggleChatArchived:o,toggleChatUnread:l}=(0,r.Sv)(),P=m?{title:g("ChatList.Filter.AddToFolder"),icon:"folder",handler:v}:void 0,y=d?{title:g("UnpinFromTop"),icon:"unpin",handler:()=>e({id:t.id,folderId:c})}:{title:g("PinToTop"),icon:"pin",handler:()=>e({id:t.id,folderId:c})};if(p)return(0,s.oA)([y,P]);const C=t.unreadCount||t.hasUnreadMark?{title:g("MarkAsRead"),icon:"readchats",handler:()=>l({id:t.id})}:{title:g("MarkAsUnread"),icon:"unread",handler:()=>l({id:t.id})},b=u?{title:g("ChatList.Unmute"),icon:"unmute",handler:()=>a({chatId:t.id,isMuted:!1})}:{title:g("ChatList.Mute"),icon:"mute",handler:()=>a({chatId:t.id,isMuted:!0})},N=(0,i.pE)(t)?{title:g("Unarchive"),icon:"unarchive",handler:()=>o({id:t.id})}:{title:g("Archive"),icon:"archive",handler:()=>o({id:t.id})},k=f&&((0,i.eA)(t)||(0,i.Bf)(t)||n&&!n.isSelf)?{title:g("ReportPeer.Report"),icon:"flag",handler:f}:void 0,w={title:(0,i.YC)(t.id)?g("Delete"):g((0,i.cc)(t)?"DeleteChat":(0,i.eA)(t)?"LeaveChannel":"Group.LeaveGroup"),icon:"delete",destructive:!0,handler:h},I=void 0!==c;return(0,s.oA)([P,C,y,!Z&&b,!Z&&!E&&!I&&N,k,w])}),[t,n,m,g,v,d,p,u,h,f,c,Z,E])}},7240:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(7361);function o(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const i=(e,t,n,i)=>{const[s,l]=(0,a.eJ)(!1),[c,d]=(0,a.eJ)(void 0),u=(0,a.I4)((e=>{t||2!==e.button||e.target.classList.add("no-selection")}),[t]),m=(0,a.I4)((e=>{e.target.classList.remove("no-selection"),t||n&&e.target.matches("a[href]")||(e.preventDefault(),c||(l(!0),d({x:e.clientX,y:e.clientY})))}),[t,n,c]),h=(0,a.I4)((()=>{l(!1)}),[]),v=(0,a.I4)((()=>{d(void 0)}),[]);return(0,a.d4)((()=>{if(t||!r.$b||i)return;const a=e.current;if(!a)return;let s;const u=()=>{s&&(clearTimeout(s),s=void 0)},m=e=>{t||(u(),s=window.setTimeout((()=>(e=>{u();const{clientX:t,clientY:i,target:s}=e.touches[0];c||n&&s.matches("a[href]")||(a.addEventListener("touchend",(function e(t){a.removeEventListener("touchend",e,!0),o(t)}),!0),r.fl&&r.cj&&a.addEventListener("mousedown",(function e(t){a.removeEventListener("mousedown",e,!0),o(t)}),!0),l(!0),d({x:t,y:i}))})(e)),200))};return a.addEventListener("touchstart",m,{passive:!0}),a.addEventListener("touchcancel",u,!0),a.addEventListener("touchend",u,!0),a.addEventListener("touchmove",u,{passive:!0}),()=>{u(),a.removeEventListener("touchstart",m),a.removeEventListener("touchcancel",u,!0),a.removeEventListener("touchend",u,!0),a.removeEventListener("touchmove",u)}}),[c,t,i,e,n]),{isContextMenuOpen:s,contextMenuPosition:c,handleBeforeContextMenu:u,handleContextMenu:m,handleContextMenuClose:h,handleContextMenuHide:v}}},3394:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050);const r={width:0,left:0,height:0,top:0};function o(e,t,n,o,i){const[s,l]=(0,a.eJ)("right"),[c,d]=(0,a.eJ)("bottom"),[u,m]=(0,a.eJ)(),[h,v]=(0,a.eJ)(),[f,p]=(0,a.eJ)(!1),[g,Z]=(0,a.eJ)(""),[E,P]=(0,a.eJ)("opacity: 0;");return(0,a.d4)((()=>{const a=t();if(!e||!a)return;let{x:s,y:c}=e;const u=s,h=c,f=o(),g=n(),{extraPaddingX:E=0,extraTopPadding:y=0,marginSides:C=0,extraMarginTop:b=0}=(null==i?void 0:i())||{},N=f?parseInt(getComputedStyle(f).marginTop,10)+b:void 0,k=f?{width:f.offsetWidth,height:f.offsetHeight+N}:r,w=g?g.getBoundingClientRect():r;let I,S;s+k.width+E<w.width+w.left?(s+=3,I="left"):s-k.width>0?(I="right",s-=3):(I="left",s=16),l(I),C&&"right"===I&&s+E+C>=w.width+w.left&&(s-=C),C&&"left"===I&&(s+E+C+k.width>=w.width+w.left?s-=C:s-C<=0&&(s+=C)),c+k.height<w.height+w.top?S="top":(S="bottom",c-k.height<w.top+y&&(c=w.top+w.height)),d(S);const T=a.getBoundingClientRect(),M="left"===I?Math.min(s-T.left,w.width-k.width-16):s-T.left,x=c-T.top,L=w.height-12-(N||0);p(L<k.height),P(`max-height: ${L}px;`),Z(`left: ${M}px; top: ${x}px`);const $=u-T.left-M,A=h-T.top-x-(N||0);m("left"===I?$:k.width+$),v("bottom"===S?k.height+A:A)}),[e,o,n,t,i]),{positionX:s,positionY:c,transformOriginX:u,transformOriginY:h,style:g,menuStyle:E,withScroll:f}}},8360:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(7204);function r(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,a.Z)(e,t);return n||null!=e?e:r}},7360:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(9118);function o(e,t,n,o,i){const s=(0,a.I4)(e,t);return(0,a.Ye)((()=>(0,r.Ds)(s,n,!o,!i)),[s,n,o,i])}},5790:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(3555),o=n(9118);const i=(e,t,n,i)=>{const{loadMessage:s}=(0,r.Sv)(),l=(0,a.Ye)((()=>{const n=(0,o.P2)(s,500,!0);return()=>{n({chatId:e,messageId:t,replyOriginForId:i})}}),[s,e,t,i]);(0,a.d4)((()=>{t&&!n&&l()}))}},5616:(e,t,n)=>{n.d(t,{d7:()=>o,mE:()=>s,yi:()=>i});var a=n(4050),r=n(6974);function o(e){const[t,n]=(0,a.eJ)((0,r.gO)(e));return(0,a.d4)((()=>(0,r.M2)(e,n)),[e]),t}function i(){const[e,t]=(0,a.eJ)((0,r.wC)());return(0,a.d4)((()=>(0,r.O6)(t)),[]),e}function s(){const[e,t]=(0,a.eJ)((0,r.Yz)());return(0,a.d4)((()=>(0,r.r_)(t)),[]),e}},8781:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(4050);const r=(e,t)=>{(0,a.d4)((()=>{if(e&&!t)return e.addEventListener("wheel",n,{passive:!0}),()=>{e.removeEventListener("wheel",n)};function n(t){t.deltaX||(e.scrollLeft+=t.deltaY/4)}}),[e,t])}},3541:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(4050);function r(e){(0,a.d4)((()=>{const t=t=>{e.forEach((e=>{let[n,a]=e;(function(e){return t=>function(e,t){const{alt:n,ctrl:a,meta:r,mod:o,shift:i,key:s}=e,{altKey:l,ctrlKey:c,metaKey:d,shiftKey:u,key:m}=t;if(n!==l)return!1;if(o){if(!c&&!d)return!1}else{if(a!==c)return!1;if(r!==d)return!1}return i===u&&Boolean(s&&(m.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase()))}(function(e){const t=e.toLowerCase().split("+").map((e=>e.trim())),n={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},a=["alt","ctrl","meta","shift","mod"];return{...n,key:t.find((e=>!a.includes(e)))}}(e),t)})(n)(t)&&function(e){return!(e.target instanceof HTMLElement&&["INPUT","TEXTAREA","SELECT"].includes(e.target.tagName))}(t)&&a(t)}))};return document.documentElement.addEventListener("keydown",t),()=>document.documentElement.removeEventListener("keydown",t)}),[e])}},2515:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(7361);function o(e,t,n){(0,a.d4)((()=>{t?r.wB||setTimeout((()=>{requestAnimationFrame((()=>{e.current&&e.current.focus()}))}),500):(e.current&&e.current.blur(),n&&setTimeout(n,300))}),[e,t,n])}},3657:(e,t,n)=>{n.d(t,{Op:()=>l,S1:()=>i,_N:()=>s});var a=n(4050),r=n(9118),o=n(8674);function i(e,t){let{rootRef:n,throttleMs:i,debounceMs:s,shouldSkipFirst:l,margin:c,threshold:d,isDisabled:u}=e;const m=(0,a.sO)(),h=(0,a.sO)(),v=(0,a.sO)(0),f=(0,a.sO)();h.current=t;const p=(0,a.I4)((()=>{v.current++}),[]),g=(0,a.I4)((()=>{v.current&&(v.current--,!v.current&&f.current&&(f.current(),f.current=void 0))}),[]);return(0,o.ZP)(p,g),(0,a.d4)((()=>{if(!u)return()=>{m.current&&(m.current.observer.disconnect(),m.current.callbacks.clear(),m.current=void 0)}}),[u]),{observe:(0,a.I4)(((e,t)=>{m.current||function(){const e=new Map,t=new Map,a=()=>{const n=Array.from(t.values());n.forEach((t=>{const a=e.get(t.target);a&&a(t,n)})),h.current&&h.current(n),t.clear()},o=i?r.P2:s?r.Ds:void 0,u=o?o(a,i||s,!l):a,p=new IntersectionObserver((e=>{e.forEach((e=>{t.set(e.target,e)})),v.current?f.current=()=>{u()}:u()}),{root:n.current,rootMargin:c?`${c}px`:void 0,threshold:d});m.current={observer:p,callbacks:e}}();const a=m.current;return a.observer.observe(e),t&&a.callbacks.set(e,t),()=>{t&&a.callbacks.delete(e),a.observer.unobserve(e)}}),[u]),freeze:p,unfreeze:g}}function s(e,t,n){(0,a.d4)((()=>t?t(e.current,n):void 0),[])}function l(e,t,n){const[r,o]=(0,a.eJ)(!t);return s(e,t,(e=>{o(e.isIntersecting),n&&n(e)})),r}},2645:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(7204);const o=(e,t,n)=>{const o=(0,r.Z)(t);return(0,a.bt)((()=>e(o||[])),t,n)}},2566:(e,t,n)=>{n.d(t,{Z:()=>m});var a=n(4050),r=n(7361),o=n(6137),i=n(9118),s=n(647),l=n(5326),c=n(6926);const d={},u=()=>{const e=(0,a.sO)();return e.current||(e.current=(0,c.Z)(d),d[e.current]=!0),e.current};function m(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.IU.BlobUrl,c=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0,m=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const h=e?s.UV(e):void 0,v=n===o.IU.Stream||r.I_&&n===o.IU.Progressive,f=(0,l.Z)(),p=u(),[g,Z]=(0,a.eJ)(h&&!v?1:0),E=(0,a.sO)(),P=(0,a.Ye)((()=>(0,i.P2)((e=>{E.current&&(!d||Date.now()-E.current>d)&&Z(e)}),500,!0)),[d]);return(0,a.d4)((()=>{!t&&e&&(h?v&&setTimeout((()=>{Z(.75)}),1500):(Z(0),E.current&&s.cC(P),E.current=Date.now(),s.he(e,n,m,P,p).then((()=>{const e=Date.now()-E.current;E.current=void 0,!d||e>=d?f():setTimeout(f,d-e)}))))}),[t,e,h,n,c,f,v,d,P,m,p]),(0,a.d4)((()=>{t&&E.current&&(s.cC(P),Z(0),E.current=void 0)}),[P,t]),(0,a.d4)((()=>()=>{e&&s.Iq(e,p)}),[p,e]),{mediaData:h,loadProgress:g}}},6503:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(7361);let o;function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=(0,a.sO)(!1),l=(0,a.I4)((()=>{s.current=!0}),[]);(0,a.d4)((()=>{o&&(clearTimeout(o),o=void 0),!e||r.$b||i||(o=window.setTimeout((()=>{s.current||t()}),2*n))}),[i,e,n,t]);const c=(0,a.I4)((()=>{s.current=!0}),[]),d=(0,a.I4)((()=>{s.current=!1,o&&(clearTimeout(o),o=void 0),o=window.setTimeout((()=>{s.current||t()}),n)}),[n,t]);return[c,d,l]}},2678:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(4050),r=n(7204),o=n(5326),i=n(9290);function s(e,t){const n=(0,r.Z)(e,!0),s=(0,a.sO)(),l=(0,o.Z)(),c=null!=e,d=null!=n;return c&&s.current&&(clearTimeout(s.current),s.current=void 0),(0,i.Z)((()=>{t&&!c&&d&&!s.current&&(s.current=window.setTimeout((()=>{s.current=void 0,l()}),t))}),[e]),s.current&&t&&!c?n:e}},1090:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(4050);function r(e,t){const n=(0,a.sO)(e),[r,o]=(0,a.eJ)(t);return[r,(0,a.I4)((e=>{o((t=>n.current(t,e)))}),[])]}},8957:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(7360);function r(e,t,n){return(0,a.Z)((e=>{e()}),[],e,t,n)}},3057:(e,t,n)=>{n.d(t,{Z:()=>u});var a=n(4050),r=n(5116),o=n(3716),i=n(790),s=n(9107),l=n(9203),c=n(8778);const d=(0,a.X$)((e=>{const{isOpen:t}=e,n=(0,c.Z)(l.gl.Extra,"CalendarModal",!t);return n?a.ZP.createElement(n,e):void 0})),u=(e,t)=>{const n=(0,s.Z)(),[l,c]=(0,a.eJ)(),u=(0,a.I4)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{serverTimeOffset:n}=(0,r.Rd)(),a=Math.round(Math.max(e.getTime(),Date.now()+6e4)/1e3)+(t?0:n);null==l||l(a),c(void 0)}),[l]),m=(0,a.I4)((()=>{u(new Date(1e3*o.t4),!0)}),[u]),h=(0,a.I4)((()=>{c(void 0),null==t||t()}),[t]),v=(0,a.I4)((e=>{c((()=>e))}),[]),f=new Date;f.setSeconds(0),f.setMilliseconds(0);const p=new Date;return p.setFullYear(p.getFullYear()+1),[v,a.ZP.createElement(d,{isOpen:Boolean(l),withTimePicker:!0,selectedAt:f.getTime(),maxAt:(0,i._F)(p),isFutureMode:!0,secondButtonLabel:e?n("Schedule.SendWhenOnline"):void 0,onClose:h,onSubmit:u,onSecondButtonClick:e?m:void 0})]}},6389:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(4050),r=n(3555),o=n(3716),i=n(9118);const s=(e,t)=>(0,a.Ye)((()=>(0,i.P2)((n=>{(0,r.Sv)().sendMessageAction({chatId:e,threadId:t,action:n})}),o.o_)),[e,t])},971:(e,t,n)=>{n.d(t,{Y:()=>o});var a=n(4050),r=n(9290);function o(e){const t=(0,a.sO)(e);return(0,r.Z)((()=>{t.current=e}),[e]),t}},8183:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(4050);const r=function(e,t){const n=(0,a.sO)(e);(0,a.bt)((()=>{n.current=e}),[e]),(0,a.d4)((()=>{if("number"!=typeof t)return;const e=setTimeout((()=>n.current()),t);return()=>clearTimeout(e)}),[t])}},6898:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(4050),r=n(9118);function o(e,t){(0,a.d4)((()=>{const t=e.current;return()=>{t&&(0,r.T2)((()=>{t.pause(),t.src="",t.load()}))}}),t)}},8986:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(4050),r=n(9118),o=n(3858);const i=()=>{const[e,t]=(0,a.eJ)(o.Z.get());return(0,a.d4)((()=>{const e=(0,r.P2)((()=>{t(o.Z.get())}),250,!1);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),e}},6264:(e,t,n)=>{n.d(t,{Z:()=>o});const a=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],r=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18];function o(e,t,n,o,i,s,l){if(Number.isNaN(s)||s<1)return;s|=0,Number.isNaN(l)&&(l=1),(l|=0)>3&&(l=3),l<1&&(l=1);const c=e.getImageData(t,n,o,i),d=c.data;let u,m,h,v,f,p,g,Z,E,P,y,C,b=o-1,N=i-1,k=s+1,w=[],I=[],S=[],T=a[s],M=r[s],x=[],L=[];for(;l-- >0;){for(C=y=0,f=0;f<i;f++){for(u=d[C]*k,m=d[C+1]*k,h=d[C+2]*k,p=1;p<=s;p++)g=C+((p>b?b:p)<<2),u+=d[g++],m+=d[g++],h+=d[g++];for(v=0;v<o;v++)w[y]=u,I[y]=m,S[y]=h,0==f&&(x[v]=((g=v+k)<b?g:b)<<2,L[v]=(g=v-s)>0?g<<2:0),Z=C+x[v],E=C+L[v],u+=d[Z++]-d[E++],m+=d[Z++]-d[E++],h+=d[Z++]-d[E++],y++;C+=o<<2}for(v=0;v<o;v++){for(P=v,u=w[P]*k,m=I[P]*k,h=S[P]*k,p=1;p<=s;p++)P+=p>N?0:o,u+=w[P],m+=I[P],h+=S[P];for(y=v<<2,f=0;f<i;f++)d[y]=u*T>>>M,d[y+1]=m*T>>>M,d[y+2]=h*T>>>M,0==v&&(x[f]=((g=f+k)<N?g:N)*o,L[f]=(g=f-s)>0?g*o:0),Z=v+x[f],E=v+L[f],u+=w[Z]-w[E],m+=I[Z]-I[E],h+=S[Z]-S[E],y+=o<<2}}e.putImageData(c,t,n)}},396:(e,t,n)=>{n.d(t,{An:()=>P,Es:()=>p,z2:()=>g});var a=n(3555),r=n(1713),o=n(7361),i=n(4753),s=n(5266),l=n(5806),c=n(9118),d=n(1192);const u=new Map;let m,h=[],v=[];function f(e,t){const n=m&&u.get(m);n&&(n.audio.pause(),n.audio.currentTime=0,n.onTrackChange&&n.onTrackChange());const o=E(e,(0,a.Rd)().audioPlayer.origin||r.Cr.Inline,t);if(!o)return;if(!u.has(o))return void(0,a.Sv)().openAudioPlayer((0,l.Ak)(y(o).messageKey));const s=u.get(o);s.onForcePlay&&s.onForcePlay(),m=o,s.audio.src&&(0,i.Z)(s.audio)}function p(){const e=m&&u.get(m);e&&e.audio.pause()}function g(e,t,n,p,g){if(!u.has(e)){const n=function(e,t,n,a){const r=new Audio;function o(t){return n=>{u.has(e)&&((0,s.z)(r)||u.get(e).handlers.forEach((e=>{e(t,n)})))}}return r.addEventListener("timeupdate",o("onTimeUpdate")),r.addEventListener("play",o("onPlay")),r.addEventListener("pause",o("onPause")),r.addEventListener("loadstart",o("onLoadStart")),r.addEventListener("loadeddata",o("onLoadedData")),r.addEventListener("playing",o("onPlaying")),r.addEventListener("ended",(()=>{u.has(e)&&((0,s.z)(r)||f(e))})),{audio:r,type:t,proxy:new Proxy(r,{get:(e,t)=>e[t]}),handlers:[],onForcePlay:n,onTrackChange:a}}(e,t,p,g);u.set(e,n),function(e,t){"audio"!==e.type||v.includes(t)||(v.push(t),v.sort(C)),"voice"!==e.type||h.includes(t)||(h.push(t),h.sort(C))}(n,e)}const{audio:Z,proxy:P,handlers:b}=u.get(e);return b.push(n),{play(n){if(!Z.paused)return;const c=m&&u.get(m);c&&m!==e&&(c.audio.pause(),c.audio.currentTime=0,(0,s.z)(c.audio)&&(c.audio.dataset.preventPlayAfterPatch="true"),c.onTrackChange&&c.onTrackChange()),m=e,Z.src||(Z.src=n,Z.preload="auto",n.includes("/progressive/")&&o.s$&&(delete Z.dataset.preventPlayAfterPatch,(0,s.B)(Z))),(0,i.Z)(Z),function(e,t){var n;if((0,a.Rd)().globalSearch.currentContent===r.nJ.Music)return;const{chatId:o}=(0,l.Ak)(y(t).messageKey),i=null===(n=(0,d.Bt)((0,a.Rd)()))||void 0===n?void 0:n.chatId,s=e=>e.startsWith(`msg${o}`)||i&&e.startsWith(`msg${i}`);"audio"===e&&(v=v.filter(s)),"voice"===e&&(h=h.filter(s))}(t,e)},pause(){m===e&&Z.pause()},stop(){if(m===e){const e=Z.src;Z.pause(),(0,c.T2)((()=>{Z.src="",Z.src=e}))}},setCurrentTime(t){m===e&&(Z.fastSeek?Z.fastSeek(t):Z.currentTime=t)},setVolume(t){m===e&&(Z.volume=t,Z.muted=!1)},setPlaybackRate(t){m===e&&(Z.playbackRate=t)},toggleMuted(e){Z.muted=void 0===e?!Z.muted:e},proxy:P,requestNextTrack(){f(e)},isLast:()=>!E(e,(0,a.Rd)().audioPlayer.origin),isFirst:()=>!E(e,(0,a.Rd)().audioPlayer.origin,!0),requestPreviousTrack(){f(e,!0)},destroy(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const a=u.get(e);a&&(a.handlers=a.handlers.filter((e=>e!==n)),a.handlers.length||(a.audio.pause(),u.delete(e),t&&function(e,t){const n=e=>e!==t;"audio"===e.type&&(v=v.filter(n)),"voice"===e.type&&(h=h.filter(n))}(a,e),e===m&&(m=void 0)))}}}function Z(e){switch(e.type){case"audio":return v;case"voice":return h;default:return}}function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Cr.Inline,n=arguments.length>2?arguments[2]:void 0;const a=u.get(e),o=Z(a);if(!o)return;if(t===r.Cr.Search){const t=o.indexOf(e);if(t<0)return;return o[t+(n?-1:1)]}const{chatId:i}=(0,l.Ak)(y(e).messageKey),s=o.filter((e=>e.startsWith(`msg${i}`))),c=s.indexOf(e);if(c<0)return;let d=t===r.Cr.Inline?-1:1;return n&&(d*=-1),s[c+d]}function P(e){return`${(0,l.Tp)(e)}-${e.date}`}function y(e){return{messageKey:e.match(/^msg(-?\d+)-(\d+)/)[0],date:Number(e.split("-").pop())}}function C(e,t){if(!e||!t)return 0;const{date:n,messageKey:a}=y(e),{date:r,messageKey:o}=y(t),i=r-n;return 0===i?o.localeCompare(a):i}},1174:(e,t,n)=>{n.d(t,{eM:()=>r,sf:()=>c,vJ:()=>o});var a=n(7361);let r;!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(r||(r={}));const o=20;function i(e,t){return t?Math.sqrt((t.pageX-e.pageX)**2+(t.pageY-e.pageY)**2):0}function s(e,t){return{x:(e.pageX+t.pageX)/2,y:(e.pageY+t.pageY)/2}}let l=0;function c(e,t){let n,c,d=!1,u=!1,m=0,h={x:window.innerWidth/2,y:window.innerHeight/2};function v(e){if(!t.excludedClosestSelector||!e.target.matches(t.excludedClosestSelector)&&!e.target.closest(t.excludedClosestSelector)){if(n=e,"mousedown"===e.type)t.onDrag&&e.preventDefault(),document.addEventListener("mousemove",p),document.addEventListener("mouseup",f);else if("touchstart"===e.type){const t=e.target;t.addEventListener("touchmove",p,{passive:!0}),t.addEventListener("touchend",f),t.addEventListener("touchcancel",f),"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY),2===e.touches.length&&(m=i(e.touches[0],e.touches[1]),h=s(e.touches[0],e.touches[1])))}t.withCursor&&document.body.classList.add("cursor-grabbing"),t.onCapture&&t.onCapture(e)}}function f(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.removeEventListener("mouseup",f),document.removeEventListener("mousemove",p),n.target.removeEventListener("touchcancel",f),n.target.removeEventListener("touchend",f),n.target.removeEventListener("touchmove",p),a.cj&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow=""})),e&&(d?t.onRelease&&t.onRelease(e):"mouseup"===e.type&&(t.onDoubleClick&&Date.now()-l<300?t.onDoubleClick(e,{centerX:n.pageX,centerY:n.pageY}):!t.onClick||"button"in e&&0!==e.button||t.onClick(e),l=Date.now()))),d=!1,u=!1,m=0,c=void 0,h={x:window.innerWidth/2,y:window.innerHeight/2},n=void 0}function p(e){if(n){if("touchmove"===e.type&&"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY),t.onZoom&&m>0&&2===e.touches.length)){const n=i(e.touches[0],e.touches[1]),a=s(e.touches[0],e.touches[1]),r=a.x-h.x,o=a.y-h.y,l=n/m;t.onZoom(e,{zoomFactor:l,initialCenterX:h.x,initialCenterY:h.y,dragOffsetX:r,dragOffsetY:o,currentCenterX:a.x,currentCenterY:a.y}),1!==l&&(d=!0)}const l=e.pageX-n.pageX,v=e.pageY-n.pageY;(Math.abs(l)>=15||Math.abs(v)>=15)&&(d=!0);let f=!1;t.onDrag&&(t.onDrag(e,n,{dragOffsetX:l,dragOffsetY:v}),f=!0),t.onSwipe&&!u&&(u=function(e,n,i){if(a.cj){const t=e.touches[0].pageX;if(t<=o||t>=window.innerWidth-o)return!1}const s=Math.abs(n),l=Math.abs(i);if(n&&i&&Math.max(s,l)/Math.min(s,l)<2)return!1;let d;if(s>=50?d="x":l>=50&&(d="y"),!d)return!1;if(c){if(c!==d)return!1}else c=d;return function(e,t,n,a,o){return"x"===t?o(e,n<0?r.Left:r.Right):"y"===t&&o(e,a<0?r.Up:r.Down)}(e,d,n,i,t.onSwipe)}(e,l,v),f=u),a.cj&&f&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow="hidden"}))}}return e.addEventListener("mousedown",v),e.addEventListener("touchstart",v,{passive:!t.isNotPassive}),()=>{f(),e.removeEventListener("touchstart",v),e.removeEventListener("mousedown",v)}}},1279:(e,t,n)=>{function a(e,t,n){o("transitionend",e,t,n)}function r(e,t,n){o("animationend",e,t,n)}function o(e,t,n,a){let r=!1;t.addEventListener(e,(function o(i){r||i.target!==i.currentTarget||a&&(i instanceof TransitionEvent&&i.propertyName===a||i instanceof AnimationEvent&&i.animationName===a)||(r=!0,t.removeEventListener(e,o),setTimeout((()=>{n()}),50))}))}n.d(t,{L:()=>a,f:()=>r})},3570:(e,t,n)=>{function a(e,t){return t-Math.floor(t/e)*e}n.d(t,{Z:()=>a})},539:(e,t,n)=>{n.d(t,{N:()=>m,Z:()=>u});var a=n(3555),r=n(1713),o=n(3716),i=n(7361),s=n(8674),l=n(9933),c=n(9118);let d=!1;function u(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:o.V$,l=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0;const u=h(e,t,s,l);l!==r.fo.Static?((0,a.Rd)().settings.byKey.animationLevel===o.oB&&(c=0),v(e,t,u,n,i,c,d)):v(e,t,u,n,i,0)}function m(){return d}function h(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.V$,a=arguments.length>3?arguments[3]:void 0;const{offsetTop:i}=t,{scrollTop:s}=e;if(void 0===a){const t=i-e.scrollTop;if(t<-n)return s+(t+n);if(t>n)return s+(t-n)}else{if(a===r.fo.Up)return i+n;if(a===r.fo.Down)return Math.max(0,i-n)}return s}function v(e,t,n,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=arguments.length>5?arguments[5]:void 0,m=arguments.length>6?arguments[6]:void 0;const{offsetTop:h,offsetHeight:v}=t,{scrollTop:g,offsetHeight:Z,scrollHeight:E}=e,P=m&&e.dataset.normalHeight?Number(e.dataset.normalHeight):Z;let y;switch(g!==n&&(e.scrollTop=n),a){case"start":y=h-r-n+(i.wZ?1:0);break;case"end":y=h+v+r-(n+P);break;case"nearest":case"center":case"centerOrTop":y=v<P?h+v/2-(n+P/2):h-r-n}if(y<0){const e=-n;y=Math.max(y,e)}else if(y>0){const e=E-(n+P);y=Math.min(y,e)}if(0===y)return;const C=n+y;if(0===u)return void(e.scrollTop=C);d=!0;const b=Math.abs(y),N=b<o.xn?p:f,k=u||o.bK+b/o.V$*(o.ck-o.bK),w=Date.now(),I=(0,s.YW)();(0,c.T2)((()=>{(0,l.cK)((()=>{const t=Math.min((Date.now()-w)/k,1),n=y*(1-N(t));return e.scrollTop=Math.round(C-n),d=t<1,d||I(),d}))}))}function f(e){return 1-(1-e)**5}function p(e){return 1-(1-e)**3.5}},1367:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(3555),r=n(3716),o=n(9933),i=n(9118);function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300;(0,a.Rd)().settings.byKey.animationLevel===r.oB&&(n=0),l(e,t,n)}function l(e,t,n){const a="rtl"===e.getAttribute("dir"),{scrollLeft:r,offsetWidth:s,scrollWidth:l}=e;let c=t-r;if(c<0){const e=-r*(a?-1:1);c=Math.max(c,e)}else if(c>0){const e=l-(r+s);c=Math.min(c,e)}if(0===c)return;const d=r+c;if(0===n)return void(e.scrollLeft=d);const u=Date.now();(0,i.T2)((()=>{(0,o.jt)((()=>{const t=Math.min((Date.now()-u)/n,1),a=c*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(d-a),t<1}))}))}},5723:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(7361);function r(e,t,n){if(!t&&e===document.activeElement)return;const r=window.getSelection(),o=document.createRange(),i=e.lastChild||e;a.$b||n||i&&i.nodeValue?(o.selectNodeContents(n?e:i),o.collapse(!1),r.removeAllRanges(),r.addRange(o)):e.focus()}},998:(e,t,n)=>{function a(){const e=window.getSelection();let t=e&&e.rangeCount?e.getRangeAt(0).cloneContents():void 0;if(!t||0===t.childElementCount)return;const n=Array.from(t.children).reduce(((e,t)=>1===t.nodeType&&t.classList.contains("message-date-group")?Array.from(t.querySelectorAll(".Message")).reduce(((e,t)=>e.concat(Number(t.dataset.messageId))),e):1===t.nodeType&&t.classList.contains("Message")?e.concat(Number(t.dataset.messageId)):e),[]);for(;t.firstChild;)t.removeChild(t.firstChild);return t=void 0,n}n.d(t,{Z:()=>a})},5254:(e,t,n)=>{n.d(t,{P:()=>r});var a=n(3858);function r(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:n}=a.Z.get();return t.top<=n&&t.top+t.height>=0}},4532:(e,t,n)=>{n.d(t,{Ay:()=>s,N:()=>r,NS:()=>c,Of:()=>d,Ym:()=>o,pC:()=>l});const a={play:void 0,pause:void 0,seekbackward:void 0,seekforward:void 0,previoustrack:void 0,nexttrack:void 0,stop:void 0,seekTo:void 0};function r(e,t){const{mediaSession:n}=window.navigator;n?(e&&o(e),t&&i(t)):console.warn("MediaSession API not supported in this browser")}function o(e){const{mediaSession:t}=window.navigator;t&&(t.metadata=null!=e?e:null)}function i(e){const{mediaSession:t}=window.navigator;t&&Object.entries({...a,...e}).forEach((e=>{let[n,a]=e;try{t.setActionHandler(n,a)}catch(e){}}))}function s(){const{mediaSession:e}=window.navigator;var t;e&&(e.metadata=null,i(a),e.playbackState&&(e.playbackState="none"),null===(t=e.setPositionState)||void 0===t||t.call(e))}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";const{mediaSession:t}=window.navigator;t&&t.playbackState&&(t.playbackState=e)}function c(e){var t;if(!e||void 0===e.position||void 0===e.duration)return;e.position=Math.min(e.position,e.duration);const{mediaSession:n}=window.navigator;null==n||null===(t=n.setPositionState)||void 0===t||t.call(n,e)}function d(e){let{title:t,artist:n,album:a,artwork:r}=e;if("MediaMetadata"in window)return new window.MediaMetadata({title:t,artist:n,album:a,artwork:r})}},3099:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(6137),r=n(7361),o=n(3716);const i={B:a.Vv.Bold,STRONG:a.Vv.Bold,I:a.Vv.Italic,EM:a.Vv.Italic,U:a.Vv.Underline,S:a.Vv.Strike,STRIKE:a.Vv.Strike,DEL:a.Vv.Strike,CODE:a.Vv.Code,PRE:a.Vv.Pre,BLOCKQUOTE:a.Vv.Blockquote};function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("div");n.innerHTML=l(t?c(e):e);const a=n.innerText.trim().replace(/\u200b+/g,"");let r=0,o=0;const i=[];function s(e){const{index:t,entity:n}=d(e,a,r);n?(r=t,i.push(n)):e.textContent&&(r+=e.textContent.length),e.hasChildNodes()&&o<=3&&(o+=1,Array.from(e.childNodes).forEach(s))}return Array.from(n.childNodes).forEach((e=>{o=1,s(e)})),{text:a,entities:i.length?i:void 0}}function l(e){let t=e.slice(0);return r.op||(t=t.replace(/<img[^>]+alt="([^"]+)"[^>]*>/gm,"$1")),t=t.replace(/ /g," "),t=t.replace(/<div><br([^>]*)?><\/div>/g,"\n"),t=t.replace(/<br([^>]*)?>/g,"\n"),t=t.replace(/<\/div>(\s*)<div>/g,"\n"),t=t.replace(/<div>/g,"\n"),t=t.replace(/<\/div>/g,""),t=t.replace(/^`{3}(.*[\n\r][^]*?^)`{3}/gm,"<pre>$1</pre>"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"<pre>$1</pre>"),t=t.replace(/[`]{1}([^`\n]+)[`]{1}/g,"<code>$1</code>"),t=t.replace(/(^|\s)(?!<code[^<]*|<\/)[*]{2}([^*\n]+)[*]{2}(?![^<]*<\/code>)(\s|$)/g,"$1<b>$2</b>$3"),t=t.replace(/(^|\s)(?!<code[^<]*|<\/)[_]{2}([^_\n]+)[_]{2}(?![^<]*<\/code>)(\s|$)/g,"$1<i>$2</i>$3"),t=t.replace(/(^|\s)(?!<code[^<]*|<\/)[~]{2}([^~\n]+)[~]{2}(?![^<]*<\/code>)(\s|$)/g,"$1<s>$2</s>$3"),t=t.replace(/(^|\s)(?!<code[^<]*|<\/)[|]{2}([^|\n]+)[|]{2}(?![^<]*<\/code>)(\s|$)/g,`$1<span data-entity-type="${a.Vv.Spoiler}">$2</span>$3`),t}function c(e){return e.replace(new RegExp(`\\[([^\\]]+?)]\\((${o.FM}+?)\\)`,"g"),((e,t,n)=>`<a href="${n.includes("://")?n:n.includes("@")?`mailto:${n}`:`http://${n}`}">${t}</a>`))}function d(e,t,n){const r=function(e){if(i[e.nodeName])return i[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===a.Vv.MentionName?a.Vv.MentionName:t.dataset.entityType===a.Vv.Url?a.Vv.Url:t.href.startsWith("mailto:")?a.Vv.Email:t.href.startsWith("tel:")?a.Vv.Phone:t.href!==t.textContent?a.Vv.TextUrl:a.Vv.Url}return"SPAN"===e.nodeName?e.dataset.entityType:void 0}(e);if(!r||!e.textContent)return{index:n,entity:void 0};const o=t.indexOf(e.textContent,n),s=o>=0?o:n,l=t.substring(0,s).length,{length:c}=t.substring(s,s+e.textContent.length);let d,u;return r===a.Vv.TextUrl&&(d=e.href),r===a.Vv.MentionName&&(u=e.dataset.userId),{index:s,entity:{type:r,offset:l,length:c,...d&&{url:d},...u&&{userId:u}}}}},5266:(e,t,n)=>{function a(e){e.dataset.patchedForSafari||(e.addEventListener("play",(()=>{const t=e.currentTime;e.dataset.patchForSafariInProgress="true",e.addEventListener("progress",(function n(){e.buffered.length&&(e.currentTime=e.duration-1,e.addEventListener("progress",(()=>{delete e.dataset.patchForSafariInProgress,e.currentTime=t,e.paused&&!e.dataset.preventPlayAfterPatch&&e.play()}),{once:!0}),e.removeEventListener("progress",n))}))}),{once:!0}),e.dataset.patchedForSafari="true")}function r(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,{B:()=>a,z:()=>r})},3227:(e,t,n)=>{n.d(t,{Z:()=>a});const a=e=>{e.stopPropagation(),e.preventDefault()}},5655:(e,t,n)=>{let a;function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"*",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a||(a=document.createElement("input"),a.setAttribute("type","file")),a.setAttribute("accept",e),n?a.removeAttribute("multiple"):a.setAttribute("multiple","multiple"),a.onchange=null,a.value="",a.onchange=t,a.click()}n.d(t,{g:()=>r})},8629:(e,t,n)=>{function a(){const e=getComputedStyle(document.documentElement),t=o(e,"--color-background"),n=o(e,"--color-text"),a=o(e,"--color-primary"),r=o(e,"--color-white"),i=o(e,"--color-links");return{bg_color:t,text_color:n,hint_color:o(e,"--color-text-secondary"),link_color:i,button_color:a,button_text_color:r}}function r(e){return/^#[0-9A-F]{6}$/i.test(e)}function o(e,t){return r(n=e.getPropertyValue(t).trim())?n:`#${n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/).slice(1).map(((e,t)=>(3===t?Math.round(255*parseFloat(e)):parseFloat(e)).toString(16).padStart(2,"0").replace("NaN",""))).join("")}`;var n}n.d(t,{B:()=>a,U:()=>r})}}]);
|
||
//# sourceMappingURL=162.b6743f96ddc397edeee3.js.map
|