Build 614181stable
Module 879732
2,963 characters · in 5f31bc25e399ea3e.jsDependencies
Source Raw
function(l,n,t){t.d(n,{default:()=>w});var e=t(477900),i=t(582128),r=t(17928),a=t(980707),s=t(477782),d=t(442433),o=t(847767),u=t(358367),c=t(212245),A=t(793574),E=t(688810),b=t(50268),h=t(346247),g=t(504049),C=t(696451),G=t(977997),M=t(291247),T=t(239211),U=t(399476),_=t(301541),x=t(252726),p=t(845625),N=t(877133),j=t(995786),m=t(734057),y=t(232835),O=t(576705),S=t(652215),f=t(375708),I=t(192308),L=t(260509),P=t(71393),k=t(287809),D=t(243949),X=t(180798);let w=(0,u.A)((0,o.A)(function(l){let n,o,{user:u,guildId:w,channelId:Z,context:v,onSelect:W,moderationAlertId:q,analyticsLocation:B,analyticsLocations:R,onCloseContextMenu:V,showTransferOwnershipItem:Y}=l,{analyticsLocations:z}=(0,E.Ay)(A.A.CONTEXT_MENU),F=(0,c.p)(),J=R?.[0]??z[0],$=(0,g.$9)(w,{location:J,targetUserId:u.id}),H=(0,r.bG)([G.A],()=>G.A.getUserVoiceChannelId(w,u.id)??void 0,[w,u.id]),K=i.useCallback(()=>{$(g.Nj.COPY_ID)},[$]),Q=(0,r.bG)([C.Ay],()=>C.Ay.isMember(w,u.id),[w,u.id]),ll=(0,D.A)({userId:u.id,guildId:w,sourceAnalyticsLocations:R}),ln=(0,_.A)(u.id,v),lt=(0,h.A)({guildId:w,userId:u.id,analyticsLocation:B??F.location,analyticsLocations:[J],context:v}),le=(0,T.A)({user:u,guildId:w,location:J,channelId:Z}),li=(0,U.A)({user:u,guildId:w,location:J,channelId:Z}),lr=(0,M.A)(u,w,Z??H,J),la=function(l,n){let t=(0,r.bG)([O.A],()=>null!=l&&O.A.canWithPartialContext(S.xBc.MANAGE_MESSAGES,{channelId:l}),[l]),i=(0,r.bG)([m.A],()=>m.A.getChannel(l),[l]),a=(0,r.bG)([y.A],()=>null!=l&&null!=n?y.A.getMessage(l,n):null),d=(0,N.kZ)(null!=a?a:null);if(null==i||null==a)return null;let o=null!=d&&d.actions.hasOwnProperty(p.G.SET_COMPLETED)?p.G.UNSET_COMPLETED:p.G.SET_COMPLETED,u=o===p.G.SET_COMPLETED?f.intl.string(f.t.VWNyUu):f.intl.string(f.t.l9GqxI);return t&&null!=n?(0,e.jsx)(s.Dr,{id:"mark-automod-alert-completed",label:u,action:()=>{(0,j.E5)(n,i,o)}},"mark-automod-alert-completed"):null}(Z,q),ls=(n=(0,r.bG)([k.default],()=>k.default.getCurrentUser()),null==(o=(0,r.bG)([P.A],()=>P.A.getGuild(w)))||null==n||u.id===o.ownerId||u.bot||!(0,L.ok)(o,n)?null:(0,e.jsx)(s.Dr,{id:"transfer-ownership",color:"danger",label:f.intl.string(f.t.Z5s7PM),action:()=>(0,I.openModalLazy)(async()=>{let{default:l}=await Promise.all([t.e("734027"),t.e("577084"),t.e("278410")]).then(t.bind(t,753031));return t=>(0,e.jsx)(l,{...t,guild:o,fromUser:n,toUser:u})})})),ld=(0,X.A)(u.id,w,!1,J),lo=(0,b.A)({id:u.id,label:f.intl.string(f.t["/AXYnE"]),onSuccess:K}),lu=(0,x.A)(u,w),lc=!!u?.isNonUserBot();return(0,e.jsxs)(a.W,{"data-menu-migrated":!0,navId:"user-context",onClose:function(){(0,d.Z_)(),V?.()},"aria-label":f.intl.string(f.t.liqwPJ),onSelect:W,children:[!lc&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(s.rX,{children:[ll,ln]}),(0,e.jsxs)(s.rX,{children:[lt,li,le]}),Q&&(0,e.jsxs)(s.rX,{children:[ld,lr,lu]}),null!=q?la:null,Y&&null!=ls?(0,e.jsx)(s.rX,{children:ls}):null]}),(0,e.jsx)(s.rX,{children:lo})]})},{object:S.ZSU.CONTEXT_MENU}),[A.A.CONTEXT_MENU,A.A.GUILD_MODERATION_USER_MENU])}