2 lines
73 KiB
JavaScript
2 lines
73 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[8104],{101:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(84051),a=n(87679),i=n(56863);function s(e){const t=(0,o.li)(),{result:n}=(0,i.A)((()=>{if(!e)return Promise.resolve(void 0);t.current&&URL.revokeObjectURL(t.current);const n=URL.createObjectURL(e);return t.current=n,(0,a.NN)(n)}),[e]);return(0,o.vJ)((()=>()=>{t.current&&(URL.revokeObjectURL(t.current),t.current=void 0)}),[]),{image:n}}},10187:(e,t,n)=>{n.d(t,{A:()=>p});var o=n(84051),a=n(13439),i=n(70636),s=n(60919),c=n(87357),r=n(35049),l=n(59030),d=n(21849),u=n(34431),h=n(18276);var m=n(20021);const p=(0,o.ph)((0,a.EK)(((e,{peerId:t,forceShowSelf:n})=>{if(!t)return{};const o=(0,s.PVB)(e,t),a=(0,s.mBe)(e,t);return{peer:o,isSavedMessages:!n&&a&&a.isSelf}}))((({icon:e,title:t,isMinimized:n,canClose:o,isCloseNonDestructive:a,clickArg:s,peer:p,mockPeer:g,customPeer:f,className:A,isSavedMessages:v,withPeerColors:C,withEmojiStatus:y,onClick:I,itemClassName:S})=>{const R=(0,l.A)(),w=g||p,N=f||w,M=w&&(0,i.vj)(w)?w:void 0;let b,x,k;e&&t?(b=(0,m.Y)("div",{className:"NtoGLT22",children:(0,m.Y)(h.A,{name:e,style:"f91Ad80i"})}),x=t):N&&(b=(0,m.Y)(d.A,{className:"La8BQ9yr",peer:N,size:"small",isSavedMessages:v}),k=(0,i.F9)(R,N)||t,x=t||(0,m.Y)(u.A,{peer:N,isSavedMessages:v,withEmojiStatus:y}));const P=(0,c.A)("_Lq6_4e5",(M?.isForum||f?.isAvatarSquare)&&"JIHfTUVn",n&&"UhOZvxvs",o&&"uvvgSFUJ",a&&"fAk5yEeV",!I&&"P8r3OoaX",C&&(0,r.y)(f||p),A);return(0,m.FD)("div",{className:P,onClick:()=>I?.(s),title:n?k:void 0,dir:R.isRtl?"rtl":void 0,children:[b,!n&&(0,m.Y)("div",{className:(0,c.A)("XPVuH29G",S),dir:"auto",children:x}),o&&(0,m.Y)("div",{className:"xVPG2UTy",children:(0,m.Y)(h.A,{name:"close"})})]})})))},11241:(e,t,n)=>{n.d(t,{A:()=>N});var o=n(84051),a=n(13439),i=n(90709),s=n(60919),c=n(87357),r=n(43336),l=n(76023),d=n(37661),u=n(5912),h=n(17712),m=n(62587),p=n(50680),g=n(47483),f=n(18104),A=n(87412),v=n(83594),C=n(17794),y=n(93879),I=n(20021);const S=1.5*l.$,R=6.5*l.$,w=l.$,N=(0,o.ph)((0,a.EK)(((e,{containerId:t})=>{const{genericEmojiEffects:n,reactions:o}=e,{activeReactions:a}=(0,s.nTw)(e),i=(0,s.xYJ)(e,"reactionEffects");return{activeReactions:a?.[t],availableReactions:o.availableReactions,genericEffects:n,withEffects:i}}))((({containerId:e,reaction:t,className:n,size:s=S,effectSize:l=R,activeReactions:N,availableReactions:M,genericEffects:b,withEffects:x,withEffectOnly:k,shouldPause:P,shouldLoop:Y,loopLimit:T,observeIntersection:D})=>{const{stopActiveReaction:L}=(0,a.ko)(),F=(0,o.li)(),E="custom"===t.type,B=(0,o.Kr)((()=>M?.find((e=>(0,i.a0)(e.reaction,t)))),[M,t]),O=B?.centerIcon?.id,{customEmoji:K}=(0,g.A)(E?t.documentId:void 0),_=(0,o.Kr)((()=>{if(!E)return B?.aroundAnimation?.id;if(!K)return;const e=M?.find((e=>e.reaction.emoticon===K.emoji))?.aroundAnimation?.id;return e}),[B,M,K,E]),U=(0,o.Kr)((()=>{if(_)return _;if(!b?.stickers)return;const{stickers:e}=b;return e[Math.floor(Math.random()*e.length)].id}),[_,b]),$=(0,u.Vz)(F,D),j=O&&(0,i.aL)(O),J=U&&(0,i.aL)(U),z=(0,m.A)(j),H=(0,m.A)(J),q=(0,o.Kr)((()=>N?.find((e=>(0,i.a0)(e,t)))),[N,t]),G=Boolean(x&&q&&(E||z)&&H),V=$&&(G&&!k||Y),{shouldRender:W,transitionClassNames:Z}=(0,p.A)(G,void 0,!0,"slow"),{shouldRender:X,transitionClassNames:Q}=(0,p.A)(V,void 0,!0,"slow"),ee=(0,h.A)((()=>{L({containerId:e,reaction:t})})),[te,ne,oe]=(0,d.A)(),ae=!(E||V&&te),{shouldRender:ie,transitionClassNames:se}=(0,p.A)(ae,void 0,!0),ce=(0,c.A)(y.A.root,W&&y.A.animating,k&&y.A.withEffectOnly,n);return(0,I.FD)("div",{className:ce,ref:F,children:[!k&&ie&&(0,I.Y)(C.A,{className:se,reaction:t,availableReactions:M,size:s,observeIntersection:D}),!k&&E&&(0,I.Y)(A.A,{documentId:t.documentId,className:y.A.customEmoji,size:s,noPlay:P,noVideoOnMobile:!0,loopLimit:T,observeIntersectionForPlaying:D,forceAlways:!0}),X&&!E&&(0,I.Y)(f.A,{className:(0,c.A)(y.A.animatedIcon,Q),size:(0,r.Ki)(1.9*s),tgsUrl:z,play:$&&!P,noLoop:!Y,onLoad:ne,onEnded:oe,forceAlways:!0},`${O}-${s}`),W&&(0,I.FD)(I.FK,{children:[(0,I.Y)(f.A,{className:(0,c.A)(y.A.effect,Z),size:l,tgsUrl:H,play:$,noLoop:!0,onEnded:ee,forceAlways:!0},`${U}-${l}`),E&&!_&&$&&(0,I.Y)(v.A,{reaction:t,className:Z,particleSize:Math.max(.5*s,w),onEnded:ee})]})]})})))},14622:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(84051),a=n(13439),i=n(81954),s=n(17712),c=n(93545),r=n(672);const l=function(e,t=!1){const{focusLastMessage:n}=(0,a.ko)(),l=(0,o.li)(0),d=(0,s.A)((e=>{const t=l.current,a=e.contentRect.height;if(l.current=a,(0,i.o8)()||!t||a<=t)return;const s=e.target.closest(".MessageList");if(!s)return;(0,o.VK)(400);const c=a-t,{offsetHeight:r,scrollHeight:d,scrollTop:u}=s;Math.round(d-u-r)-c<=5&&n()})),u=(0,r.A)(d,[d],300,!1);(0,c.A)(e,u,!t)}},14737:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(84051),a=n(17712);const i=function(e,t){const n=(0,a.A)(e);(0,o.vJ)((()=>{if("number"!=typeof t)return;const e=setTimeout((()=>n()),t);return()=>clearTimeout(e)}),[t])}},15535:(e,t,n)=>{n.d(t,{A:()=>g});var o=n(84051),a=n(31481),i=n(66644),s=n(96454),c=n(87357),r=n(83868),l=n(14737),d=n(43874),u=n(59030),h=n(64493),m=n(18276),p=n(20021);const g=(0,o.ph)((({isLoading:e=!1,isPasswordVisible:t,error:n,hint:g,placeholder:f="Password",submitLabel:A="Next",description:v,shouldShowSubmit:C,shouldResetValue:y,shouldDisablePasswordManager:I=!1,noRipple:S=!1,clearError:R,onChangePasswordVisibility:w,onInputChange:N,onSubmit:M})=>{const b=(0,o.li)(),x=(0,u.A)(),{isMobile:k}=(0,d.Ay)(),[P,Y]=(0,o.J0)(""),[T,D]=(0,o.J0)(!1),L=k?550:400;return(0,o.vJ)((()=>{y&&Y("")}),[y]),(0,l.A)((()=>{s.TF||b.current.focus()}),L),(0,o.vJ)((()=>{n&&(0,i.RK)((()=>{b.current.focus(),b.current.select()}))}),[n]),(0,p.FD)("form",{action:"",onSubmit:M?function(t){t.preventDefault(),e||T&&M(P)}:r.A,autoComplete:"off",children:[(0,p.FD)("div",{className:(0,c.A)("input-group password-input",P&&"touched",n&&"error"),dir:x.isRtl?"rtl":void 0,children:[I&&(0,p.Y)("input",{type:"password",id:"prevent_autofill",autoComplete:"off",className:"visually-hidden",tabIndex:-2}),(0,p.Y)("input",{ref:b,className:"form-control",type:t?"text":"password",id:"sign-in-password",value:P||"",autoComplete:I?"one-time-code":"current-password",onChange:function(e){n&&R();const{target:t}=e;Y(t.value),D(t.value.length>=a.AGC),N&&N(t.value)},maxLength:256,dir:"auto"}),(0,p.Y)("label",{children:n||g||f}),(0,p.Y)("div",{className:"div-button toggle-password",onClick:function(){w(!t)},role:"button",tabIndex:0,title:"Toggle password visibility","aria-label":"Toggle password visibility",children:(0,p.Y)(m.A,{name:t?"eye":"eye-crossed"})})]}),v&&(0,p.Y)("p",{className:"description",children:v}),M&&(T||C)&&(0,p.Y)(h.A,{size:"smaller",type:"submit",ripple:!S,isLoading:e,disabled:!T,children:A})]})}))},15640:(e,t,n)=>{function o(e){return"touches"in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}n.d(t,{A:()=>o})},16460:(e,t,n)=>{function o(e,t){let n=0,o=0,a=e;for(;a&&a!==t&&!a.contains(t);)n+=a.offsetTop,o+=a.offsetLeft,a=a.offsetParent;return{top:n,left:o}}n.d(t,{A:()=>o})},17794:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(84051),a=n(90709),i=n(87357),s=n(62587),c=n(83057),r=n(87412),l=n(18276),d=n(61911),u=n(20021);const h=(0,o.ph)((({reaction:e,availableReactions:t,className:n,size:h,withIconHeart:m,observeIntersection:p})=>{const g=(0,o.Kr)((()=>t?.find((t=>(0,a.a0)(t.reaction,e)))),[t,e]),f=g?.staticIcon?.id,A=f?`document${f}`:void 0,v=(0,s.A)(A),C=(0,c.A)(v),y="emoji"===e.type&&"🦄"===e.emoticon,I=m&&"emoji"===e.type&&"❤"===e.emoticon;return"custom"===e.type?(0,u.Y)(r.A,{documentId:e.documentId,className:(0,i.A)("ReactionStaticEmoji",n),size:h,observeIntersectionForPlaying:p}):I?(0,u.Y)(l.A,{name:"heart",className:"ReactionStaticEmoji",style:`font-size: ${h}px; width: ${h}px`}):(0,u.Y)("img",{className:(0,i.A)("ReactionStaticEmoji",y&&"with-unicorn-fix",C,n),style:h?`width: ${h}px; height: ${h}px`:void 0,src:v||d,alt:g?.title,draggable:!1})}))},20333:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(84051),a=n(87357),i=n(95807),s=n(59030),c=n(93545),r=n(18276);const l="_b5HgBXr",d="P6mch4bB";var u=n(20021);const h=(0,o.ph)((({leftText:e,rightText:t,floatingBadgeText:n,floatingBadgeIcon:h,progress:m,isPrimary:p,className:g})=>{const f=(0,s.A)(),A=(0,o.li)(),v=(0,o.li)(),[C,y]=(0,o.J0)(0),[I,S]=(0,o.J0)(0),R=()=>{if(A.current&&v.current&&void 0!==m){const e=A.current.offsetWidth,t=v.current.offsetWidth,n=e/2,o=t-e/2,a=m*t,i=Math.max(n,Math.min(a,o));let s;y(i/t),s=a<n?m*t/(2*n):a>o?.5+(m-o/t)/(1-o/t)*.4:.5,S(s)}};(0,o.vJ)(R,[m]),(0,c.A)(v,R);const w=Boolean(h||n),N=Boolean(m)&&m>.99;return(0,u.FD)("div",{ref:v,className:(0,a.A)("nY2ggBsF",w&&"RYtVQAjM",p&&"Zi0w7QJ3",g),style:(0,i.A)(void 0!==m&&`--progress: ${m}`,void 0!==I&&`--tail-position: ${I}`,`--shift-x: ${C}`),children:[w&&(0,u.Y)("div",{className:"dhigNjAq",children:(0,u.FD)("div",{className:"cOpfCGPh",children:[(0,u.FD)("div",{className:"uNwBLNOy",ref:A,children:[h&&(0,u.Y)(r.A,{name:h,className:"MJ7MTmxi"}),n&&(0,u.Y)("div",{className:"MwzZt3Qo",dir:f.isRtl?"rtl":void 0,children:n})]}),(0,u.Y)("div",{className:"qRwO7SZm",children:(0,u.Y)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:(0,u.Y)("path",{d:"m 28,4 v 9 c 0.0089,7.283278 -3.302215,5.319646 -6.750951,8.589815 l -5.8284,5.82843 c -0.781,0.78105 -2.0474,0.78104 -2.8284,0 L 6.7638083,21.589815 C 2.8288652,17.959047 0.04527024,20.332086 0,13 V 4 C 0,4 0.00150581,0.97697493 3,1 5.3786658,1.018266 22.594519,0.9142007 25,1 c 2.992326,0.1067311 3,3 3,3 z",fill:"#7E85FF"})})})]})}),(0,u.Y)("div",{className:l,children:(0,u.Y)("span",{children:e})}),(0,u.Y)("div",{className:d,children:(0,u.Y)("span",{children:t})}),(0,u.FD)("div",{className:(0,a.A)("sZZV0yoe",N&&"m8ie8IxL"),children:[(0,u.Y)("div",{className:l,children:(0,u.Y)("span",{children:e})}),(0,u.Y)("div",{className:d,children:(0,u.Y)("span",{children:t})})]})]})}))},24531:(e,t,n)=>{n.d(t,{A:()=>m});var o=n(84051),a=n(31481),i=n(17663),s=n(80140),c=n(17712),r=n(59030),l=n(80089),d=n(80464),u=n(20021);const h=e=>{const{isOpen:t}=e,n=(0,d.A)(l.ar.Extra,"CalendarModal",!t);return n?(0,u.Y)(n,{...e}):void 0},m=(e,t,n)=>{const l=(0,r.A)(),[d,m]=(0,o.J0)(),p=(0,c.A)(((e,t=!1)=>{const n=Math.round(Math.max(e.getTime(),Date.now()+6e4)/1e3)+(t?0:(0,s.SF)());d?.(n),m(void 0)})),g=(0,c.A)((()=>{p(new Date(1e3*a.NkL),!0)})),f=(0,c.A)((()=>{m(void 0),t?.()})),A=(0,c.A)((e=>{m((()=>e))})),v=n?new Date(1e3*n):new Date;v.setSeconds(0),v.setMilliseconds(0);const C=new Date;return C.setFullYear(C.getFullYear()+1),[A,(0,u.Y)(h,{isOpen:Boolean(d),withTimePicker:!0,selectedAt:v.getTime(),maxAt:(0,i.CS)(C),isFutureMode:!0,secondButtonLabel:e?l("Schedule.SendWhenOnline"):void 0,onClose:f,onSubmit:p,onSecondButtonClick:e?g:void 0})]}},26875:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(84051),a=n(87357),i=n(59030),s=n(21849);var c=n(20021);const r=(0,o.ph)((({peers:e,size:t,className:n,limit:r=3,badgeText:l})=>{const d=(0,i.A)(),u="number"==typeof t?t:s.R[t],h=(0,o.Kr)((()=>l||(!e?.length||e.length<=r?void 0:"+"+(e.length-r))),[l,e,r]);return(0,c.FD)("div",{className:(0,a.A)(n,"kXs18Nmi"),style:`--_size: ${u}px;`,dir:d.isRtl?"rtl":"ltr",children:[e?.slice(0,r).map((e=>(0,c.Y)(s.A,{size:t,peer:e,className:"XND8fhC1"}))),h&&(0,c.Y)("div",{className:"SHyAyGFO",children:h})]})}))},27860:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(84051),a=n(66644),i=n(87357),s=n(45470),c=n(39351),r=n(17712),l=n(50680),d=n(18276);var u=n(20021);const h=(0,o.ph)((({isVisible:e,withAnimation:t,thumbDataUri:n,isNsfw:h,className:m,width:p,height:g})=>{const f=(0,o.li)(),A=(0,c.A)(),{shouldRender:v,transitionClassNames:C}=(0,l.A)(e,void 0,!0,!t&&void 0,void 0,500),y=(0,s.A)(n,!v,void 0,25,p,g),I=(0,r.A)((e=>{if(!f.current)return;const t=f.current,n=e.currentTarget.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,s=o-n.width/2,c=i-n.height/2;(0,a.RK)((()=>{t.setAttribute("style",`--click-shift-x: ${s}px; --click-shift-y: ${c}px`)}))}));if(v)return(0,u.FD)("div",{className:(0,i.A)("qF2WgYVg",C,m,t&&"pNM3cgkY"),ref:f,onClick:t?I:void 0,children:[(0,u.Y)("canvas",{ref:y,className:"eULqS2yR",width:p,height:g}),(0,u.Y)("div",{className:"XBor45hE"}),h&&(0,u.FD)("span",{className:"FJGQoa6s",children:[(0,u.Y)(d.A,{name:"eye-crossed-outline",className:"Y7JVRkxJ"}),A("MediaSpoilerSensitive")]})]})}))},29886:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(84051);function a(e){const t=(0,o.li)(),n=(0,o.li)();return n.current!==e&&(t.current=n.current),n.current=e,t.current}},31722:(e,t,n)=>{n.d(t,{A:()=>o});const o={container:"YmM5biTv",header:"S7WFT2bv",pickerCategoryTitle:"YK1300x2",peerChip:"gsKPBPoK",pickerList:"yLCbiItq",padded:"bXzIGw8s",noResults:"dXWKD0ve",onlineStatus:"d5GDOYh9"}},36838:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(84051);const a=(e,t,n=!1)=>{(0,o.vJ)((()=>{if(t)return;const o=e.current;function a(e){e.deltaX||(o.scrollLeft+=e.deltaY/4,n&&e.preventDefault())}return o.addEventListener("wheel",a,{passive:!n}),()=>{o.removeEventListener("wheel",a)}}),[e,t,n])}},40558:(e,t,n)=>{n.d(t,{A:()=>p});var o=n(84051),a=n(66644),i=n(90709),s=n(87357),c=n(95807),r=n(87679),l=n(17712),d=n(62587),u=n(93545),h=n(38691);var m=n(20021);const p=(0,o.ph)((({backgroundColors:e,patternColor:t,patternIcon:n,clearBottomSector:p,className:g})=>{const f=(0,o.li)(),A=(0,o.li)(),[v,C]=(0,o.Ul)({width:0,height:0}),y=(0,h.A)(),[I,S]=(0,o.J0)(),R=n&&(0,i.Mw)(n,"preview"),w=(0,d.A)(R);(0,o.vJ)((()=>{w&&(0,r.NN)(w).then(S)}),[w]);const N=(0,o.Kr)((()=>{const e=[];for(let t=1;t<=3;t++){const n=Math.floor(8*(1+.5*(t-1))),o=t/3,a=.05+(.4-.05)*o,i=t%2==0?Math.PI/n:0;for(let t=0;t<n;t++){const s=t/n*Math.PI*2+i;if(p&&s>.45*Math.PI&&s<.55*Math.PI)continue;const c=.5+1.71*a*Math.cos(s),r=.5+a*Math.sin(s),l=1.4-o*Math.random();e.push({x:c,y:r,sizeFactor:l})}}return e}),[p]);(0,u.A)(f,(e=>{C({width:e.contentRect.width,height:e.contentRect.height})})),(0,o.vJ)((()=>{const e=f.current;e&&C({width:e.clientWidth,height:e.clientHeight})}),[C]);const M=(0,l.A)((()=>{const e=A.current;if(!e||!I)return;const n=e.getContext("2d"),{width:o,height:a}=e;if(!o||!a)return;n.save(),N.forEach((({x:e,y:t,sizeFactor:i})=>{const s=(o-Math.max(o,250*y))/2,c=e*Math.max(o,250*y)+s,r=t*Math.max(a,250*y)+s,l=20*y*i*(s?.8:1);n.drawImage(I,c-l/2,r-l/2,l,l)})),n.restore(),t&&(n.save(),n.fillStyle=t,n.globalCompositeOperation="source-atop",n.fillRect(0,0,o,a),n.restore());const i=n.createRadialGradient(o/2,a/2,0,o/2,a/2,o/2);i.addColorStop(0,"#FFFFFF77"),i.addColorStop(1,"#FFFFFF"),n.save(),n.globalCompositeOperation="destination-out",n.fillStyle=i,n.fillRect(0,0,o,a),n.restore()}));return(0,o.vJ)((()=>{M()}),[I]),(0,o.vJ)((()=>{const{width:e,height:t}=v(),n=A.current;if(!e||!t)return;const o=Math.max(e,t);(0,a.RK)((()=>{n.width=o*y,n.height=o*y,M()}))}),[v,y]),(0,m.Y)("div",{ref:f,className:(0,s.A)("Af3tYFMg",g),style:(0,c.A)(`--_bg-1: ${e[0]}`,`--_bg-2: ${e[1]||e[0]}`),children:(0,m.Y)("canvas",{className:"GbpiDSS_",ref:A})})}))},41512:(e,t,n)=>{n.d(t,{Y:()=>a});var o=n(43503);function a(e){if("none"===e.style.display)return!1;const t=e.getBoundingClientRect(),{height:n}=o.A.get();return t.top<=n&&t.top+t.height>=0}},43581:(e,t,n)=>{n.d(t,{A:()=>$});var o=n(84051),a=n(13439),i=n(90709),s=n(60919),c=n(87357),r=n(60343),l=n(15283),d=n(17712),u=n(59030),h=n(14242),m=n(76023),p=n(63527),g=n(10722),f=n(82117),A=n(39351),v=n(29886),C=n(21511),y=n(68292),I=n(26875),S=n(96454),R=n(83108),w=n(5912),N=n(4438),M=n(9267),b=n(93879),x=n(20021);const k=1.5*m.$,P=6.5*m.$,Y=S.pz||S.Ni?2:5,T=S.pz||S.Ni?2:3,D=(0,o.ph)((0,a.EK)(((e,{containerId:t})=>{const{activeReactions:n}=(0,s.nTw)(e),o=(0,s.xYJ)(e,"reactionEffects");return{activeReactions:n?.[t],withEffects:o}}))((({containerId:e,reaction:t,className:n,size:s=k,effectSize:r=P,activeReactions:l,localAmount:u,withEffects:h,observeIntersection:m})=>{const{stopActiveReaction:p}=(0,a.ko)(),g=(0,o.li)(),A=(0,o.li)(),[v,y]=(0,o.J0)([]),I=(0,w.Vz)(g,m),S=(0,o.Kr)((()=>l?.find((e=>(0,i.a0)(e,t)))),[l,t]),D=Boolean(h&&S),L=v.length<Y;(0,f.A)((([e])=>{D?!u||u<=(e||0)||L&&y((e=>[...e,Date.now()])):y([])}),[u,L,D]);const{shouldRender:F}=(0,C.A)({ref:A,noMountTransition:!0,isOpen:D,className:"slow",withShouldRender:!0}),E=(0,d.A)((()=>{const n=v.slice(1);y(n),n.length||p({containerId:e,reaction:t})})),B=(0,c.A)(b.A.root,F&&b.A.animating,n);return(0,x.FD)("div",{className:B,ref:g,teactFastList:!0,children:[(0,x.Y)(M.A,{type:"gold",size:"adaptive",style:`width: ${s}px; height: ${s}px`},"icon"),F&&v.map((e=>(0,x.Y)(N.A,{ref:A,className:b.A.effect,size:r,tgsUrl:R.w.StarReactionEffect,play:I,noLoop:!0,forceAlways:!0,nonInteractive:!0,quality:T,onEnded:E},e)))]})})));var L=n(11241),F=n(85118),E=n(64493),B=n(69988);const O=1.25*m.$;function K(e){return e.stars}const _=(0,o.ph)((({reaction:e,containerId:t,isOwnMessage:n,recentReactors:s,className:r,chosenClassName:l,chatId:u,messageId:m,isOutside:S,observeIntersection:R,onClick:w,onPaidClick:N})=>{const{openStarsBalanceModal:M,resetLocalPaidReactions:b,openPaidReactionModal:k,requestWave:P}=(0,a.ko)(),Y=(0,o.li)(),T=(0,o.li)(),_=(0,o.li)(),U=(0,A.A)(),$="paid"===e.reaction.type,j=(0,p.A)(K),J=Boolean(j),z=(0,d.A)(((e=1)=>{N?.(e)})),H=(0,d.A)((t=>{if("paid"===e.reaction.type)return t.stopPropagation(),void z();w?.(e.reaction)})),{isContextMenuOpen:q,handleBeforeContextMenu:G,handleContextMenu:V,handleContextMenuClose:W,handleContextMenuHide:Z}=(0,g.A)(Y,"paid"!==e.reaction.type,void 0,void 0,void 0,!0);(0,o.vJ)((()=>{q&&(k({chatId:u,messageId:m}),W(),Z())}),[W,Z,q,u,m]),(0,f.A)((([t])=>{const n=e.localAmount,o=Y.current;if(!n||!o||n===t?.localAmount)return;if(J&&n>j.balance.amount)return M({originReaction:{chatId:u,messageId:m,amount:n}}),void b({chatId:u,messageId:m});if(e.localAmount){const{left:e,top:t}=o.getBoundingClientRect(),n=e+o.offsetWidth/2,a=t+o.offsetHeight/2;P({startX:n,startY:a})}const a=Number(getComputedStyle(o).scale)||1;_.current?.cancel(),_.current=o.animate([{scale:a},{scale:Math.min(1.2*a,3),offset:.2},{scale:1}],{duration:500*a,easing:"ease-out"})}),[e,j?.balance,J,u,m]);const X=(0,v.A)(e.localAmount),{shouldRender:Q}=(0,C.A)({isOpen:Boolean(e.localAmount),ref:T,className:"slow",withShouldRender:!0});return(0,x.FD)(E.A,{className:(0,c.A)(B.A.root,n&&B.A.own,$&&B.A.paid,S&&B.A.outside,(0,i.eu)(e)&&B.A.chosen,(0,i.eu)(e)&&l,r),size:"tiny",ref:Y,onMouseDown:G,onContextMenu:V,onClick:H,children:["paid"===e.reaction.type?(0,x.FD)(x.FK,{children:[(0,x.Y)(F.A,{preset:"button"}),(0,x.Y)(D,{className:B.A.animatedEmoji,containerId:t,reaction:e.reaction,size:O,localAmount:e.localAmount,observeIntersection:R}),Q&&(0,x.Y)(y.A,{ref:T,text:`+${(0,h.Vw)(U,e.localAmount||X)}`,className:B.A.paidCounter})]}):(0,x.Y)(L.A,{className:B.A.animatedEmoji,containerId:t,reaction:e.reaction,size:O,observeIntersection:R}),s?.length?(0,x.Y)(I.A,{size:"mini",peers:s}):(0,x.Y)(y.A,{text:(0,h.Vw)(U,e.count+(e.localAmount||0)),className:B.A.counter})]})}));var U=n(92915);const $=(0,o.ph)((({message:e,threadId:t,isOutside:n,maxWidth:h,metaChildren:m,observeIntersection:p,noRecentReactors:g,isCurrentUserPremium:f,tags:A,isAccountFrozen:v})=>{const{toggleReaction:C,addLocalPaidReaction:y,updateMiddleSearch:I,performMiddleSearch:S,openPremiumModal:R,resetLocalPaidReactions:w,showNotification:N,openFrozenAccountModal:M}=(0,a.ko)(),b=(0,u.A)(),{results:k,areTags:P,recentReactions:Y}=e.reactions,T=Boolean(e.areReactionsPossible&&e.reactions),D=(0,o.Kr)((()=>k.reduce(((e,t)=>e+t.count),0)),[k]),L=(0,o.Kr)((()=>{const e=(0,a.mS)();return Y?.reduce(((t,n)=>{const{reaction:o,peerId:a}=n,c=(0,i.Jj)(o),r=(0,s.PVB)(e,a);if(!r)return t;const l=t[c]||[];return l.push(r),t[c]=l,t}),{})}),[Y]),F=(0,o.Kr)((()=>{const t=(0,r.bj)(e);return k.map((e=>{const n=(0,i.Jj)(e.reaction),o=L?.[n],a=D>3||g,s=P?A?.[n]:void 0;return{reaction:e,reactionKey:n,messageKey:t,recentReactors:a?void 0:o,isChosen:(0,i.eu)(e),tag:s}}))}),[e,g,L,k,P,A,D]),E=(0,d.A)((n=>{if(!v)return P?f?(I({chatId:e.chatId,threadId:t,update:{savedTag:n}}),void S({chatId:e.chatId,threadId:t})):void R({initialSection:"saved_tags"}):void C({chatId:e.chatId,messageId:e.id,reaction:n});M()})),B=(0,o.Kr)((()=>k.find((e=>"paid"===e.reaction.type))?.localAmount||0),[k]),O=(0,d.A)((t=>{v?M():y({chatId:e.chatId,messageId:e.id,count:t})}));(0,o.vJ)((()=>{B&&N({localId:(0,r.bj)(e),title:b("StarsSentTitle"),message:b("StarsSentText",B),actionText:b("StarsSentUndo"),cacheBreaker:B.toString(),action:{action:"resetLocalPaidReactions",payload:{chatId:e.chatId,messageId:e.id}},dismissAction:{action:"sendPaidReaction",payload:{chatId:e.chatId,messageId:e.id}},duration:5e3,shouldShowTimer:!0,disableClickDismiss:!0,icon:"star"})}),[b,e,B]);const K=(0,d.A)((t=>{v?M():C({chatId:e.chatId,messageId:e.id,reaction:t})}));return(0,l.A)((()=>()=>{w({chatId:e.chatId,messageId:e.id})})),(0,x.FD)("div",{className:(0,c.A)("Reactions",n&&"is-outside",T&&"is-service"),style:h?`max-width: ${h}px`:void 0,dir:b.isRtl?"rtl":"ltr",children:[F.map((({reaction:t,recentReactors:o,messageKey:a,reactionKey:i,isChosen:s,tag:c})=>P?(0,x.Y)(U.A,{className:"message-reaction",chosenClassName:"chosen",containerId:a,isOwnMessage:e.isOutgoing,isChosen:s,reaction:t.reaction,tag:c,withContextMenu:f,onClick:E,onRemove:K,observeIntersection:p},i):(0,x.Y)(_,{chatId:e.chatId,messageId:e.id,className:"message-reaction",chosenClassName:"chosen",containerId:a,isOwnMessage:e.isOutgoing,recentReactors:o,isOutside:n,reaction:t,onClick:E,onPaidClick:O,observeIntersection:p},i))),m]})}))},45470:(e,t,n)=>{n.d(t,{A:()=>d});var o=n(84051),a=n(32587),i=n(66644),s=n(96454),c=n(35297);const r=2,l=2;function d(e,t=!1,n,d=r,u,h){const m=(0,o.li)(),p=(0,o.li)();return(0,c.A)((()=>{t||(p.current=!1)}),[e,t]),(0,o.vJ)((()=>{const o=m.current;if(!e||!o||t||p.current)return;p.current=!0;const c=new Image,r=()=>{const e=u||c.width,t=h||c.height,n=o.getContext("2d",{alpha:!1});(0,i.RK)((()=>{o.width=e,o.height=t,s.QH&&(n.filter=`blur(${d}px)`),n.drawImage(c,2*-d,2*-d,e+4*d,t+4*d),s.QH||(0,a.A)(n,0,0,e,t,d,l)}))};c.onload=()=>{n?(0,i.YS)(r):r()},c.src=e}),[e,t,h,u,d,n]),m}},45780:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(96454),a=n(87357),i=n(17712),s=n(59030),c=n(42452);var r=n(20021);const l=({title:e,subtitle:t,avatarElement:n,inputElement:l,inputPosition:d="start",disabled:u,inactive:h,ripple:m,className:p,titleClassName:g,subtitleClassName:f,style:A,onClick:v,onDisabledClick:C})=>{const y=(0,s.A)(),I=!h&&!u,S=(0,i.A)((()=>{h||(u?C?.():v?.())}));return(0,r.FD)("div",{className:(0,a.A)("OHkx_W75",t&&"neXqB2_A",u&&"tvZeVJPh",I&&"VUSwo4t5",n&&"dMT9byM6",p),onClick:S,style:A,dir:y.isRtl?"rtl":void 0,role:I?"button":void 0,tabIndex:I?0:void 0,children:[!u&&!h&&m&&(0,r.Y)(c.A,{}),Boolean(l)&&(0,r.Y)("div",{className:(0,a.A)("kmjqObdP","end"===d?"iqGhSQGm":"F0Hv3EQm"),children:l}),Boolean(n)&&(0,r.Y)("div",{className:"dnAaRPCo",children:n}),(0,r.Y)("div",{className:(0,a.A)("JSSC0N8V",g),children:e}),Boolean(t)&&(0,r.Y)("div",{className:(0,a.A)("OYmzCSp2",f),children:t}),!l&&o.pz&&(0,r.Y)("div",{className:"P53DrbWA"})]})}},49086:(e,t,n)=>{n.d(t,{C:()=>h,V:()=>u});var o=n(13439),a=n(23174),i=n(90709),s=n(3544),c=n(60343),r=n(58849),l=n(4961),d=n(18501);function u({message:e,highlight:t,emojiSize:n,asPreview:o,truncateLength:a,isProtected:s,forcePlayback:l,shouldRenderAsHtml:u,isForMediaViewer:h,threadId:m,maxTimestamp:p}){const{text:g,entities:f}=e.content.text||{};if(!g){const t=(0,i.P5)(e)?.text;return t?[(0,r.A)(t,a)]:void 0}const A=(0,c.bj)(e);return(0,d.fd)({text:(0,r.A)(g,a),entities:f,highlight:t,emojiSize:n,shouldRenderAsHtml:u,containerId:`${h?"mv-":""}${A}`,asPreview:o,isProtected:s,forcePlayback:l,messageId:"id"in e?e.id:void 0,chatId:e.chatId,threadId:m,maxTimestamp:p})}function h(e,t,n=!1,c,d=s.vs){const{entities:h}=t.content.text||{},m=(0,o.mS)(),p=(0,i.ni)(m,t),g=h?.some((e=>e.type===a.C7.Spoiler)),f=h?.some((e=>e.type===a.C7.CustomEmoji));if(!g&&!f){const o=(0,r.A)((0,s.dS)(e,t,p,n),d);return c?(0,l.A)(o,["emoji","highlight"],{highlight:c}):(0,l.A)(o)}const A=!n&&(0,s.Su)(t),v=A?`${A} `:"",C=u({message:t,highlight:c,asPreview:!0,truncateLength:d}),y=(0,s.oL)(e,t,p,C);return[...(0,l.A)(v),...Array.isArray(y)?y:[y]].filter(Boolean)}},49746:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(84051),a=n(13439);function i(e,t,n,i,s){const{loadMessage:c}=(0,a.ko)();(0,o.vJ)((()=>{s||t&&!n&&c({chatId:e,messageId:t,replyOriginForId:i})}),[s,e,n,t,i])}},54960:(e,t,n)=>{n.d(t,{A:()=>k});var o=n(84051),a=n(13439),i=n(31481),s=n(66644),c=n(90709),r=n(70636),l=n(60919),d=n(87357),u=n(87894),h=n(79824),m=n(96374),p=n(17712),g=n(59030),f=n(19806),A=n(46222),v=n(40664),C=n(52745),y=n(24956),I=n(21849),S=n(34431),R=n(18276),w=n(10187),N=n(45780),M=n(31722),b=n(20021);const x="PeerPickerItem",k=(0,o.ph)((({className:e,categories:t,itemIds:n,categoryPlaceholderKey:k,filterValue:P,filterPlaceholder:Y,notFoundText:T,searchInputId:D,itemClassName:L,isLoading:F,noScrollRestore:E,isSearchable:B,lockedUnselectedSubtitle:O,forceShowSelf:K,isViewOnly:_,itemInputType:U,withStatus:$,withPeerTypes:j,withPeerUsernames:J,withDefaultPadding:z,onFilterChange:H,onDisabledClick:q,onLoadMore:G,...V})=>{const W=(0,g.A)(),Z=V.allowMultiple,X=Z?V.lockedSelectedIds:void 0,Q=Z?V.lockedUnselectedIds:void 0,ee=(0,o.Kr)((()=>Z?V.selectedCategories:V.selectedCategory?[V.selectedCategory]:h.p),[Z,V.selectedCategory,V.selectedCategories]),te=(0,o.Kr)((()=>Z?V.selectedIds:V.selectedId?[V.selectedId]:h.p),[Z,V.selectedId,V.selectedIds]),ne=(0,o.li)(),oe=te.length>10;(0,o.vJ)((()=>{if(!B)return;const e=window.setTimeout((()=>{(0,s.YS)((()=>{ne.current?.focus()}))}),500);return()=>{window.clearTimeout(e)}}),[B]);const ae=(0,o.Kr)((()=>new Set(X)),[X]),ie=(0,o.Kr)((()=>new Set(Q)),[Q]),se=(0,o.Kr)((()=>te.filter((e=>!ae.has(e)))),[ae,te]),ce=(0,o.Kr)((()=>t?(0,u.dU)(t,"type"):{}),[t]),re=(0,o.Kr)((()=>{if(P)return n;const e=[],t=[],o=[];return n.forEach((n=>{ae.has(n)?e.push(n):ie.has(n)?o.push(n):t.push(n)})),e.concat(t,o)}),[P,n,ae,ie]),le=(0,p.A)((e=>{if(ae.has(e))q?.(e,!0);else if(ie.has(e))q?.(e,!1);else{if(Z&&ce[e]){const t=ce[e].type,n=ee?.slice()||[];return n.includes(t)?n.splice(n.indexOf(t),1):n.push(t),void V.onSelectedCategoriesChange?.(n)}if(Z){const t=te.slice();return t.includes(e)?t.splice(t.indexOf(e),1):t.push(e),void V.onSelectedIdsChange?.(t)}ce[e]?V.onSelectedCategoryChange?.(ce[e].type):V.onSelectedIdChange?.(e)}})),de=(0,p.A)((e=>{const{value:t}=e.currentTarget;H?.(t)})),[ue,he]=(0,m.A)(G,re,Boolean(P)),me=(0,o.hb)(((e,t)=>{const n=(0,a.mS)(),o=t?ce[e]:void 0,s=t?void 0:(0,l.PVB)(n,e),u=s||o;if(!u)return i.Oig?(0,b.FD)("div",{children:["No peer or category with ID",e]},e):void 0;const h=s&&!(0,r.vj)(s)?s.isSelf&&!K:void 0,m=ie.has(e),p=ae.has(e),g=m||p,A=o?ee?.includes(o.type):te.includes(e),[v,C]=function(){if(m)return[O];if(s){if(J){const e=(0,c.Kl)(s);if(e)return[`@${e}`]}if($){if((0,r.vj)(s))return[(0,c.sT)(W,s)];const e=(0,l.K0y)(n,s.id);return[(0,c.CD)(W,s,e),(0,d.A)((0,c.PF)(s,e,!0)&&M.A.onlineStatus)]}if(j){const e=(0,r.cy)(s);return e&&[W(e)]}}}()||[];return(0,b.Y)(N.A,{className:(0,d.A)(x,L),title:(0,b.Y)(S.A,{peer:u}),avatarElement:(0,b.Y)(I.A,{peer:s||o,isSavedMessages:h,size:"medium"}),subtitle:v,subtitleClassName:C,disabled:g,inactive:_,ripple:!0,inputElement:g?(0,b.Y)(R.A,{name:"lock-badge"}):"radio"===U?(0,b.Y)(y.A,{checked:A,disabled:g,onlyInput:!0}):"checkbox"===U?(0,b.Y)(f.A,{checked:A,disabled:g,onlyInput:!0}):void 0,inputPosition:"end",onClick:()=>le(e),onDisabledClick:q&&(()=>q(e,p))},e)}),[ce,K,_,L,U,W,ae,ie,O,q,ee,te,j,$,J]),pe=(0,o.Kr)((()=>{if(t?.length)return(0,b.FD)("div",{children:[k&&(0,b.Y)("div",{className:M.A.pickerCategoryTitle,children:W(k)}),t?.map((e=>me(e.type,!0))),(0,b.Y)("div",{className:M.A.pickerCategoryTitle,children:W("FilterChats")})]},"categories")}),[t,k,W,me]);return(0,b.FD)("div",{className:(0,d.A)(M.A.container,e),children:[B&&(0,b.FD)("div",{className:(0,d.A)(M.A.header,"custom-scroll"),dir:W.isRtl?"rtl":void 0,children:[ee?.map((e=>(0,b.Y)(w.A,{className:M.A.peerChip,customPeer:ce[e],onClick:le,clickArg:e,canClose:!0}))),X?.map(((e,t)=>(0,b.Y)(w.A,{className:M.A.peerChip,peerId:e,isMinimized:oe&&t<te.length-5,forceShowSelf:K,onClick:le,clickArg:e}))),se.map(((e,t)=>(0,b.Y)(w.A,{className:M.A.peerChip,peerId:e,isMinimized:oe&&t+(X?.length||0)<te.length-5,canClose:!0,onClick:le,clickArg:e}))),(0,b.Y)(v.A,{id:D,ref:ne,value:P,onChange:de,placeholder:Y||W("SelectChat")})]}),ue?.length?(0,b.Y)(A.A,{className:(0,d.A)(M.A.pickerList,z&&M.A.padded,"custom-scroll"),items:ue,itemSelector:`.${x}`,beforeChildren:pe,onLoadMore:he,noScrollRestore:E,children:ue.map((e=>me(e)))}):F||!ue||ue.length?(0,b.Y)(C.A,{}):(0,b.Y)("p",{className:M.A.noResults,children:T||"Sorry, nothing found."})]})}))},56133:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(16581);function a(e,t,n,a=[]){return(0,o.A)((e=>{e()}),a,e,t,n)}},57446:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(13439),a=n(66644),i=n(60919),s=n(19822);const c=300,r=new Map;function l(e,t,n=c){(0,i.PKK)((0,o.mS)())||(n=0);const l="rtl"===e.getAttribute("dir"),{scrollLeft:d,offsetWidth:u,scrollWidth:h,dataset:{scrollId:m}}=e;let p=t-d;if(p<0){const e=-d*(l?-1:1);p=Math.max(p,e)}else if(p>0){const e=h-(d+u);p=Math.min(p,e)}if(0===p)return Promise.resolve();m&&r.has(m)&&r.get(m)();const g=d+p;return new Promise((t=>{(0,a.RK)((()=>{if(0===n)return e.scrollLeft=g,void t();let o=!1;const i=Math.random().toString();e.dataset.scrollId=i,r.set(i,(()=>{o=!0})),e.style.scrollSnapType="none";const c=Date.now();function l(){e.style.scrollSnapType="",delete e.dataset.scrollId,r.delete(i)}(0,s.i0)((()=>{if(o)return l(),!1;const a=Math.min((Date.now()-c)/n,1),i=p*(1-function(e){return 1-(1-e)**3.5}(a));return e.scrollLeft=Math.round(g-i),a>=1&&(l(),t()),a<1}),a.RK)}))}))}},58968:(e,t,n)=>{n.d(t,{I5:()=>s,LS:()=>i,V2:()=>a,lw:()=>o});const o={isCustomPeer:!0,type:"premium",titleKey:"PrivacyPremium",subtitleKey:"PrivacyPremiumText",avatarIcon:"star",isAvatarSquare:!0,withPremiumGradient:!0},a=[{isCustomPeer:!0,type:"contacts",titleKey:"FilterContacts",avatarIcon:"user",isAvatarSquare:!0,peerColorId:5},{isCustomPeer:!0,type:"nonContacts",titleKey:"FilterNonContacts",avatarIcon:"non-contacts",isAvatarSquare:!0,peerColorId:4},{isCustomPeer:!0,type:"groups",titleKey:"FilterGroups",avatarIcon:"group",isAvatarSquare:!0,peerColorId:3},{isCustomPeer:!0,type:"channels",titleKey:"FilterChannels",avatarIcon:"channel",isAvatarSquare:!0,peerColorId:1},{isCustomPeer:!0,type:"bots",titleKey:"FilterBots",avatarIcon:"bots",isAvatarSquare:!0,peerColorId:6}],i=[{isCustomPeer:!0,type:"excludeMuted",titleKey:"FilterMuted",avatarIcon:"mute",isAvatarSquare:!0,peerColorId:6},{isCustomPeer:!0,type:"excludeRead",titleKey:"FilterRead",avatarIcon:"readchats",isAvatarSquare:!0,peerColorId:4},{isCustomPeer:!0,type:"excludeArchived",titleKey:"FilterArchived",avatarIcon:"archive",isAvatarSquare:!0,peerColorId:5}],s={isCustomPeer:!0,type:"hidden",titleKey:"StarsTransactionHidden",avatarIcon:"author-hidden",peerColorId:4}},64489:(e,t,n)=>{n.d(t,{A:()=>m});var o=n(84051),a=n(87357),i=n(95807),s=n(37661),c=n(17712),r=n(83057),l=n(4438);const d="lM2usrZU";var u=n(20021);const h=new Set,m=(0,o.ph)((function(e){const{previewUrl:t,thumbDataUri:n,className:o,...m}=e,[p,,g]=(0,s.A)(Boolean(n)),f=(0,r.A)(p),[A,v,C]=(0,s.A)(h.has(t)),y=(0,r.A)(A),[I,S]=(0,s.A)(!1),R=(0,c.A)((()=>{v(),h.add(t)})),w=(0,c.A)((()=>{g(),C(),setTimeout(S,300)})),{size:N}=e;return(0,u.FD)("div",{className:(0,a.A)(o,"xCi2f0YH"),style:(0,i.A)(void 0!==N&&`width: ${N}px; height: ${N}px;`),children:[n&&!I&&(0,u.Y)("img",{src:n,className:(0,a.A)(d,f),draggable:!1}),t&&!I&&(0,u.Y)("img",{src:t,className:(0,a.A)(d,y),draggable:!1,onLoad:R}),(0,u.Y)(l.A,{...m,onLoad:w})]})}))},65632:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(84051),a=n(13439),i=n(31481),s=n(74824),c=n(87679);const r=(e,t)=>{const{setThemeSettings:n}=(0,a.ko)(),[r,l]=(0,o.J0)(t);return(0,o.vJ)((()=>{t&&(t.startsWith("#")?l(t):s.fetch(i.nfi,e,s.Type.Blob).then((e=>{const t=URL.createObjectURL(e);(0,c.NN)(t).then((()=>{l(`url(${t})`)}))})).catch((()=>{n({theme:e,background:void 0,backgroundColor:void 0,isBlurred:!0,patternColor:"dark"===e?i.MkD:i.be8})})))}),[t,e]),t?r:void 0}},66833:(e,t,n)=>{function o(e){return"starGift"===e.type?e.sticker:e.attributes.find((e=>"model"===e.type))?.sticker}function a(e){return"starGift"===e.type?e.availabilityTotal:e.totalCount}function i(e){if("starGiftUnique"===e.type)return function(e){const t=e.find((e=>"model"===e.type)),n=e.find((e=>"backdrop"===e.type)),o=e.find((e=>"pattern"===e.type));return{model:t,originalDetails:e.find((e=>"originalDetails"===e.type)),pattern:o,backdrop:n}}(e.attributes)}n.d(t,{UC:()=>a,uc:()=>i,yQ:()=>o})},68292:(e,t,n)=>{n.d(t,{A:()=>p});var o=n(84051),a=n(13439),i=n(60919),s=n(87357),c=n(37836),r=n(30857),l=n(39351),d=n(73767);var u=n(20021);let h=0;const m=(0,c.Fe)((()=>{h=0})),p=(0,o.ph)((({text:e,className:t,isDisabled:n,ref:c})=>{const{isRtl:p}=(0,l.A)(),g=(0,d.A)(e),f=(0,r.A)(),A=!(!(!n&&(0,i.PKK)((0,a.mS)())&&void 0!==g&&g!==e)||h>=10||(0===h&&m(),h++,0)),v=(0,o.Kr)((()=>A?function(e,t){const n=[],o=e.length,a=t?.length??0;for(let i=0;i<=o;i++){const s=o-i,c=a-i;t&&c>=0&&e[s]!==t[c]?n.unshift((0,u.FD)("div",{className:"IYTzbS8o",children:[(0,u.Y)("div",{className:"Jw1oQFdk",children:e[s]??""}),(0,u.Y)("div",{className:"TZfEz3sc",children:t[c]}),(0,u.Y)("div",{className:"Y9ied8_t",children:e[s]??""})]})):n.unshift((0,u.Y)("span",{children:e[s]??""}))}return n}(e,g):e),[A,g,e]);return(0,o.vJ)((()=>{if(!A)return;const e=window.setTimeout((()=>{f()}),200);return()=>{window.clearTimeout(e)}}),[A,e]),(0,u.Y)("span",{ref:c,className:(0,s.A)(t,!n&&"tgKbsVmz"),dir:p?"rtl":void 0,children:v})}))},69988:(e,t,n)=>{n.d(t,{A:()=>o});const o={root:"gXO57D98",chosen:"VXSJn0Sm",paid:"N3lcrsh8",outside:"Hqw10FGl","animated-emoji":"lFjoRm_p",animatedEmoji:"lFjoRm_p",tag:"Dr889Kzc",tail:"cUfY1b26","is-safari":"rxxUijuG",isSafari:"rxxUijuG","tail-fill":"y591o4fN",tailFill:"y591o4fN","tag-text":"ly7cruxF",tagText:"ly7cruxF",counter:"P2FqNJAi",disabled:"NRtGofbf",paidCounter:"CW4UO1n3"}},73104:(e,t,n)=>{let o,a;n.d(t,{M6:()=>r,v5:()=>l});const i={Down:!0,ArrowDown:!0,Up:!0,ArrowUp:!0,Left:!0,ArrowLeft:!0,Right:!0,ArrowRight:!0," ":!0,PageUp:!0,PageDown:!0,End:!0,Home:!0,Tab:!0},s=e=>{const t="deltaY"in e?e.deltaY:(e=>"changedTouches"in e?e.changedTouches[0].clientY:0)(e);if(!o||!o.contains(e.target)||o.scrollTop<=0&&t<=0||o.scrollTop>=o.scrollHeight-o.offsetHeight&&t>=0){if(a&&e.target.closest(a))return;e.preventDefault()}};function c(e){i[e.key]&&!function(e){if(!(e&&e instanceof HTMLElement))return!1;const t=e,n=t.tagName.toLowerCase();if("textarea"===n)return!0;if("input"!==n)return!1;const o=t.getAttribute("type");return!!o&&["text","password","number","email","tel","url","search","date","datetime","datetime-local","time","month","week"].indexOf(o.toLowerCase())>-1}(e.target)&&e.preventDefault()}function r(e,t){return o=e,a=t,document.addEventListener("wheel",s,{passive:!1}),document.addEventListener("touchmove",s,{passive:!1}),document.onkeydown=c,l}function l(){o=void 0,a=void 0,document.removeEventListener("wheel",s),document.removeEventListener("touchmove",s),document.onkeydown=null}},74984:(e,t,n)=>{n.d(t,{Jm:()=>l,Rh:()=>s,g5:()=>r,ic:()=>c});var o=n(84051),a=n(49763),i=n(30857);function s(e){const t=(0,i.A)();return(0,o.vJ)((()=>(0,a.Yw)(e,t)),[e,t]),(0,a.YA)(e)}function c(){const e=(0,i.A)();return(0,o.vJ)((()=>(0,a.P1)(e)),[e]),(0,a.PZ)()}function r(){const e=(0,i.A)();return(0,o.vJ)((()=>(0,a.BU)(e)),[e]),(0,a.jn)()}function l(){const e=(0,i.A)();return(0,o.vJ)((()=>(0,a.dk)(e)),[e]),(0,a.Xq)()}},76283:(e,t,n)=>{n.d(t,{A:()=>k});var o=n(84051),a=n(13439),i=n(90709),s=n(87357),c=n(17712),r=n(59030),l=n(18276),d=n(64493),u=n(96530),h=n(83108),m=n(76023),p=n(10722),g=n(4438),f=n(87412);const A="uGUjDZKl",v="M62HGuIV",C="WMpEr5XQ";var y=n(20021);const I=2*m.$,S=(0,o.ph)((({reaction:e,chosen:t,isReady:n,noAppearAnimation:a,style:i,isLocked:r,onToggleReaction:d,onSendPaidReaction:u,onShowPaidReactionModal:m})=>{const S=(0,o.li)(),R=(0,c.A)((()=>{"paid"!==e.type?d(e):u?.()})),{isContextMenuOpen:w,handleBeforeContextMenu:N,handleContextMenu:M,handleContextMenuClose:b,handleContextMenuHide:x}=(0,p.A)(S,"paid"!==e.type,void 0,void 0,void 0,!0);return(0,o.vJ)((()=>{w&&(m?.(),b(),x())}),[b,m,x,w]),(0,y.FD)("div",{className:(0,s.A)(A,"oc1hpMwv",t&&"paid"!==e.type&&v,!a&&n&&"sx6RTuAU",a&&"kqcWe4tf"),ref:S,style:i,onClick:R,onMouseDown:N,onContextMenu:M,children:["paid"===e.type?(0,y.Y)(g.A,{tgsUrl:h.w.StarReaction,size:I,noLoop:!1}):(0,y.Y)(f.A,{documentId:e.documentId,size:I}),r&&(0,y.Y)(l.A,{className:C,name:"lock-badge"})]})}));var R=n(37661),w=n(62587),N=n(18104);const M=2*m.$,b=(0,o.ph)((({reaction:e,isReady:t,noAppearAnimation:n,chosen:o,isLocked:a,onToggleReaction:i})=>{const c=(0,w.A)(`sticker${e.appearAnimation?.id}`,!t||n),r=(0,w.A)(`document${e.selectAnimation?.id}`,!t||n),d=(0,w.A)(`document${e.staticIcon?.id}`,!n),[u,h]=(0,R.A)(),[m,,p]=(0,R.A)(!0),[g,f,I]=(0,R.A)();return(0,y.FD)("div",{className:(0,s.A)(A,o&&v),onClick:function(){i(e.reaction)},onMouseEnter:t&&!m?f:void 0,children:[n&&(0,y.Y)("img",{className:"MZ2tH980",src:d,alt:e.reaction.emoticon,draggable:!1}),!u&&!n&&(0,y.Y)(N.A,{tgsUrl:c,play:m,noLoop:!0,size:M,onEnded:p,forceAlways:!0},e.appearAnimation?.id),!m&&!n&&(0,y.Y)(N.A,{tgsUrl:r,play:g,noLoop:!0,size:M,onLoad:h,onEnded:I,forceAlways:!0},e.selectAnimation?.id),a&&(0,y.Y)(l.A,{className:C,name:"lock-badge"})]})})),x=(0,s.x)("ReactionSelector"),k=(0,o.ph)((({allAvailableReactions:e,topReactions:t,defaultTagReactions:n,enabledReactions:h,currentReactions:m,reactionsLimit:p,isPrivate:g,isReady:f,canPlayAnimatedEmojis:A,className:v,isCurrentUserPremium:C,isInSavedMessages:I,isInStoryViewer:R,isForEffects:w,effectReactions:N,isWithPaidReaction:M,onClose:k,onToggleReaction:P,onSendPaidReaction:Y,onShowPaidReactionModal:T,onShowMore:D})=>{const{openPremiumModal:L}=(0,a.ko)(),F=(0,o.li)(),E=(0,r.A)(),B=I&&!C&&!R,O=Boolean(p&&m&&m.length>=p),K=(0,o.Kr)((()=>{const o=O?m?.map((e=>e.reaction)):w?N:I?n:"some"===h?.type?h.allowed:e?.map((e=>e.reaction)),a=o?.map((t=>{const n="custom"===t.type,o=e?.find((e=>(0,i.a0)(e.reaction,t)));return w?o:(n||o)&&!o?.isInactive&&(g||O||h&&(0,i.A3)(t,h))?n?t:o:void 0})).filter(Boolean)||[],s=(0,i.fu)(a,t);return M&&s.unshift({type:"paid"}),s}),[e,m,n,h,I,g,t,w,N,O,M]),_=(0,o.Kr)((()=>8===K.length?K:K.slice(0,7)),[K]),U=_.length<K.length,$=(0,o.Kr)((()=>{const e=m?.filter((({chosenOrder:e})=>void 0!==e))||[];return new Set(e.map((({reaction:e})=>_.findIndex((t=>t&&(0,i.a0)("reaction"in t?t.reaction:t,e))))))}),[m,_]),j=(0,c.A)((()=>{const e=F.current?.getBoundingClientRect()||{x:0,y:0};D({x:e.x,y:e.y})})),J=(0,c.A)((()=>{k?.(),L({initialSection:"saved_tags"})})),z=(0,o.Kr)((()=>{if(I){if(!C){const e=E("lng_subscribe_tag_about").split("{link}");return(0,y.FD)("span",{children:[e[0],(0,y.Y)(u.A,{isPrimary:!0,onClick:J,children:E("lng_subscribe_tag_link")}),e[1]]})}return E("SavedTagReactionsHint2")}return R?E("StoryReactionsHint"):w?E("AddEffectMessageHint"):void 0}),[C,I,R,E,w]);if(_.length)return(0,y.FD)("div",{className:(0,s.A)(x("&"),v),ref:F,children:[(0,y.Y)("div",{className:x("bubble-small",E.isRtl&&"isRtl")}),(0,y.FD)("div",{className:x("items-wrapper"),children:[(0,y.Y)("div",{className:x("bubble-big",E.isRtl&&"isRtl")}),(0,y.FD)("div",{className:x("items"),children:[z&&(0,y.Y)("div",{className:x("hint"),children:z}),(0,y.FD)("div",{className:x("reactions"),dir:E.isRtl?"rtl":void 0,children:[_.map(((e,t)=>"reaction"in e?(0,y.Y)(b,{isReady:f,onToggleReaction:P,reaction:e,noAppearAnimation:!A,chosen:$.has(t),isLocked:B},(0,i.Jj)(e.reaction)):(0,y.Y)(S,{isReady:f,onToggleReaction:P,onSendPaidReaction:Y,onShowPaidReactionModal:T,reaction:e,noAppearAnimation:!A,chosen:$.has(t),isLocked:B,style:`--_animation-delay: ${20*(7-t)}ms`},(0,i.Jj)(e)))),U&&(0,y.Y)(d.A,{color:"translucent",className:x("show-more"),onClick:j,children:(0,y.Y)(l.A,{name:"down"})})]})]})]})]})}))},79174:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(84051),a=n(66644),i=n(43874);const s=500,c=300;function r(e,t,n){const{isMobile:r}=(0,i.Ay)();(0,o.vJ)((()=>{t?r||setTimeout((()=>{(0,a.RK)((()=>{e.current?.isConnected&&e.current.focus()}))}),s):(e.current?.isConnected&&e.current.blur(),n&&setTimeout(n,c))}),[e,r,t,n])}},79519:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(84051),a=n(61433),i=n(31481),s=n(66644),c=n(81954);const r=500,l=i.nxZ,d=20;function u({elementRef:e,chatId:t,isFocused:n,focusDirection:i,noFocusHighlight:u,isResizingContainer:h,isJustAdded:m,isQuote:p,scrollTargetPosition:g}){const f=(0,o.li)(!m);(0,o.Nf)((()=>{const t=f.current;if(f.current=!1,n&&e.current){const n=e.current.closest(".MessageList"),o=u,m=g||o?"end":"centerOrTop",f=()=>{const t=void 0!==i?o?r:l:void 0,u=(0,c.Ay)({container:n,element:e.current,position:m,margin:d,maxDistance:t,forceDirection:i,forceNormalContainerHeight:h,shouldReturnMutationFn:!0});if(p){const t=e.current.querySelector(".is-quote");t&&(0,s.RK)((()=>{(0,a.YM)(t,"animate")}))}return u};t?(0,s.gm)(f):(0,s.YS)((()=>{(0,s.RK)(f())}))}}),[e,t,n,i,u,h,p,g])}},79577:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(84051),a=n(23174),i=n(90709),s=n(62587),c=n(64489),r=n(20021);const l=(0,o.ph)((function(e){const{sticker:t,noLoad:n,forcePreview:o,...l}=e,d=t?.thumbnail?.dataUri,u=t&&(0,i.Mw)(t,"full"),h=(0,s.A)(t?(0,i.Mw)(t,"preview"):void 0,n&&!o,a.qZ.BlobUrl),m=(0,s.A)(u,n);return(0,r.Y)(c.A,{tgsUrl:m,previewUrl:h,thumbDataUri:d,...l})}))},79582:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(13439),a=n(60919),i=n(87894);const s=3e9,c=3e8;function r(e,t=!1,n,r){const l=(0,o.mS)();return(0,i.My)(e,(e=>{if(e===r)return 1/0;const o=(0,a.hds)(l,e);if(!o)return 0;let i=0;const d=(0,a.yHC)(l,e);return d&&(i+=d.date),t&&o.isVerified&&(i+=s),n&&n.includes(e)&&(i=Date.now()+c+(n.length-n.indexOf(e))),i}),"desc")}},80539:(e,t,n)=>{n.d(t,{Ay:()=>r,g4:()=>l,qh:()=>s});var o=n(23174),a=n(31481),i=n(96454);const s={B:o.C7.Bold,STRONG:o.C7.Bold,I:o.C7.Italic,EM:o.C7.Italic,INS:o.C7.Underline,U:o.C7.Underline,S:o.C7.Strike,STRIKE:o.C7.Strike,DEL:o.C7.Strike,CODE:o.C7.Code,PRE:o.C7.Pre,BLOCKQUOTE:o.C7.Blockquote},c=3;function r(e,t=!1,n=!1){const r=document.createElement("div");r.innerHTML=n?e:function(e){let t=e.slice(0);return 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](.*?[\n\r]?)`{3}/gms,'<pre data-language="$1">$2</pre>'),t=t.replace(/^`{3}[\n\r]?(.*?)[\n\r]?`{3}/gms,"<pre>$1</pre>"),t=t.replace(/[`]{3}([^`]+)[`]{3}/g,"<pre>$1</pre>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[`]{1}([^`\n]+)[`]{1}(?![^<]*<\/(code|pre)>)/g,"<code>$2</code>"),i.TL||(t=t.replace(/\[<img[^>]+alt="([^"]+)"[^>]*>]/gm,"[$1]")),t=t.replace(/(?!<(?:code|pre)[^<]*|<\/)\[([^\]\n]+)\]\(customEmoji:(\d+)\)(?![^<]*<\/(?:code|pre)>)/g,'<img alt="$1" data-document-id="$2">'),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[*]{2}([^*\n]+)[*]{2}(?![^<]*<\/(code|pre)>)/g,"<b>$2</b>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[_]{2}([^_\n]+)[_]{2}(?![^<]*<\/(code|pre)>)/g,"<i>$2</i>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[~]{2}([^~\n]+)[~]{2}(?![^<]*<\/(code|pre)>)/g,"<s>$2</s>"),t=t.replace(/(?!<(code|pre)[^<]*|<\/)[|]{2}([^|\n]+)[|]{2}(?![^<]*<\/(code|pre)>)/g,`<span data-entity-type="${o.C7.Spoiler}">$2</span>`),t}(t?function(e){return e.replace(new RegExp(`\\[([^\\]]+?)]\\((${a.kNZ}+?)\\)`,"g"),((e,t,n)=>`<a href="${n.includes("://")?n:n.includes("@")?`mailto:${n}`:`https://${n}`}">${t}</a>`))}(e):e),l(r);const d=r.innerText.trim().replace(/\u200b+/g,"");let u=-r.innerText.indexOf(d[0]),h=0;const m=[];function p(e){if(e.nodeType===Node.COMMENT_NODE)return;const{index:t,entity:n}=function(e,t,n){const a=function(e){if(e instanceof HTMLElement&&e.dataset.entityType)return e.dataset.entityType;if(s[e.nodeName])return s[e.nodeName];if("A"===e.nodeName){const t=e;return t.dataset.entityType===o.C7.MentionName?o.C7.MentionName:t.dataset.entityType===o.C7.Url?o.C7.Url:t.href.startsWith("mailto:")?o.C7.Email:t.href.startsWith("tel:")?o.C7.Phone:t.href!==t.textContent?o.C7.TextUrl:o.C7.Url}return"SPAN"===e.nodeName?e.dataset.entityType:"IMG"===e.nodeName&&e.dataset.documentId?o.C7.CustomEmoji:void 0}(e);if(!a||!e.textContent)return{index:n,entity:void 0};const i=t.indexOf(e.textContent,n),c=i>=0?i:n,r=t.substring(0,c).length,{length:l}=t.substring(c,c+e.textContent.length);if(a===o.C7.TextUrl)return{index:c,entity:{type:a,offset:r,length:l,url:e.href}};if(a===o.C7.MentionName)return{index:c,entity:{type:a,offset:r,length:l,userId:e.dataset.userId}};if(a===o.C7.Pre)return{index:c,entity:{type:a,offset:r,length:l,language:e.dataset.language}};if(a===o.C7.CustomEmoji)return{index:c,entity:{type:a,offset:r,length:l,documentId:e.dataset.documentId}};if(a===o.C7.Timestamp){const t=Number(e.dataset.timestamp);return Number.isNaN(t)?{index:c,entity:void 0}:{index:c,entity:{type:a,offset:r,length:l,timestamp:t}}}return{index:c,entity:{type:a,offset:r,length:l}}}(e,d,u);if(n)u=t,m.push(n);else if(e.textContent){if(0===t&&""===e.textContent.trim())return;u+=e.textContent.length}e.hasChildNodes()&&h<=c&&(h+=1,Array.from(e.childNodes).forEach(p))}return Array.from(r.childNodes).forEach((e=>{h=1,p(e)})),{text:d,entities:m.length?m:void 0}}function l(e){e.querySelectorAll("img").forEach((e=>{e.dataset.documentId?e.textContent=e.alt||"":e.replaceWith(e.alt||"")}))}},81686:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(31481);const a=1;function i(){const e=window.getSelection();let t=e?.rangeCount?e.getRangeAt(0).cloneContents():void 0;const n=e?.focusNode&&e.focusOffset>0&&s(e.focusNode,o.zPk);if(!t||0===t.childElementCount)return;const i=Array.from(t.children).reduce(((e,t)=>t.nodeType===a&&t.classList.contains("message-date-group")?Array.from(t.querySelectorAll(".Message")).reduce(((e,t)=>e.concat(Number(t.dataset.messageId))),e):t.nodeType===a&&t.classList.contains("Message")?e.concat(Number(t.dataset.messageId)):e),[]);for(;t.firstChild;)t.removeChild(t.firstChild);return t=void 0,n||i.pop(),i}function s(e,t){return!(e.nodeType!==a||!e.classList.contains(t))||!!e.parentNode&&s(e.parentNode,t)}},81949:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(87357);var a=n(20021);const i=({children:e,className:t,onClick:n,onMouseDown:i})=>(0,a.Y)("div",{className:(0,o.A)("hJUqHi4B",n&&"hjDEmFaT",t),onClick:n,onMouseDown:i,children:e})},81954:(e,t,n)=>{n.d(t,{Ay:()=>g,H$:()=>C,_v:()=>f,o8:()=>v});var o=n(84051),a=n(13439),i=n(89925),s=n(31481),c=n(66644),r=n(60919),l=n(96454),d=n(16460),u=n(19822);let h,m,p=!1;function g(e){h=e;const t=A(e);if(e.shouldReturnMutationFn)return t;(0,c.RK)(t)}function f(){p&&((0,u.vk)(),(0,c.YS)((()=>{(0,c.RK)(A(h))})))}function A(e){const{container:t,element:n,position:g,margin:f=0,maxDistance:A=s.nxZ,forceDirection:v,forceNormalContainerHeight:C}=e;let S=e.forceDuration;v!==i.CC.Static&&(0,r.PKK)((0,a.mS)())||(S=0);const{offsetHeight:R}=n,{scrollTop:w,offsetHeight:N,scrollHeight:M}=t,b=(0,d.A)(n,t).top,x=C&&t.dataset.normalHeight?Number(t.dataset.normalHeight):N;let k;switch(g){case"start":k=b-f+(l.Ni?1:0);break;case"end":k=b+R+f-x;break;case"nearest":case"center":case"centerOrTop":k=R<x?b+R/2-x/2:b-f}const P=function(e,t,n=s.nxZ,o){const{scrollTop:a}=e;if(void 0===o){const e=t-a;if(e<-n)return a+(e+n);if(e>n)return a+(e-n)}else{if(o===i.CC.Up)return t+n;if(o===i.CC.Down)return Math.max(0,t-n)}return a}(t,k,A,v);let Y=k-P;if(Y<0){const e=-P;Y=Math.max(Y,e)}else if(Y>0){const e=M-(P+x);Y=Math.min(Y,e)}const T=Math.abs(Y);return()=>{if(T<1)return void(w!==P&&(t.scrollTop=P));const e=P+Y;if(0===S)return void(t.scrollTop=e);const n=T<=s.s8T?y:I,a=S||s.SKD+T/s.nxZ*(s.OzO-s.SKD),i=Date.now();p=!0;const r=m;m=(0,o.VK)(void 0,!0),r?.(),(0,u.S0)((()=>{const o=Math.min((Date.now()-i)/a,1),s=Y*(1-n(o)),c=Math.round(e-s);return t.scrollTop=c,p=o<1&&c!==e,p||(h=void 0,m?.(),m=void 0),p}),c.RK)}}function v(){return p}function C(){m(),m=void 0}function y(e){return 1-(1-e)**3.5}function I(e){return 1-(1-e)**6}},83594:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(84051),a=n(90709),i=n(96454),s=n(87357),c=n(95807),r=n(62587),l=n(87412);const d="PZAuNVZH";var u=n(20021);const h=(0,o.ph)((({reaction:e,isLottie:t,className:n,particleSize:h,onEnded:m})=>{const p=(0,a.aL)(e.documentId,!0),g=(0,r.A)(t?void 0:p),f=(0,o.Kr)((()=>i.ol?Array.from({length:7}).map((()=>function(e=20){const t=(e/2+Math.random()*e*3)*(Math.random()>.5?1:-1),n=e+Math.random()*e*4;return`M 0 0 C 0 0 ${t} ${-n-e} ${t} ${n}`}(h))):[]),[h]);if(g||t)return(0,u.Y)("div",{className:(0,s.A)("aInga6VW",n),style:(0,c.A)(Boolean(h)&&`--particle-size: ${h}px`),children:f.map(((n,o)=>{const a=`--offset-path: path('${n}');`;return t?(0,u.Y)(l.A,{documentId:e.documentId,className:d,style:a,withSharedAnimation:!0,size:h,onAnimationEnd:0===o?m:void 0}):(0,u.Y)("img",{src:g,alt:"",className:d,style:a,draggable:!1,onAnimationEnd:0===o?m:void 0})}))})}))},92915:(e,t,n)=>{n.d(t,{A:()=>I});var o=n(84051),a=n(13439),i=n(87357),s=n(76023),c=n(10722),r=n(37661),l=n(17712),d=n(59030),u=n(11241),h=n(64493),m=n(40664),p=n(22337);var g=n(20021);const f=(0,o.ph)((({isOpen:e,title:t,subtitle:n,placeholder:a,submitText:i,maxLength:s,initialValue:c="",onClose:r,onSubmit:u})=>{const f=(0,d.A)(),[A,v]=(0,o.J0)(c),C=(0,l.A)((e=>{v(e.target.value)})),y=(0,l.A)((()=>{u(A)}));return(0,g.FD)(p.A,{className:"narrow",title:t,isOpen:e,onClose:r,isSlim:!0,children:[Boolean(n)&&(0,g.Y)("div",{className:"cGrbcqD_",children:n}),(0,g.Y)(m.A,{placeholder:a,value:A,onChange:C,maxLength:s,teactExperimentControlled:!0}),(0,g.FD)("div",{className:"dialog-buttons mt-2",children:[(0,g.Y)(h.A,{className:"confirm-dialog-button",onClick:y,children:i||f("Save")}),(0,g.Y)(h.A,{className:"confirm-dialog-button",isText:!0,onClick:r,children:f("Cancel")})]})]})}));var A=n(71429),v=n(24433),C=n(69988);const y=1.25*s.$,I=(0,o.ph)((({reaction:e,tag:t,containerId:n,isChosen:s,isOwnMessage:m,className:p,chosenClassName:I,withCount:S,isDisabled:R,withContextMenu:w,observeIntersection:N,onClick:M,onRemove:b})=>{const{editSavedReactionTag:x}=(0,a.ko)(),k=(0,o.li)(),P=(0,o.li)(),Y=(0,d.A)(),[T,D,L]=(0,r.A)(),{title:F,count:E}=t||{},B=Boolean(F||S&&E),O=(0,l.A)((()=>{M?.(e)})),K=(0,l.A)((()=>{b?.(e)})),_=(0,l.A)((t=>{x({reaction:e,title:t}),L()})),{isContextMenuOpen:U,contextMenuAnchor:$,handleBeforeContextMenu:j,handleContextMenu:J,handleContextMenuClose:z,handleContextMenuHide:H}=(0,c.A)(k,!w,void 0,void 0,void 0,!0),q=(0,l.A)((()=>k.current)),G=(0,l.A)((()=>document.body)),V=(0,l.A)((()=>P.current)),W=(0,l.A)((()=>({withPortal:!0,shouldAvoidNegativePosition:!0})));if(!S||0!==E)return(0,g.FD)(h.A,{className:(0,i.A)(C.A.root,C.A.tag,m&&C.A.own,s&&C.A.chosen,s&&I,R&&C.A.disabled,p),size:"tiny",onClick:O,onMouseDown:j,onContextMenu:J,ref:k,children:[(0,g.Y)(u.A,{className:C.A.animatedEmoji,containerId:n,reaction:e,loopLimit:1,size:y,observeIntersection:N}),B&&(0,g.FD)("span",{className:C.A.tagText,children:[F&&(0,g.Y)("span",{children:F}),S&&(0,g.Y)("span",{children:E})]}),(0,g.Y)("svg",{className:C.A.tail,width:"15",height:"30",viewBox:"0 0 15 30",children:(0,g.Y)("path",{className:C.A.tailFill,d:"m 0,30 c 3.1855,0 6.1803,-1.5176 8.0641,-4.0864 l 5.835,-7.9568 c 1.2906,-1.7599 1.2906,-4.1537 0,-5.9136 L 8.0641,4.08636 C 6.1803,1.51761 3.1855,0 0,0"})}),w&&(0,g.Y)(f,{isOpen:T,maxLength:15,title:Y(t?.title?"SavedTagRenameTag":"SavedTagLabelTag"),subtitle:Y("SavedTagLabelTagText"),placeholder:Y("SavedTagLabelPlaceholder"),initialValue:t?.title,onClose:L,onSubmit:_}),w&&$&&(0,g.FD)(A.A,{ref:P,isOpen:U,anchor:$,getTriggerElement:q,getRootElement:G,getMenuElement:V,getLayout:W,autoClose:!0,withPortal:!0,onClose:z,onCloseAnimationEnd:H,children:[(0,g.Y)(v.A,{icon:"tag-filter",onClick:O,children:Y("SavedTagFilterByTag")}),(0,g.Y)(v.A,{icon:"tag-name",onClick:D,children:Y(t?.title?"SavedTagRenameTag":"SavedTagLabelTag")}),(0,g.Y)(v.A,{icon:"tag-crossed",destructive:!0,onClick:K,children:Y("SavedTagRemoveTag")})]})]})}))},93879:(e,t,n)=>{n.d(t,{A:()=>o});const o={root:"O9uCTt5C","animated-icon":"HiI6SMxF",animatedIcon:"HiI6SMxF",effect:"NhFcTGja",animating:"ikfZ6Igz",withEffectOnly:"jjRJmHCg"}},99515:(e,t,n)=>{n.d(t,{A:()=>X});var o=n(84051),a=n(13439),i=n(23174),s=n(31481),c=n(90709),r=n(60919),l=n(87357),d=n(85982),u=n(9716),h=n(80539);const m=document.createElement("div"),p=new Set([i.C7.Bold,i.C7.Italic,i.C7.Underline,i.C7.Strike,i.C7.Spoiler,i.C7.CustomEmoji]);function g(e){const t=function(e){const t=e.cloneContents();m.appendChild(t);const n=function(e,t){const n=e.commonAncestorContainer;if(n.nodeType===Node.ELEMENT_NODE&&n.classList.contains("text-content"))return t;let o=e.commonAncestorContainer.parentElement;for(;o&&!o.classList.contains("text-content");){const e=o.tagName.toLowerCase(),n=o.dataset.entityType;t=`<${e} ${n?`data-entity-type="${n}"`:""}>${t}</${e}>`,o=o.parentElement}return t}(e,m.innerHTML);return m.innerHTML="",n.replace(/<br\s*\/?>/gi,"\n").replace(/ /gi," ").replace(/\u00a0/gi," ")}(e);return function(e){if(!e.entities)return e;const t=e.entities.filter((e=>p.has(e.type)));return{...e,entities:t.length?t:void 0}}((0,h.Ay)(t,!1,!0))}var f=n(37661),A=n(39351),v=n(17712),C=n(59030),y=n(24531),I=n(21511),S=n(80089),R=n(80464),w=n(20021);const N=e=>{const{isOpen:t}=e,n=(0,R.A)(S.ar.Extra,"PinMessageModal",!t);return n?(0,w.Y)(n,{...e}):void 0};var M=n(94189),b=n(73104),x=n(76023),k=n(4961),P=n(3544),Y=n(96454),T=n(81686),D=n(58554),L=n(49086);function F(e){return e?"lng_context_copy_selected":"lng_context_copy_text"}var E=n(43874),B=n(26875),O=n(71429),K=n(24433),_=n(60859),U=n(55158),$=n(17663);const j="C3LVl_JT",J="cd1ZZeSy",z=(0,o.ph)((function({message:e}){const t=(0,C.A)(),{editDate:n}=e,o=!n;return(0,w.Y)(K.A,{icon:"clock-edit",className:j,children:o?(0,w.Y)(U.A,{className:J}):Boolean(n)&&t("Chat.PrivateMessageEditTimestamp.Date",(0,$.U)(t,1e3*n))})}));var H=n(76283),q=n(41036);const G=(0,o.ph)((function({message:e,shouldRenderShowWhen:t,canLoadReadDate:n,closeContextMenu:o}){const{openPrivacySettingsNoticeModal:i}=(0,a.ko)(),s=(0,C.A)(),{readDate:c}=e,r=n&&!c&&!t;return(0,w.Y)(K.A,{icon:"message-read",className:j,children:(0,w.Y)(q.Ay,{name:"fade",activeKey:r?1:2,className:"mg4sBQ9n",children:r?(0,w.Y)(U.A,{className:J}):(0,w.FD)(w.FK,{children:[Boolean(c)&&s("PmReadAt",(0,$.U)(s,1e3*c)),!c&&t&&(0,w.FD)("div",{children:[s("PmRead"),(0,w.Y)("span",{className:"bmxij_dk",onClick:()=>{o(),i({chatId:e.chatId,isReadDate:!0})},children:s("PmReadShowWhen")})]})]})})})})),V=(0,o.ph)((({isReactionPickerOpen:e,availableReactions:t,topReactions:n,defaultTagReactions:s,isOpen:r,message:h,poll:m,story:p,isPrivate:g,isCurrentUserPremium:y,enabledReactions:I,isWithPaidReaction:S,reactionsLimit:R,anchor:N,targetHref:M,canSendNow:$,canReschedule:j,canBuyPremium:J,canReply:q,canQuote:V,canEdit:W,canAppendTodoList:Z,noReplies:X,canPin:Q,canUnpin:ee,canDelete:te,canForward:ne,canReport:oe,canFaveSticker:ae,canUnfaveSticker:ie,canCopy:se,canCopyLink:ce,canSelect:re,canDownload:le,canSaveGif:de,canRevote:ue,canClosePoll:he,canTranslate:me,canShowOriginal:pe,canSelectLanguage:ge,isDownloading:fe,repliesThreadInfo:Ae,canShowSeenBy:ve,canShowReactionsCount:Ce,canShowReactionList:ye,seenByRecentPeers:Ie,hasCustomEmoji:Se,customEmojiSets:Re,canPlayAnimatedEmojis:we,isInSavedMessages:Ne,shouldRenderShowWhen:Me,canLoadReadDate:be,onReply:xe,onOpenThread:ke,onEdit:Pe,onAppendTodoList:Ye,onPin:Te,onUnpin:De,onForward:Le,onDelete:Fe,onFaveSticker:Ee,onReport:Be,onUnfaveSticker:Oe,onSelect:Ke,onSend:_e,onReschedule:Ue,onClose:$e,onCloseAnimationEnd:je,onCopyLink:Je,onCopyNumber:ze,onDownload:He,onSaveGif:qe,onCancelVote:Ge,onClosePoll:Ve,onShowSeenBy:We,onShowReactors:Ze,onToggleReaction:Xe,onSendPaidReaction:Qe,onShowPaidReactionModal:et,onCopyMessages:tt,onReactionPickerOpen:nt,onTranslate:ot,onShowOriginal:at,onSelectLanguage:it,userFullName:st,canGift:ct})=>{const{showNotification:rt,openStickerSet:lt,openCustomEmojiSets:dt,loadStickers:ut,openGiftModal:ht}=(0,a.ko)(),mt=(0,o.li)(),pt=(0,o.li)(),gt=(0,C.A)(),ft=(0,A.A)(),At=!g&&!I,vt=h.areReactionsPossible,Ct=ye&&!At||vt,yt="isEdited"in h&&h.isEdited,It=h.seenByDates,St="giftPremium"===h.content.action?.type,Rt="giftCode"===h.content.action?.type,wt="starGift"===h.content.action?.type,Nt="starGiftUnique"===h.content.action?.type,Mt=(0,u.L8)(h.chatId)&&ct&&(St||Rt||wt||Nt),[bt,xt]=(0,f.A)(),[kt,Pt,Yt]=(0,f.A)(),{isMobile:Tt,isDesktop:Dt}=(0,E.Ay)(),Lt=(0,o.Kr)((()=>It?Object.keys(It).length:0),[It]),Ft=(0,v.A)((()=>{rt({message:gt("Share.Link.Copied")}),$e()})),Et=(0,v.A)((()=>{ht({forUserId:h.chatId}),$e()}));(0,o.vJ)((()=>{r&&bt&&!e&&$e()}),[$e,r,e,bt]),(0,o.vJ)((()=>{Re?.length&&Re.map((e=>ut({stickerSetInfo:{id:e.id,accessHash:e.accessHash}})))}),[Re,dt]);const Bt=(0,v.A)((()=>{Re&&(1===Re.length?lt({stickerSetInfo:{shortName:Re[0].shortName}}):dt({setIds:Re.map((e=>e.id))}),$e())})),Ot=function(e,t,n,o,a,s,r,l){const u=[],h=(0,c.P5)(e),m=(0,c.yl)(e)||((0,c.QC)(e)?void 0:(0,c.dc)(e)),p=(0,c.Qm)(e),g=m?(0,c.rI)(m,"full"):void 0,f=o&&m&&(g||(0,c.KG)(m))&&d.WO&&!Y.Yw,A=window.getSelection();if(f&&u.push({label:"lng_context_copy_image",icon:"copy-media",handler:()=>{Promise.resolve(g?D.hd(g,i.qZ.BlobUrl):m.blobUrl).then(d.qp),a?.()}}),o&&n)u.push({label:"lng_context_copy_link",icon:"copy",handler:()=>{(0,d.eM)(n),a?.()}});else if(o&&h){const n=Boolean(A?.anchorNode?.parentNode&&A.anchorNode.parentNode.closest(".Message .content-inner")&&""!==A.toString().replace(/(?:\r\n|\r|\n)/g,"")&&function(e){const t=window.getSelection(),n=t?.anchorNode?.parentNode,o=n?.closest(".Message.message-list-item");return(0,c.GZ)(e.id)===o?.id}(e));u.push({label:F(n),icon:"copy",handler:()=>{const o=(0,T.A)();if(o?.length&&r)r(o);else if(n)document.execCommand("copy");else{const n=(0,L.V)({message:e,shouldRenderAsHtml:!0});n&&(0,d.A)(n.join(""),(0,P.Gn)(e,t))}a?.()}})}return s&&u.push({label:"lng_context_copy_message_link",icon:"link",handler:s}),p&&l&&u.push({label:"lng_profile_copy_phone",icon:"copy",handler:()=>{l(),a?.()}}),u}(h,(0,c.FE)({poll:m,story:p}),M,se,Ft,ce?Je:void 0,tt,ze),Kt=(0,v.A)((()=>document.querySelector(`.Transition_slide-active > .MessageList div[data-message-id="${h.id}"]`))),_t=(0,v.A)((()=>document.querySelector(".Transition_slide-active > .MessageList"))),Ut=(0,v.A)((()=>document.querySelector(".MessageContextMenu .bubble"))),$t=(0,v.A)((()=>{const e=Tt&&document.querySelector(".AudioPlayer-content")?.offsetHeight||0,t=document.getElementById("MiddleColumn"),n=getComputedStyle(t),o=parseFloat(n.getPropertyValue("--middle-header-panes-height"))||0;return{extraPaddingX:10,extraTopPadding:document.querySelector(".MiddleHeader").offsetHeight,extraMarginTop:o+e,shouldAvoidNegativePosition:!Dt,menuElMinWidth:Ct&&Tt?19.25*x.$:void 0}}));(0,o.vJ)((()=>{r?setTimeout((()=>{Pt()}),200):Yt()}),[r,Pt,Yt]),(0,o.vJ)((()=>(0,b.M6)(pt.current,".ReactionPicker")),[r]);const jt=(0,v.A)((e=>{nt(e),xt()}));return(0,w.FD)(O.A,{ref:mt,isOpen:r,anchor:N,getTriggerElement:Kt,getRootElement:_t,getMenuElement:Ut,getLayout:$t,withMaxHeight:!0,className:(0,l.A)("MessageContextMenu","fluid",Ct&&"with-reactions"),onClose:$e,onCloseAnimationEnd:je,children:[Ct&&(0,w.Y)(H.A,{enabledReactions:I,topReactions:n,allAvailableReactions:t,defaultTagReactions:s,currentReactions:h.reactions?.results,reactionsLimit:R,onToggleReaction:Xe,onSendPaidReaction:Qe,onShowPaidReactionModal:et,isWithPaidReaction:S,isPrivate:g,isReady:kt,canBuyPremium:J,isCurrentUserPremium:y,isInSavedMessages:Ne,canPlayAnimatedEmojis:we,onShowMore:jt,onClose:$e,className:(0,l.A)(bt&&"ReactionSelector-hidden")}),(0,w.FD)("div",{ref:pt,className:(0,l.A)("MessageContextMenu_items scrollable-content custom-scroll",bt&&"MessageContextMenu_items-hidden"),dir:gt.isRtl?"rtl":void 0,children:[Mt&&(0,w.Y)(K.A,{icon:"gift",onClick:Et,children:h?.isOutgoing?gt("SendAnotherGift"):gt("Conversation.ContextMenuSendGiftTo",st)}),$&&(0,w.Y)(K.A,{icon:"send-outline",onClick:_e,children:gt("MessageScheduleSend")}),j&&(0,w.Y)(K.A,{icon:"schedule",onClick:Ue,children:gt("MessageScheduleEditTime")}),q&&(0,w.Y)(K.A,{icon:"reply",onClick:xe,children:gt(V?"lng_context_quote_and_reply":"Reply")}),!X&&Boolean(Ae?.messagesCount)&&(0,w.Y)(K.A,{icon:"replies",onClick:ke,children:gt("Conversation.ContextViewReplies",Ae.messagesCount,"i")}),W&&(0,w.Y)(K.A,{icon:"edit",onClick:Pe,children:gt("Edit")}),Z&&(0,w.Y)(K.A,{icon:"add",onClick:Ye,children:ft("MenuButtonAppendTodoList")}),ae&&(0,w.Y)(K.A,{icon:"favorite",onClick:Ee,children:gt("AddToFavorites")}),ie&&(0,w.Y)(K.A,{icon:"favorite",onClick:Oe,children:gt("Stickers.RemoveFromFavorites")}),me&&(0,w.Y)(K.A,{icon:"language",onClick:ot,children:gt("TranslateMessage")}),pe&&(0,w.Y)(K.A,{icon:"language",onClick:at,children:gt("ShowOriginalButton")}),ge&&(0,w.Y)(K.A,{icon:"web",onClick:it,children:gt("lng_settings_change_lang")}),Ot.map((e=>(0,w.Y)(K.A,{icon:e.icon,onClick:e.handler,withPreventDefaultOnMouseDown:!0,children:gt(e.label)},e.label))),Q&&(0,w.Y)(K.A,{icon:"pin",onClick:Te,children:gt("DialogPin")}),ee&&(0,w.Y)(K.A,{icon:"unpin",onClick:De,children:gt("DialogUnpin")}),de&&(0,w.Y)(K.A,{icon:"gifs",onClick:qe,children:gt("lng_context_save_gif")}),ue&&(0,w.Y)(K.A,{icon:"revote",onClick:Ge,children:gt("lng_polls_retract")}),he&&(0,w.Y)(K.A,{icon:"stop",onClick:Ve,children:gt("lng_polls_stop")}),le&&(0,w.Y)(K.A,{icon:"download",onClick:He,children:gt(fe?"lng_context_cancel_download":"lng_media_download")}),ne&&(0,w.Y)(K.A,{icon:"forward",onClick:Le,children:gt("Forward")}),re&&(0,w.Y)(K.A,{icon:"select",onClick:Ke,children:gt("Common.Select")}),oe&&(0,w.Y)(K.A,{icon:"flag",onClick:Be,children:gt("lng_context_report_msg")}),te&&(0,w.Y)(K.A,{destructive:!0,icon:"delete",onClick:Fe,children:gt("Delete")}),Se&&(0,w.FD)(w.FK,{children:[(0,w.Y)(_.A,{size:"thick"}),!Re&&(0,w.FD)(w.FK,{children:[(0,w.Y)(U.A,{inline:!0,className:"menu-loading-row"}),(0,w.Y)(U.A,{inline:!0,className:"menu-loading-row"})]}),Re&&1===Re.length&&(0,w.Y)(K.A,{withWrap:!0,onClick:Bt,className:"menu-custom-emoji-sets",children:(0,k.A)(gt("MessageContainsEmojiPack",Re[0].title),["simple_markdown","emoji"])}),Re&&Re.length>1&&(0,w.Y)(K.A,{withWrap:!0,onClick:Bt,className:"menu-custom-emoji-sets",children:(0,k.A)(gt("MessageContainsEmojiPacks",Re.length),["simple_markdown"])})]}),(ve||Ce)&&(0,w.FD)(w.FK,{children:[(0,w.Y)(_.A,{size:Se?"thin":"thick"}),(0,w.FD)(K.A,{icon:Ce?"heart-outline":"group",onClick:Ce?Ze:We,disabled:!Ce&&!Lt,children:[(0,w.Y)("span",{className:"MessageContextMenu--seen-by-label-wrapper",children:(0,w.Y)("span",{className:"MessageContextMenu--seen-by-label",dir:gt.isRtl?"rtl":void 0,children:Ce&&h.reactors?.count?ve&&Lt?gt("Chat.OutgoingContextMixedReactionCount",[h.reactors.count,Lt]):gt("Chat.ContextReactionCount",h.reactors.count,"i"):1===Lt&&Ie?(0,k.A)((0,u.L8)(Ie[0].id)?(0,c.Yg)(Ie[0]):Ie[0].title):Lt?gt("Conversation.ContextMenuSeen",Lt,"i"):gt("Conversation.ContextMenuNoViews")})}),(0,w.Y)(B.A,{className:"avatars",size:"micro",peers:Ie})]})]}),(be||Me||yt)&&(0,w.Y)(_.A,{size:Se?"thin":"thick"}),(be||Me)&&(0,w.Y)(G,{canLoadReadDate:be,shouldRenderShowWhen:Me,message:h,closeContextMenu:$e}),yt&&(0,w.Y)(z,{message:h})]})]})})),W=window.getSelection(),Z=-1,X=(0,o.ph)((0,a.EK)(((e,{message:t,messageListType:n,detectedLanguage:o})=>{const{threadId:a}=(0,r.Xf0)(e)||{},{defaultTags:i,topReactions:l,availableReactions:d}=e.reactions,h=(0,r.yuw)(e),m=(0,r.hds)(e,t.chatId),p=m&&(0,u.L8)(m.id),g=p?void 0:(0,r.AWZ)(e,t.chatId),f=(0,r.mBe)(e,t.chatId),A=f&&(0,c.Yg)(f),{seenByExpiresAt:v,seenByMaxChatMembers:C,maxUniqueReactions:y,readDateExpiresAt:I}=e.appConfig||{},S=g?.reactionsLimit||y,{noOptions:R,canReplyGlobally:w,canPin:N,canUnpin:M,canDelete:b,canReport:x,canEdit:k,canFaveSticker:P,canUnfaveSticker:Y,canCopy:T,canCopyLink:D,canSelect:L,canDownload:F,canSaveGif:E,canRevote:B,canClosePoll:O}=a&&(0,r.WAX)(e,t,a)||{},K=(0,r.R4s)(e,t),_=p?(0,r.K0y)(e,m.id):void 0,U=(0,c.Ie)(t),$=m&&(0,r.yps)(e,m.id),j=Boolean($),J=(0,r.Jbz)(e,t),z=Boolean(p&&U&&!j&&!J&&I&&t.date>Date.now()/1e3-I&&!_?.isReadDateRestricted&&"scheduled"!==n),H=Boolean(z&&p&&(0,r.K0y)(e,m.id)?.isReadDateRestrictedByMe),q="pinned"===n,G="scheduled"===n,V=m&&(0,c.WX)(m),W=a&&(0,r.Vw0)(e,t.chatId,a),Z=Boolean(W&&!W?.isCommentsInfo&&W?.fromChannelId),X=a?(0,r.S0q)(e,t.chatId,a):void 0,Q=m&&!(0,c.Sq)(m,"sendPlain",g),ee=!(!m||!a)&&(0,c.__)(m,X,Z,g)&&Q,te=(0,c.Nb)(t),ne=(0,c.G5)(t),oe=Boolean(!te&&m&&!m.isMonoforum&&!J&&C&&v&&(0,c.YE)(m)&&U&&!G&&m.membersCount&&m.membersCount<=C&&t.date>Date.now()/1e3-v),ae=(0,c._P)(t),ie=!te&&!V&&!G&&!ae&&!p&&t.reactions&&!(0,c.G)(t.reactions)&&t.reactions.canSeeList,se=(0,r.ynf)(e,t),ce=Boolean(t.content.contact),re=(0,r.g29)(e),le=(0,r.S1W)(e,t),de=le?.map((t=>(0,r.ycM)(e,t))),ue=de?.every(Boolean)?de:void 0,he=(0,r.Rny)(e,t.chatId,t.id),me=he?Boolean((0,r.a_$)(e,t.chatId,he)[t.id]?.text):void 0,pe=!me&&(0,r.S86)(e,t,o),ge=(0,r.qZq)(e,t.chatId),fe=(0,r.nZ4)(e,t.chatId),Ae=(0,r.zcZ)(e,t),ve=t.content.storyData,Ce=ve?(0,r.Msb)(e,ve.peerId,ve.id):void 0,ye=(0,r.X2D)(e,t.chatId),Ie=(0,r.QP5)(e,t),Se=e.appConfig?.todoItemsMax||s.gyE;return{threadId:a,chat:m,availableReactions:d,topReactions:l,defaultTagReactions:i,noOptions:R,canReport:x,canSendNow:G,canReschedule:G,canReply:!q&&!G&&w,canPin:!G&&N,canUnpin:!G&&M,canDelete:b,canEdit:!q&&k,canAppendTodoList:t.content.todo?.todo.othersCanAppend&&t.content.todo?.todo.items?.length<Se,canForward:!G&&K,canFaveSticker:!G&&P,canUnfaveSticker:!G&&Y,canCopy:ce||!se&&T,canCopyLink:!G&&D,canSelect:L,canDownload:!se&&F,canSaveGif:!se&&E,canRevote:B,canClosePoll:!G&&O,activeDownloads:h,canShowSeenBy:oe,canLoadReadDate:z,shouldRenderShowWhen:H,enabledReactions:m?.isForbidden?void 0:g?.enabledReactions,reactionsLimit:S,isPrivate:p,isCurrentUserPremium:re,hasFullInfo:Boolean(g),canShowReactionsCount:ie,canShowReactionList:!(te||ae||G||m?.id===s.zv8||ne),canBuyPremium:!re&&!(0,r.n_C)(e),customEmojiSetsInfo:le,customEmojiSets:ue,canScheduleUntilOnline:(0,r.RBq)(e,t.chatId),canTranslate:pe,canShowOriginal:me&&!ge,canSelectLanguage:me&&!ge,isMessageTranslated:me,canPlayAnimatedEmojis:(0,r.BWX)(e),isReactionPickerOpen:(0,r.Ani)(e),isInSavedMessages:fe,isChannel:V,canReplyInChat:ee,isWithPaidReaction:g?.isPaidReactionAvailable,poll:Ae,story:Ce,userFullName:A,canGift:ye,savedDialogId:Ie}}))((({threadId:e,availableReactions:t,topReactions:n,defaultTagReactions:r,isOpen:u,messageListType:h,message:m,customEmojiSetsInfo:p,customEmojiSets:S,album:R,poll:b,story:x,anchor:k,targetHref:P,noOptions:Y,canSendNow:T,hasFullInfo:D,canReschedule:L,canReply:F,canPin:E,repliesThreadInfo:B,canUnpin:O,canDelete:K,canShowReactionsCount:_,chat:U,canReport:$,canShowReactionList:j,canEdit:J,canAppendTodoList:z,enabledReactions:H,reactionsLimit:q,isPrivate:G,isCurrentUserPremium:X,canForward:Q,canBuyPremium:ee,canFaveSticker:te,canUnfaveSticker:ne,canCopy:oe,canCopyLink:ae,canSelect:ie,canDownload:se,canSaveGif:ce,canRevote:re,canClosePoll:le,canPlayAnimatedEmojis:de,canLoadReadDate:ue,shouldRenderShowWhen:he,activeDownloads:me,noReplies:pe,canShowSeenBy:ge,canScheduleUntilOnline:fe,canTranslate:Ae,isMessageTranslated:ve,canShowOriginal:Ce,canSelectLanguage:ye,isReactionPickerOpen:Ie,isInSavedMessages:Se,canReplyInChat:Re,isWithPaidReaction:we,userFullName:Ne,canGift:Me,className:be,savedDialogId:xe,onClose:ke,onCloseAnimationEnd:Pe})=>{const{openThread:Ye,updateDraftReplyInfo:Te,setEditingId:De,pinMessage:Le,openForwardMenu:Fe,openReplyMenu:Ee,faveSticker:Be,unfaveSticker:Oe,toggleMessageSelection:Ke,sendScheduledMessages:_e,rescheduleMessage:Ue,downloadMedia:$e,cancelMediaDownload:je,loadSeenBy:Je,openSeenByModal:ze,openReactorListModal:He,loadFullChat:qe,loadReactors:Ge,copyMessagesByIds:Ve,saveGif:We,loadStickers:Ze,cancelPollVote:Xe,closePoll:Qe,toggleReaction:et,requestMessageTranslation:tt,showOriginalMessage:nt,openChatLanguageModal:ot,openMessageReactionPicker:at,openPremiumModal:it,loadOutboxReadDate:st,copyMessageLink:ct,openDeleteMessageModal:rt,addLocalPaidReaction:lt,openPaidReactionModal:dt,reportMessages:ut,openTodoListModal:ht,showNotification:mt}=(0,a.ko)(),pt=(0,C.A)(),gt=(0,A.A)(),{ref:ft}=(0,I.A)({isOpen:u,onCloseAnimationEnd:Pe,className:!1}),[At,vt]=(0,o.J0)(!0),[Ct,yt]=(0,o.J0)(!1),[It,St,Rt]=(0,f.A)(),[wt,Nt]=(0,o.J0)(Z),[Mt,bt]=(0,y.A)(fe,ke,m.date),xt=void 0===p||Boolean(p.length);(0,o.vJ)((()=>{ge&&u&&Je({chatId:m.chatId,messageId:m.id})}),[Je,u,m.chatId,m.id,ge]),(0,o.vJ)((()=>{ue&&u&&st({chatId:m.chatId,messageId:m.id})}),[ue,u,m.chatId,m.id,m.readDate]),(0,o.vJ)((()=>{_&&u&&Ge({chatId:m.chatId,messageId:m.id})}),[_,u,Ge,m.chatId,m.id]),(0,o.vJ)((()=>{p?.length&&S?.length!==p.length&&p.forEach((e=>{Ze({stickerSetInfo:e})}))}),[p,S,Ze]),(0,o.vJ)((()=>{D||G||!u||qe({chatId:m.chatId})}),[D,u,G,qe,m.chatId]);const kt=(0,o.Kr)((()=>{const e=(0,a.mS)().chats.byId,t=(0,a.mS)().users.byId;if(m.reactions?.recentReactions?.length){const n=new Set(m.reactions?.recentReactions?.map((({peerId:n})=>t[n]||e[n])));return Array.from(n).filter(Boolean).slice(0,s.dqH)}if(m.seenByDates)return Object.keys(m.seenByDates).slice(0,s.dqH).map((n=>t[n]||e[n])).filter(Boolean)}),[m.reactions?.recentReactions,m.seenByDates]),Pt=(0,o.Kr)((()=>{if(R)return R.messages.some((e=>{const t=(0,c.ed)(e);return!!t&&(0,c.$r)(me,t)}));const e=(0,c.ed)(m);return!!e&&(0,c.$r)(me,e)}),[me,R,m]),Yt=F&&W?.rangeCount?W.getRangeAt(0):void 0;(0,o.vJ)((()=>{if(ve)return void Nt(Z);if(!Yt||Yt.collapsed||!Boolean(m.content.text?.text)||!function(e){const t=e.commonAncestorContainer,n=t.nodeType===Node.TEXT_NODE?t.parentNode:t;return Boolean(n.closest(".message-content-wrapper .text-content"))&&!(Boolean(n.closest(".EmbeddedMessage"))||Boolean(n.closest(".WebPage")))}(Yt))return void Nt(Z);const e=g(Yt),t=m.content.text.text.replace(/\u00A0/g," ");e.text.trim().length>0&&t.includes(e.text)?Nt(Yt.startOffset):Nt(Z)}),[Yt,Yt?.collapsed,Yt?.startOffset,Yt?.endOffset,ve,m.content.text]);const Tt=(0,v.A)((()=>{vt(!1),ke()})),Dt=(0,v.A)((()=>{vt(!1),Tt();const e=R?.messages?R.messages.map((({id:e})=>e)):[m.id];rt({chatId:m.chatId,messageIds:e,isSchedule:"scheduled"===h})})),Lt=(0,v.A)((()=>{yt(!1),ke()})),Ft=(0,v.A)((()=>{const e=wt!==Z&&Yt?g(Yt):void 0;Re?Te({replyToMsgId:m.id,quoteText:e,quoteOffset:wt,monoforumPeerId:xe,replyToPeerId:void 0}):Ee({fromChatId:m.chatId,messageId:m.id,quoteText:e,quoteOffset:wt}),Tt()})),Et=(0,v.A)((()=>{Ye({chatId:m.chatId,threadId:m.id}),Tt()})),Bt=(0,v.A)((()=>{m.content.todo?ht({chatId:m.chatId,messageId:m.id}):De({messageId:m.id}),Tt()})),Ot=(0,v.A)((()=>{X?ht({chatId:m.chatId,messageId:m.id,forNewTask:!0}):mt({message:gt("SubscribeToTelegramPremiumForAppendToDo"),action:{action:"openPremiumModal",payload:{initialSection:"todo"}},actionText:pt("PremiumMore")}),Tt()})),Kt=(0,v.A)((()=>{vt(!1),yt(!0)})),_t=(0,v.A)((()=>{Le({chatId:m.chatId,messageId:m.id,isUnpin:!0}),Tt()})),Ut=(0,v.A)((()=>{if(Tt(),R?.messages){const e=R.messages.map((({id:e})=>e));Fe({fromChatId:m.chatId,messageIds:e})}else Fe({fromChatId:m.chatId,messageIds:[m.id]})})),$t=(0,v.A)((()=>{Tt(),Be({sticker:m.content.sticker})})),jt=(0,v.A)((()=>{Tt(),Oe({sticker:m.content.sticker})})),Jt=(0,v.A)((()=>{Tt(),Xe({chatId:m.chatId,messageId:m.id})})),zt=(0,v.A)((()=>{Tt(),Qe({chatId:m.chatId,messageId:m.id})})),Ht=(0,v.A)((()=>{const e=R?.messages?{messageId:m.id,childMessageIds:R.messages.map((({id:e})=>e)),withShift:!1}:{messageId:m.id,withShift:!1};Ke(e),Tt()})),qt=(0,v.A)((()=>{_e({chatId:m.chatId,id:m.id}),Tt()})),Gt=(0,v.A)((e=>{Ue({chatId:m.chatId,messageId:m.id,scheduledAt:e}),ke()})),Vt=(0,v.A)((()=>{vt(!1),Mt(Gt)})),Wt=(0,v.A)((()=>{Tt(),ze({chatId:m.chatId,messageId:m.id})})),Zt=(0,v.A)((()=>{Tt(),He({chatId:m.chatId,messageId:m.id})})),Xt=(0,v.A)((e=>{Ve({messageIds:e}),Tt()})),Qt=(0,v.A)((()=>{ct({chatId:m.chatId,messageId:m.id,shouldIncludeThread:e!==i.l3,shouldIncludeGrouped:!0}),Tt()})),en=(0,v.A)((()=>{(0,d.eM)(m.content.contact.phoneNumber),Tt()})),tn=(0,v.A)((()=>{(R?.messages||[m]).forEach((e=>{const t=(0,c.ed)(e);t&&(Pt?je({media:t}):$e({media:t,originMessage:e}))})),Tt()})),nn=(0,v.A)((()=>{const e=(0,c.zX)(m);We({gif:e}),Tt()})),on=(0,v.A)((e=>{Se&&!X?it({initialSection:"saved_tags"}):et({chatId:m.chatId,messageId:m.id,reaction:e,shouldAddToRecent:!0}),Tt()})),an=(0,v.A)((()=>{lt({chatId:m.chatId,messageId:m.id,count:1}),Tt()})),sn=(0,v.A)((()=>{dt({chatId:m.chatId,messageId:m.id}),Tt()})),cn=(0,v.A)((e=>{at({chatId:m.chatId,messageId:m.id,position:e})})),rn=(0,v.A)((()=>{tt({chatId:m.chatId,id:m.id}),Tt()})),ln=(0,v.A)((()=>{nt({chatId:m.chatId,id:m.id}),Tt()})),dn=(0,v.A)((()=>{ot({chatId:m.chatId,messageId:m.id}),Tt()})),un=(0,o.Kr)((()=>(R?R.messages:[m]).map((({id:e})=>e))),[R,m]),hn=(0,v.A)((()=>{U&&(vt(!1),ke(),ut({chatId:U.id,messageIds:un}))}));if(Y)return void Tt();const mn=new Date;return mn.setFullYear(mn.getFullYear()+1),(0,w.FD)("div",{ref:ft,className:(0,l.A)("ContextMenuContainer",be),children:[(0,w.Y)(V,{isReactionPickerOpen:Ie,availableReactions:t,topReactions:n,defaultTagReactions:r,isWithPaidReaction:we,message:m,isPrivate:G,isCurrentUserPremium:X,canBuyPremium:ee,isOpen:At,enabledReactions:H,reactionsLimit:q,anchor:k,targetHref:P,canShowReactionsCount:_,canShowReactionList:j,canSendNow:T,canReschedule:L,canReply:F,canQuote:wt!==Z,canDelete:K,canPin:E,canReport:$,repliesThreadInfo:B,canUnpin:O,canEdit:J,canAppendTodoList:z,canForward:Q,canFaveSticker:te,canUnfaveSticker:ne,canCopy:oe,canCopyLink:ae,canSelect:ie,canDownload:se,canSaveGif:ce,canRevote:re,canClosePoll:le,canShowSeenBy:ge,canTranslate:Ae,canShowOriginal:Ce,canSelectLanguage:ye,canPlayAnimatedEmojis:de,shouldRenderShowWhen:he,canLoadReadDate:ue,hasCustomEmoji:xt,customEmojiSets:S,isDownloading:Pt,seenByRecentPeers:kt,isInSavedMessages:Se,noReplies:pe,poll:b,story:x,onOpenThread:Et,onReply:Ft,onEdit:Bt,onAppendTodoList:Ot,onPin:Kt,onUnpin:_t,onForward:Ut,onDelete:Dt,onReport:hn,onFaveSticker:$t,onUnfaveSticker:jt,onSelect:Ht,onSend:qt,onReschedule:Vt,onClose:Tt,onCopyLink:Qt,onCopyMessages:Xt,onCopyNumber:en,onDownload:tn,onSaveGif:nn,onCancelVote:Jt,onClosePoll:St,onShowSeenBy:Wt,onToggleReaction:on,onSendPaidReaction:an,onShowPaidReactionModal:sn,onShowReactors:Zt,onReactionPickerOpen:cn,onTranslate:rn,onShowOriginal:ln,onSelectLanguage:dn,userFullName:Ne,canGift:Me}),(0,w.Y)(N,{isOpen:Ct,messageId:m.id,chatId:m.chatId,onClose:Lt}),(0,w.Y)(M.A,{isOpen:It,onClose:Rt,text:pt("lng_polls_stop_warning"),confirmLabel:pt("lng_polls_stop_sure"),confirmHandler:zt}),L&&bt]})})))}}]);
|
|
//# sourceMappingURL=8104.a262cf8e89a5c411f446.js.map
|