mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-15 10:47:04 +01:00
2 lines
117 KiB
JavaScript
2 lines
117 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[306],{7854:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(6137),s=n(4399),o=n(3657),i=n(6202),c=n(692),l=n(706),d=n(7799);const u={large:160,medium:128,small:104},m=({sticker:e,size:t="medium",observeIntersection:n,lastSyncTime:m,forceLoadPreview:h})=>{var f;const v=(0,r.sO)(null),[p,g]=(0,l.Z)(),Z=`sticker${e.id}`,E=(0,o.Op)(v,n),P=null===(f=e.thumbnail)||void 0===f?void 0:f.dataUri,y=(0,i.Z)(`${Z}?size=m`,!E&&!h,a.IU.BlobUrl,m),C=(0,c.Z)(y),b=(0,i.Z)(Z,!E,a.IU.Lottie,m),N=Boolean(b),[w,k]=(0,r.eJ)(String(Math.random())),I=(0,r.I4)((()=>{k(String(Math.random()))}),[]),T=u[t],S=`width: ${T}px; height: ${T}px;`;return r.ZP.createElement("div",{ref:v,className:"AnimatedEmoji media-inner",style:S,onClick:I},!p&&P&&r.ZP.createElement("img",{src:P,className:e.id===s.wB?"like-sticker-thumb":void 0,alt:""}),!p&&y&&r.ZP.createElement("img",{src:y,className:C,alt:""}),N&&r.ZP.createElement(d.Z,{key:Z,id:Z,animationData:b,size:T,quality:1,play:E&&w,noLoop:!0,onLoad:g}))}},7799:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(9118),s=n(6752),o=n(8674),i=n(5332);let c,l;async function d(){return c||(c=n.e(941).then(n.bind(n,7941)),l=(await c).default),c}setTimeout(d,5e3);const u=(0,r.X$)((({className:e,id:t,animationData:n,play:c,playSegment:u,speed:m,noLoop:h,size:f,quality:v,isLowPriority:p,onLoad:g})=>{const[Z,E]=(0,r.eJ)(),P=(0,r.sO)(null),y=(0,r.sO)(!1),C=(0,r.sO)(!1),b=(0,r.sO)();b.current=c;const N=(0,r.sO)();N.current=u,(0,r.d4)((()=>{if(Z||!n)return;const e=()=>{if(!P.current)return;const e=new l(t,P.current,n,{noLoop:h,size:f,quality:v,isLowPriority:p},g);m&&e.setSpeed(m),E(e)};l?e():d().then((()=>{(0,a.T2)((()=>{P.current&&e()}))}))}),[Z,n,t,p,h,g,v,f,m]),(0,r.d4)((()=>()=>{Z&&Z.destroy()}),[Z]);const w=(0,r.I4)(((e=!1)=>{Z&&(b.current||N.current)&&(N.current?Z.playSegment(N.current):e?Z.goToAndPlay(0):Z.play())}),[Z]),k=(0,r.I4)((()=>{Z&&Z.pause()}),[Z]),I=(0,r.I4)((()=>{C.current=!0,Z&&(y.current||(y.current=Z.isPlaying()),k())}),[Z,k]),T=(0,r.I4)((()=>{y.current&&w(),y.current=!1,C.current=!1}),[w]),S=(0,r.I4)((()=>{(0,a.T2)(T)}),[T]);(0,r.d4)((()=>{Z&&(c||u?C.current?y.current=!0:w(h):C.current?y.current=!1:k())}),[Z,c,u,h,w,k]),(0,o.ZP)(I,T),(0,i.Z)(I,S);const M=(0,s.Z)("AnimatedSticker",e),x=f?`width: ${f}px; height: ${f}px;`:void 0;return r.ZP.createElement("div",{ref:P,className:M,style:x})}))},4752:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(4050),a=n(5116),s=n(6137),o=n(1713),i=n(7361),c=n(790),l=n(2858),d=n(6752),u=n(2340),m=n(5376),h=n(2566),f=n(1212),v=n(2019),p=n(3186),g=n(9107),Z=n(1174),E=n(6202),P=n(396),y=n(663),C=n(231),b=n(9196),N=n(8033);const w=i.wB?20:25,k=i.wB?50:75;function I(e,t,n){return r.ZP.createElement("div",{className:"seekline no-selection",ref:n},r.ZP.createElement("span",{className:"seekline-buffered-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*t}%)`})),r.ZP.createElement("span",{className:"seekline-play-progress"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})),r.ZP.createElement("span",{className:"seekline-thumb"},r.ZP.createElement("i",{style:`transform: translateX(${100*e}%)`})))}const T=(0,r.X$)((({theme:e,message:t,senderTitle:n,uploadProgress:T,origin:S,date:M,lastSyncTime:x,className:L,isSelectable:A,isSelected:$,isDownloading:O,onPlay:F,onReadMedia:R,onCancelUpload:U,onDateClick:D})=>{const{content:{audio:B,voice:V,video:X},isMediaUnread:q}=t,K=Boolean(V||X),j=(0,r.sO)(!1),z=(0,r.sO)(!1),H=(0,r.sO)(null),Y=(0,g.Z)(),{isRtl:J}=Y,W=(0,a.uC)(),[_,G]=(0,r.eJ)(!1),Q=x,ee=(0,l.Ti)(t,"pictogram"),te=(0,E.Z)(ee,!1,s.IU.BlobUrl),ne=(0,E.Z)((0,l.Ti)(t,"inline"),!Q,(0,l.kG)(t,"inline")),{loadProgress:re}=(0,h.Z)((0,l.Ti)(t,"download"),!O),ae=(0,r.I4)((()=>{G(!0),F(t.id,t.chatId)}),[t,F]),se=(0,r.I4)((()=>{G(!1)}),[]),{isBuffered:oe,bufferedProgress:ie,bufferingHandlers:ce,checkBuffering:le}=(0,v.Z)(),{isPlaying:de,playProgress:ue,playPause:me,play:he,pause:fe,setCurrentTime:ve,duration:pe}=(0,p.Z)((0,P.An)(t),(0,l.XV)(t),K?"voice":"audio",S,ne,ce,void 0,le,_,ae,se,(0,l.CI)(t)),ge=(0,l.B4)(t),Ze=function(e,t,n=0,a=!1){const s=(0,r.sO)(null),{data:o,peak:i}=(0,r.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 r=Math.min(n/10,1),a=Math.round(w+(k-w)*r);return function(e,t){let n=0;const r=new Array(t),a=e.length/t,s=e[0],o=e[e.length-1];for(let d=0;d<t;d++){var i,c,l;const t=Math.floor(d*a),u=((null!==(i=e[t-1])&&void 0!==i?i:s)+(null!==(c=e[t])&&void 0!==c?c:s)+(null!==(l=e[t+1])&&void 0!==l?l:o))/3;r[d]=u,n<u&&(n=u)}return{data:r,peak:n}}(function(e){const t=8*e.length,n=Math.floor(t/5);if(!n)return[];const r=Array(n),a=e;for(let e=0,t=n-1;e!==t;++e){const t=Math.floor(5*e/8),n=Math.floor(5*e%8),s=a[t]+(a[t+1]<<8);r[e]=s>>n&31}const s=Math.floor(5*(n-1)/8),o=Math.floor(5*(n-1)%8),i=a[s]+(a[s+1]<<8);return r[n-1]=i>>o&31,r}(new Uint8Array(e)),a)}),[t])||{};return(0,r.bt)((()=>{const t=s.current;t&&o&&void 0!==i&&function(e,t,n,{peak:r,fillStyle:a,progressFillStyle:s}){const o=4*t.length;e.width=2*o,e.height=46,e.style.width=`${o}px`,e.style.height="23px";const i=e.getContext("2d");i.scale(2,2),t.forEach(((e,o)=>{i.globalAlpha=o/t.length>=n?.5:1,i.fillStyle=n>o/t.length?s:a;const c=Math.max(2,e/Math.max(1,r)*23);!function(e,t,n,r,a,s){2<2*s&&(s=1),a<2*s&&(s=a/2),e.beginPath(),e.moveTo(t+s,n),e.arcTo(t+2,n,t+2,n-a,s),e.arcTo(t+2,n-a,t,n-a,s),e.arcTo(t,n-a,t,n,s),e.arcTo(t,n,t+2,n,s),e.closePath()}(i,4*o,23,0,c,1),i.fill()}))}(t,o,n,{peak:i,fillStyle:a?"dark"===e?"#B7ABED":"#AEDFA4":"dark"===e?"#494A78":"#ADD3F7",progressFillStyle:a?"dark"===e?"#FFFFFF":"#4FAE4E":"dark"===e?"#8774E1":"#3390EC"})}),[a,i,n,o,e]),s}(e,V,q&&!ge?1:ue,ge),Ee=de||ue>0&&ue<1;(0,r.d4)((()=>{G(de)}),[de]);const Pe=_&&!oe,{isUploading:ye,isTransferring:Ce,transferProgress:be}=(0,l.Sc)(t,T||re,Pe||O),{shouldRender:Ne,transitionClassNames:we}=(0,f.Z)(Ce),ke=Ne&&(Pe||ye),Ie=(0,r.I4)((()=>{ye?null==U||U():(de||F(t.id,t.chatId),G(!_),me())}),[de,ye,t.id,t.chatId,U,F,me,_]);(0,r.d4)((()=>{R&&q&&(de||O)&&R()}),[de,q,R,O]);const Te=(0,r.I4)((()=>{O?W.cancelMessageMediaDownload({message:t}):W.downloadMessageMedia({message:t})}),[W,O,t]),Se=(0,r.I4)((e=>{if(j.current&&H.current){const{width:t,left:n}=H.current.getBoundingClientRect(),r=e instanceof MouseEvent?e.clientX:e.targetTouches[0].clientX;e.stopPropagation(),ve(Math.max(Math.min(pe*((r-n)/t),pe-.1),.001))}}),[pe,ve]),Me=(0,r.I4)((e=>{e instanceof MouseEvent&&2===e.button||(j.current=!0,z.current=de,fe(),Se(e))}),[Se,fe,de]),xe=(0,r.I4)((()=>{j.current=!1,z.current&&he()}),[he]),Le=(0,r.I4)((()=>{D(t.id,t.chatId)}),[D,t.id,t.chatId]);function Ae(){if(K)return n||"Voice";const{title:e,fileName:t}=B;return e||t}(0,r.d4)((()=>{if(H.current&&Ee)return(0,Z.s)(H.current,{onCapture:Me,onRelease:xe,onClick:xe,onDrag:Se})}),[Ee,Me,Se,xe]);const $e=(0,d.Z)("Audio",L,ge&&S===o.Cr.Inline&&"own",(S===o.Cr.Search||S===o.Cr.SharedMedia)&&"bigger",$&&"audio-is-selected"),Oe=["toggle-play"];ke?Oe.push("loading"):de?Oe.push("pause"):de||Oe.push("play");const Fe=(0,d.Z)("content",Ee&&"with-seekline");function Re(){return r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("div",{className:Fe},r.ZP.createElement("div",{className:"content-row"},r.ZP.createElement("p",{className:"title",dir:"auto",title:Ae()},(0,u.Z)(Ae())),r.ZP.createElement("div",{className:"message-date"},M&&r.ZP.createElement(N.Z,{className:"date",onClick:Le},(0,c.VX)(Y,1e3*M)))),Ee&&r.ZP.createElement("div",{className:"meta search-result",dir:J?"rtl":void 0},r.ZP.createElement("span",{className:"duration with-seekline",dir:"auto"},ue<1&&`${(0,c.k9)(pe*ue,pe)}`),I(ue,ie,H)),!Ee&&function(){if(K)return r.ZP.createElement("div",{className:"meta",dir:J?"rtl":void 0},(0,c.k9)((V||X).duration));const{performer:e}=B;return r.ZP.createElement("div",{className:"meta",dir:J?"rtl":void 0},(0,c.k9)(pe),r.ZP.createElement("span",{className:"bullet"},"•"),e&&r.ZP.createElement("span",{className:"performer",title:e},(0,u.Z)(e)),e&&n&&r.ZP.createElement("span",{className:"bullet"},"•"),n&&r.ZP.createElement("span",{title:n},(0,u.Z)(n)))}()))}return r.ZP.createElement("div",{className:$e,dir:Y.isRtl?"rtl":"ltr"},A&&r.ZP.createElement("div",{className:"message-select-control"},$&&r.ZP.createElement("i",{className:"icon-select"})),r.ZP.createElement(C.Z,{round:!0,ripple:!i.wB,size:"smaller",color:te?"translucent-white":"primary",className:Oe.join(" "),ariaLabel:de?"Pause audio":"Play audio",onClick:Ie,isRtl:Y.isRtl,backgroundImage:te},r.ZP.createElement("i",{className:"icon-play"}),r.ZP.createElement("i",{className:"icon-pause"})),Ne&&r.ZP.createElement("div",{className:(0,d.Z)("media-loading",we,ke&&"interactive")},r.ZP.createElement(b.Z,{progress:be,transparent:!0,size:"m",onClick:ke?Ie:void 0,noCross:!ke})),B&&!ye&&r.ZP.createElement(C.Z,{round:!0,size:"tiny",className:"download-button",ariaLabel:O?"Cancel download":"Download",onClick:Te},r.ZP.createElement("i",{className:O?"icon-close":"icon-arrow-down"})),S===o.Cr.Search&&Re(),S!==o.Cr.Search&&B&&function(e,t,n,a,s,o,i,l,d,h,f){const{title:v,performer:p,fileName:g}=t,Z=a||s>0&&s<1,{isRtl:E}=y.i0;return r.ZP.createElement("div",{className:"content"},r.ZP.createElement("p",{className:"title",dir:"auto",title:v},(0,u.Z)(v||g)),Z&&r.ZP.createElement("div",{className:"meta",dir:E?"rtl":void 0},r.ZP.createElement("span",{className:"duration with-seekline",dir:"auto"},(0,c.k9)(n*s,n)),I(s,o,i)),!Z&&l&&r.ZP.createElement("div",{className:"meta",dir:E?"rtl":void 0},h?`${(0,m.yW)(t.size*h)} / `:void 0,(0,m.yW)(t.size)),!Z&&!l&&r.ZP.createElement("div",{className:"meta",dir:E?"rtl":void 0},r.ZP.createElement("span",{className:"duration",dir:"auto"},(0,c.k9)(n)),r.ZP.createElement("span",{className:"bullet"},"•"),r.ZP.createElement("span",{className:"performer",dir:"auto",title:p},(0,u.Z)(p||"Unknown")),d&&r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("span",{className:"bullet"},"•"),r.ZP.createElement(N.Z,{className:"date",onClick:f},(0,c.ZK)(e,1e3*d,!0)))))}(Y,B,pe,de,ue,ie,H,O||ye,M,be,D?Le:void 0),S===o.Cr.SharedMedia&&(V||X)&&Re(),S===o.Cr.Inline&&V&&function(e,t,n,a,s){return r.ZP.createElement("div",{className:"content"},r.ZP.createElement("div",{className:"waveform",draggable:!1,ref:t},r.ZP.createElement("canvas",{ref:n})),r.ZP.createElement("p",{className:(0,d.Z)("voice-duration",s&&"unread"),dir:"auto"},0===a?(0,c.k9)(e.duration):(0,c.k9)(e.duration*a)))}(V,H,Ze,ue,q))}))},172:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(6137),s=n(3716),o=n(2858),i=n(2155),c=n(6752),l=n(2340),d=n(6202),u=n(1212),m=n(9107);const h=(0,r.X$)((({className:e,size:t="large",chat:n,user:h,text:f,withOnlineStatus:v,isSavedMessages:p,lastSyncTime:g,onClick:Z})=>{const E=h&&(0,o.NB)(h),P=h&&(0,o.pK)(h.id);let y;p||E||(h?y=(0,o.RT)(h):n&&(y=(0,o.RT)(n)));const C=(0,d.Z)(y,!1,a.IU.BlobUrl,g),b=Boolean(C),{transitionClassNames:N}=(0,u.Z)(b,void 0,b,"slow"),w=(0,m.Z)();let k="";if(p)k=r.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(E)k=r.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(P)k=r.ZP.createElement("i",{className:"icon-reply-filled"});else if(C)k=r.ZP.createElement("img",{src:C,className:(0,c.Z)("avatar-media",N),alt:"",decoding:"async"});else if(h){const e=(0,o.Js)(h);k=e?(0,i.Xv)(e,2):void 0}else if(n){const e=(0,o.U)(w,n);k=e&&(0,i.Xv)(e,(0,o.YC)(n.id)?2:1)}else f&&(k=(0,i.Xv)(f,2));const I=!p&&h&&(0,o.kM)(h),T=(0,c.Z)(`Avatar size-${t}`,e,`color-bg-${(0,o.Rs)(h||n)}`,p&&"saved-messages",E&&"deleted-account",P&&"replies-bot-account",v&&I&&"online",Z&&"interactive",!p&&!C&&"no-photo"),S=Boolean(p||C),M=(0,r.I4)((e=>{Z&&Z(e,S)}),[Z,S]),x=(h||n)&&(h||n).id;return r.ZP.createElement("div",{className:T,onClick:M,"data-test-sender-id":s.Cg?x:void 0},"string"==typeof k?(0,l.Z)(k,["jumbo"===t?"hq_emoji":"emoji"]):k)}))},180:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(2340),c=n(782),l=n(4319),d=n(6272),u=n(9107),m=n(1876),h=n(3321);const f=(0,r.X$)((0,a.c$)(((e,{chatOrUserId:t})=>{const{lastSyncTime:n,countryList:{phoneCodes:r}}=e,a=t?(0,s.Z1)(e,t):void 0,i=(0,o.YC)(t)?(0,s.dy)(e,t):void 0,c=a&&(0,o.i4)(a,(0,s.dZ)(e),(0,s.NJ)(e));return{lastSyncTime:n,phoneCodeList:r,chat:a,user:i,canInviteUsers:a&&!i&&(!(0,o.eA)(a)&&!(0,o.Mg)(a,"inviteUsers")||(0,o.VE)(a,"inviteUsers")),isMuted:c}}),((e,t)=>(0,c.ei)(t,["loadFullUser","updateChatMutedState","showNotification"])))((({lastSyncTime:e,user:t,chat:n,forceShowSelf:a,canInviteUsers:s,isMuted:c,phoneCodeList:f,loadFullUser:v,showNotification:p,updateChatMutedState:g})=>{const{id:Z,fullInfo:E,username:P,phoneNumber:y,isSelf:C}=t||{},{id:b}=n||{},N=(0,u.Z)();(0,r.d4)((()=>{e&&Z&&v({userId:Z})}),[v,Z,e]);const w=(0,r.I4)((()=>{g({chatId:b,isMuted:!c})}),[b,c,g]);if(!n||n.isRestricted||C&&!a)return;function k(e,t){(0,l.TE)(e),p({message:`${t} was copied`})}const I=y&&(0,d.WZ)(f,y),T=(0,o.hu)(n),S=(null==E?void 0:E.bio)||(0,o.GM)(n);return r.ZP.createElement("div",{className:"ChatExtra"},I&&!!I.length&&r.ZP.createElement(m.Z,{icon:"phone",multiline:!0,narrow:!0,ripple:!0,onClick:()=>k(I,N("Phone"))},r.ZP.createElement("span",{className:"title",dir:"auto"},I),r.ZP.createElement("span",{className:"subtitle"},N("Phone"))),P&&r.ZP.createElement(m.Z,{icon:"mention",multiline:!0,narrow:!0,ripple:!0,onClick:()=>k(`@${P}`,N("Username"))},r.ZP.createElement("span",{className:"title",dir:"auto"},(0,i.Z)(P)),r.ZP.createElement("span",{className:"subtitle"},N("Username"))),S&&!!S.length&&r.ZP.createElement(m.Z,{icon:"info",multiline:!0,narrow:!0,isStatic:!0},r.ZP.createElement("span",{className:"title",dir:"auto"},(0,i.Z)(S,["br","links","emoji"])),r.ZP.createElement("span",{className:"subtitle"},N(Z?"UserBio":"Info"))),(s||!P)&&T&&r.ZP.createElement(m.Z,{icon:"mention",multiline:!0,narrow:!0,ripple:!0,onClick:()=>k(T,N("SetUrlPlaceholder"))},r.ZP.createElement("div",{className:"title"},T),r.ZP.createElement("span",{className:"subtitle"},N("SetUrlPlaceholder"))),!a&&r.ZP.createElement(m.Z,{icon:"unmute",ripple:!0,onClick:w},r.ZP.createElement("span",null,N("Notifications")),r.ZP.createElement(h.Z,{id:"group-notifications",label:Z?"Toggle User Notifications":"Toggle Chat Notifications",checked:!c,inactive:!0})))})))},329:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(782),c=n(9107),l=n(2340),d=n(172),u=n(3103),m=n(231);const h=(0,r.X$)((0,a.c$)(((e,{chat:t})=>{const n=(0,o.YC)(t.id),r=(0,s.FM)(e,t.id),a=n&&(0,s.dy)(e,(0,o.zX)(t)),i=a&&(0,o.cS)(a)&&!t.isSupport,c=n&&!r&&!i,l=n?(0,o.Vl)((0,s.dy)(e,(0,o.zX)(t))):void 0;return{isPrivateChat:n,isChatWithSelf:r,isBot:i,isChannel:(0,o.eA)(t),isBasicGroup:(0,o.G9)(t),isSuperGroup:(0,o.ZV)(t),currentUserId:e.currentUserId,canDeleteForAll:c,contactName:l}}),((e,t)=>(0,i.ei)(t,["leaveChannel","deleteHistory","deleteChannel","deleteChatUser","blockContact"])))((({isOpen:e,chat:t,isChannel:n,isPrivateChat:a,isChatWithSelf:s,isBot:i,isBasicGroup:h,isSuperGroup:f,currentUserId:v,canDeleteForAll:p,contactName:g,onClose:Z,onCloseAnimationEnd:E,leaveChannel:P,deleteHistory:y,deleteChannel:C,deleteChatUser:b,blockContact:N})=>{const w=(0,c.Z)(),k=(0,o.U)(w,t),I=(0,r.I4)((()=>{y({chatId:t.id,shouldDeleteForAll:!0}),Z()}),[y,t.id,Z]),T=(0,r.I4)((()=>{y({chatId:t.id,shouldDeleteForAll:!0}),N({contactId:t.id,accessHash:t.accessHash}),Z()}),[y,t.id,t.accessHash,N,Z]),S=(0,r.I4)((()=>{a?y({chatId:t.id,shouldDeleteForAll:!1}):h?(b({chatId:t.id,userId:v}),y({chatId:t.id,shouldDeleteForAll:!1})):!n&&!f||t.isCreator?(n||f)&&t.isCreator&&C({chatId:t.id}):P({chatId:t.id}),Z()}),[a,h,n,f,v,t.isCreator,t.id,Z,y,b,P,C]);return r.ZP.createElement(u.Z,{isOpen:e,className:"DeleteChatModal",header:r.ZP.createElement("div",{className:"modal-header",dir:w.isRtl?"rtl":void 0},r.ZP.createElement(d.Z,{size:"tiny",chat:t,isSavedMessages:s}),r.ZP.createElement("h3",{className:"modal-title"},w(n&&!t.isCreator?"LeaveChannel":n&&t.isCreator?"ChannelDelete":h||f?"Group.LeaveGroup":"DeleteChatUser"))),onClose:Z,onCloseAnimationEnd:E},n&&t.isCreator?r.ZP.createElement("p",null,(0,l.Z)(w("ChatList.DeleteAndLeaveGroupConfirmation",k),["simple_markdown"])):n&&!t.isCreator||h||f?r.ZP.createElement("p",null,(0,l.Z)(w("ChannelLeaveAlertWithName",k),["simple_markdown"])):r.ZP.createElement("p",null,(0,l.Z)(w("ChatList.DeleteChatConfirmation",g),["simple_markdown"])),i&&r.ZP.createElement(m.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:T},w("DeleteAndStop")),p&&r.ZP.createElement(m.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:I},g?(0,l.Z)(w("ChatList.DeleteForEveryone",g)):w("DeleteForAll")),r.ZP.createElement(m.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:S},w(n&&!t.isCreator?"LeaveChannel":n&&t.isCreator?"Chat.Input.Delete":h||f?"Group.LeaveGroup":p?"ChatList.DeleteForCurrentUser":"Delete")),r.ZP.createElement(m.Z,{className:"confirm-dialog-button",isText:!0,onClick:Z},w("Cancel")))})))},2535:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(4050),a=n(5116),s=n(5376),o=n(2858),i=n(3657),c=n(2566),l=n(6202),d=n(706),u=n(7002);const m=(0,r.X$)((({message:e,observeIntersection:t,smaller:n,canAutoLoad:m,autoLoadFileMaxSizeMb:h,uploadProgress:f,withDate:v,datetime:p,className:g,sender:Z,isSelected:E,isSelectable:P,onCancelUpload:y,onMediaClick:C,onDateClick:b,isDownloading:N})=>{const w=(0,a.uC)(),k=(0,r.sO)(null),I=e.content.document,{fileName:T,size:S,timestamp:M}=I,x=(0,s.K2)(I)||"",L=(0,i.Op)(k,t),[A,$]=(0,d.Z)();(0,r.d4)((()=>{L&&$()}),[L,$]);const[O,F]=(0,r.eJ)(m&&(!h||S<=1048576*h)),R=Boolean(N||O&&A),U=(0,o.Ti)(e,"download"),{loadProgress:D,mediaData:B}=(0,c.Z)(U,!R,void 0,void 0,void 0,!0),V=Boolean(B),{isUploading:X,isTransferring:q,transferProgress:K}=(0,o.Sc)(e,f||D,R&&!V),j=(0,s.v6)(I),z=j?(0,o.DH)(e):void 0,H=j?I.previewBlobUrl:void 0,Y=(0,l.Z)((0,o.Ti)(e,"pictogram"),!L),J=C&&Boolean(I.mediaType),W=(0,r.I4)((()=>{X?y&&y():N?w.cancelMessageMediaDownload({message:e}):q?F(!1):J?C():w.downloadMessageMedia({message:e})}),[X,N,q,J,y,w,e,C]),_=(0,r.I4)((()=>{b(e.id,e.chatId)}),[b,e.id,e.chatId]);return r.ZP.createElement(u.Z,{ref:k,name:T,extension:x,size:S,timestamp:v?p||M:void 0,thumbnailDataUri:z,previewData:H||Y,smaller:n,isTransferring:q,isUploading:X,transferProgress:K,className:g,sender:Z,isSelectable:P,isSelected:E,actionIcon:J?(0,o.hC)(e)?"icon-play":"icon-eye":"icon-download",onClick:W,onDateClick:b?_:void 0})}))},7002:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(1212),s=n(692),o=n(6752),i=n(790),c=n(5376),l=n(4399),d=n(2340),u=n(9107),m=n(9196),h=n(8033);const f=(0,r.X$)((({ref:e,name:t,size:n,extension:f="",timestamp:v,sender:p,thumbnailDataUri:g,previewData:Z,className:E,smaller:P,isTransferring:y,isUploading:C,isSelectable:b,isSelected:N,transferProgress:w,actionIcon:k,onClick:I,onDateClick:T})=>{const S=(0,u.Z)();let M=(0,r.sO)(null);e&&(M=e);const x=(0,s.Z)(Z),{shouldRender:L,transitionClassNames:A}=(0,a.Z)(y,void 0,!0),$=(0,c.Oh)(f),O=(0,c.yW)(n),{width:F,height:R}=(0,l.lE)(P),U=(0,o.Z)("File",E,P&&"smaller",I&&!C&&"interactive",N&&"file-is-selected");return r.ZP.createElement("div",{ref:M,className:U,dir:S.isRtl?"rtl":void 0},b&&r.ZP.createElement("div",{className:"message-select-control"},N&&r.ZP.createElement("i",{className:"icon-select"})),r.ZP.createElement("div",{className:"file-icon-container",onClick:C?void 0:I},g||Z?r.ZP.createElement("div",{className:"file-preview media-inner"},r.ZP.createElement("img",{src:g,width:F,height:R,className:"thumbnail",alt:""}),r.ZP.createElement("img",{src:Z,className:(0,o.Z)("full-media",x),width:F,height:R,alt:""})):r.ZP.createElement("div",{className:`file-icon ${$}`},f.length<=4&&r.ZP.createElement("span",{className:"file-ext",dir:"auto"},f)),L&&r.ZP.createElement("div",{className:(0,o.Z)("file-progress",$,A)},r.ZP.createElement(m.Z,{progress:w,size:P?"s":"m",onClick:C?I:void 0})),I&&r.ZP.createElement("i",{className:(0,o.Z)("action-icon",k||"icon-download",L&&"hidden")})),r.ZP.createElement("div",{className:"file-info"},r.ZP.createElement("div",{className:"file-title",dir:"auto"},(0,d.Z)(t)),r.ZP.createElement("div",{className:"file-subtitle",dir:"auto"},r.ZP.createElement("span",null,y&&w?`${Math.round(100*w)}%`:O),p&&r.ZP.createElement("span",{className:"file-sender"},(0,d.Z)(p)),!p&&v&&r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("span",{className:"bullet"}),r.ZP.createElement(h.Z,{onClick:T},(0,i.ZK)(S,1e3*v,!0))))),p&&v&&r.ZP.createElement(h.Z,{onClick:T},(0,i.VX)(S,1e3*v)))}))},8799:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(5116),s=n(1713),o=n(2858),i=n(8085),c=n(2340),l=n(782),d=n(9107),u=n(172),m=n(9411),h=n(8729);const f=(0,r.X$)((0,a.c$)(((e,{chatId:t})=>{const{lastSyncTime:n}=e,r=(0,i.Z1)(e,t);return{lastSyncTime:n,chat:r,onlineCount:r?(0,i.YK)(e,r):void 0,areMessagesLoaded:Boolean((0,i.Zw)(e,t))}}),((e,t)=>(0,l.ei)(t,["loadFullChat","openMediaViewer"])))((({typingStatus:e,avatarSize:t="medium",withMediaViewer:n,withUsername:a,withFullInfo:i,withUpdatingStatus:l,withChatType:f,noRtl:v,chat:p,onlineCount:g,areMessagesLoaded:Z,lastSyncTime:E,loadFullChat:P,openMediaViewer:y})=>{const C=p&&(0,o.ZV)(p),{id:b,isMin:N,isRestricted:w}=p||{};(0,r.d4)((()=>{b&&!N&&i&&E&&P({chatId:b})}),[b,N,E,i,P,C]);const k=(0,r.I4)(((e,n)=>{p&&n&&(e.stopPropagation(),y({avatarOwnerId:p.id,origin:"jumbo"===t?s.bZ.ProfileAvatar:s.bZ.MiddleHeaderAvatar}))}),[p,t,y]),I=(0,d.Z)();if(p)return r.ZP.createElement("div",{className:"ChatInfo",dir:!v&&I.isRtl?"rtl":void 0},r.ZP.createElement(u.Z,{key:p.id,size:t,chat:p,onClick:n?k:void 0}),r.ZP.createElement("div",{className:"info"},r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",{dir:"auto"},(0,c.Z)((0,o.U)(I,p))),p.isVerified&&r.ZP.createElement(m.Z,null)),function(){if(l&&!Z&&!w)return r.ZP.createElement("span",{className:"status",dir:"auto"},I("Updating"));if(!p)return;if(e)return r.ZP.createElement(h.Z,{typingStatus:e});if(f)return r.ZP.createElement("div",{className:"status",dir:"auto"},I((0,o.l6)(p)));const t=a?p.username:void 0,n=function(e,t){const n=e((0,o.l6)(t)),{membersCount:r}=t;return t.isRestricted?"Channel"===n?"channel is inaccessible":"group is inaccessible":r?e("Channel"===n?"Subscribers":"Members",r,"i"):n}(I,p),s=g?`, ${I("OnlineCount",g,"i")}`:void 0;return r.ZP.createElement("div",{className:"status"},t&&r.ZP.createElement("span",{className:"handle"},t),r.ZP.createElement("span",{className:"group-status"},n),s&&r.ZP.createElement("span",{className:"online-status"},s))}()))})))},6844:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(790),s=n(9107),o=n(8018);const i=(0,r.X$)((({message:e,outgoingStatus:t})=>{const n=(0,s.Z)();return r.ZP.createElement("div",{className:"LastMessageMeta"},t&&r.ZP.createElement(o.Z,{status:t}),r.ZP.createElement("span",{className:"time"},(0,a.VX)(n,1e3*e.date)))}))},3709:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(790),s=n(2858),o=n(6752),i=n(6202),c=n(692);const l=(0,r.X$)((({message:e,idPrefix:t="shared-media",onClick:n})=>{const l=(0,r.I4)((()=>{n(e.id,e.chatId)}),[e.id,e.chatId,n]),d=(0,s.DH)(e),u=(0,i.Z)((0,s.Ti)(e,"pictogram")),m=(0,c.Z)(u),h=(0,s.b7)(e);return r.ZP.createElement("div",{id:`${t}${e.id}`,className:"Media scroll-item",onClick:n?l:void 0},r.ZP.createElement("img",{src:d,alt:""}),r.ZP.createElement("img",{src:u,className:(0,o.Z)("full-media",m),alt:""}),h&&r.ZP.createElement("span",{className:"video-duration"},h.isGif?"GIF":(0,a.k9)(h.duration)))}))},8018:(e,t,n)=>{n.d(t,{Z:()=>o});var r,a=n(4050),s=n(2255);!function(e){e[e.failed=0]="failed",e[e.pending=1]="pending",e[e.succeeded=2]="succeeded",e[e.read=3]="read"}(r||(r={}));const o=(0,a.X$)((({status:e})=>a.ZP.createElement("div",{className:"MessageOutgoingStatus"},a.ZP.createElement(s.Z,{name:"reveal",activeKey:r[e]},(()=>a.ZP.createElement("i",{className:`icon-message-${e}`}))))))},7262:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(6752),s=n(1212),o=n(2340),i=n(9107);const c=(0,r.X$)((({text:e="Nothing found.",description:t})=>{const n=(0,i.Z)(),{transitionClassNames:c}=(0,s.Z)(!0);return r.ZP.createElement("div",{className:(0,a.Z)("NothingFound",c,t&&"with-description")},e,t&&r.ZP.createElement("p",{className:"description"},(0,o.Z)(n(t),["br"])))}))},1820:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(4050),a=n(2858),s=n(1273),o=n(4605),i=n(7687),c=n(1876),l=n(6058),d=n(8799),u=n(9187),m=n(7407),h=n(9107),f=n(4288);const v=(0,r.X$)((({itemIds:e,selectedIds:t,filterValue:n,filterPlaceholder:v,notFoundText:p,searchInputId:g,isLoading:Z,noScrollRestore:E,onSelectedIdsChange:P,onFilterChange:y,onLoadMore:C})=>{const b=(0,r.sO)(null),N=t.length>10;(0,r.d4)((()=>{setTimeout((()=>{requestAnimationFrame((()=>{b.current.focus()}))}),500)}),[]);const w=(0,r.I4)((e=>{const n=[...t];n.includes(e)?n.splice(n.indexOf(e),1):n.push(e),P(n),y("")}),[t,P,y]),k=(0,r.I4)((e=>{const{value:t}=e.currentTarget;y(t)}),[y]),[I,T]=(0,m.Z)(C,e,Boolean(n)),S=(0,h.Z)();return r.ZP.createElement("div",{className:"Picker"},r.ZP.createElement("div",{className:"picker-header custom-scroll",dir:S.isRtl?"rtl":void 0},t.map(((e,n)=>r.ZP.createElement(u.Z,{chatOrUserId:e,isMinimized:N&&n<t.length-5,canClose:!0,onClick:w,clickArg:e}))),r.ZP.createElement(i.Z,{id:g,ref:b,value:n,onChange:k,placeholder:v||S("SelectChat")})),null!=I&&I.length?r.ZP.createElement(s.Z,{className:"picker-list custom-scroll",items:I,onLoadMore:T,noScrollRestore:E},I.map((e=>r.ZP.createElement(c.Z,{key:e,className:"chat-item-clickable picker-list-item",onClick:()=>w(e),ripple:!0},r.ZP.createElement(o.Z,{label:"",checked:t.includes(e)}),(0,a.YC)(e)?r.ZP.createElement(l.Z,{userId:e}):r.ZP.createElement(d.Z,{chatId:e}))))):Z||!I||I.length?r.ZP.createElement(f.Z,null):r.ZP.createElement("p",{className:"no-results"},p||"Sorry, nothing found."))}))},9187:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(2340),c=n(6752),l=n(9107),d=n(172);const u=(0,r.X$)((0,a.c$)(((e,{chatOrUserId:t})=>t?{chat:t?(0,s.Z1)(e,t):void 0,user:(0,o.YC)(t)?(0,s.dy)(e,t):void 0}:{}))((({icon:e,title:t,isMinimized:n,canClose:a,onClick:s,clickArg:u,chat:m,user:h,className:f})=>{const v=(0,l.Z)();let p,g;if(e&&t)p=r.ZP.createElement("div",{className:"item-icon"},r.ZP.createElement("i",{className:`icon-${e}`})),g=t;else if(m||h){p=r.ZP.createElement(d.Z,{chat:m,user:h,size:"small",isSavedMessages:null==h?void 0:h.isSelf});const e=!m||h&&!h.isSelf?(0,o.Vl)(h):(0,o.U)(v,m,h);g=e?(0,i.Z)(e):void 0}const Z=(0,c.Z)("PickerSelectedItem",f,n&&"minimized",a&&"closeable");return r.ZP.createElement("div",{className:Z,onClick:()=>s(u),title:n?g:void 0,dir:v.isRtl?"rtl":void 0},p,!n&&r.ZP.createElement("div",{className:"item-name",dir:"auto"},g),a&&r.ZP.createElement("div",{className:"item-remove"},r.ZP.createElement("i",{className:"icon-close"})))})))},6058:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(5116),s=n(1713),o=n(8085),i=n(2858),c=n(2340),l=n(782),d=n(9107),u=n(172),m=n(9411),h=n(8729);const f=(0,r.X$)((0,a.c$)(((e,{userId:t,forceShowSelf:n})=>{const{lastSyncTime:r,serverTimeOffset:a}=e,s=(0,o.dy)(e,t);return{lastSyncTime:r,user:s,isSavedMessages:!n&&s&&s.isSelf,areMessagesLoaded:Boolean((0,o.Zw)(e,t)),serverTimeOffset:a}}),((e,t)=>(0,l.ei)(t,["loadFullUser","openMediaViewer"])))((({typingStatus:e,avatarSize:t="medium",status:n,withMediaViewer:a,withUsername:o,withFullInfo:l,withUpdatingStatus:f,noStatusOrTyping:v,noRtl:p,user:g,isSavedMessages:Z,areMessagesLoaded:E,lastSyncTime:P,serverTimeOffset:y,loadFullUser:C,openMediaViewer:b})=>{const{id:N}=g||{},w=(0,i.Js)(g);(0,r.d4)((()=>{l&&P&&N&&C({userId:N})}),[N,C,P,l]);const k=(0,r.I4)(((e,n)=>{g&&n&&(e.stopPropagation(),b({avatarOwnerId:g.id,origin:"jumbo"===t?s.bZ.ProfileAvatar:s.bZ.MiddleHeaderAvatar}))}),[g,t,b]),I=(0,d.Z)();if(g)return r.ZP.createElement("div",{className:"ChatInfo",dir:!p&&I.isRtl?"rtl":void 0},r.ZP.createElement(u.Z,{key:g.id,size:t,user:g,isSavedMessages:Z,onClick:a?k:void 0}),r.ZP.createElement("div",{className:"info"},Z?r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",null,I("SavedMessages"))):r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",{dir:"auto"},w&&(0,c.Z)(w)),(null==g?void 0:g.isVerified)&&r.ZP.createElement(m.Z,null)),(n||!Z&&!v)&&(n?r.ZP.createElement("span",{className:"status",dir:"auto"},n):f&&!E?r.ZP.createElement("span",{className:"status",dir:"auto"},I("Updating")):g?e?r.ZP.createElement(h.Z,{typingStatus:e}):r.ZP.createElement("div",{className:"status "+((0,i.kM)(g)?"online":"")},o&&g.username&&r.ZP.createElement("span",{className:"handle"},g.username),r.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,i.Tq)(I,g,y))):void 0)))})))},787:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(4050),a=n(5116),s=n(1713),o=n(7361),i=n(8085),c=n(2858),l=n(2340),d=n(782),u=n(1174),m=n(6752),h=n(6137),f=n(647),v=n(9107),p=n(9411),g=n(2155),Z=n(6202),E=n(2937),P=n(7204),y=n(9204);const C=(0,r.X$)((({chat:e,user:t,photo:n,isFirstPhoto:a,isSavedMessages:s,lastSyncTime:o,onClick:i})=>{const d=(0,v.Z)(),u=t&&(0,c.NB)(t),f=e&&(0,c.pK)(e.id);function p(r,a){if(n&&!a)return`photo${n.id}?size=c`;let o;return s||u||f||(t?o=(0,c.RT)(t,r):e&&(o=(0,c.RT)(e,r))),o}const C=(0,Z.Z)(p("big"),!1,h.IU.BlobUrl,o),b=a&&!C?p("normal",!0):void 0,N=(0,Z.Z)(b,!1,h.IU.BlobUrl,o),w=(0,E.Z)(!C&&n&&n.thumbnail&&n.thumbnail.dataUri),k=C||N||w,I=(0,P.Z)(k);let T="";if(s)T=r.ZP.createElement("i",{className:"icon-avatar-saved-messages"});else if(u)T=r.ZP.createElement("i",{className:"icon-avatar-deleted-account"});else if(f)T=r.ZP.createElement("i",{className:"icon-reply-filled"});else if(k)T=r.ZP.createElement("img",{src:k,className:"avatar-media",alt:"",decoding:"async"});else if(!k&&t){const e=(0,c.Js)(t);T=e?(0,g.Xv)(e,2):void 0}else if(!k&&e){const t=(0,c.U)(d,e);T=t&&(0,g.Xv)(t,(0,c.YC)(e.id)?2:1)}else T=r.ZP.createElement("div",{className:"spinner-wrapper"},r.ZP.createElement(y.Z,{color:"white"}));const S=(0,m.Z)("ProfilePhoto",`color-bg-${(0,c.Rs)(t||e)}`,s&&"saved-messages",u&&"deleted-account",f&&"replies-bot-account",!s&&!k&&"no-photo");return r.ZP.createElement("div",{className:S,onClick:k?i:void 0},I&&k&&I!==k&&r.ZP.createElement("img",{src:I,className:"prev-avatar-media",alt:"",decoding:"async"}),"string"==typeof T?(0,l.Z)(T,["hq_emoji"]):T)}));var b=n(2255);const N=(0,r.X$)((0,a.c$)(((e,{userId:t,forceShowSelf:n})=>{const{connectionState:r,serverTimeOffset:a}=e,s=(0,i.dy)(e,t),o=(0,i.Z1)(e,t),c=!n&&s&&s.isSelf,{animationLevel:l}=e.settings.byKey;return{connectionState:r,user:s,chat:o,isSavedMessages:c,animationLevel:l,serverTimeOffset:a}}),((e,t)=>(0,d.ei)(t,["loadFullUser","openMediaViewer"])))((({forceShowSelf:e,user:t,chat:n,isSavedMessages:a,connectionState:i,animationLevel:d,serverTimeOffset:g,loadFullUser:Z,openMediaViewer:E})=>{var P;const{id:y}=t||{},{id:N}=n||{},w=t?(0,c.Js)(t):n?n.title:"",k=(null==t?void 0:t.photos)||(null==n?void 0:n.photos)||[],I=d>=1?"slide":"none",[T,S]=(0,r.eJ)(0),M=a||k.length<=1||0===T,x=a||k.length<=1||T===k.length-1;(0,r.d4)((()=>{T>k.length&&S(Math.max(0,k.length-1))}),[T,k.length]);const L=(0,v.Z)();(0,r.d4)((()=>{"connectionStateReady"===i&&y&&!e&&Z({userId:y})}),[y,Z,i,e]),function(e,t,n){(0,r.d4)((()=>{t.slice(n,n+4).forEach((e=>{f.UV(`photo${e.id}?size=c`)||f.he(`photo${e.id}?size=c`,h.IU.BlobUrl)}))}),[n,t])}(0,k,T);const A=(0,r.I4)((()=>{E({avatarOwnerId:y||N,profilePhotoIndex:T,origin:e?s.bZ.SettingsAvatar:s.bZ.ProfileAvatar})}),[E,y,N,T,e]),$=(0,r.I4)((()=>{M||S(T-1)}),[T,M]),O=(0,r.I4)((()=>{x||S(T+1)}),[T,x]);if((0,r.d4)((()=>{const e=document.querySelector(".photo-wrapper");if(e)return(0,u.s)(e,{selectorToPreventScroll:".Profile, .settings-content",onSwipe:o.$b?(e,t)=>t===u.e.Right?($(),!0):t===u.e.Left&&(O(),!0):void 0})}),[O,$]),!t&&!n)return;function F(){const e=!a&&k&&k.length>0?k[T]:void 0;return r.ZP.createElement(C,{key:T,user:t,chat:n,photo:e,isSavedMessages:a,isFirstPhoto:M,onClick:A})}const R=null===(P=t||n)||void 0===P?void 0:P.isVerified;return r.ZP.createElement("div",{className:(0,m.Z)("ProfileInfo",e&&"self"),dir:L.isRtl?"rtl":void 0},r.ZP.createElement("div",{className:"photo-wrapper"},function(){if(!(a||!k||k.length<=1))return r.ZP.createElement("div",{className:"photo-dashes"},k.map(((e,t)=>r.ZP.createElement("span",{className:"photo-dash "+(t===T?"current":"")}))))}(),r.ZP.createElement(b.Z,{activeKey:T,name:I,className:"profile-slide-container"},F),!M&&r.ZP.createElement("button",{type:"button",className:"navigation prev","aria-label":L("AccDescrPrevious"),onClick:$}),!x&&r.ZP.createElement("button",{type:"button",className:"navigation next","aria-label":L("Next"),onClick:O})),r.ZP.createElement("div",{className:"info",dir:L.isRtl?"rtl":"auto"},a?r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",{dir:"auto"},L("SavedMessages"))):r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",{dir:"auto"},w&&(0,l.Z)(w)),R&&r.ZP.createElement(p.Z,null)),!a&&(t?r.ZP.createElement("div",{className:"status "+((0,c.kM)(t)?"online":"")},r.ZP.createElement("span",{className:"user-status",dir:"auto"},(0,c.Tq)(L,t,g))):r.ZP.createElement("span",{className:"status",dir:"auto"},(0,c.eA)(n)?L("Subscribers",null!==(U=n.membersCount)&&void 0!==U?U:0,"i"):L("Members",null!==(D=n.membersCount)&&void 0!==D?D:0,"i")))));var U,D})))},3547:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(6137),s=n(3657),o=n(6202),i=n(1212),c=n(706),l=n(6752),d=n(386),u=n(7799),m=n(231);const h=(0,r.X$)((({sticker:e,size:t,observeIntersection:n,noAnimate:h,title:f,className:v,onClick:p,clickArg:g,onUnfaveClick:Z})=>{const E=(0,r.sO)(null),P=`sticker${e.id}`,y=`sticker-button-${e.id}`,C=(0,s.Op)(E,n),b=e.thumbnail?e.thumbnail.dataUri:void 0,N=(0,o.Z)(`${P}?size=m`,!C,a.IU.BlobUrl),w=C&&!h,k=(0,o.Z)(e.isAnimated&&P,!w,a.IU.Lottie),[I,T,S]=(0,c.Z)(Boolean(k)),M=I&&w,{transitionClassNames:x}=(0,i.Z)(Boolean(N||M),void 0,void 0,"slow");(0,r.d4)((()=>{w||S()}),[S,w]);const L=(0,l.Z)("StickerButton",p&&"interactive",e.isAnimated&&"animated",y,v),A=b&&!M?`background-image: url('${b}');`:"";return r.ZP.createElement("div",{ref:E,className:L,title:f||(null==e?void 0:e.emoji),style:A,"data-sticker-id":e.id,onMouseDown:d.b,onClick:function(){p&&p(g)}},!M&&r.ZP.createElement("img",{src:N,className:x}),w&&k&&r.ZP.createElement(u.Z,{id:P,animationData:k,play:!0,size:t,isLowPriority:!0,onLoad:T}),Z&&r.ZP.createElement(m.Z,{className:"sticker-unfave-button",color:"dark",round:!0,onClick:function(t){t.stopPropagation(),t.preventDefault(),Z(e)}},r.ZP.createElement("i",{className:"icon-close"})))}))},4851:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9203),s=n(8778);const o=(0,r.X$)((e=>{const{isOpen:t}=e,n=(0,s.Z)(a.gl.Extra,"StickerSetModal",!t);return n?r.ZP.createElement(n,e):void 0}))},8729:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(5116),s=n(8085),o=n(2858),i=n(2340),c=n(9107);const l=(0,r.X$)((0,a.c$)(((e,{typingStatus:t})=>t.userId?{typingUser:(0,s.dy)(e,t.userId)}:{}))((({typingStatus:e,typingUser:t})=>{const n=(0,c.Z)(),a=t&&!t.isSelf&&(0,o.Vl)(t);return r.ZP.createElement("p",{className:"typing-status",dir:n.isRtl?"rtl":"auto"},a&&r.ZP.createElement("span",{className:"sender-name",dir:"auto"},(0,i.Z)(a)),n(e.action).replace("{user}","").trim(),r.ZP.createElement("span",{className:"ellipsis"}))})))},9411:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);const a=()=>r.ZP.createElement("span",{className:"VerifiedIcon"})},5418:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(2858),s=n(6752),o=n(8035),i=n(2340),c=n(790),l=n(9107),d=n(3709),u=n(8033),m=n(88);const h=(0,r.X$)((({message:e,senderTitle:t,onMessageClick:n})=>{const h=(0,l.Z)();let f=(0,a.s1)(e);if(!f){const t=(0,a.T7)(e);if(t){const{url:n,domain:r}=t,s=(0,a.MK)(h,e);f={siteName:r.replace(/^www./,""),url:n.includes("://")?n:n.includes("@")?`mailto:${n}`:`http://${n}`,description:s!==n?s:void 0}}}const v=(0,r.I4)((()=>{n(e.id,e.chatId)}),[n,e.id,e.chatId]);if(!f)return;const{siteName:p,url:g,displayUrl:Z,title:E,description:P,photo:y,video:C}=f,b=!t&&(0,o.Z)(P,170),N=(0,s.Z)("WebLink scroll-item",!y&&!C&&"without-media");return r.ZP.createElement("div",{className:N,"data-initial":(p||Z)[0],dir:h.isRtl?"rtl":void 0},y&&r.ZP.createElement(d.Z,{message:e}),r.ZP.createElement("div",{className:"content"},r.ZP.createElement(u.Z,{isRtl:h.isRtl,className:"site-title",onClick:v},(0,i.Z)(E||p||Z)),b&&r.ZP.createElement(u.Z,{isRtl:h.isRtl,className:"site-description",onClick:v},(0,i.Z)(b)),r.ZP.createElement(m.Z,{url:g,className:"site-name",text:"",isRtl:h.isRtl},g.replace("mailto:","")||Z),t&&r.ZP.createElement("div",{className:"sender-name"},(0,i.Z)(t))),t&&r.ZP.createElement("div",{className:"message-date"},r.ZP.createElement(u.Z,{className:"date",onClick:v,isRtl:h.isRtl},(0,c.VX)(h,1e3*e.date))))}))},4399:(e,t,n)=>{n.d(t,{L6:()=>i,Gw:()=>c,Rj:()=>l,vY:()=>d,wB:()=>u,kc:()=>p,fM:()=>Z,Eh:()=>E,GC:()=>P,W7:()=>y,lE:()=>C,Wr:()=>b,PA:()=>N,jg:()=>w});var r=n(3716),a=n(7361),s=n(3858),o=n(2858);const i="(max-height: 640px)",c=parseInt(getComputedStyle(document.documentElement).fontSize,10),l=240,d={width:640,height:640},u="1258816259753933",m={width:100,height:100};let h,f,v;function p(e,t,n,r){const o=t||n?1.625:0;return(function(e,t){const n=e?30:29;if(!a.wB)return n;const{width:r}=s.Z.get();return h||(h=Math.min(30,r/c-4.5)),f||(f=Math.min(29,r/c-7)),v||(v=Math.min(29,r/c-4.5)),e?h:t?v:f}(e,r)-o)*c}function g({width:e,height:t,fromOwnMessage:n,isForwarded:r,isWebPagePhoto:a,isGif:s,noAvatars:o}){const i=t/e,l=p(n,r,a,o),d=function(e,t){return e&&t&&t>=.75&&t<=1.25?20*c:27*c}(s,i),u=s?Math.max(300,e):e;return w(l,d,u,s?t*(u/e):t)}function Z(e,t){const n=window.matchMedia(i),{width:r,height:a}=s.Z.get();let o=t&&n.matches?10:8.25;return e&&(o=n.matches?10:15),{width:r,height:a-o*c}}function E(e,t,n,r,a){const{width:s,height:i}=(0,o.HV)(e)||m;return g({width:s,height:i,fromOwnMessage:t,isForwarded:n,isWebPagePhoto:r,noAvatars:a})}function P(e,t,n,r){const{width:a,height:s}=(0,o.jC)(e)||m;return g({width:a,height:s,fromOwnMessage:t,isForwarded:n,isGif:e.isGif,noAvatars:r})}function y(){return{width:2*c,height:2*c}}function C(e){return e?{width:3*c,height:3*c}:{width:3.375*c,height:3.375*c}}function b(e){const{width:t}=e;let{height:n}=e;e.id===u&&(n=t);const s=n&&t&&n/t,o=c*(a.wB?r.w7:r.K7),i=s?o*s:o;return s&&i>o?{width:Math.round(o/s),height:o}:{width:o,height:i}}function N({width:e,height:t},n,r=!1){const{width:a,height:s}=Z(n,r);return w(a,s,e,t)}function w(e,t,n,r){const a=r/n,s=Math.min(n,e);return Math.round(s*a)>t?{width:Math.round(t/a),height:t}:{width:s,height:Math.round(s*a)}}},935:(e,t,n)=>{n.d(t,{X:()=>d,H:()=>h});var r=n(4050),a=n(5116),s=n(6137),o=n(2858),i=n(2340),c=n(7373),l=n(88);function d(e,t,n){const r=e.content.text;if(!r||!r.text){const t=(0,o.UD)(e);return t?[t]:void 0}const{text:a,entities:s}=r;return h(a,s,t,n)}function u(e,t,n,r){const{offset:a,length:s}=e,o=new Set([t]);if(r.has(t))return;const i=[];return n.filter(((e,n)=>n>t&&e.offset>=a&&e.offset<a+s)).map((e=>u(e,n.indexOf(e),n,r))).filter(Boolean).forEach((e=>{let t=!1;e.organizedIndexes.forEach((e=>{t||o.has(e)||(t=!0),o.add(e)})),t&&i.push(e)})),{entity:e,organizedIndexes:o,nestedEntities:i}}function m(e){const t=new Set,n=[];return e.forEach(((r,a)=>{if(t.has(a))return;const s=u(r,a,e,t);s&&(s.organizedIndexes.forEach((e=>{t.add(e)})),n.push(s))})),n}function h(e,t,n,a,o){if(!t||!t.length)return f(e,n,a,o);const d=[];let u=!1;const h=m(t);function Z(t,d,m,h){const E=[],{entity:P,nestedEntities:y}=m,{offset:C,length:b,type:N}=P;let w=e.substring(t,C);const k=w.length;w&&(u&&w.length>0&&"\n"===w[0]&&(w=w.substr(1),u=!1),w&&E.push(...f(w,n,a,o)));const I=t+k,T=I+b;let S=e.substring(C,C+b);const M=[];if(u&&S.length>0&&"\n"===S[0]&&(S=S.substr(1),u=!1),N===s.Vv.Pre&&(u=!0),y.length){let e=I;y.forEach(((t,n)=>{const{renderResult:r,entityEndIndex:a}=Z(e,T,t,n===y.length-1);M.push(...r),e=a}))}const x=o?function(e,t,n){const r="string"==typeof t&&t,a=n.length?n.join(""):(0,i.Z)(t,["escape_html","emoji_html","br_html"]).join("");if(!r)return a;switch(e.type){case s.Vv.Bold:return`<b>${a}</b>`;case s.Vv.Italic:return`<i>${a}</i>`;case s.Vv.Underline:return`<u>${a}</u>`;case s.Vv.Code:return`<code class="text-entity-code">${a}</code>`;case s.Vv.Pre:return`\`\`\`<br/>${a}<br/>\`\`\``;case s.Vv.Strike:return`<del>${a}</del>`;case s.Vv.MentionName:return`<a\n class="text-entity-link"\n data-entity-type="${s.Vv.MentionName}"\n data-user-id="${e.userId}"\n contenteditable="false"\n dir="auto"\n >${a}</a>`;case s.Vv.Url:case s.Vv.TextUrl:return`<a\n class="text-entity-link"\n href=${v(r,e)}\n data-entity-type="${e.type}"\n dir="auto"\n >${a}</a>`;default:return a}}(P,S,M):function(e,t,n){const a="string"==typeof t&&t,o=n.length?n:t;if(!a)return f(o);switch(e.type){case s.Vv.Bold:return r.ZP.createElement("strong",null,f(o));case s.Vv.Blockquote:return r.ZP.createElement("blockquote",null,f(o));case s.Vv.BotCommand:return r.ZP.createElement("a",{onClick:p,className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Hashtag:case s.Vv.Cashtag:return r.ZP.createElement("a",{onClick:g,className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Code:return r.ZP.createElement("code",{className:"text-entity-code"},f(o));case s.Vv.Email:return r.ZP.createElement("a",{href:`mailto:${a}`,target:"_blank",rel:"noopener noreferrer",className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Italic:return r.ZP.createElement("em",null,f(o));case s.Vv.MentionName:return r.ZP.createElement(c.Z,{userId:e.userId},f(o));case s.Vv.Mention:return r.ZP.createElement(c.Z,{username:a},f(o));case s.Vv.Phone:return r.ZP.createElement("a",{href:`tel:${a}`,className:"text-entity-link",dir:"auto"},f(o));case s.Vv.Pre:return r.ZP.createElement("pre",{className:"text-entity-pre"},f(o));case s.Vv.Strike:return r.ZP.createElement("del",null,f(o));case s.Vv.TextUrl:case s.Vv.Url:return r.ZP.createElement(l.Z,{url:v(a,e),text:a},f(o));case s.Vv.Underline:return r.ZP.createElement("ins",null,f(o));default:return f(o)}}(P,S,M);if(Array.isArray(x)?E.push(...x):E.push(x),h&&T<d){let t=e.substring(T,d);u&&t.length>0&&"\n"===t[0]&&(t=t.substring(1)),t&&E.push(...f(t,n,a,o))}return{renderResult:E,entityEndIndex:T}}let E=0;return h.forEach(((t,n)=>{const{renderResult:r,entityEndIndex:a}=Z(E,e.length,t,n===h.length-1);d.push(...r),E=a})),d}function f(e,t,n,r){if(Array.isArray(e)){const a=[];return e.forEach((e=>{a.push(...f(e,t,n,r))})),a}if(r)return(0,i.Z)(e,["escape_html","emoji_html","br_html"]);const a=n?"hq_emoji":"emoji";return t?(0,i.Z)(e,[a,"br","highlight"],{highlight:t}):(0,i.Z)(e,[a,"br"])}function v(e,t){const{type:n,url:r}=t;return n===s.Vv.TextUrl&&r?r:e}function p(e){(0,a.uC)().sendBotCommand({command:e.currentTarget.innerText})}function g(e){(0,a.uC)().setLocalTextSearchQuery({query:e.currentTarget.innerText}),(0,a.uC)().searchTextMessagesLocal()}},742:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9203),s=n(8778);const o=(0,r.X$)((e=>{const{isOpen:t}=e,n=(0,s.Z)(a.gl.Extra,"ChatFolderModal",!t);return n?r.ZP.createElement(n,e):void 0}))},9359:(e,t,n)=>{n.d(t,{Z:()=>V});var r=n(4050),a=n(5116),s=n(3716),o=n(7361),i=n(7204),c=n(782),l=n(2858),d=n(8085),u=n(7407);let m;!function(e){e[e.Move=0]="Move",e[e.Opacity=1]="Opacity",e[e.None=2]="None"}(m||(m={}));var h=n(1273),f=n(4288),v=n(9107),p=n(6137),g=n(2864),Z=n(2340),E=n(9118),P=n(6752),y=n(5790),C=n(1470),b=n(706),N=n(6202),w=n(172),k=n(9411),I=n(8729),T=n(6844),S=n(329),M=n(1876),x=n(2155),L=n(126);const A=(0,r.X$)((({chat:e,isPinned:t,isMuted:n})=>{const a=Boolean(e.unreadCount||e.hasUnreadMark||t),s=(0,P.Z)("Badge",n&&"muted",t&&"pinned",Boolean(e.unreadCount||e.hasUnreadMark)&&"unread");function o(){return e.unreadCount?e.unreadMentionsCount?r.ZP.createElement("div",{className:"Badge-wrapper"},r.ZP.createElement("div",{className:"Badge mention"},r.ZP.createElement("i",{className:"icon-mention"})),r.ZP.createElement("div",{className:s},(0,x.bi)(e.unreadCount))):r.ZP.createElement("div",{className:s},(0,x.bi)(e.unreadCount)):e.hasUnreadMark?r.ZP.createElement("div",{className:s}):t?r.ZP.createElement("div",{className:s},r.ZP.createElement("i",{className:"icon-pinned-chat"})):void 0}return r.ZP.createElement(L.Z,{isCustom:!0,className:"Badge-transition",isOpen:a},o)}));var $=n(742);const O=(0,r.X$)((0,a.c$)(((e,{chatId:t})=>{const n=(0,d.Z1)(e,t);if(!n||!n.lastMessage)return{};const{senderId:r,replyToMessageId:a,isOutgoing:s}=n.lastMessage,o=r?(0,d.dy)(e,r):void 0,i=(0,l.N5)(n.lastMessage),c=i&&a?(0,d.hj)(e,n.id,a):void 0,{targetUserIds:u,targetChatId:m}=i||{},h=(0,l.zX)(n),{byId:f}=e.users,{chatId:v,threadId:g,type:Z}=(0,d.Bt)(e)||{},E=t===v&&g===p._f;return{chat:n,isMuted:(0,l.i4)(n,(0,d.dZ)(e),(0,d.NJ)(e)),lastMessageSender:o,actionTargetUserIds:u,actionTargetChatId:m,actionTargetMessage:c,draft:(0,d.Ms)(e,t,p._f),animationLevel:e.settings.byKey.animationLevel,isSelected:E,canScrollDown:E&&"thread"===Z,lastSyncTime:e.lastSyncTime,...s&&{lastMessageOutgoingStatus:(0,d.dT)(e,n.lastMessage)},...h&&{privateChatUser:(0,d.dy)(e,h)},...u&&{usersById:f}}}),((e,t)=>(0,c.ei)(t,["openChat","focusLastMessage"])))((({style:e,chatId:t,folderId:n,orderDiff:a,animationType:i,isPinned:c,chat:d,isMuted:u,privateChatUser:h,actionTargetUserIds:f,usersById:p,lastMessageSender:x,lastMessageOutgoingStatus:L,actionTargetMessage:O,actionTargetChatId:F,draft:R,animationLevel:U,isSelected:D,canScrollDown:B,lastSyncTime:V,openChat:X,focusLastMessage:q})=>{const K=(0,r.sO)(null),[j,z,H]=(0,b.Z)(),[Y,J,W]=(0,b.Z)(),[_,G,Q]=(0,b.Z)(),[ee,te,ne]=(0,b.Z)(),{lastMessage:re,typingStatus:ae}=d||{},se=re&&(0,l.Lo)(re);(0,y.Z)(t,se?re.replyToMessageId:void 0,O);const oe=re&&!(0,l.bf)(re)?(0,l.DH)(re):void 0,ie=(0,N.Z)(re?(0,l.Ti)(re,"micro"):void 0),ce=Boolean(re&&(0,l.Y5)(re)),le=(0,r.Ye)((()=>f?f.map((e=>null==p?void 0:p[e])).filter(Boolean):void 0),[f,p]);(0,r.bt)((()=>{const e=K.current;if(0!==U&&e){if(i===m.Opacity)e.style.opacity="0",(0,E.T2)((()=>{e.classList.add("animate-opacity"),e.style.opacity="1"}));else{if(i!==m.Move)return;e.style.transform=`translate3d(0, ${100*-a}%, 0)`,(0,E.T2)((()=>{e.classList.add("animate-transform"),e.style.transform=""}))}setTimeout((()=>{(0,E.T2)((()=>{e.classList.remove("animate-opacity","animate-transform"),e.style.opacity="",e.style.transform=""}))}),200+s.fK)}}),[U,a,i]);const de=(0,r.I4)((()=>{X({id:t,shouldReplaceHistory:!0}),D&&B&&q()}),[D,B,X,t,q]),ue=(0,C.Z)({chat:d,privateChatUser:h,handleDelete:function(){G(),z()},handleChatFolderChange:function(){te(),J()},folderId:n,isPinned:c,isMuted:u}),me=(0,v.Z)();if(!d)return;const he=(0,P.Z)("Chat chat-item-clickable",(0,l.YC)(t)?"private":"group",D&&"selected");return r.ZP.createElement(M.Z,{ref:K,className:he,style:e,ripple:!o.wB,contextActions:ue,onClick:de},r.ZP.createElement("div",{className:"status"},r.ZP.createElement(w.Z,{chat:d,user:h,withOnlineStatus:!0,isSavedMessages:null==h?void 0:h.isSelf,lastSyncTime:V})),r.ZP.createElement("div",{className:"info"},r.ZP.createElement("div",{className:"title"},r.ZP.createElement("h3",null,(0,Z.Z)((0,l.U)(me,d,h))),d.isVerified&&r.ZP.createElement(k.Z,null),u&&r.ZP.createElement("i",{className:"icon-muted"}),d.lastMessage&&r.ZP.createElement(T.Z,{message:d.lastMessage,outgoingStatus:L})),r.ZP.createElement("div",{className:"subtitle"},function(){if(ae&&re&&ae.timestamp>1e3*re.date)return r.ZP.createElement(I.Z,{typingStatus:ae});if(null!=R&&R.text.length)return r.ZP.createElement("p",{className:"last-message",dir:me.isRtl?"auto":"ltr"},r.ZP.createElement("span",{className:"draft"},me("Draft")),(0,Z.Z)(R.text));if(!re)return;if(se){const e=d&&((0,l.eA)(d)||re.senderId===re.chatId)?d:x;return r.ZP.createElement("p",{className:"last-message",dir:me.isRtl?"auto":"ltr"},(0,Z.Z)((0,g.D)(me,re,e,le,O,F,{asPlain:!0})))}const e=(0,l.zF)(me,t,x);return r.ZP.createElement("p",{className:"last-message",dir:me.isRtl?"auto":"ltr"},e&&r.ZP.createElement(r.ZP.Fragment,null,r.ZP.createElement("span",{className:"sender-name"},(0,Z.Z)(e)),r.ZP.createElement("span",{className:"colon"},":")),function(e,t,n,a){return n?r.ZP.createElement("span",{className:"media-preview"},r.ZP.createElement("img",{src:n,alt:"",className:a?"round":void 0}),(0,l.b7)(t)&&r.ZP.createElement("i",{className:"icon-play"}),(0,Z.Z)((0,l.MK)(e,t,!0))):(0,Z.Z)((0,l.MK)(e,t))}(me,re,ie||oe,ce))}(),r.ZP.createElement(A,{chat:d,isPinned:c,isMuted:u}))),_&&r.ZP.createElement(S.Z,{isOpen:j,onClose:H,onCloseAnimationEnd:Q,chat:d}),ee&&r.ZP.createElement($.Z,{isOpen:Y,onClose:W,onCloseAnimationEnd:ne,chatId:t}))})));var F=n(1713),R=n(231),U=n(7854);const D=(0,r.X$)((0,a.c$)(((e,{folderId:t,folderType:n})=>({chatFolder:t&&"folder"===n?(0,d.Mw)(e,t):void 0,animatedEmoji:(0,d.zB)(e,"📂")})))((({chatFolder:e,animatedEmoji:t,foldersDispatch:n,onScreenSelect:a})=>{const s=(0,v.Z)(),i=(0,r.I4)((()=>{n({type:"editFolder",payload:e}),a(F.MT.FoldersEditFolderFromChatList)}),[e,n,a]);return r.ZP.createElement("div",{className:"EmptyFolder"},r.ZP.createElement("div",{className:"sticker"},t&&r.ZP.createElement(U.Z,{sticker:t})),r.ZP.createElement("h3",{className:"title",dir:"auto"},s("FilterNoChatsToDisplay")),r.ZP.createElement("p",{className:"description",dir:"auto"},s(e?"ChatList.EmptyChatListFilterText":"Chat.EmptyChat")),e&&n&&a&&r.ZP.createElement(R.Z,{ripple:!o.wB,fluid:!0,pill:!0,onClick:i,size:"smaller",isRtl:s.isRtl},r.ZP.createElement("i",{className:"icon-settings"}),s("ChatList.EmptyChatListEditFilter")))})));var B;!function(e){e.all="active",e.archived="archived"}(B||(B={}));const V=(0,r.X$)((0,a.c$)(((e,{folderType:t,folderId:n})=>{const{chats:{listIds:r,byId:a,orderedPinnedIds:s},users:{byId:o},lastSyncTime:i}=e,c="folder"!==t?B[t]:void 0,l=n?(0,d.Mw)(e,n):void 0;return{chatsById:a,usersById:o,lastSyncTime:i,notifySettings:(0,d.dZ)(e),notifyExceptions:(0,d.NJ)(e),...c?{listIds:r[c],orderedPinnedIds:s[c]}:{chatFolder:l}}}),((e,t)=>(0,c.ei)(t,["loadMoreChats","preloadTopChatMessages","preloadArchivedChats","openChat","openNextChat"])))((({folderType:e,folderId:t,isActive:n,chatFolder:a,chatsById:d,usersById:v,listIds:p,orderedPinnedIds:g,lastSyncTime:Z,foldersDispatch:E,notifySettings:P,notifyExceptions:y,onScreenSelect:C,loadMoreChats:b,preloadTopChatMessages:N,preloadArchivedChats:w,openChat:k,openNextChat:I})=>{const[T,S]=(0,r.Ye)((()=>"folder"===e&&a?(0,l.P4)(d,v,a,P,y):[p,g]),[e,a,d,v,P,y,p,g]),[M,x]=(0,r.Ye)((()=>{if(!T||"folder"===e&&!a)return[];const t=(0,l.O)(d,T,S,e),n=[...t.pinnedChats,...t.otherChats],r=n.map((({id:e})=>e));return[n.reduce(((e,t,n)=>(e[t.id]=n,e)),{}),r]}),[T,S,e,a,d]),L=(0,i.Z)(M),A=(0,r.Ye)((()=>M&&L?(0,c.Q8)(M,((e,t)=>e-(void 0!==L[t]?L[t]:1/0))):{}),[M,L]),$=(0,r.I4)((()=>{b({listType:"archived"===e?"archived":"active"})}),[b,e]),[F,R]=(0,u.Z)(Z?$:void 0,x,void 0,s.t_,"all"===e&&!s.NM),U=F&&(0,l.O)(d,F,S,e);(0,r.d4)((()=>{Z&&"all"===e&&(N(),w())}),[Z,e,N,w]);const B=function(e){const t=(0,r.I4)((t=>e[t]<0),[e]),n=(0,r.I4)((t=>e[t]>0),[e]),a=Object.keys(e),s=a.filter(t).length,o=a.filter(n).length;return(0,r.I4)((r=>{const a=e[r];return 0===a?m.None:a===1/0||a===-1/0||t(r)&&s<=o||n(r)&&o<s?m.Opacity:m.Move}),[n,t,o,s,e])}(A);return(0,r.d4)((()=>{const e=e=>{if(n&&x){if(o.fl&&(o.jm&&e.metaKey||!o.jm&&e.ctrlKey)&&e.code.startsWith("Digit")){const[,t]=e.code.match(/Digit(\d)/)||[];if(!t)return;const n=Number(t)-1;if(n>x.length-1)return;k({id:x[n],shouldReplaceHistory:!0})}if(e.altKey){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(!t)return;e.preventDefault(),I({targetIndexDelta:t,orderedIds:x})}}};return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}})),r.ZP.createElement(h.Z,{className:"chat-list custom-scroll",items:F,onLoadMore:R,preloadBackwards:s.t_,noFastList:!0,noScrollRestore:!0},null!=F&&F.length&&U?function(){const e=x.indexOf(F[0]),n=e+U.pinnedChats.length;return r.ZP.createElement("div",{className:"scroll-container",style:o.wZ?`height: ${x.length*s.rS}px`:void 0,teactFastList:!0},U.pinnedChats.map((({id:n},a)=>r.ZP.createElement(O,{key:n,teactOrderKey:a,chatId:n,isPinned:!0,folderId:t,animationType:B(n),orderDiff:A[n],style:`top: ${(e+a)*s.rS}px;`}))),U.otherChats.map(((e,a)=>r.ZP.createElement(O,{key:e.id,teactOrderKey:(0,l.OE)(e),chatId:e.id,folderId:t,animationType:B(e.id),orderDiff:A[e.id],style:`top: ${(n+a)*s.rS}px;`}))))}():F&&!F.length?r.ZP.createElement(D,{folderId:t,folderType:e,foldersDispatch:E,onScreenSelect:C}):r.ZP.createElement(f.Z,{key:"loading"}))})))},91:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(2858);function a(e,t,n,a){const{senderId:s}=t;if(!s)return;const o=(0,r.YC)(s)?a[s]:n[s];let i=(0,r.OU)(e,o);const c=n[t.chatId];return c&&((0,r.YC)(s)&&o.isSelf?i=`${e("FromYou")} → ${(0,r.U)(e,c)}`:(0,r.Bf)(c)&&(i+=` → ${(0,r.U)(e,c)}`)),i}},2420:(e,t,n)=>{n.d(t,{t:()=>d,Z:()=>u});var r=n(4050),a=n(1212),s=n(6752),o=n(3989),i=n(7204),c=n(706);const l=(0,r.X$)((({isQuick:e,onFileSelect:t})=>{const[n,a,o]=(0,c.Z)(),i=(0,s.Z)("DropTarget",n&&"hovered");return r.ZP.createElement("div",{className:i,onDrop:t,onDragEnter:()=>{a()},onDragLeave:e=>{const{relatedTarget:t}=e;t&&e.stopPropagation(),o()}},r.ZP.createElement("div",{className:"target-content"},r.ZP.createElement("div",{className:"icon icon-"+(e?"photo":"document")}),r.ZP.createElement("div",{className:"title"},"Drop files here to send them"),r.ZP.createElement("div",{className:"description"},e?"in a quick way":"without compression")))}));let d;!function(e){e.None="none",e.Document="document",e.QuickFile="quick_file"}(d||(d={}));const u=(0,r.X$)((({isOpen:e,withQuick:t,onHide:n,onFileSelect:c})=>{const d=(0,r.sO)(null),u=(0,i.Z)(t),{shouldRender:m,transitionClassNames:h}=(0,a.Z)(e);(0,r.d4)((()=>e?(0,o.Z)(n):void 0),[e,n]);const f=(0,r.I4)((e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),c(Array.from(t.files),!1))}),[c,n]),v=(0,r.I4)((e=>{const{dataTransfer:t}=e;t.files&&t.files.length>0&&(n(),c(Array.from(t.files),!0))}),[c,n]),p=(0,r.I4)((e=>{e.stopPropagation();const{target:t,relatedTarget:r}=e;t.matches(".DropTarget, .DropArea")&&!r&&(d.current=window.setTimeout((()=>{n()}),150))}),[n]);if(!m)return;const g=(0,s.Z)("DropArea",h);return r.ZP.createElement("div",{className:g,onDragLeave:p,onDragOver:()=>{d.current&&window.clearTimeout(d.current)},onDrop:n},r.ZP.createElement(l,{onFileSelect:f}),(t||u)&&r.ZP.createElement(l,{onFileSelect:v,isQuick:!0}))}))},9830:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9203),s=n(8778);const o=(0,r.X$)((e=>{const{isOpen:t}=e,n=(0,s.Z)(a.gl.Extra,"EmojiTooltip",!t);return n?r.ZP.createElement(n,e):void 0}))},3616:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(4050),a=n(5116),s=n(3716),o=n(8085),i=n(9118),c=n(5723),l=n(6752),d=n(782),u=n(7361),m=n(517),h=n(2645),f=n(706),v=n(4784),p=n(6391),g=n(9107),Z=n(2340),E=n(3283);const P=u.wB?256:416,y=(0,r.X$)((0,a.c$)((e=>{const{chatId:t,threadId:n}=(0,o.Bt)(e)||{},{messageSendKeyCombo:r}=e.settings.byKey;return{currentChatId:t,messageSendKeyCombo:r,replyingToId:t&&n?(0,o.Yy)(e,t,n):void 0,noTabCapture:e.isPollModalOpen||e.payment.isPaymentModalOpen}}),((e,t)=>(0,d.ei)(t,["editLastMessage","replyToNextMessage"])))((({id:e,isAttachmentModalInput:t,editableInputId:n,html:a,placeholder:o,forcedPlaceholder:d,shouldSetFocus:y,shouldSuppressFocus:C,shouldSuppressTextFormatter:b,onUpdate:N,onSuppressedFocus:w,onSend:k,currentChatId:I,replyingToId:T,noTabCapture:S,messageSendKeyCombo:M,editLastMessage:x,replyToNextMessage:L})=>{const A=(0,r.sO)(null),$=(0,r.sO)(null),O=(0,g.Z)(),F=(0,r.sO)(!1),[R,U,D]=(0,f.Z)(),[B,V]=(0,r.eJ)(),[X,q]=(0,r.eJ)();(0,r.d4)((()=>{t&&Y(!1)}),[t]),(0,h.Z)((([e])=>{a!==A.current.innerHTML&&(A.current.innerHTML=a),a!==$.current.innerHTML&&($.current.innerHTML=a),void 0!==e&&e!==a&&Y(!a.length)}),[a]);const K=(0,r.I4)((()=>{A.current.closest(".from, .to")?setTimeout(K,350):(0,c.Z)(A.current)}),[]),j=(0,r.I4)((()=>{D(),function(){const e=window.getSelection();e&&(e.removeAllRanges?e.removeAllRanges():e.empty&&e.empty())}()}),[D]);function z(){if(u.cj)return!1;const e=window.getSelection();if(!e||!e.rangeCount||F.current)return D(),!1;const t=e.getRangeAt(0),r=t.toString().trim();return!(b||!(0,p.R)(t,n||s.R2)||!r||(0,v.Z)(r)||!t.START_TO_END)||(D(),!1)}function H(){if(!z())return;const e=window.getSelection().getRangeAt(0),t=e.getBoundingClientRect(),n=A.current.getBoundingClientRect();let r=t.left+t.width/2-n.left;r<90?r=90:r>n.width-90&&(r=n.width-90),V({x:r,y:t.top-n.top}),q(e),U()}function Y(e=!1){const t=A.current,n=$.current,r=Number(t.style.height.replace("px","")),a=Math.min(n.scrollHeight,P);if(a===r)return;const s=Math.round(50*Math.log(Math.abs(a-r))),o=()=>{t.style.height=`${a}px`,t.style.transitionDuration=`${s}ms`,t.classList.toggle("overflown",n.scrollHeight>P)};e?requestAnimationFrame(o):o()}(0,r.d4)((()=>{u.$b||y&&K()}),[I,K,T,y]),(0,r.d4)((()=>{if(S)return;const e=(0,i.Ds)((e=>{"Tab"===e.key&&(e.preventDefault(),requestAnimationFrame(K))}),2e3,!0,!1);return(0,m.Z)({onTab:e})}),[K,S]),(0,r.d4)((()=>{const e=A.current;function t(){e.blur()}return C&&e.addEventListener("focus",t),()=>{e.removeEventListener("focus",t)}}),[C]);const J=(0,l.Z)("form-control custom-scroll",a.length>0&&"touched",C&&"focus-disabled");return r.ZP.createElement("div",{id:e,onClick:C?w:void 0,dir:O.isRtl?"rtl":void 0},r.ZP.createElement("div",{ref:A,id:n||s.R2,className:J,contentEditable:!0,dir:"auto",onClick:K,onChange:function(e){const{innerHTML:t,textContent:n}=e.currentTarget;if(N("<br>"===t?"":t),!u.$b&&(!n||!n.length)&&(u.op||!t.includes("emoji-small"))){const e=window.getSelection();e&&(A.current.blur(),e.removeAllRanges(),(0,c.Z)(A.current,!0))}},onKeyDown:function(e){if(!a.length&&(e.metaKey||e.ctrlKey)){const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:void 0;if(t)return e.preventDefault(),void L({targetIndexDelta:t})}"Enter"!==e.key||e.shiftKey?"ArrowUp"!==e.key||a.length||e.metaKey||e.ctrlKey||e.altKey?e.target.addEventListener("keyup",(function t(){H(),e.target.removeEventListener("keyup",t)})):(e.preventDefault(),x()):u.cj||u.wZ||!("enter"===M&&!e.shiftKey||"ctrl-enter"===M&&(e.ctrlKey||e.metaKey))||(e.preventDefault(),D(),k())},onMouseDown:function(e){2===e.button?!0!==F.current&&(F.current=!0,document.addEventListener("mousedown",(function e(){setTimeout((()=>{F.current=!1}),100),window.removeEventListener("mouseup",e)})),document.addEventListener("keydown",(function e(t){"Esc"!==t.key&&"Escape"!==t.key||(setTimeout((()=>{F.current=!1}),100),window.removeEventListener("keydown",e))}))):e.target.addEventListener("mouseup",(function t(){H(),e.target.removeEventListener("mouseup",t)}))},onContextMenu:u.wZ?function(e){z()&&(e.preventDefault(),e.stopPropagation())}:void 0,onTouchCancel:u.wZ?H:void 0}),r.ZP.createElement("div",{ref:$,className:(0,l.Z)(J,"clone"),dir:"auto"}),!d&&r.ZP.createElement("span",{className:"placeholder-text",dir:"auto"},o),r.ZP.createElement(E.Z,{isOpen:R,anchorPosition:B,selectedRange:X,setSelectedRange:q,onClose:j}),d&&r.ZP.createElement("span",{className:"forced-placeholder"},(0,Z.Z)(d)))})))},3283:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(3716),s=n(6752),o=n(3989),i=n(1212),c=n(8758),l=n(706),d=n(9107),u=n(231);const m={B:"bold",STRONG:"bold",I:"italic",EM:"italic",U:"underline",DEL:"strikethrough",CODE:"monospace"},h=document.createElement("div"),f=(0,r.X$)((({isOpen:e,anchorPosition:t,selectedRange:n,setSelectedRange:f,onClose:v})=>{const p=(0,r.sO)(null),g=(0,r.sO)(null),{shouldRender:Z,transitionClassNames:E}=(0,i.Z)(e),[P,y,C]=(0,l.Z)(),[b,N]=(0,r.eJ)(""),[w,k]=(0,r.eJ)(!1),[I,T]=(0,r.eJ)(),[S,M]=(0,r.eJ)({});(0,r.d4)((()=>e?(0,o.Z)(v):void 0),[e,v]),(0,c.Z)(e,p,v),(0,r.d4)((()=>{P?g.current.focus():(N(""),k(!1))}),[P]),(0,r.d4)((()=>{Z||(C(),M({}),T(void 0))}),[C,Z]),(0,r.d4)((()=>{if(!e||!n)return;const t={};let{parentElement:r}=n.commonAncestorContainer;for(;r&&r.id!==a.R2;){const e=m[r.tagName];e&&(t[e]=!0),r=r.parentElement}M(t)}),[e,n,y]);const x=(0,r.I4)((()=>{const e=window.getSelection();e&&f(e.getRangeAt(0))}),[f]),L=(0,r.I4)((()=>{if(n)return h.innerText=n.toString(),h.innerHTML}),[n]),A=(0,r.I4)((()=>{if(n)return n.commonAncestorContainer.parentElement}),[n]);function $(){const e=g.current;if(!e)return;const{offsetWidth:t,scrollWidth:n,scrollLeft:r}=e;if(n<=t)return void T(void 0);let a="";r<n-t&&(a="mask-right"),r>0&&(a+=" mask-left"),T(a)}function O(e){if(S[e])return"active";if("monospace"===e||"strikethrough"===e){if(Object.keys(S).some((t=>t!==e&&!!S[t])))return"disabled"}else if(S.monospace||S.strikethrough)return"disabled"}const F=(0,r.I4)((()=>{M((e=>(document.execCommand(e.bold?"removeFormat":"bold"),Object.keys(e).forEach((t=>{"italic"!==t&&"underline"!==t||!e[t]||document.execCommand(t)})),x(),{...e,bold:!e.bold})))}),[x]),R=(0,r.I4)((()=>{document.execCommand("italic"),x(),M((e=>({...e,italic:!e.italic})))}),[x]),U=(0,r.I4)((()=>{document.execCommand("underline"),x(),M((e=>({...e,underline:!e.underline})))}),[x]),D=(0,r.I4)((()=>{if(S.strikethrough){const e=A();if(!n||!e||"DEL"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void M((e=>({...e,strikethrough:!1})))}const e=L();document.execCommand("insertHTML",!1,`<del>${e}</del>`),v()}),[A,L,v,n,S.strikethrough]),B=(0,r.I4)((()=>{if(S.monospace){const e=A();if(!n||!e||"CODE"!==e.tagName||!e.textContent)return;return e.replaceWith(e.textContent),void M((e=>({...e,monospace:!1})))}const e=L();document.execCommand("insertHTML",!1,`<code class="text-entity-code" dir="auto">${e}</code>`),v()}),[A,L,v,n,S.monospace]);function V(){const e=encodeURI(b.includes("://")?b:`http://${b}`);if(w){const t=A();if(!t||"A"!==t.tagName)return;return t.href=e,void v()}const t=L();!function(){if(!n)return;const e=window.getSelection();e&&(e.removeAllRanges(),e.addRange(n))}(),document.execCommand("insertHTML",!1,`<a href=${e} class="text-entity-link" dir="auto">${t}</a>`),v()}const X=(0,r.I4)((e=>{const t={KeyK:y,KeyB:F,KeyU:U,KeyI:R,KeyM:B,KeyS:D}[e.code];!e.altKey&&(e.ctrlKey||e.metaKey)&&t&&(e.preventDefault(),e.stopPropagation(),t())}),[F,R,U,B,D,y]);(0,r.d4)((()=>(e&&document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X))),[e,X]);const q=(0,d.Z)();if(!Z)return;const K=(0,s.Z)("TextFormatter",E,P&&"link-control-shown"),j=(0,s.Z)("TextFormatter-link-url-confirm",!!b.length&&"shown"),z=t?`left: ${t.x}px; top: ${t.y}px;--text-formatter-left: ${t.x}px;`:"";return r.ZP.createElement("div",{ref:p,className:K,style:z,onKeyDown:function(e){"Enter"===e.key&&P&&(V(),e.preventDefault())}},r.ZP.createElement("div",{className:"TextFormatter-buttons"},r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Bold text",className:O("bold"),onClick:F},r.ZP.createElement("i",{className:"icon-bold"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Italic text",className:O("italic"),onClick:R},r.ZP.createElement("i",{className:"icon-italic"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Underlined text",className:O("underline"),onClick:U},r.ZP.createElement("i",{className:"icon-underlined"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Strikethrough text",className:O("strikethrough"),onClick:D},r.ZP.createElement("i",{className:"icon-strikethrough"})),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:"Monospace text",className:O("monospace"),onClick:B},r.ZP.createElement("i",{className:"icon-monospace"})),r.ZP.createElement("div",{className:"TextFormatter-divider"}),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:q("TextFormat.AddLinkTitle"),onClick:y},r.ZP.createElement("i",{className:"icon-link"}))),r.ZP.createElement("div",{className:"TextFormatter-link-control"},r.ZP.createElement("div",{className:"TextFormatter-buttons"},r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:q("Cancel"),onClick:C},r.ZP.createElement("i",{className:"icon-arrow-left"})),r.ZP.createElement("div",{className:"TextFormatter-divider"}),r.ZP.createElement("div",{className:(0,s.Z)("TextFormatter-link-url-input-wrapper",I)},r.ZP.createElement("input",{ref:g,className:"TextFormatter-link-url-input",type:"text",value:b,placeholder:"Enter URL...",autoComplete:"off",inputMode:"url",dir:"auto",onChange:function(e){N(e.target.value),$()},onScroll:$})),r.ZP.createElement("div",{className:j},r.ZP.createElement("div",{className:"TextFormatter-divider"}),r.ZP.createElement(u.Z,{color:"translucent",ariaLabel:q("Save"),className:"color-primary",onClick:V},r.ZP.createElement("i",{className:"icon-check"}))))))}))},2400:(e,t,n)=>{n.d(t,{_:()=>i});const r=/(<br>|<br\s?\/>)/g,a=/( |\u00A0)/g,s=/(<div>|<\/div>)/gi,o=/\n$/i;function i(e){return e.replace(a," ").replace(r,"\n").replace(s,"").replace(o,"")}},6391:(e,t,n)=>{function r(e,t){const{commonAncestorContainer:n}=e;let r=n,a=1;for(;r&&r.id!==t&&a<5;)r=r.parentElement,a++;return Boolean(r&&r.id===t)}n.d(t,{R:()=>r})},8353:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(4050),a=n(3716),s=n(735),o=n(2400),i=n(4284),c=n(5723),l=n(782),d=n(706);let u,m,h,f;try{f=new RegExp("(^|\\s):[-+_:\\p{L}\\p{N}]*$","gui")}catch(e){f=new RegExp("(^|\\s):[-+_:\\d\\wа-яё]*$","gi")}function v(e,t,v,p=a.R2,g,Z,E,P=!1){const[y,C,b]=(0,d.Z)(),[N,w]=(0,r.eJ)(),[k,I]=(0,r.eJ)(),[T,S]=(0,r.eJ)({}),[M,x]=(0,r.eJ)(),[L,A]=(0,r.eJ)({}),[$,O]=(0,r.eJ)(!1),[F,R]=(0,r.eJ)(s.D),U=(0,r.Ye)((()=>N&&v.length?Object.values((0,l.q0)(N,v)):[]),[N,v]);(0,r.d4)((()=>{if(P)return;const e=()=>{w(h.emojis)};h?e():async function(){return u||(u=n.e(501).then(n.t.bind(n,7501,19)),m=(await u).default,h=(0,i.NM)(m)),u}().then(e)}),[P]),(0,r.d4)((()=>{if(!N||P)return;const e=Object.values(N),t=(0,l.ee)(e,"native"),n=Z?(0,l.Q8)(Z,(e=>Object.values((0,l.q0)(t,e)))):{},r=E?(0,l.Q8)(E,(e=>Object.values((0,l.q0)(t,e)))):{};S({...n,...r}),I([...Object.keys(n),...Object.keys(r)]);const a=e.reduce(((e,t)=>(t.names.forEach((n=>{e[n]||(e[n]=[]),e[n].push(t)})),e)),{});A(a),x(Object.keys(a))}),[P,Z,N,E]),(0,r.d4)((()=>{if(!(e&&t&&N&&k&&k.length))return void b();const n=t.includes(":")&&function(e){const t=(0,o._)(e).match(f);return t?t[0].trim():void 0}(t);if(!n)return R(s.D),void b();const r=n.length>2&&n.endsWith(":"),a=n.substr(1,r?n.length-2:void 0);let i=[];if(O(r),a){if(a.length>=2){const e=k.filter((e=>e.startsWith(a))).sort();i=i.concat((0,l.xH)(Object.values((0,l.q0)(T,e))));const t=M.filter((e=>e.startsWith(a)));i=i.concat((0,l.xH)(Object.values((0,l.q0)(L,t)))),i=(0,l.Tw)(i)}}else i=U;i.length?(r||C(),R(i.slice(0,36))):b()}),[N,T,k,L,M,t,e,C,U,b,O]);const D=(0,r.I4)(((e,n)=>{const r=t.lastIndexOf(":",n?t.lastIndexOf(":")-1:void 0);if(-1!==r){g(`${t.substr(0,r)}${e}`);const n=document.getElementById(p);requestAnimationFrame((()=>{(0,c.Z)(n,!0)}))}b()}),[t,p,g,b]);return(0,r.d4)((()=>{y&&$&&F.length&&D(F[0].native,!0)}),[F,D,y,$]),{isEmojiTooltipOpen:y,closeEmojiTooltip:b,filteredEmojis:F,insertEmoji:D}}},2365:(e,t,n)=>{n.d(t,{Z:()=>v});var r=n(4050),a=n(6137),s=n(3716),o=n(2858),i=n(5765);function c(e,t){const n=t.username.toLowerCase(),r=(0,o.Js)(t),a=r&&r.toLowerCase(),s=e.toLowerCase();return n.startsWith(s)||a&&(0,i.Z)(a,s)}var l=n(2400),d=n(5723),u=n(706),m=n(782);const h=(0,n(9118).P2)((e=>e()),500,!0);let f;try{f=new RegExp("(^|\\s)@[-_\\p{L}\\p{M}\\p{N}]*$","gui")}catch(e){f=new RegExp("(^|\\s)@[-_\\d\\wа-яё]*$","gi")}function v(e,t,n,i=s.R2,v,p,g,Z){const[E,P,y]=(0,u.Z)(),[C,b]=(0,r.eJ)(),N=(0,r.Ye)((()=>(p||[]).map((e=>null==Z?void 0:Z[e])).filter(Boolean)),[p,Z]),w=(0,r.I4)(((e,t)=>{(v||p)&&Z?h((()=>{const n=(t?N:[]).filter((t=>!e||c(e,t))),r=(v||[]).map((({userId:e})=>Z[e])).filter((t=>!(!t||t.id===g)&&(!e||c(e,t))));b((0,m.Tw)(n.concat(r)))})):b(void 0)}),[g,v,p,N,Z]);(0,r.d4)((()=>{if(!e||!t.length)return void y();const n=t.includes("@")&&function(e){const t=(0,l._)(e).match(f);return t?t[0].trim():void 0}(t);if(n){const e=n?n.substr(1):"";w(e,function(e){return e.startsWith("@")}(t))}else y()}),[e,t,w,P,y]),(0,r.d4)((()=>{null!=C&&C.length?P():y()}),[P,y,C]);const k=(0,r.I4)(((e,r=!1)=>{if(!e.username&&!(0,o.Vl)(e))return;const s=e.username?`@${e.username}`:`<a\n class="text-entity-link"\n data-entity-type="${a.Vv.MentionName}"\n data-user-id="${e.id}"\n contenteditable="false"\n dir="auto"\n >${(0,o.Vl)(e)}</a>`,c=t.lastIndexOf("@");if(-1!==c){n(`${t.substr(0,c)}${s} `);const e=document.getElementById(i);requestAnimationFrame((()=>{(0,d.Z)(e,r)}))}y()}),[t,i,n,y]);return{isMentionTooltipOpen:E,closeMentionTooltip:y,insertMention:k,mentionFilteredUsers:C}}},7891:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9290),s=n(5326);function o(e,t){const n=void 0===t,o=(0,r.sO)(n),i=(0,r.sO)(),c=(0,s.Z)();return(0,a.Z)((()=>{n||(o.current=!1,i.current&&(clearTimeout(i.current),i.current=void 0))}),e),(0,r.d4)((()=>{if(n||o.current)return;const e=()=>{o.current=!0,c()};t>0?i.current=window.setTimeout(e,t):e()}),e),o.current}},1218:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(4605);const s=(0,r.X$)((({id:e,options:t,selected:n=[],disabled:s,round:o,loadingOptions:i,onChange:c})=>{const[l,d]=(0,r.eJ)(n||[]),u=(0,r.I4)((e=>{const{value:t,checked:n}=e.currentTarget;let r;r=n?[...l,t]:l.filter((e=>e!==t)),d(r),c(r)}),[c,l]);return r.ZP.createElement("div",{id:e,className:"radio-group"},t.map((e=>r.ZP.createElement(a.Z,{label:e.label,subLabel:e.subLabel,value:e.value,checked:-1!==n.indexOf(e.value),disabled:s,round:o,isLoading:i?-1!==i.indexOf(e.value):void 0,onChange:u}))))}))},7551:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(9107),s=n(3103),o=n(231);const i=(0,r.X$)((({isOpen:e,onClose:t,onCloseAnimationEnd:n,title:i,header:c,text:l,textParts:d,confirmLabel:u="Confirm",confirmHandler:m,confirmIsDestructive:h,isButtonsInOneRow:f})=>{const v=(0,a.Z)();return r.ZP.createElement(s.Z,{className:"confirm",title:i,header:c,isOpen:e,onClose:t,onCloseAnimationEnd:n,onEnter:m},l&&l.split("\\n").map((e=>r.ZP.createElement("p",null,e))),d,r.ZP.createElement("div",{className:f?"dialog-buttons mt-2":""},r.ZP.createElement(o.Z,{className:"confirm-dialog-button",isText:!0,onClick:m,color:h?"danger":"primary"},u),r.ZP.createElement(o.Z,{className:"confirm-dialog-button",isText:!0,onClick:t},v("Cancel"))))}))},1151:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(6752),s=n(231);const o=({isShown:e,className:t,color:n="primary",ariaLabel:o,disabled:i,onClick:c,children:l})=>{const d=(0,a.Z)("FloatingActionButton",e&&"revealed",t);return r.ZP.createElement(s.Z,{className:d,color:n,round:!0,disabled:i,onClick:e&&!i?c:void 0,ariaLabel:o,tabIndex:-1},l)}},1273:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(1713),a=n(4050),s=n(9118),o=n(7675);const i=({ref:e,className:t,onLoadMore:n,onScroll:i,onKeyDown:c,items:l,itemSelector:d=".ListItem",preloadBackwards:u=20,sensitiveArea:m=800,noScrollRestore:h=!1,noScrollRestoreOnTop:f=!1,noFastList:v,cacheBuster:p,children:g})=>{let Z=(0,a.sO)(null);e&&(Z=e);const E=(0,a.sO)({}),[P,y]=(0,a.Ye)((()=>n?[(0,s.Ds)(((e=!1)=>{n({direction:r.Uq.Backwards,noScroll:e})}),1e3,!0,!1),(0,s.Ds)((()=>{n({direction:r.Uq.Forwards})}),1e3,!0,!1)]:[]),[n,l]);(0,a.d4)((()=>{if(!P)return;if(u>0&&(!l||l.length<u))return void P(!0);const{scrollHeight:e,clientHeight:t}=Z.current;t&&e<=t&&P()}),[l,P,u]),(0,a.bt)((()=>{const e=Z.current,t=E.current;let n;if(t.listItemElements=e.querySelectorAll(d),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:r}=e;n=r+(t.currentAnchor.getBoundingClientRect().top-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}h||f&&0===e.scrollTop||((0,o.Z)(e,n),t.isScrollTopJustUpdated=!0)}),[l,d,h,f,p]);const C=(0,a.I4)((e=>{if(y&&P){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=E.current,r=E.current.listItemElements;if(e)return void(E.current.isScrollTopJustUpdated=!1);const a=r.length,s=Z.current,{scrollTop:i,scrollHeight:c,offsetHeight:l}=s,d=i<=(a?r[0].offsetTop:0)+m,u=(a?r[a-1].offsetTop+r[a-1].offsetHeight:c)-(i+l)<=m;let h=!1;if(d){const e=r[0];if(e){const r=e.getBoundingClientRect().top,a=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:r;t&&void 0!==n&&a>n&&(E.current.currentAnchor=e,E.current.currentAnchorTop=r,h=!0,(0,o.Z)(s),y())}}if(u){const e=r[a-1];if(e){const r=e.getBoundingClientRect().top,a=null!=t&&t.offsetParent&&t!==e?t.getBoundingClientRect().top:r;t&&void 0!==n&&a<n&&(E.current.currentAnchor=e,E.current.currentAnchorTop=r,h=!0,(0,o.Z)(s),P())}}if(!h)if(null!=t&&t.offsetParent)E.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=r[0];e&&(E.current.currentAnchor=e,E.current.currentAnchorTop=e.getBoundingClientRect().top)}}i&&i(e)}),[P,y,i,m]);return a.ZP.createElement("div",{ref:Z,className:t,onScroll:C,teactFastList:!v,onKeyDown:c},g)}},1876:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(4050),a=n(7361),s=n(9118),o=n(6752),i=n(7240),c=n(3394),l=n(706),d=n(9107),u=n(8512),m=n(2328),h=n(8964);const f=e=>{const{ref:t,buttonRef:n,icon:f,className:v,style:p,children:g,disabled:Z,ripple:E,narrow:P,inactive:y,focus:C,destructive:b,multiline:N,isStatic:w,contextActions:k,onMouseDown:I,onClick:T}=e;let S=(0,r.sO)(null);t&&(S=t);const[M,x,L]=(0,l.Z)(),{isContextMenuOpen:A,contextMenuPosition:$,handleBeforeContextMenu:O,handleContextMenu:F,handleContextMenuClose:R,handleContextMenuHide:U}=(0,i.Z)(S,!k),D=(0,r.I4)((()=>S.current),[]),B=(0,r.I4)((()=>S.current.closest(".custom-scroll")),[]),V=(0,r.I4)((()=>S.current.querySelector(".ListItem-context-menu .bubble")),[]),{positionX:X,positionY:q,style:K}=(0,c.Z)($,D,B,V),j=(0,r.I4)((e=>{!Z&&T&&(T(e),a.$b&&!E&&(x(),(0,s.T2)(L)))}),[Z,x,T,E,L]),z=(0,r.I4)((e=>{y||a.$b||(!k||2!==e.button&&T||O(e),0===e.button&&(T?j(e):F(e)))}),[y,k,T,O,F,j]),H=(0,d.Z)(),Y=(0,o.Z)("ListItem",v,!w&&"no-selection",E&&"has-ripple",P&&"narrow",Z&&"disabled",y&&"inactive",$&&"has-menu-open",C&&"focus",b&&"destructive",N&&"multiline",w&&"is-static");return r.ZP.createElement("div",{ref:S,className:Y,dir:H.isRtl?"rtl":void 0,style:p,onMouseDown:I},r.ZP.createElement("div",{className:(0,o.Z)("ListItem-button",M&&"active"),role:"button",ref:n,tabIndex:0,onClick:!y&&a.$b?j:void 0,onMouseDown:z,onContextMenu:!y&&k?F:void 0},f&&r.ZP.createElement("i",{className:`icon-${f}`}),N&&r.ZP.createElement("div",{className:"multiline-item"},g),!N&&g,!Z&&!y&&E&&r.ZP.createElement(u.Z,null)),k&&void 0!==$&&r.ZP.createElement(m.Z,{isOpen:A,positionX:X,positionY:q,style:K,className:"ListItem-context-menu",autoClose:!0,onClose:R,onCloseAnimationEnd:U},k.map((e=>r.ZP.createElement(h.Z,{key:e.title,icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler},e.title)))))}},3103:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(4050),a=n(517),s=n(6752),o=n(8674),i=n(1212),c=n(274),l=n(9107),d=n(6590),u=n(231),m=n(2898);const h=({title:e,className:t,isOpen:n,header:h,hasCloseButton:f,noBackdrop:v,children:p,onClose:g,onCloseAnimationEnd:Z,onEnter:E,shouldSkipHistoryAnimations:P})=>{const{shouldRender:y,transitionClassNames:C}=(0,i.Z)(n,Z,P,void 0,P),b=(0,r.sO)(null);(0,r.d4)((()=>n?(0,a.Z)({onEsc:g,onEnter:E}):void 0),[n,g,E]),(0,r.d4)((()=>n&&b.current?function(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const n=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!n.length)return;const r=n.findIndex((e=>e.isSameNode(document.activeElement)));let a=0;r>=0&&(a=t.shiftKey?r>0?r-1:n.length-1:r<n.length-1?r+1:0),n[a].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}(b.current):void 0),[n]);const{forceClose:N}=(0,d.ZP)(n,g);(0,r.d4)((()=>()=>{n&&N()}),[]),(0,c.Z)((([e])=>(document.body.classList.toggle("has-open-dialog",n),(n||!n&&void 0!==e)&&(0,o.YW)(200),()=>{document.body.classList.remove("has-open-dialog")})),[n]);const w=(0,l.Z)();if(!y)return;const k=(0,s.Z)("Modal",t,C,v&&"transparent-backdrop");return r.ZP.createElement(m.Z,null,r.ZP.createElement("div",{ref:b,className:k,tabIndex:-1,role:"dialog"},r.ZP.createElement("div",{className:"modal-container"},r.ZP.createElement("div",{className:"modal-backdrop",onClick:g}),r.ZP.createElement("div",{className:"modal-dialog"},h||(e?r.ZP.createElement("div",{className:"modal-header"},f&&r.ZP.createElement(u.Z,{round:!0,color:"translucent",size:"smaller",ariaLabel:w("Close"),onClick:g},r.ZP.createElement("i",{className:"icon-close"})),r.ZP.createElement("div",{className:"modal-title"},e)):void 0),r.ZP.createElement("div",{className:"modal-content custom-scroll"},p)))))}},6937:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(3716),s=n(1212),o=n(6752),i=n(3989),c=n(2898);const l=({message:e,duration:t=3e3,containerId:n,onDismiss:l})=>{const[d,u]=(0,r.eJ)(!0),m=(0,r.sO)(null),{transitionClassNames:h}=(0,s.Z)(d),f=(0,r.I4)((()=>{u(!1),setTimeout(l,150+a.fK)}),[l]);(0,r.d4)((()=>d?(0,i.Z)(f):void 0),[d,f]),(0,r.d4)((()=>(m.current=window.setTimeout(f,t),()=>{m.current&&(clearTimeout(m.current),m.current=void 0)})),[t,f]);const v=(0,r.I4)((()=>{m.current&&(clearTimeout(m.current),m.current=void 0)}),[]),p=(0,r.I4)((()=>{m.current=window.setTimeout(f,t)}),[t,f]);return r.ZP.createElement(c.Z,{className:"Notification-container",containerId:n},r.ZP.createElement("div",{className:(0,o.Z)("Notification",h),onClick:f,onMouseEnter:v,onMouseLeave:p},r.ZP.createElement("div",{className:"content"},e)))}},2898:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(2916);const s=({containerId:e,className:t,children:n})=>{const s=(0,r.sO)();return s.current||(s.current=document.createElement("div")),(0,r.bt)((()=>{const n=document.querySelector(e||"#portals");if(!n)return;const r=s.current;return t&&r.classList.add(t),n.appendChild(r),()=>{a.Z.render(void 0,r),n.removeChild(r)}}),[t,e]),a.Z.render(n,s.current)}},9196:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(6752);const s={s:22,m:25,l:28,xl:20},o=(0,r.X$)((({progress:e=0,size:t="l",square:n,transparent:o,noCross:i,onClick:c})=>{const l=s[t],d=l-4,u=l-1,m=2*d*Math.PI,h=(0,r.sO)(null);(0,r.d4)((()=>{if(!h.current)return;const t=h.current.firstElementChild,n=m-Math.min(Math.max(.05,e),1)*m;t?t.firstElementChild.setAttribute("stroke-dashoffset",n.toString()):h.current.innerHTML=`<svg\n viewBox="0 0 ${2*u} ${2*u}"\n height="${2*u}"\n width="${2*u}"\n >\n <circle\n stroke="white"\n fill="transparent"\n stroke-width=2\n stroke-dasharray="${m} ${m}"}\n stroke-dashoffset="${n}"\n stroke-linecap="round"\n r=${d}\n cx=${u}\n cy=${u}\n />\n </svg>`}),[h,m,u,d,e]);const f=(0,a.Z)(`ProgressSpinner size-${t}`,o&&"transparent",n&&"square",i&&"no-cross");return r.ZP.createElement("div",{ref:h,className:f,onClick:c})}))},4434:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(6752),s=n(9107),o=n(9204);const i=(0,r.X$)((({id:e,label:t,subLabel:n,value:i,name:c,checked:l,disabled:d,hidden:u,isLoading:m,onChange:h})=>{const f=(0,s.Z)(),v=(0,a.Z)("Radio",d&&"disabled",u&&"hidden-widget",m&&"loading");return r.ZP.createElement("label",{className:v,dir:f.isRtl?"rtl":void 0},r.ZP.createElement("input",{type:"radio",name:c,value:i,id:e,checked:l,onChange:h,disabled:d||u}),r.ZP.createElement("div",{className:"Radio-main"},r.ZP.createElement("span",{className:"label",dir:f.isRtl?"auto":void 0},t),n&&r.ZP.createElement("span",{className:"subLabel",dir:f.isRtl?"auto":void 0},n)),m&&r.ZP.createElement(o.Z,null))})),c=(0,r.X$)((({id:e,name:t,options:n,selected:a,disabled:s,loadingOption:o,onChange:c})=>{const l=(0,r.I4)((e=>{const{value:t}=e.currentTarget;c(t)}),[c]);return r.ZP.createElement("div",{id:e,className:"radio-group"},n.map((e=>r.ZP.createElement(i,{name:t,label:e.label,subLabel:e.subLabel,value:e.value,checked:e.value===a,hidden:e.hidden,disabled:s,isLoading:o?o===e.value:void 0,onChange:l}))))}))},8051:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(6752),s=n(9107);const o=(0,r.X$)((({options:e,min:t=0,max:n=(e?e.length-1:100),step:o=1,label:i,value:c,renderValue:l,disabled:d,onChange:u})=>{const m=(0,s.Z)(),h=(0,r.I4)((e=>{u(Number(e.currentTarget.value))}),[u]),f=(0,a.Z)("RangeSlider",d&&"disabled"),v=(0,r.Ye)((()=>e?c/(e.length-1)*100:(c-t)/((n-t)/o)*100),[e,c,n,t,o]);return r.ZP.createElement("div",{className:f},i&&r.ZP.createElement("div",{className:"slider-top-row",dir:m.isRtl?"rtl":void 0},r.ZP.createElement("span",{className:"label",dir:"auto"},i),!e&&r.ZP.createElement("span",{className:"value",dir:"auto"},l?l(c):c)),r.ZP.createElement("div",{className:"slider-main"},r.ZP.createElement("div",{className:"slider-fill-track",style:`width: ${v}%`}),r.ZP.createElement("input",{min:t,max:n,value:c,step:o,type:"range",onChange:h}),e&&r.ZP.createElement("div",{className:"slider-options"},e.map(((e,t)=>r.ZP.createElement("div",{className:(0,a.Z)("slider-option no-selection",t===c&&"active"),onClick:()=>u(t)},e))))))}))},9589:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),a=n(6752),s=n(706),o=n(9107),i=n(2515),c=n(4288),l=n(231);const d=(0,r.X$)((({ref:e,children:t,parentContainerClassName:n,value:d,inputId:u,className:m,focused:h,isLoading:f,placeholder:v,disabled:p,autoComplete:g,canClose:Z,autoFocusSearch:E,onChange:P,onReset:y,onFocus:C,onBlur:b})=>{let N=(0,r.sO)(null);e&&(N=e);const[w,k,I]=(0,s.Z)(h);(0,i.Z)(N,E,I),(0,r.d4)((()=>{N.current&&(h?N.current.focus():N.current.blur())}),[h,v]);const T=(0,o.Z)(),S=(0,r.I4)((e=>{if("ArrowDown"===e.key||"Enter"===e.key){const e=document.querySelector(`.${n} .ListItem-button`);e&&e.focus()}}),[n]);return r.ZP.createElement("div",{className:(0,a.Z)("SearchInput",m,w&&"has-focus"),dir:T.isRtl?"rtl":void 0},t,r.ZP.createElement("input",{ref:N,id:u,type:"text",dir:"auto",placeholder:v||T("Search"),className:"form-control",value:d,disabled:p,autoComplete:g,onChange:function(e){const{currentTarget:t}=e;P(t.value)},onFocus:function(){k(),C&&C()},onBlur:function(){I(),b&&b()},onKeyDown:S}),r.ZP.createElement("i",{className:"icon-search"}),f&&r.ZP.createElement(c.Z,null),!f&&(d||Z)&&y&&r.ZP.createElement(l.Z,{round:!0,size:"tiny",color:"translucent",onClick:y},r.ZP.createElement("span",{className:"icon-close"})))}))},126:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(1212),s=n(7204),o=n(6752);const i=({isOpen:e,isCustom:t,id:n,className:i,onClick:c,children:l})=>{const{shouldRender:d,transitionClassNames:u}=(0,a.Z)(e,void 0,void 0,!t&&void 0),m=(0,s.Z)(e),h=(0,s.Z)(l),f=(0,r.sO)();return m&&!e&&(f.current=h),d&&r.ZP.createElement("div",{id:n,className:(0,o.Z)(i,u),onClick:c},e?l():f.current())}},3321:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(6752);const s=(0,r.X$)((({id:e,name:t,value:n,label:s,checked:o=!1,disabled:i,inactive:c,noAnimation:l,onChange:d,onCheck:u})=>{const m=(0,r.I4)((e=>{d&&d(e),u&&u(e.currentTarget.checked)}),[d,u]),h=(0,a.Z)("Switcher",i&&"disabled",c&&"inactive",l&&"no-animation");return r.ZP.createElement("label",{className:h,title:s},r.ZP.createElement("input",{type:"checkbox",id:e,name:t,value:n,checked:o,disabled:i,onChange:m}),r.ZP.createElement("span",{className:"widget"}))}))},3133:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(1367),s=n(7204),o=n(8781),i=n(9107),c=n(6752),l=n(2340);const d=(0,r.X$)((({className:e,title:t,active:n,badgeCount:a,isBadgeActive:s,previousActiveTab:o,onClick:i,clickArg:d})=>{const u=(0,r.sO)(null);return(0,r.bt)((()=>{if(!n||void 0===o)return;const e=u.current,t=e.querySelector("i"),r=e.parentElement.children[o];if(!r)return;const a=r.querySelector("i");a.classList.remove("animate"),t.classList.remove("animate");const s=a.parentElement.offsetLeft-t.parentElement.offsetLeft,i=a.clientWidth/t.clientWidth;t.style.transform=`translate3d(${s}px, 0, 0) scale3d(${i}, 1, 1)`,requestAnimationFrame((()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.classList.add("animate"),t.style.transform="none"}))}))}))}),[n,o]),r.ZP.createElement("button",{type:"button",className:(0,c.Z)("Tab",e,n&&"active"),onClick:()=>i(d),ref:u},r.ZP.createElement("span",null,(0,l.Z)(t),!!a&&r.ZP.createElement("span",{className:(0,c.Z)("badge",s&&"active")},a),r.ZP.createElement("i",null)))})),u=(0,r.X$)((({tabs:e,activeTab:t,big:n,onSwitchTab:c})=>{const l=(0,r.sO)(null),u=(0,s.Z)(t);(0,o.Z)(l.current),(0,r.d4)((()=>{const e=l.current;if(e.scrollWidth<=e.offsetWidth)return;const t=e.querySelector(".Tab.active");if(t){const n=t.offsetLeft-e.offsetWidth/2+t.offsetWidth/2;if(Math.abs(n-e.scrollLeft)<16)return;(0,a.Z)(e,n)}}),[t]);const m=(0,i.Z)();return r.ZP.createElement("div",{className:"TabList no-selection no-scrollbar "+(n?"big":""),ref:l,dir:m.isRtl?"rtl":void 0},e.map(((e,n)=>r.ZP.createElement(d,{key:e.title,title:m(e.title),active:n===t,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:u,onClick:c,clickArg:n}))))}))},2255:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(5116),s=n(5326),o=n(7204),i=n(6752),c=n(8674),l=n(1279);const d=Symbol("CLEANED_UP"),u=({ref:e,activeKey:t,name:n,direction:u="auto",renderCount:m,shouldRestoreHeight:h,shouldCleanup:f,cleanupExceptionKey:v,id:p,className:g,onStart:Z,onStop:E,children:P})=>{const{animationLevel:y}=(0,a.Rd)().settings.byKey,C=(0,r.sO)();let b=(0,r.sO)(null);e&&(b=e);const N=(0,r.sO)({}),w=(0,o.Z)(t),k=(0,s.Z)(),I=void 0!==w&&t!==w;!m&&I&&(N.current={[w]:N.current[w]}),N.current[t]=P,(0,r.bt)((()=>{function e(){!f||void 0!==v&&v===w||(N.current={[w]:d},k())}const r=b.current,a=r.children;if(1===a.length&&!I)return void a[0].classList.add("active");const s=Array.from(r.childNodes);if(!I||!s.length)return;const o=-1===u||"auto"===u&&w>t||"inverse"===u&&w<t;r.classList.remove("animating"),r.classList.toggle("backwards",o);const i=Object.keys(N.current).map(Number),p=m?w:i.indexOf(w),g=m?t:i.indexOf(t);if("none"===n||0===y)return s.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===g))})),void e();let P;s.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("active"),e.classList.toggle("from",t===p),e.classList.toggle("through",t>p&&t<g||t<p&&t>g),e.classList.toggle("to",t===g))})),y>0&&(P=(0,c.YW)()),requestAnimationFrame((()=>{var a;function i(){requestAnimationFrame((()=>{if(t===C.current){if(r.classList.remove("animating","backwards"),s.forEach(((e,t)=>{e instanceof HTMLElement&&(e.classList.remove("from","through","to"),e.classList.toggle("active",t===g))})),h){const e=r.querySelector(".active");e&&(e.style.height="auto",r.style.height=`${e.clientHeight}px`)}P&&P(),e(),E&&E()}}))}r.classList.add("animating"),Z&&Z();const c="mv-slide"===n?null===(a=s[g])||void 0===a?void 0:a.firstChild:"reveal"===n&&o?s[p]:s[g];C.current=t,y>0&&c?(0,l.f)(c,i):i()}))}),[t,w,I,u,n,Z,E,m,h,f,v,y,k]),(0,r.bt)((()=>{if(h){const e=b.current,t=e.querySelector(".active")||e.querySelector(".from");t&&(t.style.height="auto",e.style.height=`${t.clientHeight}px`,e.style.flexBasis=`${t.clientHeight}px`)}}),[h,P]);const T=N.current,S=Object.keys(m?new Array(m).fill(void 0):T).map(Number).map((e=>{const n=T[e];return"function"==typeof n?r.ZP.createElement("div",{key:e},n(e===t,e===w,t)):void 0})),M=(0,i.Z)("Transition",g,n);return r.ZP.createElement("div",{ref:b,id:p,className:M},S)}},3455:(e,t,n)=>{n.d(t,{fi:()=>s,Yy:()=>o,vb:()=>l,ZP:()=>h});var r=n(1090),a=n(782);const s=[{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"}],o=[{icon:"mute",title:"FilterMuted",key:"excludeMuted"},{icon:"archive",title:"FilterArchived",key:"excludeArchived"},{icon:"readchats",title:"FilterRead",key:"excludeRead"}],i=["includedChatIds","bots","channels","groups","contacts","nonContacts"],c=["excludedChatIds","excludeArchived","excludeMuted","excludeRead"];function l(e,t,n){let r=[],s=[];if("included"===t){const{includedChatIds:t,...o}=n?e.includeFilters||{}:(0,a.ei)(e.folder,i);r=t||[],s=Object.keys(o).filter((e=>Boolean(o[e])))}else{const{excludedChatIds:t,...o}=n?e.excludeFilters||{}:(0,a.ei)(e.folder,c);r=t||[],s=Object.keys(o).filter((e=>Boolean(o[e])))}return{selectedChatIds:r,selectedChatTypes:s}}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,a.ei)(e.folder,i)};case"editExcludeFilters":return{...e,excludeFilters:(0,a.ei)(e.folder,c)};case"setIncludeFilters":return{...e,includeFilters:t.payload,chatFilter:""};case"setExcludeFilters":return{...e,excludeFilters:t.payload,chatFilter:""};case"saveFilters":return e.includeFilters?{...e,folder:{...(0,a.CE)(e.folder,i),title:e.folder.title?e.folder.title:d(e.includeFilters),...e.includeFilters},includeFilters:void 0,chatFilter:"",isTouched:!0}:e.excludeFilters?{...e,folder:{...(0,a.CE)(e.folder,c),...e.excludeFilters},excludeFilters:void 0,chatFilter:"",isTouched:!0}:e;case"editFolder":{const{id:e,description:n,...r}=t.payload;return{mode:"edit",folderId:e,folder:r,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,r.Z)(m,u)},3186:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(4050),a=n(5116),s=n(396),o=n(274),i=n(5266),c=n(9290),l=n(4532);const d=(e,t,n,d,u,m,h,f,v=!1,p,g,Z=!1,E=!1)=>{const P=(0,r.sO)(null),[y,C]=(0,r.eJ)(!1);let b=y;const[N,w]=(0,r.eJ)(0),k=(0,r.I4)((()=>{C(!1),g&&g()}),[g]);(0,c.Z)((()=>{P.current=(0,s.z2)(e,n,d,((e,r)=>{var s;switch(e){case"onPlay":{const{setVolume:e,setPlaybackRate:t,toggleMuted:r,proxy:s}=P.current;C(!0),(0,l.N)(h,function(e){let t={};if(e&&e.current){const{play:n,pause:r,setCurrentTime:s,proxy:o,requestNextTrack:i,requestPreviousTrack:c,isFirst:l,isLast:d}=e.current;t={play:()=>{n(o.src)},pause:()=>{r()},stop:()=>{r(),s(0),(0,a.uC)().closeAudioPlayer()},seekbackward:e=>{const t=e.seekOffset||10;s(Math.max(o.currentTime-t,0))},seekforward:e=>{const t=e.seekOffset||10;s(Math.min(o.currentTime+t,o.duration))},seekTo:e=>{e.seekTime&&s(e.seekTime)}},d()||(t.nexttrack=()=>{i()}),l()||(t.previoustrack=()=>{c()})}return t}(P)),(0,l.pC)("playing"),e((0,a.Rd)().audioPlayer.volume),r(!!(0,a.Rd)().audioPlayer.isMuted),"voice"===n&&t((0,a.Rd)().audioPlayer.playbackRate),(0,l.NS)({duration:s.duration||0,playbackRate:s.playbackRate,position:s.currentTime});break}case"onRateChange":{const{proxy:e}=P.current;(0,l.NS)({duration:e.duration||0,playbackRate:e.playbackRate,position:e.currentTime});break}case"onPause":C(!1),(0,l.pC)("paused");break;case"onTimeUpdate":{const{proxy:e}=P.current,n=e.duration&&Number.isFinite(e.duration)?e.duration:t;E||w(e.currentTime/n);break}case"onEnded":(0,l.pC)("paused")}null==m||null===(s=m[e])||void 0===s||s.call(m,r)}),p,k);const{proxy:r}=P.current;y||r.paused||(C(!0),b=!0),f&&f(r)}),[e]),(0,r.d4)((()=>{y&&h&&(0,l.Ym)(h)}),[h,y]);const{play:I,pause:T,setCurrentTime:S,proxy:M,destroy:x,setVolume:L,setCurrentOrigin:A,stop:$,isFirst:O,isLast:F,requestNextTrack:R,requestPreviousTrack:U,setPlaybackRate:D,toggleMuted:B}=P.current,V=M.duration&&Number.isFinite(M.duration)?M.duration:t;(0,r.d4)((()=>{!V||(0,i.z)(M)||E||w(M.currentTime/V)}),[V,N,M,E]),(0,r.d4)((()=>()=>{x(Z)}),[x,Z]),(0,o.Z)((([e,t])=>{e===v&&u===t||M.src&&M.paused||v&&u&&!y&&I(u)}),[v,u,y,I,M.src,M.paused]);const X=(0,r.I4)((()=>{u&&(A(d),I(u))}),[u,d,I,A]),q=(0,r.I4)((()=>{y?T():X()}),[T,X,y]),K=(0,r.I4)((e=>{S(e),V&&w(M.currentTime/V)}),[V,M,S]);return{isPlaying:b,playProgress:N,playPause:q,pause:T,play:X,stop:$,setCurrentTime:K,setVolume:L,audioProxy:M,duration:V,requestNextTrack:R,requestPreviousTrack:U,isFirst:O(),isLast:F(),setPlaybackRate:D,toggleMuted:B}}},5332:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);function a(e,t){(0,r.d4)((()=>(e&&!document.hasFocus()&&e(),e&&window.addEventListener("blur",e),t&&window.addEventListener("focus",t),()=>{t&&window.removeEventListener("focus",t),e&&window.removeEventListener("blur",e)})),[e,t])}},2937:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(4050),a=n(6264),s=n(9290),o=n(1394),i=n(5326);const c=new Map;function l(e){const t=(0,r.sO)();let n=!1;(0,s.Z)((()=>{if(n=!0,t.current=void 0,!e)return;const r=new Image;if(r.src=e,!r.width)return;const s=(0,o.ao)(r);(0,a.Z)(s.getContext("2d"),0,0,s.width,s.height,2,2),t.current=s.toDataURL()}),[e]);const l=function(e,t=!1,n){const s=(0,r.sO)(e?c.get(e):void 0),l=(0,r.sO)(),d=(0,i.Z)();return l.current&&t&&(clearTimeout(l.current),l.current=void 0),(0,r.d4)((()=>{if(!e||s.current||t)return;const r=new Image;r.onload=()=>{const t=(0,o.ao)(r);(0,a.Z)(t.getContext("2d"),0,0,t.width,t.height,2,2);const n=t.toDataURL();s.current=n,d(),c.size>=1e3&&c.clear(),c.set(e,n)},n?l.current=window.setTimeout((()=>{r.src=e}),n):r.src=e}),[e,n,d,t]),s.current}(e||void 0,Boolean(t.current));return t.current||!n&&l||e||void 0}},2019:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(9118),s=n(5266);const o=(e=!1)=>{const[t,n]=(0,r.eJ)(!e),[o,i]=(0,r.eJ)(0),c=(0,r.Ye)((()=>(0,a.Ds)(n,200,!1,!0)),[]),l=(0,r.I4)((e=>{const t=e.currentTarget;(0,s.z)(t)||(t.buffered.length&&i(t.buffered.end(0)/t.duration),c(t.readyState>=3||t.currentTime>0))}),[c]);return{isBuffered:t,bufferedProgress:o,bufferingHandlers:{onLoadedData:l,onPlaying:l,onLoadStart:l,onPause:l,onTimeUpdate:l,onProgress:l},checkBuffering(e){c(e.readyState>=3)}}}},5866:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(6264),s=n(5326),o=n(7361);function i(e,t=!1,n){const i=(0,r.sO)(null),c=(0,s.Z)();return(0,r.d4)((()=>{const r=i.current;if(!e||!r||t)return;const s=new Image,c=()=>{r.width=s.width,r.height=s.height;const e=r.getContext("2d",{alpha:!1});o.vX&&(e.filter="blur(2px)"),e.drawImage(s,-4,-4,r.width+8,r.height+8),o.vX||(0,a.Z)(e,0,0,r.width,r.height,2,2)};s.onload=()=>{n?requestAnimationFrame(c):c()},s.src=e}),[i,e,c,t,n]),i}},1470:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(5116),s=n(2858),o=n(782),i=n(9107);const c=({chat:e,privateChatUser:t,handleDelete:n,handleChatFolderChange:c,folderId:l,isPinned:d,isMuted:u},m=!1)=>{const h=(0,i.Z)(),{isSelf:f}=t||{};return(0,r.Ye)((()=>{if(!e)return;const{toggleChatPinned:t,updateChatMutedState:r,toggleChatArchived:i,toggleChatUnread:v}=(0,a.uC)(),p={title:h("ChatList.Filter.AddToFolder"),icon:"folder",handler:c},g=d?{title:h("UnpinFromTop"),icon:"unpin",handler:()=>t({id:e.id,folderId:l})}:{title:h("PinToTop"),icon:"pin",handler:()=>t({id:e.id,folderId:l})};if(m)return[g,p];const Z=e.unreadCount||e.hasUnreadMark?{title:h("MarkAsRead"),icon:"readchats",handler:()=>v({id:e.id})}:{title:h("MarkAsUnread"),icon:"unread",handler:()=>v({id:e.id})},E=u?{title:h("ChatList.Unmute"),icon:"unmute",handler:()=>r({chatId:e.id,isMuted:!1})}:{title:h("ChatList.Mute"),icon:"mute",handler:()=>r({chatId:e.id,isMuted:!0})},P=(0,s.pE)(e)?{title:h("Unarchive"),icon:"unarchive",handler:()=>i({id:e.id})}:{title:h("Archive"),icon:"archive",handler:()=>i({id:e.id})},y={title:(0,s.YC)(e.id)?h("Delete"):h((0,s.cc)(e)?"DeleteChat":(0,s.eA)(e)?"LeaveChannel":"Group.LeaveGroup"),icon:"delete",destructive:!0,handler:n},C=void 0!==l;return(0,o.oA)([p,Z,g,!f&&E,!f&&!C&&P,y])}),[e,h,c,d,m,u,n,l,f])}},7240:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(7361);function s(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const o=(e,t,n,o)=>{const[i,c]=(0,r.eJ)(!1),[l,d]=(0,r.eJ)(void 0),u=(0,r.I4)((e=>{t||2!==e.button||document.body.classList.add("no-selection")}),[t]),m=(0,r.I4)((e=>{document.body.classList.remove("no-selection"),t||n&&e.target.matches("a[href]")||(e.preventDefault(),l||(c(!0),d({x:e.clientX,y:e.clientY})))}),[t,n,l]),h=(0,r.I4)((()=>{c(!1)}),[]),f=(0,r.I4)((()=>{d(void 0),document.body.classList.remove("no-selection")}),[]);return(0,r.d4)((()=>{if(t||!a.$b||o)return;const r=e.current;if(!r)return;let i;const u=()=>{i&&(clearTimeout(i),i=void 0)},m=e=>{t||a.wB&&window.document.body.classList.contains("enable-symbol-menu-transforms")||(u(),i=window.setTimeout((()=>(e=>{u();const{clientX:t,clientY:o,target:i}=e.touches[0];l||n&&i.matches("a[href]")||(r.addEventListener("touchend",(function e(t){r.removeEventListener("touchend",e,!0),s(t)}),!0),a.fl&&a.cj&&r.addEventListener("mousedown",(function e(t){r.removeEventListener("mousedown",e,!0),s(t)}),!0),document.body.classList.add("no-selection"),c(!0),d({x:t,y:o}))})(e)),200))};return r.addEventListener("touchstart",m,{passive:!0}),r.addEventListener("touchcancel",u,!0),r.addEventListener("touchend",u,!0),r.addEventListener("touchmove",u,{passive:!0}),()=>{u(),r.removeEventListener("touchstart",m),r.removeEventListener("touchcancel",u,!0),r.removeEventListener("touchend",u,!0),r.removeEventListener("touchmove",u)}}),[l,t,o,e,n]),{isContextMenuOpen:i,contextMenuPosition:l,handleBeforeContextMenu:u,handleContextMenu:m,handleContextMenuClose:h,handleContextMenuHide:f}}},3394:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);const a=(e,t,n,a,s=0,o=0)=>{const[i,c]=(0,r.eJ)("right"),[l,d]=(0,r.eJ)("bottom"),[u,m]=(0,r.eJ)(!1),[h,f]=(0,r.eJ)(""),[v,p]=(0,r.eJ)("");return(0,r.d4)((()=>{const r=t();if(!e||!r)return;let{x:i,y:l}=e;const u={width:0,left:0,height:0,top:0},h=a(),v=n(),g=r.getBoundingClientRect(),Z=h?{width:h.offsetWidth,height:h.offsetHeight}:u,E=v?v.getBoundingClientRect():u;let P;i+Z.width+s<E.width+E.left?(i+=3,P="left"):i-Z.width>0?(P="right",i-=3):(P="left",i=16),c(P),l+Z.height<E.height+E.top?d("top"):(d("bottom"),l-Z.height<E.top+o&&(l=E.top+E.height));const y="left"===P?Math.min(i-g.left,E.width-Z.width-16):Math.max(i-g.left,Z.width+16),C=Math.min(E.height-g.top+g.height-12,l-g.top),b=E.height-12;m(b<Z.height),p(`max-height: ${b}px;`),f(`left: ${y}px; top: ${C}px`)}),[e,s,o,a,n,t]),{positionX:i,positionY:l,style:h,menuStyle:v,withScroll:u}}},8360:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(7204);function a(e,t=!1,n=!1){const a=(0,r.Z)(e,t);return n||null!=e?e:a}},2202:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(9118);function s(e,t,n){return(0,r.Ye)((()=>(0,a.Ds)((e=>e()),e,t,n)),[e,t,n])}},5790:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(5116),s=n(9118);const o=(e,t,n,o)=>{const{loadMessage:i}=(0,a.uC)(),c=(0,r.Ye)((()=>{const n=(0,s.P2)(i,500,!0);return()=>{n({chatId:e,messageId:t,replyOriginForId:o})}}),[i,e,t,o]);(0,r.d4)((()=>{t&&!n&&c()}))}},8781:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);const a=(e,t)=>{(0,r.d4)((()=>{if(e)return e.addEventListener("wheel",t,{passive:!0}),()=>{e.removeEventListener("wheel",t)};function t(t){t.deltaX||(e.scrollLeft+=t.deltaY/4)}}),[e,t])}},7407:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(4050),a=n(1713),s=n(782),o=n(5326),i=n(7204);const c=(e,t,n=!1,c=30,d=!1)=>{const u=(0,r.sO)(),m=(0,r.sO)((()=>{if(!t||u.current)return;const{newViewportIds:e}=l(t,a.Uq.Forwards,c,t[0]);return e})()),h=(0,o.Z)(),f=(0,i.Z)(t),v=(0,i.Z)(n);if(t&&!n&&(t!==f||n!==v)){const{offsetId:e=t[0],direction:n=a.Uq.Forwards}=u.current||{},{newViewportIds:r}=l(t,n,c,e);m.current&&(0,s.et)(m.current,r)||(m.current=r)}(0,r.d4)((()=>{if(t&&!n&&e&&d){const t=m.current;e({offsetId:t[t.length-1]})}}),[t,n,e,d]);const p=(0,r.I4)((({direction:n,noScroll:r})=>{const o=m.current,i=o?n===a.Uq.Backwards?o[o.length-1]:o[0]:void 0;if(!t)return void(e&&e({offsetId:i}));r||(u.current={...u.current,direction:n,offsetId:i});const{newViewportIds:d,areSomeLocal:f,areAllLocal:v}=l(t,n,c,i);!f||o&&(0,s.et)(o,d)||(m.current=d,h()),!v&&e&&e({offsetId:i})}),[t,c,e,h]);return n?[t]:[m.current,p]};function l(e,t,n,r){const{length:s}=e,o=r?e.indexOf(r):0,i=t===a.Uq.Forwards?o:o+1||s,c=Math.max(0,i-n),l=i+n-1,d=e.slice(Math.max(0,c),l+1);let u,m;switch(t){case a.Uq.Forwards:u=i>0,m=c>=0;break;case a.Uq.Backwards:u=i<s,m=l<=s-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:m}}},2515:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(7361);function s(e,t,n){(0,r.d4)((()=>{t?a.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,{S1:()=>o,_N:()=>i,Op:()=>c});var r=n(4050),a=n(9118),s=n(8674);function o({rootRef:e,throttleMs:t,debounceMs:n,shouldSkipFirst:o,margin:i,threshold:c,isDisabled:l,noAutoFreeze:d=!1},u){const m=(0,r.sO)(),h=(0,r.sO)(),f=(0,r.sO)(0),v=(0,r.sO)(),p=(0,r.sO)();h.current=u;const g=(0,r.I4)((()=>{f.current&&(f.current--,!f.current&&p.current&&(p.current(),p.current=void 0))}),[]),Z=(0,r.I4)((()=>{f.current++,d||(v.current&&(clearTimeout(v.current),v.current=void 0),v.current=window.setTimeout((()=>{v.current=void 0,f.current&&(f.current=1,g())}),2e3))}),[d,g]);return(0,s.ZP)(Z,g),(0,r.d4)((()=>{if(!l)return()=>{m.current&&(m.current.observer.disconnect(),m.current.callbacks.clear(),m.current=void 0)}}),[l]),{observe:(0,r.I4)(((r,s)=>{m.current||function(){const r=new Map,s=new Map,l=()=>{const e=Array.from(s.values());e.forEach((t=>{const n=r.get(t.target);n&&n(t,e)})),h.current&&h.current(e),s.clear()},d=t?a.P2:n?a.Ds:void 0,u=d?d(l,t||n,!o):l,v=new IntersectionObserver((e=>{e.forEach((e=>{s.set(e.target,e)})),f.current?p.current=()=>{u()}:u()}),{root:e.current,rootMargin:i?`${i}px`:void 0,threshold:c});m.current={observer:v,callbacks:r}}();const l=m.current;return l.observer.observe(r),s&&l.callbacks.set(r,s),()=>{s&&l.callbacks.delete(r),l.observer.unobserve(r)}}),[l]),freeze:Z,unfreeze:g}}function i(e,t,n){(0,r.d4)((()=>t?t(e.current,n):void 0),[])}function c(e,t,n){const[a,s]=(0,r.eJ)(!t);return i(e,t,(e=>{s(e.isIntersecting),n&&n(e)})),a}},2645:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(7204);const s=(e,t,n)=>{const s=(0,a.Z)(t);return(0,r.bt)((()=>e(s||[])),t,n)}},6202:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(6137),s=n(647),o=n(5326);const i=(e,t=!1,n=a.IU.BlobUrl,i,c)=>{const l=e?s.UV(e):void 0,d=(0,o.Z)();return(0,r.d4)((()=>{if(!t&&e&&!l){const t=Date.now();s.he(e,n).then((()=>{const e=Date.now()-t;!c||e>=c?d():setTimeout(d,c-e)}))}}),[t,e,l,n,i,d,c]),l}},692:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(1212);function a(e){const t=Boolean(e),{transitionClassNames:n}=(0,r.Z)(t,void 0,t,"slow");return n}},2566:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4050),a=n(7361),s=n(6137),o=n(9118),i=n(647),c=n(5326),l=n(6926);const d={};function u(e,t=!1,n=s.IU.BlobUrl,u,m,h=!1){const f=e?i.UV(e):void 0,v=n===s.IU.Stream||a.I_&&n===s.IU.Progressive,p=(0,c.Z)(),g=(()=>{const e=(0,r.sO)();return e.current||(e.current=(0,l.Z)(d),d[e.current]=!0),e.current})(),[Z,E]=(0,r.eJ)(f&&!v?1:0),P=(0,r.sO)(),y=(0,r.Ye)((()=>(0,o.P2)((e=>{P.current&&(!m||Date.now()-P.current>m)&&E(e)}),500,!0)),[m]);return(0,r.d4)((()=>{!t&&e&&(f?v&&setTimeout((()=>{E(.75)}),1500):(E(0),P.current&&i.cC(y),P.current=Date.now(),i.he(e,n,h,y,g).then((()=>{const e=Date.now()-P.current;P.current=void 0,!m||e>=m?p():setTimeout(p,m-e)}))))}),[t,e,f,n,u,p,v,m,y,h,g]),(0,r.d4)((()=>{t&&P.current&&(i.cC(y),E(0),P.current=void 0)}),[y,t]),(0,r.d4)((()=>()=>{e&&i.Iq(e,g)}),[g,e]),{mediaData:f,loadProgress:Z}}},6503:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(4050),a=n(7361);let s;function o(e,t,n=250,o=!1){const i=(0,r.sO)(!1);return(0,r.d4)((()=>{s&&(clearTimeout(s),s=void 0),!e||a.$b||o||(s=window.setTimeout((()=>{i.current||t()}),2*n))}),[o,e,n,t]),[(0,r.I4)((()=>{i.current=!0}),[]),(0,r.I4)((()=>{i.current=!1,s&&(clearTimeout(s),s=void 0),s=window.setTimeout((()=>{i.current||t()}),n)}),[n,t])]}},2678:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(4050),a=n(7204),s=n(5326),o=n(9290);function i(e,t){const n=(0,a.Z)(e,!0),i=(0,r.sO)(),c=(0,s.Z)(),l=null!=e,d=null!=n;return l&&i.current&&(clearTimeout(i.current),i.current=void 0),(0,o.Z)((()=>{t&&!l&&d&&!i.current&&(i.current=window.setTimeout((()=>{i.current=void 0,c()}),t))}),[e]),i.current&&t&&!l?n:e}},1090:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(4050);function a(e,t){const n=(0,r.sO)(e),[a,s]=(0,r.eJ)(t);return[a,(0,r.I4)((e=>{s((t=>n.current(t,e)))}),[])]}},6898:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4050),a=n(9118);function s(e,t){(0,r.d4)((()=>{const t=e.current;return()=>{t&&(0,a.T2)((()=>{t.pause(),t.src="",t.load()}))}}),t)}},6264:(e,t,n)=>{n.d(t,{Z:()=>s});const r=[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],a=[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 s(e,t,n,s,o,i,c){if(Number.isNaN(i)||i<1)return;i|=0,Number.isNaN(c)&&(c=1),(c|=0)>3&&(c=3),c<1&&(c=1);const l=e.getImageData(t,n,s,o),d=l.data;let u,m,h,f,v,p,g,Z,E,P,y,C,b=s-1,N=o-1,w=i+1,k=[],I=[],T=[],S=r[i],M=a[i],x=[],L=[];for(;c-- >0;){for(C=y=0,v=0;v<o;v++){for(u=d[C]*w,m=d[C+1]*w,h=d[C+2]*w,p=1;p<=i;p++)g=C+((p>b?b:p)<<2),u+=d[g++],m+=d[g++],h+=d[g++];for(f=0;f<s;f++)k[y]=u,I[y]=m,T[y]=h,0==v&&(x[f]=((g=f+w)<b?g:b)<<2,L[f]=(g=f-i)>0?g<<2:0),Z=C+x[f],E=C+L[f],u+=d[Z++]-d[E++],m+=d[Z++]-d[E++],h+=d[Z++]-d[E++],y++;C+=s<<2}for(f=0;f<s;f++){for(P=f,u=k[P]*w,m=I[P]*w,h=T[P]*w,p=1;p<=i;p++)P+=p>N?0:s,u+=k[P],m+=I[P],h+=T[P];for(y=f<<2,v=0;v<o;v++)d[y]=u*S>>>M,d[y+1]=m*S>>>M,d[y+2]=h*S>>>M,0==f&&(x[v]=((g=v+w)<N?g:N)*s,L[v]=(g=v-i)>0?g*s:0),Z=f+x[v],E=f+L[v],u+=k[Z]-k[E],m+=I[Z]-I[E],h+=T[Z]-T[E],y+=s<<2}}e.putImageData(l,t,n)}},396:(e,t,n)=>{n.d(t,{Es:()=>v,z2:()=>p,An:()=>E});var r=n(5116),a=n(1713),s=n(7361),o=n(4753),i=n(5266),c=n(2858),l=n(9118);const d=new Map;let u,m=[],h=[];function f(e,t){const n=u&&d.get(u);n&&(n.audio.pause(),n.audio.currentTime=0,n.onTrackChange&&n.onTrackChange());const a=d.get(e),s=g(a);if(!s)return;const i=Z(s,e,a.origin,t);if(!i)return;if(!d.has(i))return void(0,r.uC)().openAudioPlayer((0,c.Ak)(P(i).messageKey));const l=d.get(i);n&&(l.origin=n.origin),l.onForcePlay&&l.onForcePlay(),u=i,l.audio.src&&(0,o.Z)(l.audio)}function v(){const e=u&&d.get(u);e&&e.audio.pause()}function p(e,t,n,r,a,c){if(!d.has(e)){const r=function(e,t,n,r,a){const s=new Audio;function o(t){return n=>{d.has(e)&&((0,i.z)(s)||d.get(e).handlers.forEach((e=>{e(t,n)})))}}return s.addEventListener("timeupdate",o("onTimeUpdate")),s.addEventListener("play",o("onPlay")),s.addEventListener("pause",o("onPause")),s.addEventListener("loadstart",o("onLoadStart")),s.addEventListener("loadeddata",o("onLoadedData")),s.addEventListener("playing",o("onPlaying")),s.addEventListener("ended",(()=>{d.has(e)&&((0,i.z)(s)||f(e))})),{audio:s,type:t,proxy:new Proxy(s,{get:(e,t)=>e[t]}),origin:n,handlers:[],onForcePlay:r,onTrackChange:a}}(e,t,n,a,c);d.set(e,r),function(e,t){"audio"!==e.type||h.includes(t)||(h.push(t),h.sort(y)),"voice"!==e.type||m.includes(t)||(m.push(t),m.sort(y))}(r,e)}const{audio:v,proxy:p,handlers:E}=d.get(e);return E.push(r),{play(t){if(!v.paused)return;const n=u&&d.get(u);n&&u!==e&&(n.audio.pause(),n.audio.currentTime=0,(0,i.z)(n.audio)&&(n.audio.dataset.preventPlayAfterPatch="true"),n.onTrackChange&&n.onTrackChange()),u=e,v.src||(v.src=t,v.preload="auto",t.includes("/progressive/")&&s.s$&&(delete v.dataset.preventPlayAfterPatch,(0,i.B)(v))),(0,o.Z)(v)},setCurrentOrigin(t){d.get(e).origin=t},pause(){u===e&&v.pause()},stop(){if(u===e){const e=v.src;v.pause(),(0,l.T2)((()=>{v.src="",v.src=e}))}},setCurrentTime(t){u===e&&(v.fastSeek?v.fastSeek(t):v.currentTime=t)},setVolume(t){u===e&&(v.volume=t,v.muted=!1)},setPlaybackRate(t){u===e&&(v.playbackRate=t)},toggleMuted(e){v.muted=void 0===e?!v.muted:e},proxy:p,requestNextTrack(){f(e)},isLast(){const t=g(d.get(e));return!t||!Z(t,e,d.get(e).origin)},isFirst(){const t=g(d.get(e));return!t||!Z(t,e,d.get(e).origin,!0)},requestPreviousTrack(){f(e,!0)},destroy(t=!1){const n=d.get(e);n&&(n.handlers=n.handlers.filter((e=>e!==r)),n.handlers.length||(n.audio.pause(),d.delete(e),t&&function(e,t){"audio"===e.type&&(h=h.filter((e=>e!==t))),"voice"===e.type&&(m=m.filter((e=>e!==t)))}(n,e),e===u&&(u=void 0)))}}}function g(e){return"audio"===e.type?h:"voice"===e.type?m:void 0}function Z(e,t,n,r){if(n===a.Cr.Search){const n=e.indexOf(t);if(n<0)return;return e[n+(r?-1:1)]}const{chatId:s}=(0,c.Ak)(P(t).messageKey),o=e.filter((e=>e.startsWith(`msg${s}`))),i=o.indexOf(t);if(i<0)return;let l=n===a.Cr.Inline?-1:1;return r&&(l*=-1),o[i+l]}function E(e){return`${(0,c.Tp)(e)}-${e.date}`}function P(e){return{messageKey:e.match(/^msg(-?\d+)-(\d+)/)[0],date:Number(e.split("-").pop())}}function y(e,t){if(!e||!t)return 0;const{date:n,messageKey:r}=P(e),{date:a,messageKey:s}=P(t),o=a-n;return 0===o?s.localeCompare(r):o}},1174:(e,t,n)=>{n.d(t,{e:()=>a,s:()=>s});var r=n(7361);let a;function s(e,t){let n,s,o=!1,i=!1;function c(e){if(!t.excludedClosestSelector||!e.target.matches(t.excludedClosestSelector)&&!e.target.closest(t.excludedClosestSelector)){if(n=e,"mousedown"===e.type)document.addEventListener("mousemove",d),document.addEventListener("mouseup",l);else if("touchstart"===e.type){const t=e.target;t.addEventListener("touchmove",d,{passive:!0}),t.addEventListener("touchend",l),t.addEventListener("touchcancel",l),"touches"in e&&(void 0===e.pageX&&(e.pageX=e.touches[0].pageX),void 0===e.pageY&&(e.pageY=e.touches[0].pageY))}document.body.classList.add("no-selection"),t.withCursor&&document.body.classList.add("cursor-grabbing"),t.onCapture&&t.onCapture(e)}}function l(e){n&&(t.withCursor&&document.body.classList.remove("cursor-grabbing"),document.body.classList.remove("no-selection"),document.removeEventListener("mouseup",l),document.removeEventListener("mousemove",d),n.target.removeEventListener("touchcancel",l),n.target.removeEventListener("touchend",l),n.target.removeEventListener("touchmove",d),n=void 0,r.cj&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow=""})),o?t.onRelease&&t.onRelease(e):!t.onClick||"button"in e&&0!==e.button||t.onClick(e)),o=!1,i=!1,s=void 0}function d(e){if(n){"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));const c=e.pageX-n.pageX,l=e.pageY-n.pageY;(Math.abs(c)>=15||Math.abs(l)>=15)&&(o=!0);let d=!1;t.onDrag&&(t.onDrag(e,n,{dragOffsetX:c,dragOffsetY:l}),d=!0),t.onSwipe&&!i&&(i=function(e,n,o){if(r.cj){const t=e.touches[0].pageX;if(t<=20||t>=window.innerWidth-20)return!1}const i=Math.abs(n),c=Math.abs(o);if(n&&o&&Math.max(i,c)/Math.min(i,c)<2)return!1;let l;if(i>=50?l="x":c>=50&&(l="y"),!l)return!1;if(s){if(s!==l)return!1}else s=l;return function(e,t,n,r,s){return"x"===t?s(e,n<0?a.Left:a.Right):"y"===t&&s(e,r<0?a.Up:a.Down)}(e,l,n,o,t.onSwipe)}(e,c,l),d=i),r.cj&&d&&t.selectorToPreventScroll&&Array.from(document.querySelectorAll(t.selectorToPreventScroll)).forEach((e=>{e.style.overflow="hidden"}))}}return e.addEventListener("mousedown",c),e.addEventListener("touchstart",c,{passive:!0}),()=>{e.removeEventListener("mousedown",c),e.removeEventListener("touchstart",c)}}!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down",e[e.Left=2]="Left",e[e.Right=3]="Right"}(a||(a={}))},4319:(e,t,n)=>{n.d(t,{yl:()=>a,TE:()=>o,VP:()=>i});var r=n(3716);const a=navigator.clipboard&&window.ClipboardItem,s=document.createElement("textarea");s.setAttribute("readonly",""),s.tabIndex=-1,s.className="visually-hidden";const o=e=>{s.value=e,document.body.appendChild(s);const t=document.getSelection();if(t){const e=t.rangeCount>0&&t.getRangeAt(0);s.select(),document.execCommand("copy"),e&&(t.removeAllRanges(),t.addRange(e))}document.body.removeChild(s)},i=e=>{if(!e)return;const t=document.createElement("canvas"),n=t.getContext("2d"),r=new Image;r.onload=e=>{if(n&&e.currentTarget){const r=e.currentTarget;t.width=r.width,t.height=r.height,n.drawImage(r,0,0,r.width,r.height),t.toBlob(c,"image/png",1)}},r.src=e};async function c(e){if(e&&a)try{await navigator.clipboard.write([new window.ClipboardItem({[e.type]:e})])}catch(e){r.eM&&console.error(e)}}},1279:(e,t,n)=>{function r(e,t,n){s("transitionend",e,t,n)}function a(e,t,n){s("animationend",e,t,n)}function s(e,t,n,r){let a=!1;t.addEventListener(e,(function s(o){a||o.target!==o.currentTarget||r&&(o instanceof TransitionEvent&&o.propertyName===r||o instanceof AnimationEvent&&o.animationName===r)||(a=!0,t.removeEventListener(e,s),setTimeout((()=>{n()}),50))}))}n.d(t,{L:()=>r,f:()=>a})},3570:(e,t,n)=>{function r(e,t){return t-Math.floor(t/e)*e}n.d(t,{Z:()=>r})},539:(e,t,n)=>{n.d(t,{Z:()=>l,N:()=>d});var r=n(5116),a=n(1713),s=n(3716),o=n(8674),i=n(9933);let c=!1;function l(e,t,n,o=0,i=s.V$,c,l,d){const m=function(e,t,n=s.V$,r){const{offsetTop:o}=t,{scrollTop:i}=e;if(void 0===r){const t=o-e.scrollTop;if(t<-n)return i+(t+n);if(t>n)return i+(t-n)}else{if(r===a.fo.Up)return o+n;if(r===a.fo.Down)return Math.max(0,o-n)}return i}(e,t,i,c);c!==a.fo.Static?((0,r.Rd)().settings.byKey.animationLevel===s.oB&&(l=0),u(e,t,m,n,o,l,d)):u(e,t,m,n,o,0)}function d(){return c}function u(e,t,n,r,a=0,l,d){const{offsetTop:u,offsetHeight:f}=t,{scrollTop:v,offsetHeight:p,scrollHeight:g}=e,Z=d&&e.dataset.normalHeight?Number(e.dataset.normalHeight):p;let E;switch(v!==n&&(e.scrollTop=n),r){case"start":E=u-a-n;break;case"end":E=u+f+a-(n+Z);break;case"nearest":case"center":case"centerOrTop":E=f<Z?u+f/2-(n+Z/2):u-a-n}if(E<0){const e=-n;E=Math.max(E,e)}else if(E>0){const e=g-(n+Z);E=Math.min(E,e)}if(0===E)return;const P=n+E;if(0===l)return void(e.scrollTop=P);c=!0;const y=Math.abs(E),C=y<s.xn?h:m,b=l||s.bK+y/s.V$*(s.ck-s.bK),N=Date.now(),w=(0,o.YW)();(0,i.c)((()=>{const t=Math.min((Date.now()-N)/b,1),n=E*(1-C(t));return e.scrollTop=Math.round(P-n),c=t<1,c||w(),c}))}function m(e){return 1-(1-e)**5}function h(e){return 1-(1-e)**3.5}},1367:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(5116),a=n(3716),s=n(7361),o=n(9933);function i(e,t,n=300){(0,r.Rd)().settings.byKey.animationLevel===a.oB&&(n=0),s.cj?function(e,t,n){const{scrollLeft:r,offsetWidth:a,scrollWidth:s}=e;let i=t-r;if(i<0){const e=-r;i=Math.max(i,e)}else if(i>0){const e=s-(r+a);i=Math.min(i,e)}if(0===i)return;const c=r+i;if(0===n)return void(e.scrollLeft=c);const l=Date.now();(0,o.j)((()=>{const t=Math.min((Date.now()-l)/n,1),r=i*(1-function(e){return 1-(1-e)**3.5}(t));return e.scrollLeft=Math.round(c-r),t<1}))}(e,t,n):e.scrollTo({left:t,...n&&{behavior:"smooth"}})}},5723:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(7361);function a(e,t){if(!t&&e===document.activeElement)return;const n=window.getSelection(),a=document.createRange(),s=e.lastChild||e;r.$b||s&&s.nodeValue?(a.selectNodeContents(s),a.collapse(!1),n.removeAllRanges(),n.addRange(a)):e.focus()}},4532:(e,t,n)=>{n.d(t,{N:()=>a,Ym:()=>s,Ay:()=>i,pC:()=>c,NS:()=>l,Of:()=>d});const r={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 a(e,t){const{mediaSession:n}=window.navigator;n?(e&&s(e),t&&o(t)):console.warn("MediaSession API not supported in this browser")}function s(e){const{mediaSession:t}=window.navigator;t&&(t.metadata=null!=e?e:null)}function o(e){const{mediaSession:t}=window.navigator;t&&Object.entries({...r,...e}).forEach((([e,n])=>{try{t.setActionHandler(e,n)}catch(e){}}))}function i(){const{mediaSession:e}=window.navigator;var t;e&&(e.metadata=null,o(r),e.playbackState&&(e.playbackState="none"),null===(t=e.setPositionState)||void 0===t||t.call(e))}function c(e="none"){const{mediaSession:t}=window.navigator;t&&t.playbackState&&(t.playbackState=e)}function l(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({title:e,artist:t,album:n,artwork:r}){if("MediaMetadata"in window)return new window.MediaMetadata({title:e,artist:t,album:n,artwork:r})}},3099:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(6137),a=n(7361);const s={B:r.Vv.Bold,STRONG:r.Vv.Bold,I:r.Vv.Italic,EM:r.Vv.Italic,U:r.Vv.Underline,S:r.Vv.Strike,STRIKE:r.Vv.Strike,DEL:r.Vv.Strike,CODE:r.Vv.Code,PRE:r.Vv.Pre,BLOCKQUOTE:r.Vv.Blockquote};function o(e){const t=document.createElement("div");t.innerHTML=function(e){let t=e.slice(0);return a.op||(t=t.replace(/<img[^>]+alt="([^"]+)"[^>]*>/gm,"$1")),t=t.replace(/<\/?span([^>]*)?>/g,""),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(/[*]{2}([^*\n]+)[*]{2}/g,"<b>$1</b>"),t=t.replace(/[_]{2}([^*\n]+)[_]{2}/g,"<i>$1</i>"),t=t.replace(/[~]{2}([^~\n]+)[~]{2}/g,"<s>$1</s>"),t}(e);const n=t.innerText.trim().replace(/\u200b+/g,"");let o=0,i=0;const c=[];function l(e){const{index:t,entity:a}=function(e,t,n){const a=function(e){if(s[e.nodeName])return s[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===r.Vv.MentionName?r.Vv.MentionName:t.dataset.entityType===r.Vv.Url?r.Vv.Url:t.href.startsWith("mailto:")?r.Vv.Email:t.href.startsWith("tel:")?r.Vv.Phone:t.href!==t.textContent?r.Vv.TextUrl:r.Vv.Url}return"SPAN"===e.nodeName?e.dataset.entityType:void 0}(e);if(!a||!e.textContent)return{index:n,entity:void 0};const o=t.indexOf(e.textContent,n),i=o>=0?o:n,c=t.substring(0,i).length,{length:l}=t.substring(i,i+e.textContent.length);let d,u;return a===r.Vv.TextUrl&&(d=e.href),a===r.Vv.MentionName&&(u=e.dataset.userId),{index:i,entity:{type:a,offset:c,length:l,...d&&{url:d},...u&&{userId:u}}}}(e,n,o);a?(o=t,c.push(a)):e.textContent&&(o+=e.textContent.length),e.hasChildNodes()&&i<=3&&(i+=1,Array.from(e.childNodes).forEach(l))}return Array.from(t.childNodes).forEach((e=>{i=1,l(e)})),{text:n,entities:c.length?c:void 0}}},5266:(e,t,n)=>{function r(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 a(e){return Boolean(e.dataset.patchForSafariInProgress)}n.d(t,{B:()=>r,z:()=>a})},7675:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(7361);const a=(e,t)=>{r.cj&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),r.cj&&(e.style.overflow="")}},4753:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(3716);const a=e=>{e.play().catch((t=>{r.eM&&console.warn(t,e)}))}}}]);
|
||
//# sourceMappingURL=306.abed97b181f73c2c1aa8.js.map
|