2 lines
29 KiB
JavaScript
2 lines
29 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[5278],{25404:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(84051),o=n(13439),s=n(31481),r=n(85982),a=n(17663),c=n(80140),d=n(39351),l=n(17712),u=n(59030),g=n(24433),m=n(20021);const h=(0,i.ph)((({peerId:e,canManage:t,gift:n,currentUserEmojiStatus:h,collectibleEmojiStatuses:p})=>{const{showNotification:A,openChatWithDraft:f,openGiftTransferModal:v,openGiftResalePriceComposerModal:C,openGiftStatusInfoModal:I,setEmojiStatus:y,toggleSavedGiftPinned:F,changeGiftVisibility:b,updateStarGiftPrice:k,closeGiftInfoModal:P}=(0,o.ko)(),N=(0,d.A)(),S=(0,u.A)(),Y=n&&"gift"in n,T=Y?n:void 0,w=Y?n.gift:n,G="starGiftUnique"===w?.type?w.slug:void 0,M=(0,i.Kr)((()=>{if(G)return`${s.jsp}nft/${G}`}),[G]),x=(0,i.Kr)((()=>{if(G)return p?.find((e=>"collectible"===e.type&&e.slug===G))}),[G,p]),B="collectible"===h?.type?h.slug:void 0,D=w&&"starGiftUnique"===w.type,U=D&&B===w.slug,R=x&&!U,L=D?w.resellPrice:void 0,E=t&&T&&!T.isUnsaved&&D,V=(0,l.A)((()=>{const{inputGift:e,isUnsaved:t}=T;b({gift:e,shouldUnsave:!t})})),j=(0,l.A)((()=>{M&&((0,r.eM)(M),A({message:N("LinkCopied")}))})),K=(0,l.A)((()=>{M&&f({text:{text:M}})})),O=(0,l.A)((()=>{T&&"starGiftUnique"===T?.gift.type&&(T.canTransferAt&&T.canTransferAt>(0,c.Fm)()?A({message:{key:"NotificationGiftCanTransferAt",variables:{date:(0,a.U)(S,1e3*T.canTransferAt)}}}):v({gift:T}))})),W=(0,l.A)((()=>{T&&(T.canResellAt&&T.canResellAt>(0,c.Fm)()?A({message:{key:"NotificationGiftCanResellAt",variables:{date:(0,a.U)(S,1e3*T.canResellAt)}}}):C({peerId:e,gift:T}))})),z=(0,l.A)((()=>{T&&"starGiftUnique"===T.gift.type&&T.inputGift&&(P(),k({gift:T.inputGift,price:{currency:"XTR",amount:0,nanos:0}}),A({icon:"unlist-outline",message:{key:"NotificationGiftIsUnlist",variables:{gift:N("GiftUnique",{title:T.gift.title,number:T.gift.number})}}}))})),J=(0,l.A)((()=>{"starGiftUnique"===w?.type&&x&&I({emojiStatus:x})})),q=(0,l.A)((()=>{U&&y({emojiStatus:{type:"regular",documentId:s.zNY}})})),Q=(0,l.A)((()=>{F({peerId:e,gift:T})}));return(0,m.FD)(m.FK,{children:[E&&(0,m.Y)(g.A,{icon:T.isPinned?"unpin":"pin",onClick:Q,children:N(T.isPinned?"ChatListUnpinFromTop":"ChatListPinToTop")}),(0,m.Y)(g.A,{icon:"link-badge",onClick:j,children:N("CopyLink")}),(0,m.Y)(g.A,{icon:"forward",onClick:K,children:N("Share")}),t&&D&&(0,m.Y)(g.A,{icon:"diamond",onClick:O,children:N("GiftInfoTransfer")}),t&&D&&!L&&(0,m.Y)(g.A,{icon:"sell-outline",onClick:W,children:N("Sell")}),t&&D&&Boolean(L)&&(0,m.Y)(g.A,{icon:"unlist-outline",onClick:z,children:N("GiftInfoUnlist")}),t&&T&&(0,m.Y)(g.A,{icon:T.isUnsaved?"eye-outline":"eye-crossed-outline",onClick:V,children:N(T.isUnsaved?"GiftActionShow":"GiftActionHide")}),R&&(0,m.Y)(g.A,{icon:"crown-wear-outline",onClick:J,children:N("GiftInfoWear")}),U&&(0,m.Y)(g.A,{icon:"crown-take-off-outline",onClick:q,children:N("GiftInfoTakeOff")})]})}))},36143:(e,t,n)=>{n.d(t,{A:()=>Ge});var i=n(84051),o=n(13439),s=n(23174),r=n(89925),a=n(31481),c=n(90709),d=n(26129),l=n(60919),u=n(96454),g=n(87357),m=n(60343),h=n(41512),p=n(54464),A=n(43874),f=n(10722),v=n(49746),C=n(37661),I=n(5912),y=n(17712),F=n(14622),b=n(34201),k=n(48196),P=n(79519),N=n(96773),S=n(76023),Y=n(21849),T=n(50805),w=n(20021);const G=15*S.$,M=(0,i.ph)((({action:e,onClick:t,observeIntersection:n})=>(0,w.Y)(Y.A,{className:T.A.channelPhoto,photo:e.photo,loopIndefinitely:!0,withVideo:!0,observeIntersection:n,onClick:t,size:G})));var x=n(17142),B=n(18501),D=n(39351),U=n(85118),R=n(82855);const L=(0,i.ph)((0,o.EK)(((e,{action:t})=>({sticker:"giftPremium"===t.type?(0,l.t0O)(e,t.months):"giftStars"===t.type?(0,l.WLj)(e,t.stars):(0,l.OD9)(e,t.cryptoAmount),canPlayAnimatedEmojis:(0,l.BWX)(e)})))((({action:e,sticker:t,canPlayAnimatedEmojis:n,onClick:o,observeIntersectionForLoading:s,observeIntersectionForPlaying:r})=>{const a=(0,i.li)(),c=(0,D.A)(),d="giftPremium"===e.type?e.message:void 0;return(0,w.FD)("div",{className:T.A.contentBox,tabIndex:0,role:"button",onClick:o,children:[(0,w.Y)("div",{ref:a,className:T.A.stickerWrapper,style:"width: 150px; height: 150px",children:t&&(0,w.Y)(R.A,{containerRef:a,sticker:t,size:150,observeIntersectionForLoading:s,observeIntersectionForPlaying:r,noLoad:!n})}),(0,w.FD)("div",{className:T.A.info,children:[(0,w.Y)("h3",{className:T.A.title,children:"giftPremium"===e.type?c("ActionGiftPremiumTitle",{months:e.months},{pluralValue:e.months}):"giftStars"===e.type?c("ActionGiftStarsTitle",{amount:e.stars},{pluralValue:e.stars}):(()=>{const{cryptoAmount:t,cryptoCurrency:n}=e;return t?(0,x.vv)(c,t,n,{asFontIcon:!0}):void 0})()}),(0,w.FD)("div",{children:[d&&(0,B.fd)(d),!d&&c("giftTon"===e.type?"DescriptionAboutTon":"giftPremium"===e.type?"ActionGiftPremiumText":"ActionGiftStarsText")]})]}),(0,w.FD)("div",{className:T.A.actionButton,children:[(0,w.Y)(U.A,{preset:"button"}),c("ActionViewButton")]})]})})));var E=n(70636),V=n(4262);const j=(0,i.ph)((0,o.EK)(((e,{action:t})=>({currentUserId:e.currentUserId,sticker:"giftCode"===t.type?(0,l.t0O)(e,t.months):(0,l.WLj)(e,t.stars),canPlayAnimatedEmojis:(0,l.BWX)(e),channel:t.boostPeerId?(0,l.hds)(e,t.boostPeerId):void 0})))((({currentUserId:e,action:t,sender:n,sticker:o,canPlayAnimatedEmojis:s,channel:r,onClick:a,observeIntersectionForLoading:c,observeIntersectionForPlaying:d})=>{const l=(0,i.li)(),u=(0,D.A)(),g=(0,i.Kr)((()=>{const e=r&&(0,E.F9)(u,r),t=u("ActionFallbackChannel");return(0,V.Nm)(r?.id,e||t)}),[r,u]),m=(0,i.Kr)((()=>{const e=r||n,t=e&&(0,E.F9)(u,e),i=u("ActionFallbackChat");return(0,V.Nm)(e?.id,t||i)}),[r,n,u]);return(0,w.FD)("div",{className:T.A.contentBox,tabIndex:0,role:"button",onClick:a,children:[(0,w.Y)("div",{ref:l,className:T.A.stickerWrapper,style:"width: 150px; height: 150px",children:o&&(0,w.Y)(R.A,{containerRef:l,sticker:o,size:150,observeIntersectionForLoading:c,observeIntersectionForPlaying:d,noLoad:!s})}),(0,w.FD)("div",{children:[(0,w.Y)("h3",{className:T.A.title,children:u("giftCode"!==t.type||t.isViaGiveaway?"ActionGiveawayResultTitle":"GiftInfoTitle")}),(0,w.FD)("div",{children:["giftCode"===t.type&&(t.isViaGiveaway?u("ActionGiveawayResultPremiumText",{channel:g,months:t.months},{withNodes:!0,withMarkdown:!0,pluralValue:t.months,renderTextFilters:["br"]}):(0,V.AD)(u,"ActionGiftCodeSubscriptionText",n?.id===e,{peer:m,months:t.months},{pluralValue:t.months,renderTextFilters:["br"]})),"prizeStars"===t.type&&u("ActionGiveawayResultStarsText",{amount:t.stars,channel:g},{withNodes:!0,withMarkdown:!0,pluralValue:t.stars,renderTextFilters:["br"]})]})]}),(0,w.FD)("div",{className:T.A.actionButton,children:[(0,w.Y)(U.A,{preset:"button"}),u("giftCode"===t.type?"ActionOpenGiftButton":"ActionViewButton")]})]})})));var K=n(48775),O=n(80140),W=n(14242),z=n(66833),J=n(87094),q=n(87049);const Q=(0,i.ph)((0,o.EK)(((e,{message:t,action:n})=>{const i=(0,l.mBe)(e,e.currentUserId),o=(0,l.BWX)(e),s=(0,l.Y7C)(e,t),r=n.fromId?(0,l.PVB)(e,n.fromId):void 0,a=t.isOutgoing?(0,l.PVB)(e,t.chatId):i;return{canPlayAnimatedEmojis:o,sender:r||s,recipient:(n.peerId?(0,l.PVB)(e,n.peerId):void 0)||a,starGiftMaxConvertPeriod:e.appConfig?.starGiftMaxConvertPeriod}}))((({action:e,message:t,canPlayAnimatedEmojis:n,sender:o,recipient:s,starGiftMaxConvertPeriod:r,onClick:a,observeIntersectionForLoading:d,observeIntersectionForPlaying:l})=>{const m=(0,i.li)(),h=(0,i.li)(),p=(0,D.A)(),[A,f,v]=(0,C.A)(),{isOutgoing:I}=t,y=(0,z.yQ)(e.gift),F=I?s:o,b=F&&(0,E.vj)(F)&&(0,c.WX)(F),k=(0,J.A)(m,"background-color",!e.gift.availabilityTotal),P=p("ActionFallbackSomeone"),N=F&&(0,E.F9)(p,F),S=o?.id===s?.id,Y=(0,i.Kr)((()=>{const n=(0,V.Nm)(F?.id,N||P),i=void 0!==e.starsToConvert?(0,K.Kk)(p,e.starsToConvert):void 0;return e.isUpgraded?p("ActionStarGiftUpgraded"):e.alreadyPaidUpgradeStars?(0,V.AD)(p,"ActionStarGiftUpgradeText",!I||S,{peer:n}):e.isConverted?(0,V.AD)(p,"ActionStarGiftConvertedText",!I||S,{peer:n,amount:i}):r&&(0,O.Fm)()<t.date+r?(0,V.AD)(p,"ActionStarGiftConvertText",!I||S,{peer:n,amount:i}):b?p("ActionStarGiftChannelText",{amount:i},{withNodes:!0}):(0,V.AD)(p,"ActionStarGiftNoConvertText",!I||S,{peer:n})}),[e,P,b,I,p,t.date,F?.id,N,r,S]);return(0,w.FD)("div",{ref:m,className:(0,g.A)("interactive-gift",T.A.contentBox,T.A.starGift),tabIndex:0,role:"button",onClick:a,onMouseEnter:u.TF?void 0:f,onMouseLeave:u.TF?void 0:v,children:[(0,w.Y)("div",{ref:h,className:T.A.stickerWrapper,style:"width: 120px; height: 120px",children:y&&(0,w.Y)(R.A,{containerRef:h,sticker:y,size:120,shouldLoop:A,observeIntersectionForLoading:d,observeIntersectionForPlaying:l,noLoad:!n})}),Boolean(e.gift.availabilityTotal)&&(0,w.Y)(q.A,{color:k||"blue",text:p("ActionStarGiftLimitedRibbon",{total:(0,W.Vw)(p,e.gift.availabilityTotal)})}),(0,w.FD)("div",{className:T.A.info,children:[(0,w.Y)("h3",{className:T.A.title,children:S?p("ActionStarGiftSelf"):p(I?"ActionStarGiftTo":"ActionStarGiftFrom",{peer:(0,V.Nm)(F?.id,N||P)},{withNodes:!0})}),(0,w.FD)("div",{className:T.A.subtitle,children:[e.message&&(0,B.fd)(e.message),!e.message&&Y]})]}),(0,w.FD)("div",{className:T.A.actionButton,children:[(0,w.Y)(U.A,{preset:"button"}),!e.alreadyPaidUpgradeStars||e.isUpgraded||I?p("ActionViewButton"):p("ActionStarGiftUnpack")]})]})})));var H=n(95807),$=n(92108),X=n(40558);const Z=(0,i.ph)((0,o.EK)(((e,{message:t,action:n})=>{const i=(0,l.mBe)(e,e.currentUserId),o=(0,l.BWX)(e),s=(0,l.Y7C)(e,t),r=n.fromId?(0,l.PVB)(e,n.fromId):void 0,a=t.isOutgoing?(0,l.PVB)(e,t.chatId):i;return{canPlayAnimatedEmojis:o,sender:r||s,recipient:(n.peerId?(0,l.PVB)(e,n.peerId):void 0)||a}}))((({action:e,message:t,canPlayAnimatedEmojis:n,sender:o,recipient:s,onClick:r,observeIntersectionForLoading:a,observeIntersectionForPlaying:c})=>{const d=(0,i.li)(),l=(0,D.A)(),[m,h,p]=(0,C.A)(),{isOutgoing:A}=t,f=(0,z.yQ)(e.gift),v=(0,z.uc)(e.gift),I=v.model,y=v.pattern,F=v.backdrop,b=[F.centerColor,F.edgeColor],k=`${F.patternColor.slice(0,7)}55`,P=(0,i.Kr)((()=>[[l("ActionStarGiftUniqueModel"),I.name],[l("ActionStarGiftUniqueBackdrop"),F.name],[l("ActionStarGiftUniqueSymbol"),y.name]]),[l,I,y,F]),N=!A||e.isUpgrade,S=N&&!e.isUpgrade?o:s,Y=l("ActionFallbackSomeone"),G=S&&(0,E.F9)(l,S),M=o?.id===s?.id;return(0,w.FD)("div",{className:(0,g.A)("interactive-gift",T.A.contentBox,T.A.starGift,T.A.uniqueGift),tabIndex:0,role:"button",onClick:r,onMouseEnter:u.TF?void 0:h,onMouseLeave:u.TF?void 0:p,children:[(0,w.Y)("div",{className:T.A.uniqueBackgroundWrapper,children:(0,w.Y)(X.A,{className:T.A.uniqueBackground,backgroundColors:b,patternColor:F.patternColor,patternIcon:y.sticker,clearBottomSector:!0})}),(0,w.Y)("div",{ref:d,className:T.A.stickerWrapper,style:"width: 120px; height: 120px",children:f&&(0,w.Y)(R.A,{containerRef:d,sticker:f,size:120,shouldLoop:m,observeIntersectionForLoading:a,observeIntersectionForPlaying:c,noLoad:!n})}),(0,w.Y)(q.A,{color:k,text:l("ActionStarGiftUniqueRibbon")}),(0,w.FD)("div",{className:T.A.info,children:[(0,w.Y)("h3",{className:T.A.title,children:M?l("ActionStarGiftSelf"):l(N?"ActionStarGiftFrom":"ActionStarGiftTo",{peer:(0,V.Nm)(S?.id,G||Y)},{withNodes:!0})}),(0,w.Y)("div",{className:T.A.subtitle,style:`color: ${F.textColor}`,children:l("GiftUnique",{title:e.gift.title,number:e.gift.number})}),(0,w.Y)($.A,{data:P,style:`color: ${F.textColor}`,valueClassName:T.A.uniqueValue})]}),(0,w.FD)("div",{className:T.A.actionButton,style:(0,H.A)(k&&`background-color: ${k}`),children:[(0,w.Y)(U.A,{preset:"button"}),l("ActionViewButton")]})]})})));var _=n(87679),ee=n(62587),te=n(94189),ne=n(90751);const ie=(0,i.ph)((0,o.EK)(((e,{message:t})=>({peer:(0,l.PVB)(e,t.chatId)})))((({message:e,action:t,peer:n,observeIntersection:a})=>{const{openMediaViewer:d,uploadProfilePhoto:l,showNotification:u}=(0,o.ko)(),{isOutgoing:g}=e,m=t.photo,h=(0,D.A)(),[p,A]=(0,i.J0)(),[f,v,I]=(0,C.A)(!1),F=(0,ee.A)((0,c.rI)(m,"full")),b=(0,ee.A)((0,c.Pg)(m)),k=m.isVideo,P=(0,i.Kr)((()=>{const e=n&&(0,E.F9)(h,n)||h("ActionFallbackUser"),t=(0,V.Nm)(n?.id,e);return h(g?"ActionSuggestedPhotoYou":"ActionSuggestedPhoto",{user:t},{withNodes:!0})}),[h,g,n]),N=(0,y.A)((()=>{u({title:h("ActionSuggestedPhotoUpdatedTitle"),message:h("ActionSuggestedPhotoUpdatedDescription"),action:{action:"openSettingsScreen",payload:{screen:r.VS.Main}},actionText:h("Open")})})),S=(0,y.A)((e=>{A(void 0),l({file:e}),N()})),G=(0,y.A)((()=>{A(void 0)})),M=(0,y.A)((async()=>{if(!b)return;I(),N();const e=await(0,_.sZ)(b);l({file:new File([e],"avatar.mp4"),isVideo:!0,videoTs:m.videoSizes?.find((e=>void 0!==e.videoStartTs))?.videoStartTs})}));return(0,w.FD)("div",{className:T.A.contentBox,tabIndex:0,role:"button",onClick:async()=>{!g&&F?k?v():A(await(0,_.sZ)(F)):d({chatId:e.chatId,messageId:e.id,threadId:s.l3,origin:r.TQ.SuggestedAvatar})},children:[(0,w.Y)(Y.A,{className:T.A.suggestedAvatar,photo:t.photo,loopIndefinitely:!0,withVideo:!0,observeIntersection:a,size:"jumbo"}),(0,w.Y)("div",{className:T.A.suggestedText,children:P}),(0,w.Y)("div",{className:T.A.actionButton,children:h("ActionSuggestedPhotoButton")}),(0,w.Y)(ne.A,{file:p,onClose:G,onChange:S}),(0,w.Y)(te.A,{isOpen:f,title:h("ActionSuggestedVideoTitle"),confirmHandler:M,onClose:I,text:h("ActionSuggestedVideoText")})]})})));var oe=n(17663),se=n(4961),re=n(59030);const ae=(0,i.ph)((0,o.EK)(((e,{message:t})=>{const n=(0,l.Y7C)(e,t),i=(0,l.k2W)(e,t.chatId),o=(0,d.Q)(t);let s;if("message"===o?.type&&o.replyToMsgId){const n=(0,l.gMr)(e,t);n&&(s=(0,l.Y7C)(e,n))}const{appConfig:r}=e;return{sender:n,chat:i,originalSender:s,ageMinSeconds:r?.starsSuggestedPostAgeMin||a.Qep,isAdmin:!!i&&Boolean((0,l.ODG)(e,t.chatId))}}))((({message:e,action:t,sender:n,chat:i,originalSender:o,ageMinSeconds:s,isAdmin:r,onClick:c})=>{const d=(0,D.A)(),l=(0,re.A)(),{scheduleDate:u,amount:m}=t,h=i&&(0,E.em)(d,i),p=()=>(0,V.Nm)(i?.id,h||d("ActionFallbackChat")),A=o&&(0,E.em)(d,o),f=(0,V.Nm)(o?.id,A||d("ActionFallbackUser")),v=u?(0,oe.e0)(u,d,l):d("SuggestMessageAnytime"),C=!!u&&u<=(0,O.Fm)(),I=m?.currency,y=m?.amount||0,F=y>0?I===a.ykW?(0,K.QH)(d,(0,x.wD)(y)):(0,K.Kk)(d,y):void 0,b=(0,oe.A$)(d,s,!0);return(0,w.FD)("div",{className:(0,g.A)(T.A.contentBox,T.A.suggestedPostContentBox),onClick:c,children:[(0,w.Y)("div",{className:T.A.suggestedPostApprovalTitle,children:(0,se.A)(d("SuggestedPostAgreementReached"))}),(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(d,C?"SuggestedPostPublished":"SuggestedPostPublishSchedule",!r,{peer:p(),date:v},{withMarkdown:!0})}),F&&(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(d,"SuggestedPostCharged",!r,{user:f,amount:F},{withMarkdown:!0})}),C&&F&&(0,w.FD)(w.FK,{children:[(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(d,"SuggestedPostReceiveAmount",!r,{peer:p(),duration:b,currency:I===a.ykW?d("CurrencyTon"):d("CurrencyStars")},{withMarkdown:!0})}),(0,w.Y)("div",{className:T.A.suggestedPostApprovalSection,children:(0,V.AD)(d,"SuggestedPostRefund",!r,{peer:p(),duration:b,currency:I===a.ykW?d("CurrencyTon"):d("CurrencyStars")},{withMarkdown:!0})})]})]})}))),ce=(0,i.ph)((0,o.EK)(((e,{message:t})=>{const n=(0,l.Y7C)(e,t),i="message"===t.replyInfo?.type&&t.replyInfo.replyToMsgId?(0,l.O5q)(e,t.chatId,t.replyInfo.replyToMsgId):void 0;return{sender:n,replyMessageSender:i?(0,l.Y7C)(e,i):void 0,replyMessage:i}}))((({onClick:e,message:t,sender:n,replyMessageSender:i,replyMessage:s})=>{const{openStarsBalanceModal:r}=(0,o.ko)(),c=(0,D.A)(),d=(0,y.A)((e=>{e.preventDefault(),e.stopPropagation(),r({})})),l=i||n,u=l&&(0,E.em)(c,l),m=(0,V.Nm)(l?.id,u||c("ActionFallbackUser")),h=s?.suggestedPostInfo?.price?.currency||a.OUy,p=h===a.ykW?c("CurrencyTon"):c("CurrencyStars"),A=h===a.ykW?c("ButtonTopUpViaFragment"):c("ButtonBuyStars");return(0,w.FD)("div",{className:(0,g.A)(T.A.contentBox,T.A.suggestedPostBalanceTooLowBox),onClick:e,children:[(0,w.Y)("div",{className:T.A.suggestedPostBalanceTooLowTitle,children:c("SuggestedPostBalanceTooLow",{peer:m,currency:p},{withNodes:!0,withMarkdown:!0})}),!t.isOutgoing&&(0,w.FD)("div",{className:T.A.actionButton,onClick:d,children:[(0,w.Y)(U.A,{preset:"button"}),A]})]})})));var de=n(18276);const le=(0,i.ph)((0,o.EK)(((e,{message:t})=>({sender:(0,l.Y7C)(e,t)})))((({message:e,action:t,sender:n,onClick:i})=>{const o=(0,D.A)(),{isOutgoing:s}=e,{rejectComment:r}=t,a=n&&(0,E.F9)(o,n),c=(0,V.Nm)(n?.id,a||o("ActionFallbackUser"));return(0,w.FD)("div",{className:(0,g.A)(T.A.contentBox,T.A.suggestedPostRejectedContentBox),onClick:i,children:[(0,w.FD)("div",{className:T.A.suggestedPostRejectedTitle,children:[(0,w.Y)(de.A,{className:T.A.rejectedIcon,name:"close"}),(0,V.AD)(o,r?"SuggestedPostRejectedWithReason":"SuggestedPostRejected",s,{peer:c},{withMarkdown:!0})]}),r&&(0,w.Y)("div",{className:T.A.suggestedPostRejectedComment,children:o("SuggestedPostRejectedComment",{comment:r})})]})})));var ue=n(99515),ge=n(43581),me=n(14737),he=n(48894);var pe=n(36838),Ae=n(64493),fe=n(55158);const ve="d8axZxyN",Ce="glDpC2av",Ie="gqCs9fSo",ye="gnYhwnvf",Fe="HWgwnKui",be="BTNQ4KBH",ke="Xl9MVMTn",Pe="Qizai7yv";function Ne({channel:e}){const{openChat:t}=(0,o.ko)(),n=function(e,t="#00000000"){const[n,o]=(0,i.J0)(t),r=(0,ee.A)((0,c.cP)(e),!1,s.qZ.BlobUrl);return(0,i.vJ)((()=>{(async()=>{if(!r)return;const e=await(0,he.rX)(r);o(`#${(0,he.v2)(e)}`)})()}),[r]),n}(e,"#3C3C4399"),r=(0,D.A)();return(0,w.FD)("div",{className:Ce,onClick:()=>t({id:e.id}),children:[(0,w.Y)(Y.A,{className:Ie,size:"large",peer:e},e.id),(0,w.FD)("div",{style:`background: ${n}`,className:ye,children:[(0,w.Y)(de.A,{name:"user-filled",className:ve}),(0,w.Y)("span",{className:Fe,children:(0,W.Vw)(r,e?.membersCount||0)})]}),(0,w.Y)("span",{className:be,children:e.title})]})}function Se({channel:e,chatId:t,channelsCount:n,isCurrentUserPremium:i}){const{openPremiumModal:s,openChatWithInfo:r}=(0,o.ko)(),a=(0,re.A)();return(0,w.FD)("div",{className:(0,g.A)(Ce,"MBChXyXk"),onClick:()=>{i?r({id:t,shouldReplaceHistory:!0,profileTab:"similarChannels",forceScrollProfileTab:!0}):s()},children:[(0,w.Y)(Y.A,{className:Ie,size:"large",peer:e},e.id),(0,w.Y)("div",{className:ke,children:(0,w.Y)("div",{className:Pe})}),(0,w.Y)("div",{className:(0,g.A)(ke,"JxSmtOFi"),children:(0,w.Y)("div",{className:Pe})}),(0,w.FD)("div",{className:ye,children:[(0,w.Y)("span",{className:Fe,children:`+${n}`}),!i&&(0,w.Y)(de.A,{name:"lock-badge",className:ve})]}),(0,w.Y)("span",{className:be,children:a("MoreSimilar")})]})}const Ye=(0,i.ph)((0,o.EK)(((e,{chatId:t})=>{const{similarChannelIds:n,isExpanded:i,count:o}=(0,l.dg4)(e,t)||{},s=(0,l.g29)(e),r=(0,l.AWZ)(e,t);return{similarChannelIds:n,isExpanded:i,count:o,isCurrentUserPremium:s,channelJoinInfo:r?.joinInfo}}))((({chatId:e,similarChannelIds:t,isExpanded:n,count:s,isCurrentUserPremium:r,channelJoinInfo:a})=>{const{toggleChannelRecommendations:c,loadChannelRecommendations:d}=(0,o.ko)(),u=(0,re.A)(),[m,h,p]=(0,C.A)(!1),[A,f,v]=(0,C.A)(!1),I=(0,i.li)(),F=(0,i.li)(!1),b=(0,i.Kr)((()=>{if(!t)return;const e=(0,o.mS)();return t.map((t=>(0,l.hds)(e,t))).filter(Boolean)}),[t]),[k,P]=(0,i.J0)(!1),N=(0,i.Kr)((()=>b?.slice(0,10)),[b]),S=Boolean(N?.length),Y=Boolean(!k&&(n||A||m)&&S);(0,pe.A)(I,!Y,!0),(0,i.vJ)((()=>{t||d({chatId:e})}),[e,t]),(0,me.A)((()=>P(!1)),2e3),(0,i.vJ)((()=>{if(k&&b&&n){const e=setTimeout((()=>{P(!1)}),300);return()=>clearTimeout(e)}}),[b,n,k]),(0,i.vJ)((()=>{n?(h(),v(),P(!t),F.current||setTimeout((()=>{I.current?.scrollIntoView({behavior:"smooth"})}),150)):(p(),f())}),[n,t]);const T=(0,y.A)((()=>{c({chatId:e})}));if((0,i.vJ)((()=>{a?.joinedDate&&!n&&(0,O.Fm)()-a.joinedDate<=10&&(T(),F.current=!0)}),[a,n]),Y||k)return(0,w.FD)("div",{className:(0,g.A)("V3RHiOJR"),children:[k&&(0,w.Y)(fe.A,{className:"xKVZv7KE"}),Y&&(0,w.FD)("div",{className:(0,g.A)(m&&"eb8rX09E",A&&"XR6_qLCc"),children:[(0,w.Y)("div",{className:"tfG_BSDt",children:(0,w.Y)("svg",{width:"19",height:"7",viewBox:"0 0 19 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,w.Y)("path",{className:"HVbeGv4t","fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 7C16.8992 7 13.59 3.88897 11.5003 1.67424C10.7648 0.894688 10.397 0.50491 10.0434 0.385149C9.70568 0.270811 9.4225 0.270474 9.08456 0.38401C8.73059 0.50293 8.36133 0.892443 7.62279 1.67147C5.52303 3.88637 2.18302 7 0 7L19 7Z",fill:"white"})})}),(0,w.FD)("div",{className:"njAC8dR9",children:[(0,w.FD)("div",{className:"s7QOi22Q",children:[(0,w.Y)("span",{className:"JstcOhAN",children:u("SimilarChannels")}),(0,w.Y)(Ae.A,{className:"meewH7t_",color:"translucent",onClick:T,children:(0,w.Y)(de.A,{name:"close"})})]}),(0,w.Y)("div",{ref:I,className:(0,g.A)("h4gWlNen","no-scrollbar"),children:N?.map(((t,n)=>9===n?(0,w.Y)(Se,{channel:t,chatId:e,channelsCount:s-10+1,isCurrentUserPremium:r}):(0,w.Y)(Ne,{channel:t})))})]})]})]})}))),Te=new Set(["pinMessage","chatEditPhoto","chatDeletePhoto","todoCompletions","todoAppendTasks","unsupported"]),we=new Set(["giftCode","prizeStars","suggestProfilePhoto","suggestedPostApproval"]),Ge=(0,i.ph)((0,o.EK)(((e,{message:t,threadId:n})=>{const i=(0,l.nTw)(e),{themes:o}=e.settings,r=(0,l.hds)(e,t.chatId),a=(0,l.Y7C)(e,t),c=r?.isForum&&n!==s.l3,{replyToMsgId:u,replyToPeerId:g}=(0,d.Q)(t)||{},m=u?(0,l.O5q)(e,g||t.chatId,u):void 0,h=!!n&&(0,l.nJv)(e,t,n),{direction:p,noHighlight:A,isResizingContainer:f,scrollTargetPosition:v}=h&&i.focusedMessage||{},C=(0,l.g29)(e),I=r?.unreadReactions?.includes(t.id),y=(0,l.trm)(e);return{sender:a,currentUserId:e.currentUserId,isCurrentUserPremium:C,isFocused:h,focusDirection:p,noFocusHighlight:A,isInsideTopic:c,replyMessage:m,isInSelectMode:(0,l.rTV)(e),patternColor:o[(0,l.SJA)(e)]?.patternColor,hasUnreadReaction:I,isResizingContainer:f,scrollTargetPosition:v,isAccountFrozen:y}}))((({message:e,threadId:t,sender:n,currentUserId:s,appearanceOrder:l,isJustAdded:S,isLastInList:Y,memoFirstUnreadIdRef:G,getIsMessageListReady:x,isInsideTopic:B,isFocused:D,focusDirection:U,noFocusHighlight:R,replyMessage:E,patternColor:V,isCurrentUserPremium:K,isInSelectMode:O,hasUnreadReaction:W,isResizingContainer:z,scrollTargetPosition:J,onIntersectPinnedMessage:q,observeIntersectionForBottom:H,observeIntersectionForLoading:$,observeIntersectionForPlaying:X,isAccountFrozen:_})=>{const{requestConfetti:ee,openMediaViewer:te,getReceipt:ne,checkGiftCode:oe,openPrizeStarsTransactionFromGiveaway:se,openPremiumModal:re,openStarsTransactionFromGift:de,openGiftInfoModalFromMessage:me,toggleChannelRecommendations:he,animateUnreadReaction:pe,markMentionsRead:Ae,focusMessage:fe}=(0,o.ko)(),ve=(0,i.li)(),{id:Ce,chatId:Ie}=e,ye=e.content.action,Fe=(0,m.iL)(Ce),be=we.has(ye.type),ke=Te.has(ye.type),Pe=u.uH&&!ke,Ne="suggestedPostSuccess"===ye.type,Se=(0,d.Q)(e),{replyToMsgId:Ge,replyToPeerId:Me}=Se||{},xe=Boolean(e.areReactionsPossible&&e?.reactions?.results?.length),Be=B&&"topicCreate"===ye.type,{isTouchScreen:De}=(0,A.Ay)();(0,I.mv)(ve,Be?void 0:H),(0,F.A)(ve,!Be&&Y&&"channelJoined"!==ye.type),(0,v.A)(Me||Ie,Ge,E,Ce),(0,P.A)({elementRef:ve,chatId:Ie,isFocused:D,focusDirection:U,noFocusHighlight:R,isResizingContainer:z,isJustAdded:S,scrollTargetPosition:J}),(0,i._W)((()=>{e.isPinned&&q?.({viewportPinnedIdsToRemove:[e.id]})}));const{isContextMenuOpen:Ue,contextMenuAnchor:Re,handleBeforeContextMenu:Le,handleContextMenu:Ee,handleContextMenuClose:Ve,handleContextMenuHide:je}=(0,f.A)(ve,De&&O||_,!u.cp,u.Ni,x),Ke=void 0!==Re,Oe=l<=0,[We,ze]=(0,C.A)(Oe);(0,i.vJ)((()=>{Oe||setTimeout(ze,l*a.zq7)}),[l,ze,Oe]);const{ref:Je}=(0,b.A)({isOpen:We,noOpenTransition:Oe,noCloseTransition:!0,className:!1,ref:ve});(0,i.vJ)((()=>{const t=ve.current;t&&(0,h.Y)(t)&&(W&&pe({messageIds:[Ce]}),e.hasUnreadMention&&Ae({chatId:Ie,messageIds:[Ce]}))}),[W,Ie,Ce,pe,e.hasUnreadMention]),(0,i.vJ)((()=>{"giftPremium"===ye.type&&(G?.current&&Ce>=G.current||Fe)&&ee({})}),[ye.type,Ce,Fe,G]);const qe=(0,k.A)(Pe?V:void 0),Qe=(0,y.A)((()=>{switch(ye.type){case"paymentSent":case"paymentRefunded":ne({chatId:e.chatId,messageId:e.id});break;case"chatEditPhoto":te({chatId:e.chatId,messageId:e.id,threadId:t,origin:r.TQ.ChannelAvatar});break;case"giftCode":oe({slug:ye.slug,message:{chatId:e.chatId,messageId:e.id}});break;case"prizeStars":se({chatId:e.chatId,messageId:e.id});break;case"giftPremium":re({isGift:!0,fromUserId:n?.id,toUserId:n&&n.id===s?Ie:s,monthsAmount:ye.months});break;case"giftTon":case"giftStars":de({chatId:e.chatId,messageId:e.id});break;case"starGift":case"starGiftUnique":me({chatId:e.chatId,messageId:e.id});break;case"channelJoined":he({chatId:Ie});break;case"suggestedPostApproval":{const n=(0,d.Q)(e);"message"===n?.type&&n.replyToMsgId&&fe({chatId:e.chatId,threadId:t,messageId:n.replyToMsgId});break}case"suggestedPostSuccess":{const n=(0,d.Q)(e);"message"===n?.type&&n.replyToMsgId&&fe({chatId:e.chatId,threadId:t,messageId:n.replyToMsgId});break}}})),He=(0,i.Kr)((()=>{switch(ye.type){case"chatEditPhoto":if(!ye.photo)return;return(0,w.Y)(M,{action:ye,observeIntersection:$,onClick:Qe});case"suggestProfilePhoto":return(0,w.Y)(ie,{message:e,action:ye,observeIntersection:$});case"prizeStars":case"giftCode":return(0,w.Y)(j,{action:ye,sender:n,observeIntersectionForLoading:$,observeIntersectionForPlaying:X,onClick:Qe});case"giftPremium":case"giftTon":case"giftStars":return(0,w.Y)(L,{action:ye,observeIntersectionForLoading:$,observeIntersectionForPlaying:X,onClick:Qe});case"starGift":return(0,w.Y)(Q,{action:ye,message:e,observeIntersectionForLoading:$,observeIntersectionForPlaying:X,onClick:Qe});case"starGiftUnique":return(0,w.Y)(Z,{action:ye,message:e,observeIntersectionForLoading:$,observeIntersectionForPlaying:X,onClick:Qe});case"channelJoined":return(0,w.Y)(Ye,{chatId:e.chatId});case"suggestedPostApproval":return ye.isBalanceTooLow?(0,w.Y)(ce,{message:e,action:ye,onClick:Qe}):ye.isRejected?(0,w.Y)(le,{message:e,action:ye,onClick:Qe}):(0,w.Y)(ae,{message:e,action:ye,onClick:Qe});default:return}}),[ye,e,$,n,X]);if(!(B&&"topicCreate"===ye.type||"phoneCall"===ye.type))return(0,w.FD)("div",{ref:Je,id:(0,c.GZ)(Ce),className:(0,g.A)("ActionMessage","message-list-item",T.A.root,ke&&T.A.singleLine,Pe&&T.A.fluidMultiline,He&&T.A.hasFullContent,D&&!R&&"focused",Ke&&"has-menu-open",Y&&"last-in-list"),"data-message-id":e.id,"data-is-pinned":e.isPinned||void 0,"data-has-unread-mention":e.hasUnreadMention||void 0,"data-has-unread-reaction":W||void 0,onMouseDown:e=>{(0,p.l)(e),Le(e)},onContextMenu:Ee,children:[!be&&(0,w.FD)(w.FK,{children:[Pe&&(0,w.Y)("div",{className:(0,g.A)(T.A.inlineWrapper,Ne&&T.A.hoverable),children:(0,w.Y)("span",{className:T.A.fluidBackground,style:qe,children:(0,w.Y)(N.A,{message:e,isInsideTopic:B})})}),(0,w.Y)("div",{className:(0,g.A)(T.A.inlineWrapper,Ne&&T.A.hoverable),children:(0,w.Y)("span",{className:T.A.textContent,onClick:Qe,children:(0,w.Y)(N.A,{message:e,isInsideTopic:B})})})]}),He,Re&&(0,w.Y)(ue.A,{isOpen:Ue,anchor:Re,message:e,messageListType:"thread",className:T.A.contextContainer,onClose:Ve,onCloseAnimationEnd:je}),xe&&(0,w.Y)(ge.A,{isOutside:!0,message:e,threadId:t,observeIntersection:X,isCurrentUserPremium:K,isAccountFrozen:_})]})})))},48196:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(84051),o=n(31481),s=n(28470),r=n(20021);const a=new Map;class c{referenceCount=0;constructor(e){this.color=e,this.filterId=`fluid-background-filter-${e.slice(1)}`,(0,s.z)((0,r.FD)("filter",{"color-interpolation-filters":"sRGB",xmlns:o.jNX,children:[(0,r.Y)("feGaussianBlur",{in:"SourceAlpha",stdDeviation:"4",result:"blur"}),(0,r.Y)("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 30 -15",result:"goo"}),(0,r.Y)("feComposite",{in:"SourceAlpha",in2:"goo",operator:"over",result:"outline"}),(0,r.Y)("feFlood",{"flood-color":e,result:"color"}),(0,r.Y)("feComposite",{in:"color",in2:"outline",operator:"in"})]}),this.filterId)}getFilterId(){return this.referenceCount+=1,this.filterId}removeReference(){this.referenceCount-=1,0===this.referenceCount&&(0,s.e)(this.filterId)}isUsed(){return this.referenceCount>0}}function d(e,t){if((0,i.vJ)((()=>{if(e)return()=>{const t=a.get(e);t&&(t.removeReference(),t.isUsed()||a.delete(t.color))}}),[e]),!e)return;if(a.has(e))return l(a.get(e).getFilterId(),t);const n=new c(e);return a.set(e,n),l(n.getFilterId(),t)}function l(e,t){return t?`url(#${e})`:`filter: url(#${e});`}},87049:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(84051),o=n(13439),s=n(60919),r=n(87357),a=n(14745);const c={root:"AmQSvxpZ",text:"pQW7dcwr"};var d=n(20021);const l={red:[["#FF5B54","#ED1C26"],["#653633","#532224"]],blue:[["#6ED2FF","#34A4FC"],["#344F5A","#152E42"]],purple:[["#E367D7","#757BF6"],["#E367D7","#757BF6"]],green:[["#52D553","#4BB121"],["#52D553","#4BB121"]],orange:[["#D48F23","#BE7E15"],["#D48F23","#BE7E15"]]},u=new Set(Object.keys(l)),g=(0,i.ph)((0,o.EK)((e=>({theme:(0,s.SJA)(e)})))((({text:e,color:t,className:n,theme:i})=>{const o=`svg-${(0,a.A)()}`,s=u.has(t)?t:void 0,g="dark"===i,m=Array.isArray(t)?t:s?l[s][g?1:0]:void 0,h=m?m[0]:t,p=m?m[1]:t;return(0,d.FD)("div",{className:(0,r.A)(c.root,n),children:[(0,d.FD)("svg",{className:c.ribbon,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",children:[(0,d.Y)("path",{d:"M52.4851 26.4853L29.5145 3.51472C27.2641 1.26428 24.2119 0 21.0293 0H2.82824C1.04643 0 0.154103 2.15429 1.41403 3.41422L52.5856 54.5858C53.8455 55.8457 55.9998 54.9534 55.9998 53.1716V34.9706C55.9998 31.788 54.7355 28.7357 52.4851 26.4853Z",fill:`url(#${o})`}),(0,d.Y)("defs",{children:(0,d.FD)("linearGradient",{id:o,x1:"27.9998",y1:"1",x2:"27.9998",y2:"55",gradientUnits:"userSpaceOnUse",children:[(0,d.Y)("stop",{"stop-color":h}),(0,d.Y)("stop",{offset:"1","stop-color":p})]})})]}),(0,d.Y)("div",{className:c.text,children:e})]})})))},92108:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(84051),o=n(87357);var s=n(20021);const r=(0,i.ph)((({data:e,style:t,className:n,valueClassName:i,keyClassName:r})=>(0,s.Y)("div",{className:(0,o.A)("cKr8J5k_",n),style:t,children:e.map((([e,t])=>(0,s.FD)(s.FK,{children:[(0,s.Y)("div",{className:(0,o.A)("c9RLLvfs",r),children:e}),(0,s.Y)("div",{className:(0,o.A)("QEuGpzIc",i),children:t})]})))})))}}]);
|
|
//# sourceMappingURL=5278.51f2018b7529760f7a25.js.map
|