TelegramPWA/dist/6494.606e73cb1165026f3ec6.js
Alexander Zinchuk daea14f37c [Build]
2025-05-14 19:17:41 +03:00

2 lines
21 KiB
JavaScript

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[6494],{21849:(e,t,r)=>{r.d(t,{A:()=>C,R:()=>b});var n=r(84051),o=r(13439),a=r(23174),s=r(31481),i=r(90709),c=r(70636),l=r(87357),d=r(95807),u=r(14242),p=r(76023),m=r(35049),f=r(4961),y=r(11217),h=r(17712),v=r(62587),g=r(83057),I=r(59030),A=r(65843),S=r(88554),w=r(18276);const b={micro:p.$,mini:1.5*p.$,tiny:2*p.$,small:2.125*p.$,medium:2.75*p.$,large:3.375*p.$,giant:5.625*p.$,jumbo:7.5*p.$},T=(0,l.x)("Avatar");T.media=T("media"),T.icon=T("icon");const C=(0,n.ph)((({className:e,size:t="large",peer:r,photo:p,webPhoto:C,previewUrl:E,text:P,isSavedMessages:k,isSavedDialog:M,withVideo:N,withStory:F,forPremiumPromo:x,withStoryGap:L,withStorySolid:K,forceFriendStorySolid:O,forceUnreadStorySolid:B,storyViewerOrigin:V,storyViewerMode:$="single-peer",loopIndefinitely:z,noPersonalPhoto:D,onClick:U,onContextMenu:G})=>{const{openStoryViewer:j}=(0,o.ko)(),R=(0,n.li)(null),J=(0,n.li)(0),Q=r&&"isCustomPeer"in r,_=r&&!Q?r:void 0,W=_&&(0,c.mO)(_)?_:void 0,Y=_&&(0,c.vj)(_)?_:void 0,q=W&&(0,i.PL)(W),H=_&&(0,i.kE)(_.id),Z=_&&(0,i.Qe)(_.id),X=Y?.isForum;let ee,te;const re="number"==typeof t?t:b[t],ne=N&&p?.isVideo,oe=re>=b.jumbo;k||q||(W&&!D||Y?ee=(0,i.cP)(r,oe?"big":void 0):p?(ee=`photo${p.id}?size=m`,p.isVideo&&N&&(te=(0,i.Pg)(p))):C&&(ee=(0,i.cy)(C)));const ae=(0,n.Kr)((()=>Q?r.avatarIcon:k?M?"my-notes":"avatar-saved-messages":q?"avatar-deleted-account":H?"reply-filled":Z?"author-hidden":void 0),[Q,k,q,H,Z,r,M]),se=(0,v.A)(ee,!1,a.qZ.BlobUrl),ie=(0,v.A)(te,!ne,a.qZ.BlobUrl),ce=se||E,le=Boolean(ce||ie),de=Boolean(ie&&ne),ue=(0,g.A)(le),pe=(0,h.A)((e=>{const t=e.currentTarget;ie&&(z||(J.current+=1,J.current>=3&&(t.style.display="none")))})),me=(0,I.A)();let fe;const ye=W?(0,i.Yg)(W):Y?(0,i.Js)(me,Y):P;if(ae)fe=n.Ay.createElement(w.A,{name:ae,className:T.icon,role:"img",ariaLabel:ye});else if(le)fe=n.Ay.createElement(n.Ay.Fragment,null,n.Ay.createElement("img",{src:ce,className:(0,l.A)(T.media,"avatar-media",ue,ie&&"poster"),alt:ye,decoding:"async",draggable:!1}),de&&n.Ay.createElement(A.A,{canPlay:!0,src:ie,className:(0,l.A)(T.media,"avatar-media","poster"),muted:!0,loop:z,autoPlay:!0,disablePictureInPicture:!0,playsInline:!0,draggable:!1,onEnded:pe}));else if(W){const e=(0,i.Yg)(W);fe=e?(0,u.Qh)(e,2):void 0}else if(Y){const e=(0,i.Js)(me,Y);fe=e&&(0,u.Qh)(e,(0,i.L8)(Y.id)?2:1)}else if(Q){const e=r.title||me(r.titleKey);fe=e&&(0,u.Qh)(e,1)}else P&&(fe=(0,u.Qh)(P,2));const he=Q&&r.isAvatarSquare||X&&!((F||K)&&_?.hasStories),ve=Q&&r.withPremiumGradient,ge=Q&&r.customPeerAvatarColor,Ie=(0,l.A)("Avatar",e,(0,m.y)(r),!r&&P&&"hidden-user",k&&"saved-messages",Z&&"anonymous-forwards",q&&"deleted-account",H&&"replies-bot-account",ve&&"premium-gradient-bg",he&&"forum",(p||C)&&"force-fit",(F&&_?.hasStories||x)&&"with-story-circle",K&&_?.hasStories&&"with-story-solid",K&&O&&"close-friend",K&&(_?.hasUnreadStories||B)&&"has-unread-story",U&&"interactive",!k&&!ce&&"no-photo"),Ae=Boolean(k||ce),{handleClick:Se,handleMouseDown:we}=(0,y.Q)((e=>{if(F&&"disabled"!==$&&_?.hasStories)return e.stopPropagation(),void j({peerId:_.id,isSinglePeer:"single-peer"===$,origin:V});U&&U(e,Ae)}));return n.Ay.createElement("div",{ref:R,className:Ie,id:_?.id&&F?(0,i.kR)(_.id):void 0,"data-peer-id":_?.id,"data-test-sender-id":s.W75?_?.id:void 0,"aria-label":"string"==typeof fe?ye:void 0,style:(0,d.A)(`--_size: ${re}px;`,ge&&`--color-user: ${ge}`),onClick:Se,onContextMenu:G,onMouseDown:we},n.Ay.createElement("div",{className:"inner"},"string"==typeof fe?(0,f.A)(fe,[oe?"hq_emoji":"emoji"]):fe),F&&_?.hasStories&&n.Ay.createElement(S.A,{peerId:_.id,size:re,withExtraGap:L}))}))},88554:(e,t,r)=>{r.d(t,{$:()=>w,A:()=>S});var n=r(84051),o=r(13439),a=r(29807),s=r(87357),i=r(76023),c=r(38691);const l=["#34C578","#3CA3F3"],d=["#C9EB38","#09C167"],u=["#A667FF","#55A5FF"],p=.125*i.$,m=.0625*i.$,f=2,y=45,h=3.5*i.$,v=Math.PI/4,g=2*Math.PI*.1,I=v-g/2,A=v+g/2,S=(0,n.ph)((0,o.EK)(((e,{peerId:t})=>{const r=(0,a._bp)(e,t),n=(0,a.SJA)(e);return{peerStories:r?.byId,storyIds:r?.orderedIds,lastReadId:r?.lastReadId,appTheme:n}}))((function({size:e,className:t,peerStories:r,storyIds:o,lastReadId:a,withExtraGap:i,appTheme:l}){const d=(0,n.li)(null),u=(0,c.A)(),m=e+p,f=(0,n.Kr)((()=>(o||[]).reduce(((e,t)=>(e.total+=1,a&&t<=a&&(e.read+=1),e)),{total:0,read:0})),[a,o]),y=(0,n.Kr)((()=>!(!r||!o?.length)&&o.some((e=>{const t=r[e];if(!t||!("isForCloseFriends"in t))return!1;const n=a&&t.id<=a;return t.isForCloseFriends&&!n}))),[a,r,o]);if((0,n.Nf)((()=>{d.current&&w({canvas:d.current,size:m*u,segmentsCount:f.total,color:y?"green":"blue",readSegmentsCount:f.read,withExtraGap:i,readSegmentColor:"dark"===l?"#737373":"#C4C9CC",dpr:u})}),[l,y,m,f.read,f.total,i,u]),f.total)return n.Ay.createElement("canvas",{ref:d,className:(0,s.A)("story-circle",t),style:`max-width: ${m}px; max-height: ${m}px;`})})));function w({canvas:e,size:t,color:r,segmentsCount:n,readSegmentsCount:o=0,withExtraGap:a=!1,readSegmentColor:s,dpr:c}){n>y&&(o=Math.round(o*(y/n)),n=y);const v=Math.max(Math.max(t-h*c,0)/c/i.$/1.5,1)*c,g=e.getContext("2d");if(!g)return;e.width=t,e.height=t;const S=t/2,w=(t-p*v)/2,b=2*Math.PI/n,T=f/100*(2*Math.PI),C=g.createLinearGradient(0,0,Math.ceil(t*Math.cos(Math.PI/2)),Math.ceil(t*Math.sin(Math.PI/2))),E="purple"===r?u:"green"===r?d:l;E.forEach(((e,t)=>{C.addColorStop(t/(E.length-1),e)})),g.lineCap="round",g.clearRect(0,0,t,t),Array.from({length:n}).forEach(((e,t)=>{const r=t<o;let i=t*b-Math.PI/2+T/2,c=i+b-(n>1?T:0);if(g.strokeStyle=r?s:C,g.lineWidth=(r?m:p)*v,a){if(i>=I&&c<=A)return;i<I&&c>A?(g.beginPath(),g.arc(S,S,w,A,c),g.stroke(),c=I):i<I&&c>I?c=I:i<A&&c>A&&(i=A)}g.beginPath(),g.arc(S,S,w,i,c),g.stroke()}))}},2578:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(84051),o=r(59030);const a=(0,n.ph)((({fakeType:e})=>{const t=(0,o.A)();return n.Ay.createElement("span",{className:"FakeIcon"},t("fake"===e?"FakeMessage":"ScamMessage"))}))},34431:(e,t,r)=>{r.d(t,{A:()=>A});var n=r(84051),o=r(13439),a=r(31481),s=r(90709),i=r(70636),c=r(87357),l=r(95807),d=r(85982),u=r(83868),p=r(4961),m=r(17712),f=r(59030),y=r(41036),h=r(87412),v=r(2578),g=r(9267);const I=()=>n.Ay.createElement("svg",{className:"VerifiedIcon",viewBox:"0 0 24 24"},n.Ay.createElement("path",{d:"M12.3 2.9c.1.1.2.1.3.2.7.6 1.3 1.1 2 1.7.3.2.6.4.9.4.9.1 1.7.2 2.6.2.5 0 .6.1.7.7.1.9.1 1.8.2 2.6 0 .4.2.7.4 1 .6.7 1.1 1.3 1.7 2 .3.4.3.5 0 .8-.5.6-1.1 1.3-1.6 1.9-.3.3-.5.7-.5 1.2-.1.8-.2 1.7-.2 2.5 0 .4-.2.5-.6.6-.8 0-1.6.1-2.5.2-.5 0-1 .2-1.4.5-.6.5-1.3 1.1-1.9 1.6-.3.3-.5.3-.8 0-.7-.6-1.4-1.2-2-1.8-.3-.2-.6-.4-.9-.4-.9-.1-1.8-.2-2.7-.2-.4 0-.5-.2-.6-.5 0-.9-.1-1.7-.2-2.6 0-.4-.2-.8-.4-1.1-.6-.6-1.1-1.3-1.6-2-.4-.4-.3-.5 0-1 .6-.6 1.1-1.3 1.7-1.9.3-.3.4-.6.4-1 0-.8.1-1.6.2-2.5 0-.5.1-.6.6-.6.9-.1 1.7-.1 2.6-.2.4 0 .7-.2 1-.4.7-.6 1.4-1.2 2.1-1.7.1-.2.3-.3.5-.2z",style:"fill: var(--color-fill)"}),n.Ay.createElement("path",{d:"M16.4 10.1l-.2.2-5.4 5.4c-.1.1-.2.2-.4 0l-2.6-2.6c-.2-.2-.1-.3 0-.4.2-.2.5-.6.7-.6.3 0 .5.4.7.6l1.1 1.1c.2.2.3.2.5 0l4.3-4.3c.2-.2.4-.3.6 0 .1.2.3.3.4.5.2 0 .3.1.3.1z",style:"fill: var(--color-checkmark)"})),A=(0,n.ph)((({className:e,peer:t,noVerified:r,noFake:A,withEmojiStatus:S,emojiStatusSize:w,isSavedMessages:b,isSavedDialog:T,noLoopLimit:C,canCopyTitle:E,iconElement:P,statusSparklesColor:k,onEmojiStatusClick:M,observeIntersection:N})=>{const F=(0,f.A)(),{showNotification:x}=(0,o.ko)(),L="id"in t?t:void 0,K="isCustomPeer"in t?t:void 0,O=L&&(0,i.mO)(L),B=L&&(O?(0,s.Yg)(L):(0,s.Js)(F,L)),V=O&&L.isPremium||K?.isPremium,$=S&&!b,z=L?.emojiStatus||(K?.emojiStatusId?{type:"regular",documentId:K.emojiStatusId}:void 0),D=(0,m.A)((e=>{B&&E&&((0,u.A)(e),(0,d.eM)(B),x({message:(O?"User":"Chat")+" name was copied"}))})),U=(0,n.Kr)((()=>K?(0,p.A)(K.title||F(K.titleKey)):b?F(T?"MyNotes":"SavedMessages"):(0,s.Qe)(L.id)?F("AnonymousForward"):(0,s.kE)(L.id)?F("RepliesTitle"):(0,s.Rl)(L.id)?F("VerifyCodesNotifications"):void 0),[K,T,b,F,L]),G=L?.botVerificationIconId;return n.Ay.createElement("div",{className:(0,c.A)("title","QljEeKI5",e)},G&&n.Ay.createElement(h.A,{documentId:G,size:w,loopLimit:C?void 0:a.J$1,observeIntersectionForLoading:N}),n.Ay.createElement("h3",{dir:"auto",role:"button",className:(0,c.A)("fullName","AS54Cntu",E&&"vr53L_9p"),onClick:D},U||(0,p.A)(B||"")),!P&&t&&n.Ay.createElement(n.Ay.Fragment,null,!r&&t?.isVerified&&n.Ay.createElement(I,null),!A&&t?.fakeType&&n.Ay.createElement(v.A,{fakeType:t.fakeType}),$&&z&&n.Ay.createElement(y.Ay,{className:"KBZgFSv7",slideClassName:"xmVxyvNy",activeKey:Number(z.documentId),name:"slideFade",direction:-1,shouldCleanup:!0},n.Ay.createElement(h.A,{forceAlways:!0,className:"no-selection",withSparkles:"collectible"===z.type,sparklesClassName:"statusSparkles",sparklesStyle:(0,l.A)(k&&`color: ${k}`),documentId:z.documentId,size:w,loopLimit:C?void 0:a.J$1,observeIntersectionForLoading:N,onClick:M})),$&&!z&&V&&n.Ay.createElement(g.A,null)),P)}))},86046:(e,t,r)=>{r.d(t,{D5:()=>u,HT:()=>s,M6:()=>d,Pc:()=>i,ZF:()=>l,hk:()=>c,j6:()=>p,jA:()=>a});var n=r(5930),o=r(29807);function a(e,t){if("slug"===t.type)return t;if("stargiftResale"===t.type){const{slug:r,peerId:n}=t,a=(0,o.PVB)(e,n);if(!a)return;return{type:"stargiftResale",slug:r,peer:a}}if("stargift"===t.type){const{peerId:r,shouldHideName:n,giftId:a,message:s,shouldUpgrade:i}=t,c=(0,o.PVB)(e,r);if(!c)return;return{type:"stargift",peer:c,shouldHideName:n,giftId:a,message:s,shouldUpgrade:i}}if("starsgift"===t.type){const{userId:r,stars:n,amount:a,currency:s}=t,i=(0,o.mBe)(e,r);if(!i)return;return{type:"stars",purpose:{type:"starsgift",user:i,stars:n,amount:a,currency:s}}}if("stars"===t.type){const{stars:e,amount:r,currency:n}=t;return{type:"stars",purpose:{type:"stars",stars:e,amount:r,currency:n}}}if("chatInviteSubscription"===t.type){const{hash:e}=t;return{type:"chatInviteSubscription",hash:e}}if("message"===t.type){const r=(0,o.hds)(e,t.chatId);if(!r)return;return{type:"message",chat:r,messageId:t.messageId}}if("premiumGiftStars"===t.type){const{months:r,userId:n,message:a}=t,s=(0,o.mBe)(e,n);if(!s)return;return{type:"premiumGiftStars",months:r,message:a,user:s}}if("giftcode"===t.type){const{userIds:r,boostChannelId:n,amount:a,currency:s,option:i,message:c}=t;return{type:"giveaway",option:i,purpose:{type:"giftcode",amount:a,currency:s,users:r.map((t=>(0,o.mBe)(e,t))).filter(Boolean),boostChannel:n?(0,o.hds)(e,n):void 0,message:c}}}if("starsgiveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:a,currency:s,untilDate:i,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:u,stars:p,users:m}=t,f=(0,o.hds)(e,r);if(!f)return;const y=n?.map((t=>(0,o.hds)(e,t))).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:a,currency:s,chat:f,additionalChannels:y,untilDate:i,areWinnersVisible:c,countries:l,isOnlyForNewSubscribers:d,prizeDescription:u,stars:p,users:m}}}if("giveaway"===t.type){const{chatId:r,additionalChannelIds:n,amount:a,currency:s,option:i,untilDate:c,areWinnersVisible:l,countries:d,isOnlyForNewSubscribers:u,prizeDescription:p}=t,m=(0,o.hds)(e,r);if(!m)return;const f=n?.map((t=>(0,o.hds)(e,t))).filter(Boolean);return{type:"giveaway",option:i,purpose:{type:"giveaway",amount:a,currency:s,chat:m,additionalChannels:f,untilDate:c,areWinnersVisible:l,countries:d,isOnlyForNewSubscribers:u,prizeDescription:p}}}if("stargiftUpgrade"===t.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=t,o=s(e,r);if(!o)return;return{type:"stargiftUpgrade",inputSavedGift:o,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===t.type){const{inputSavedGift:r,recipientId:n}=t,a=s(e,r),i=(0,o.PVB)(e,n);if(!a||!i)return;return{type:"stargiftTransfer",inputSavedGift:a,recipient:i}}}function s(e,t){if("user"===t.type)return t;if("chat"===t.type){const r=(0,o.hds)(e,t.chatId);if(!r)return;return{type:"chat",chat:r,savedId:t.savedId}}}function i(e){return"appStore"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===e.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function c(e,t){const r=t.amount+t.nanos/1e9;return r<0?`- ${e.number(Math.abs(r))}`:`+ ${e.number(r)}`}function l(e,t){return e.number(t.amount+t.nanos/1e9)}function d(e){const{action:t}=e.content;if("giftStars"!==t?.type)return;const{transactionId:r,stars:n}=t;return{id:r,stars:{amount:n,nanos:0},peer:{type:"peer",id:e.isOutgoing?e.chatId:e.senderId||e.chatId},date:e.date,isGift:!0,isMyGift:e.isOutgoing||void 0}}function u(e){const{action:t}=e.content;if("prizeStars"!==t?.type)return;const{transactionId:r,stars:n,boostPeerId:o}=t;return{id:r,stars:{amount:n,nanos:0},peer:{type:"peer",id:o},date:e.date,giveawayPostId:e.id}}function p(e,t){return(0,n.A)(e,t)}},10722:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(84051),o=r(61433),a=r(66644),s=r(96454),i=r(17712);function c(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}const l=(e,t,r,l,d,u)=>{const[p,m]=(0,n.J0)(!1),[f,y]=(0,n.J0)(void 0),[h,v]=(0,n.J0)(void 0),g=(0,i.A)((e=>{t||2!==e.button||(0,a.RK)((()=>{(0,o.YM)(e.target,"no-selection")}))})),I=(0,i.A)((e=>{(0,a.RK)((()=>{(0,o.HW)(e.target,"no-selection")})),t||r&&e.target.matches("a[href]")||(e.preventDefault(),e.stopPropagation(),f||(m(!0),y({x:e.clientX,y:e.clientY}),v(e.target)))})),A=(0,i.A)((()=>{m(!1)})),S=(0,i.A)((()=>{y(void 0)}));return(0,n.vJ)((()=>{if(t||!s.TF||l||d&&!d())return;const n=e.current;if(!n)return;let o;const a=()=>{o&&(clearTimeout(o),o=void 0)},i=e=>{t||(u&&e.stopPropagation(),a(),o=window.setTimeout((()=>(e=>{a();const{clientX:t,clientY:n,target:o}=e.touches[0];f||r&&o.matches("a[href]")||(document.addEventListener("touchend",(e=>{s.pz&&s._7&&setTimeout((()=>{document.removeEventListener("mousedown",c,{capture:!0}),document.removeEventListener("click",c,{capture:!0})}),100),c(e)}),{once:!0,capture:!0}),s._7&&s.pz&&(document.addEventListener("mousedown",c,{once:!0,capture:!0}),document.addEventListener("click",c,{once:!0,capture:!0})),m(!0),y({x:t,y:n}))})(e)),200))};return n.addEventListener("touchstart",i,{passive:!0}),n.addEventListener("touchcancel",a,!0),n.addEventListener("touchend",a,!0),n.addEventListener("touchmove",a,{passive:!0}),()=>{a(),n.removeEventListener("touchstart",i),n.removeEventListener("touchcancel",a,!0),n.removeEventListener("touchend",a,!0),n.removeEventListener("touchmove",a)}}),[f,t,l,e,r,d,u]),{isContextMenuOpen:p,contextMenuAnchor:f,contextMenuTarget:h,handleBeforeContextMenu:g,handleContextMenu:I,handleContextMenuClose:A,handleContextMenuHide:S}}},11217:(e,t,r)=>{r.d(t,{Q:()=>a});var n=r(96454),o=r(17712);function a(e){const t=(0,o.A)((t=>{"mousedown"===t.type&&t.button!==n.w3.Main||e(t)}));return n.TF?{handleClick:e?t:void 0}:{handleMouseDown:e?t:void 0}}},96374:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(84051),o=r(89925),a=r(87894),s=r(30857),i=r(17712),c=r(73767);function l(e,t,r,n){const{length:a}=e,s=n?e.indexOf(n):0,i=t===o.TN.Forwards?s:s+1||a,c=Math.max(0,i-r),l=i+r-1,d=e.slice(Math.max(0,c),l+1);let u,p;switch(t){case o.TN.Forwards:u=i>=0,p=c>=0;break;case o.TN.Backwards:u=i<a,p=l<=a-1}return{newViewportIds:d,areSomeLocal:u,areAllLocal:p,newIsOnTop:d[0]===e[0],fromOffset:c}}const d=(e,t,r=!1,d=30)=>{const u=(0,n.li)(),p=(0,n.li)();if(!p.current&&t&&!r){const{newViewportIds:e,newIsOnTop:r,fromOffset:n}=l(t,o.TN.Forwards,d,t[0]);p.current={viewportIds:e,isOnTop:r,offset:n}}const m=(0,s.A)();r&&(u.current={});const f=(0,c.A)(t),y=(0,c.A)(r);if(!t||r||t===f&&r===y)t||(p.current=void 0);else{const{viewportIds:e,isOnTop:r}=p.current||{},n=e&&!r?e[Math.round(e.length/2)]:void 0,s=n&&t.includes(n)?n:t[0],{offsetId:i=s,direction:c=o.TN.Forwards}=u.current||{},{newViewportIds:m,newIsOnTop:f,fromOffset:y}=l(t,c,d,i);u.current={},e&&(0,a.k)(e,m)||(p.current={viewportIds:m,isOnTop:f,offset:y})}const h=(0,i.A)((({direction:r,noScroll:n})=>{const{viewportIds:s}=p.current||{},i=s?r===o.TN.Backwards?s[s.length-1]:s[0]:void 0;if(!t)return void(e&&e({offsetId:i}));const{newViewportIds:c,areSomeLocal:f,areAllLocal:y,newIsOnTop:h,fromOffset:v}=l(t,r,d,i);!f||s&&(0,a.k)(s,c)||(p.current={viewportIds:c,isOnTop:h,offset:v},m()),!y&&e&&(n||(u.current={...u.current,direction:r,offsetId:i}),e({offsetId:i}))}));return r?[t]:[p.current?.viewportIds,h,p.current?.offset]}},37859:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(84051);const o=(e,t,r)=>{const o=(0,n.li)();return(0,n.Nf)((()=>{const r=o.current;return o.current=t,e(r||[])}),t,r)}},32610:(e,t,r)=>{r.d(t,{A:()=>a});const n=[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],o=[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 a(e,t,r,a,s,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,r,a,s),d=l.data;let u,p,m,f,y,h,v,g,I,A,S,w,b=a-1,T=s-1,C=i+1,E=[],P=[],k=[],M=n[i],N=o[i],F=[],x=[];for(;c-- >0;){for(w=S=0,y=0;y<s;y++){for(u=d[w]*C,p=d[w+1]*C,m=d[w+2]*C,h=1;h<=i;h++)v=w+((h>b?b:h)<<2),u+=d[v++],p+=d[v++],m+=d[v++];for(f=0;f<a;f++)E[S]=u,P[S]=p,k[S]=m,0==y&&(F[f]=((v=f+C)<b?v:b)<<2,x[f]=(v=f-i)>0?v<<2:0),g=w+F[f],I=w+x[f],u+=d[g++]-d[I++],p+=d[g++]-d[I++],m+=d[g++]-d[I++],S++;w+=a<<2}for(f=0;f<a;f++){for(A=f,u=E[A]*C,p=P[A]*C,m=k[A]*C,h=1;h<=i;h++)A+=h>T?0:a,u+=E[A],p+=P[A],m+=k[A];for(S=f<<2,y=0;y<s;y++)d[S]=u*M>>>N,d[S+1]=p*M>>>N,d[S+2]=m*M>>>N,0==f&&(F[y]=((v=y+C)<T?v:T)*a,x[y]=(v=y-i)>0?v*a:0),g=f+F[y],I=f+x[y],u+=E[g]-E[I],p+=P[g]-P[I],m+=k[g]-k[I],S+=a<<2}}e.putImageData(l,t,r)}},14680:(e,t,r)=>{r.d(t,{FD:()=>o,ZJ:()=>s,wb:()=>a});let n=0;function o(){n+=1}function a(){n-=1}function s(){return n>0}},91034:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(84051);function o(e){return function(t){const r=(0,n.li)(t);return t.ignoreFreeze?e(t):(t.isOpen?r.current=t:r.current={...r.current,isOpen:!1},e(r.current))}}},9718:(e,t,r)=>{r.d(t,{A:()=>s,E:()=>a});var n=r(96454),o=r(41402);function a(e){e.style.display="none",(0,o.A)(e),e.style.display=""}const s=(e,t)=>{n.pz&&(e.style.overflow="hidden"),void 0!==t&&(e.scrollTop=t),n.pz&&(e.style.overflow="")}},29441:(e,t,r)=>{function n(e){function t(t){if("Tab"!==t.key)return;t.preventDefault(),t.stopPropagation();const r=Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!r.length)return;const n=r.findIndex((e=>e.isSameNode(document.activeElement)));let o=0;n>=0&&(o=t.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[o].focus()}return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}}r.d(t,{A:()=>n})}}]);
//# sourceMappingURL=6494.606e73cb1165026f3ec6.js.map