revenge-plugins/server-drawer/install/index.js
2026-08-01 18:37:30 +00:00

1 line
20 KiB
JavaScript

(function(F,ue,y,i,a,n,o,le,G,ae,_e){"use strict";function ze(e){const t=i.findByProps("useIsMobileQuestDockRendered");if(!t?.useIsMobileQuestDockRendered)return!1;const r=t.useIsMobileQuestDockRendered;return t.useIsMobileQuestDockRendered=function(...s){return r.apply(this,s),!0},e.push(function(){t.useIsMobileQuestDockRendered=r}),!0}function Ue(e){const t=i.findByProps("useIsMobileQuestDockRenderedBase");if(!t?.useIsMobileQuestDockRenderedBase)return!1;const r=t.useIsMobileQuestDockRenderedBase;return t.useIsMobileQuestDockRenderedBase=function(...s){return r.apply(this,s),!0},e.push(function(){t.useIsMobileQuestDockRenderedBase=r}),!0}function ve(e){const t=i.findByProps("useMobileQuestDock");if(!t?.useMobileQuestDock)return!1;const r=t.useMobileQuestDock;return t.useMobileQuestDock=function(...s){return r.apply(this,s)||{id:"server-drawer",config:{quest_content_type:0,assets:{questBarHeroVideo:null,questBarHero:null},features:[]},userStatus:{enrolledAt:"2099-01-01",claimedAt:null},benefits:{rewards:[]},guildId:"0",tasks:[]}},e.push(function(){t.useMobileQuestDock=r}),!0}const qe="[ServerDrawer]";function Je(e){const t=i.findByProps("getQuestAsset");if(!t?.getQuestAsset)return console.log(qe,"WARN: getQuestAsset not found"),!1;const r=t.getQuestAsset;return t.getQuestAsset=function(...s){try{return r.apply(this,s)}catch{return{url:null,isAnimated:!1}}},e.push(function(){t.getQuestAsset=r}),!0}const Xe=i.findByStoreName("GuildStore"),Ke=i.findByProps("colors","unsafe_rawColors")?.colors;function ce({id:e,size:t=48}){const r=Xe?.getGuild(e);if(!r)return null;const s=t>=40?16:8;return r.icon?n.createElement(o.Image,{source:{uri:`https://cdn.discordapp.com/icons/${r.id}/${r.icon}.png?size=${t*2}`},style:{width:t,height:t,borderRadius:s}}):n.createElement(o.View,{style:[de.fallback,{width:t,height:t,borderRadius:s,backgroundColor:Ke?.BG_ACCENT??"#5865f2"}]},n.createElement(o.Text,{style:[de.letter,{fontSize:Math.max(10,t*.4)}]},r.name?.split(" ").map(function(u){return u[0]}).join("").slice(0,2).toUpperCase()||"?"))}const de=o.StyleSheet.create({fallback:{alignItems:"center",justifyContent:"center"},letter:{color:"#fff",fontWeight:"700"}}),Ye=i.findByStoreName("ThemeStore"),Ze=i.find(function(e){return e?.default?.internal?.resolveSemanticColor})?.default?.internal?.resolveSemanticColor??i.find(function(e){return e?.meta?.resolveSemanticColor})?.meta?.resolveSemanticColor??function(){};function $e(e,t=Ye?.theme){if(e)try{return Ze(t,e)}catch{return}}const fe=i.findByProps("TextStyleSheet")?.TextStyleSheet,pe=i.findByProps("triggerHapticFeedback","HapticFeedbackTypes");function Q(e,t){return $e(e)??t}const B=12,v=12,ge=42,q=220,he=4,I=16,M=20,ye={tension:200,friction:20};function Ne({visible:e,items:t,title:r,anchorX:s,anchorY:u,onClose:d}){const{width:f,height:k}=o.Dimensions.get("window"),w=(r?v+20+he:0)+t.length*ge;let m=s,g=u+48+10;m+q>f-B&&(m=f-q-B),m<B&&(m=B),g+w>k-B&&(g=u-w-10),g<B&&(g=B);const R=Q(G.semanticColors?.BACKGROUND_SURFACE_HIGHEST,"#1e1f22"),l=Q(G.semanticColors?.BORDER_SUBTLE,"#3f4147"),b=Q(G.semanticColors?.TEXT_STRONG,"#f2f3f5"),ne=Q(G.semanticColors?.BACKGROUND_MOD_SUBTLE,"rgba(255,255,255,0.06)"),D=n.useRef(new o.Animated.Value(0)).current,P=n.useRef(new o.Animated.Value(.5)).current,h=n.useRef(new o.Animated.Value(0)).current,[oe,re]=n.useState(!1),V=n.useRef(!1);n.useEffect(function(){e&&!V.current&&(re(!0),D.setValue(0),P.setValue(.5),h.setValue(0),o.Animated.parallel([o.Animated.timing(D,{toValue:1,duration:150,useNativeDriver:!0}),o.Animated.spring(P,{toValue:1,useNativeDriver:!0,...ye}),o.Animated.spring(h,{toValue:1,useNativeDriver:!0,...ye})]).start())},[e]);const H=n.useCallback(function(){V.current||(V.current=!0,o.Animated.parallel([o.Animated.timing(D,{toValue:0,duration:120,useNativeDriver:!0}),o.Animated.timing(P,{toValue:.8,duration:120,useNativeDriver:!0}),o.Animated.timing(h,{toValue:0,duration:120,useNativeDriver:!0})]).start(function(){V.current=!1,re(!1),d()}))},[d]);return oe?n.createElement(o.Modal,{transparent:!0,visible:oe,onRequestClose:H,statusBarTranslucent:!0},n.createElement(o.Pressable,{style:J.root,onPress:H},n.createElement(o.Animated.View,{style:[J.backdrop,{opacity:D}]}),n.createElement(o.Animated.View,{style:[J.container,{left:m,top:g,backgroundColor:R,borderColor:l,minWidth:q,opacity:h,transform:[{scale:P}]}]},r?n.createElement(o.View,null,n.createElement(o.Text,{style:[fe?.["text-md/bold"],{color:b,paddingHorizontal:v,paddingTop:13,paddingBottom:12}]},r),n.createElement(o.View,{style:{borderBottomWidth:he,borderBottomColor:l}})):null,t.map(function(E,C){const ie=C===0&&!r,se=C===t.length-1,_t=!!(E.iconSource||E.IconComponent);return n.createElement(o.Pressable,{key:C,style:function({pressed:zt}){return{paddingHorizontal:v,paddingVertical:10,minHeight:ge,flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:8,backgroundColor:zt?ne:"transparent",borderTopLeftRadius:ie?I:0,borderTopRightRadius:ie?I:0,borderBottomLeftRadius:se?I:0,borderBottomRightRadius:se?I:0,borderBottomWidth:!ie&&!se?1:0,borderBottomColor:l}},onPress:function(){pe?.triggerHapticFeedback?.(pe.HapticFeedbackTypes.IMPACT_LIGHT),H(),E.action?.()}},n.createElement(o.Text,{style:[fe?.["text-md/medium"],{flexShrink:1,color:b}]},E.label),_t?n.createElement(o.View,{style:{width:M,height:M,alignItems:"center",justifyContent:"center"}},E.IconComponent?n.createElement(E.IconComponent,{size:"sm",color:b}):E.iconSource?n.createElement(o.Image,{source:E.iconSource,style:{width:M,height:M,tintColor:b}}):null):null)})))):null}const J=o.StyleSheet.create({root:{flex:1},backdrop:{...o.StyleSheet.absoluteFill,backgroundColor:"rgba(0,0,0,0.55)"},container:{position:"absolute",borderWidth:1,borderRadius:I,overflow:"hidden",elevation:20,shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.24,shadowRadius:24}}),W=48,me=i.findByProps("useStateFromStores"),O=i.findByStoreName("GuildReadStateStore"),et=i.findByStoreName("GuildStore"),tt=i.findByStoreName("SortedGuildStore"),be=i.findByProps("triggerHapticFeedback","HapticFeedbackTypes");function nt({guildId:e}){le.useProxy(y.storage);const t=me?.useStateFromStores?.([O],function(){return O?.getMentionCount?.(e)??0},[e])??0,r=me?.useStateFromStores?.([O],function(){return O?.hasUnread?.(e)??!1},[e])??!1;return y.storage.showUnreadBadges?t>0?n.createElement(o.View,{style:A.outline},n.createElement(o.View,{style:A.badge},n.createElement(o.Text,{style:A.text},t>99?"99+":String(t)))):r?n.createElement(o.View,{style:A.dotOutline},n.createElement(o.View,{style:A.dot})):null:null}function Ee({node:e,onPick:t}){const r=n.useRef(null),s=n.useRef(new o.Animated.Value(1)).current,u=function(){return o.Animated.spring(s,{toValue:.85,useNativeDriver:!0}).start()},d=function(){return o.Animated.spring(s,{toValue:1,useNativeDriver:!0}).start()},[f,k]=n.useState({visible:!1,items:[],title:"",x:0,y:0}),w=n.useCallback(function(){const R=e.id,l=et?.getGuild?.(R),b=i.find(function(h){return h?.default?.name==="getGuildsBarGuildMenuItems"})?.default??i.find(function(h){return typeof h?.default=="function"&&h.default.length<=2&&/guild/i.test(h.default.name??"")})?.default;if(!l||!b)return;const ne=tt?.getGuildsTree?.()?.version,D=b(R,ne);if(!D?.length)return;const P=r.current;P?.measure&&P.measure(function(h,oe,re,V,H,E){k({visible:!0,items:D.map(function(C){return{label:C.label??C.title??"Unknown",action:C.action,danger:C.variant==="destructive",iconSource:C.iconSource,IconComponent:C.IconComponent}}),title:l.name,x:H,y:E})})},[e.id]),m=n.useCallback(function(){be?.triggerHapticFeedback?.(be.HapticFeedbackTypes.IMPACT_MEDIUM),w()},[w]),g=e.id;return n.createElement(n.Fragment,null,n.createElement(o.Pressable,{onPressIn:u,onPressOut:d,onPress:function(){return t(g)},onLongPress:m,delayLongPress:500},n.createElement(o.View,{ref:r,style:Ce.outer,collapsable:!1},n.createElement(o.Animated.View,{style:[Ce.icon,{transform:[{scale:s}]}]},n.createElement(ce,{id:g})),n.createElement(nt,{guildId:g}))),n.createElement(Ne,{visible:f.visible,items:f.items,title:f.title,anchorX:f.x,anchorY:f.y,onClose:function(){return k(function(R){return{...R,visible:!1}})}}))}const Ce=o.StyleSheet.create({outer:{width:W,height:W},icon:{width:W,height:W,borderRadius:16,overflow:"hidden"}}),A=o.StyleSheet.create({outline:{position:"absolute",bottom:-3,right:-3,minWidth:23,minHeight:23,borderRadius:12,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},badge:{minWidth:19,height:19,borderRadius:9,backgroundColor:"#ed4245",alignItems:"center",justifyContent:"center",paddingHorizontal:5},text:{color:"#fff",fontSize:10,fontWeight:"700",lineHeight:19},dotOutline:{position:"absolute",bottom:-2,right:-2,width:14,height:14,borderRadius:7,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},dot:{width:10,height:10,borderRadius:5,backgroundColor:"#ed4245"}}),ot=i.findByProps("useStateFromStores");i.findByProps("colors","unsafe_rawColors")?.colors;const Se=i.findByStoreName("ExpandedGuildFolderStore");function rt(e){return ot?.useStateFromStores?.([Se],function(){const t=Se?.getExpandedFolders?.();return t instanceof Set?t.has(e):!1},[e])??!1}const it=i.findByProps("toggleGuildFolderExpand"),st=i.findByProps("useStateFromStores"),ke=i.findByStoreName("GuildReadStateStore"),x=48,X=16,ut=[{top:6,left:6},{top:6,right:6},{bottom:6,left:6},{bottom:6,right:6}],lt=ae.getAssetIDByName("FolderIcon");function we(e){return e==null?"#5865f2":`#${e.toString(16).padStart(6,"0")}`}function at({node:e}){const t=st?.useStateFromStores?.([ke],function(){let r=0;for(const s of e.children)r+=ke?.getMentionCount?.(s.id)??0;return r},[e.children])??0;return t>0?n.createElement(o.View,{style:Y.outline},n.createElement(o.View,{style:Y.badge},n.createElement(o.Text,{style:Y.text},t>99?"99+":String(t)))):null}function ct({node:e}){const t=we(e.color);return n.createElement(o.View,{style:K.outer},n.createElement(o.View,{style:[K.icon,{backgroundColor:t}]},e.children.slice(0,4).map(function(r,s){return n.createElement(o.View,{key:r.id,style:[K.cell,ut[s]]},n.createElement(ce,{id:r.id,size:X}))})),n.createElement(at,{node:e}))}const K=o.StyleSheet.create({outer:{width:x,height:x},icon:{width:x,height:x,borderRadius:16,overflow:"hidden"},cell:{position:"absolute",width:X,height:X,borderRadius:8,overflow:"hidden"}});function dt({children:e}){const t=n.useRef(new o.Animated.Value(0)).current;return n.useEffect(function(){o.Animated.timing(t,{toValue:1,duration:180,useNativeDriver:!0}).start()},[]),n.createElement(o.Animated.View,{style:{opacity:t}},e)}function ft({node:e,onPick:t}){const r=rt(e.id),s=function(){it?.toggleGuildFolderExpand?.(e.id)};return r?n.createElement(n.Fragment,null,n.createElement(o.Pressable,{onPress:s},n.createElement(o.View,{style:[Re.openIcon,{backgroundColor:we(e.color)}]},n.createElement(o.Image,{source:lt,style:Re.folderImg,tintColor:"#fff"}))),e.children.map(function(u){return n.createElement(dt,{key:u.id},n.createElement(Ee,{node:u,onPick:t}))})):n.createElement(o.Pressable,{onPress:s},n.createElement(ct,{node:e}))}const Re=o.StyleSheet.create({openIcon:{width:x,height:x,borderRadius:16,alignItems:"center",justifyContent:"center"},folderImg:{width:24,height:24}}),Y=o.StyleSheet.create({outline:{position:"absolute",bottom:-3,right:-3,minWidth:23,minHeight:23,borderRadius:12,backgroundColor:"#1a1a2e",alignItems:"center",justifyContent:"center"},badge:{minWidth:19,height:19,borderRadius:9,backgroundColor:"#ed4245",alignItems:"center",justifyContent:"center",paddingHorizontal:5},text:{color:"#fff",fontSize:10,fontWeight:"700",lineHeight:19}}),pt=i.findByProps("useStateFromStores"),Be=i.findByStoreName("SortedGuildStore"),gt=i.findByProps("getRootNavigationRef"),L=i.findByProps("triggerHapticFeedback","HapticFeedbackTypes"),De=i.findByProps("transitionToGuild"),ht=i.find(function(e){return typeof e?.handleCreateJoinGuildPress=="function"}),Pe=i.find(function(e){return e?.CirclePlusIcon})?.CirclePlusIcon,xe=i.findByProps("colors","unsafe_rawColors")?.unsafe_rawColors,yt=xe?.GREEN_360,Ie=xe?.WHITE,mt=i.find(function(e){return e?.QuestDockExternalCoordinationContext}),Ae=mt?.QuestDockExternalCoordinationContext,Te=i.find(function(e){return e?.QuestDockMode?.COLLAPSED!=null})?.QuestDockMode,j=48,_=6,bt=12;function Et(){const e=n.useRef(new o.Animated.Value(1)).current,t=n.useCallback(function(){o.Animated.spring(e,{toValue:.9,useNativeDriver:!0}).start()},[e]),r=n.useCallback(function(){o.Animated.spring(e,{toValue:1,useNativeDriver:!0}).start()},[e]),s=n.useCallback(function(){L?.triggerHapticFeedback?.(L.HapticFeedbackTypes.SOFT),ht?.handleCreateJoinGuildPress?.()},[]);return n.createElement(o.Pressable,{onPress:s,onPressIn:t,onPressOut:r},n.createElement(o.Animated.View,{style:[z.createJoin,{transform:[{scale:e}]}]},Pe?n.createElement(Pe,{size:"md",color:Ie}):n.createElement(o.Text,{style:z.createJoinFallback},"+")))}function Ve({gestureContext:e}){const t=n.useCallback(function(l){L?.triggerHapticFeedback(L.HapticFeedbackTypes.SOFT),De?.transitionToGuild?De.transitionToGuild(l,null):gt?.getRootNavigationRef()?.navigate("guilds",{guildId:l})},[]),r=pt?.useStateFromStores?.([Be],function(){return(Be?.getGuildsTree()?.root?.children||[]).filter(function(l){return l.type!=="root"})})??[],s=e?n.useContext(e):null,u=s?.minExpandedContentHeight,d=n.useCallback(function(l){if(!u)return;const b=l.nativeEvent.layout.height;u.get()!==b&&u.set(b)},[u]),f=(Ae?n.useContext(Ae):null)?.setRestingQuestDockMode,k=s?.questDockWrapperSpecs;n.useEffect(function(){if(!f||!Te||!k)return;const l=o.BackHandler.addEventListener("hardwareBackPress",function(){return(k.get()?.height??56)>80?(f(Te.COLLAPSED),!0):!1});return function(){return l.remove()}},[f,k]);const{width:w}=o.Dimensions.get("window"),m=Math.max(3,Math.floor((w-bt*2+_)/(j+_))),g=m*j+(m-1)*_,R=Math.max(0,(w-g)/2);return n.createElement(o.View,{style:z.alignTop},n.createElement(o.View,{style:[z.grid,{paddingHorizontal:R,gap:_}],onLayout:d},r.map(function(l){return l.type==="folder"?n.createElement(ft,{key:l.id,node:l,onPick:t}):n.createElement(Ee,{key:l.id,node:l,onPick:t})}),n.createElement(Et,null)))}const z=o.StyleSheet.create({alignTop:{flex:1,justifyContent:"flex-start",alignItems:"flex-start"},grid:{flexDirection:"row",flexWrap:"wrap",paddingTop:4,paddingBottom:16},createJoin:{width:j,height:j,borderRadius:16,backgroundColor:yt,alignItems:"center",justifyContent:"center"},createJoinFallback:{color:Ie,fontSize:28,fontWeight:"700",lineHeight:30}}),Z=new Map;let S=null,U=!1;function He(e,t,r){Z.set(e,{replacement:t,extraProps:r})}function Ct(e){if(U)return;if(S=a.React.createElement,!S){console.warn("[ServerDrawer] React.createElement is null, skipping patch");return}const t=function(r,s,...u){if(!S)return a.React.createElement(r,s,...u);const d=Z.get(r);if(d){const f=d.extraProps?{...s,...d.extraProps}:s;return S.call(a.React,d.replacement,f,...u)}return S.call(a.React,r,s,...u)};Object.assign(t,S),a.React.createElement=t,U=!0,e.push(function(){U&&S&&(a.React.createElement=S,U=!1),Z.clear()})}const $="[ServerDrawer]";let N=null;function Fe(){return N||(N=i.find(function(e){return e?.QuestDockGestureContext})?.QuestDockGestureContext??null),N}function St(e){const t=i.find(function(s){return s?.type?.displayName==="QuestDockContentExpanded"||s?.type?.name==="QuestDockContentExpanded"});if(!t?.type)return console.log($,"WARN: QuestDockContentExpanded not found (will retry)"),!1;const r=t.type;return He(r,Ve,{gestureContext:Fe()}),t.type=function(){return a.React.createElement(Ve,{gestureContext:Fe()})},e.push(function(){t.type=r}),console.log($,"PATCH: QuestDockContentExpanded replaced"),!0}function T(e,t){const r=i.find(function(d){return d?.type?.displayName===e||d?.type?.name===e});if(!r?.type)return console.log($,`WARN: ${e} not found`),!1;const s=r.type,u=s;return r.type=function(){return null},u&&(Object.defineProperties(r.type,Object.getOwnPropertyDescriptors(u)),r.type.displayName=e),t.push(function(){r.type=s}),!0}const kt="[ServerDrawer]",wt=ae.getAssetIDByName("ChatIcon"),Ge=i.findByProps("triggerHapticFeedback","HapticFeedbackTypes"),Qe=i.findByProps("selectPrivateChannel"),Rt=i.findByName("SelectedChannelStore"),Bt=i.findByProps("useStateFromStores"),Dt=Bt?.useStateFromStores,ee=i.findByProps("getGuildId"),te=i.findByProps("colors","unsafe_rawColors")?.colors,Pt=i.findByProps("ME"),xt=Pt?.ME??"/channels/@me";function It(){if(Ge?.triggerHapticFeedback(Ge.HapticFeedbackTypes.SOFT),Qe?.selectPrivateChannel){const e=Rt?.getLastSelectedChannelId?.();Qe.selectPrivateChannel(e)}}function At(){try{return ee?Dt([ee],function(){const e=ee?.getGuildId?.();return e==null||e===xt}):!1}catch{return!1}}function Me(){const e=At(),t=e?te?.WHITE??"#fff":te?.INTERACTIVE_NORMAL??"#80848e";return n.createElement(o.Pressable,{onPress:It,style:{flex:1,alignItems:"center",justifyContent:"center"}},e?n.createElement(o.View,{style:{position:"absolute",left:0,top:"25%",width:4,height:"50%",borderRadius:2,backgroundColor:te?.WHITE??"#fff"}}):null,n.createElement(o.Image,{source:wt,style:{width:28,height:28,tintColor:t}}))}function Tt(){const e=i.findByName("GuildsBar");if(e)return{default:e};let t=i.find(function(r){try{return r?.default?.type?.name==="GuildsBar"}catch{return!1}});return t?.default||(t=i.find(function(r){try{return r?.default?.displayName==="GuildsBar"}catch{return!1}}),t?.default)?t:null}function Vt(e){const t=Tt();if(!t?.default)return console.log(kt,"WARN: GuildsBar not found"),!1;const r=t.default;return He(r,Me),t.default=function(){return n.createElement(Me)},t.default.displayName="GuildsBar",e.push(function(){t.default=r}),!0}const{ScrollView:Ht,View:Ft}=a.ReactNative;function Gt({children:e}){return a.React.createElement(Ht,{style:{flex:1}},e,a.React.createElement(Ft,{style:{height:24}}))}const{View:Qt,Text:Mt}=a.ReactNative;function Wt({children:e,style:t}){return a.React.createElement(Qt,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},t]},a.React.createElement(Mt,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},e))}const{FormSection:Ot,FormSwitchRow:We}=_e.Forms;function Lt(){return le.useProxy(y.storage),a.React.createElement(Gt,null,a.React.createElement(Wt,null,"Server Drawer takes over the Quest Dock (the strip above the tab bar) to show your servers as a grid instead - tap to expand, long-press a server for its usual context menu, and use the + button to create or join a server through Discord's own modal."),a.React.createElement(Ot,{title:"Layout"},a.React.createElement(We,{label:"Hide the left server rail",subLabel:"Replaces it with a single DMs icon since your servers now live in the drawer",value:y.storage.hideGuildsBar!==!1,onValueChange:function(e){y.storage.hideGuildsBar=e,je()}}),a.React.createElement(We,{label:"Unread badges",subLabel:"Show mention counts and unread dots on server icons in the drawer",value:y.storage.showUnreadBadges!==!1,onValueChange:function(e){y.storage.showUnreadBadges=e}})))}let c=[];function p(e,t){try{return t()}catch(r){return ue.logger.error(`[ServerDrawer] "${e}" patch threw, skipping: ${r}`),!1}}function Oe(){const e=[];Ct(c),p("questDockRender",function(){return ze(c)})&&e.push("questDockRender"),p("questDockBase",function(){return Ue(c)})&&e.push("questDockBase"),p("mobileQuestDock",function(){return ve(c)})&&e.push("mobileQuestDock"),p("getQuestAsset",function(){return Je(c)})&&e.push("getQuestAsset"),p("expanded",function(){return St(c)})&&e.push("expanded"),p("collapsed",function(){return T("QuestDockContentCollapsed",c)})&&e.push("collapsed"),p("enrolledHeader",function(){return T("QuestDockEnrolledHeader",c)})&&e.push("enrolledHeader"),p("unenrolledHeader",function(){return T("QuestDockUnenrolledHeader",c)})&&e.push("unenrolledHeader"),p("enrolledBody",function(){return T("QuestDockEnrolledBody",c)})&&e.push("enrolledBody"),p("unenrolledBody",function(){return T("QuestDockUnenrolledBody",c)})&&e.push("unenrolledBody"),y.storage.hideGuildsBar&&p("hideGuildsBar",function(){return Vt(c)})&&e.push("hideGuildsBar"),ue.logger.log(`[ServerDrawer] onLoad done - ${e.length}/11 patches applied (${e.join(", ")||"none"})`)}function Le(){for(const e of c)try{e()}catch{}c=[]}function je(){Le(),Oe()}var jt={onLoad:function(){y.storage.hideGuildsBar??=!0,y.storage.showUnreadBadges??=!0,Oe()},onUnload:function(){return Le()},settings:Lt};return F.default=jt,F.restart=je,Object.defineProperty(F,"__esModule",{value:!0}),F})({},vendetta,vendetta.plugin,vendetta.metro,vendetta.metro.common,window.React,vendetta.metro.common.ReactNative,vendetta.storage,vendetta.ui,vendetta.ui.assets,vendetta.ui.components);