32 lines
24 KiB
JavaScript
32 lines
24 KiB
JavaScript
(function(E,e,s,p,k,B,v,F){"use strict";const{ScrollView:A,View:j}=e.ReactNative;function _({children:t}){return e.React.createElement(A,{style:{flex:1}},t,e.React.createElement(j,{style:{height:24}}))}const{View:O,Text:I}=e.ReactNative;function D({children:t,style:a}){return e.React.createElement(O,{style:[{marginHorizontal:16,marginVertical:8,padding:10,borderRadius:8,borderWidth:1,borderColor:"rgba(128,128,128,0.25)"},a]},e.React.createElement(I,{style:{fontSize:12.5,lineHeight:18,opacity:.75}},t))}const{TouchableOpacity:z,Text:H}=e.ReactNative;function h({label:t,onPress:a,disabled:n,style:o}){return e.React.createElement(z,{disabled:n,onPress:a,style:[{backgroundColor:"#5865F2",borderRadius:8,padding:10,alignItems:"center",opacity:n?.5:1},o]},e.React.createElement(H,{style:{color:"white",fontWeight:"600"}},t))}function S(t){const a=window?.modules;if(a)for(const n in a){const o=a[n];if(!o?.isInitialized)continue;const r=o.publicModule?.exports;if(r)try{if(t(r))return r;if(r.default!=null&&t(r.default))return r.default}catch{}}}function T(t){return S(function(a){return a?.name===t||a?.displayName===t||a?.type?.name===t||a?.type?.displayName===t})}function m(t){return S(function(a){return a?.name===t||a?.displayName===t})}function P(...t){return S(function(a){return t.every(function(n){return a?.[n]!==void 0})})}function C(t){return S(function(a){return typeof a?.getName=="function"&&a.getName.length===0&&a.getName()===t})}const x=[{label:'findByProps("computePermissions", "canEveryoneRole")',run:function(){return s.findByProps("computePermissions","canEveryoneRole")}},{label:'findByProps("getBotLabel")',run:function(){return s.findByProps("getBotLabel")}},{label:'findByName("DisplayName", false)',run:function(){return s.findByName("DisplayName",!1)}},{label:'findByName("HeaderName", false)',run:function(){return s.findByName("HeaderName",!1)}},{label:'findByName("getTagProperties", false)',run:function(){return s.findByName("getTagProperties",!1)}},{label:'findByTypeNameAll("UserRow")',run:function(){return s.findByTypeNameAll("UserRow")}},{label:'findByStoreName("ThemeStore")',run:function(){return s.findByStoreName("ThemeStore")}},{label:'findByStoreName("GuildMemberStore")',run:function(){return s.findByStoreName("GuildMemberStore")}},{label:'findByStoreName("GuildStore")',run:function(){return s.findByStoreName("GuildStore")}},{label:'findByStoreName("ChannelStore")',run:function(){return s.findByStoreName("ChannelStore")}},{label:'findByStoreName("UserStore")',run:function(){return s.findByStoreName("UserStore")}},{label:'findByStoreName("RelationshipStore")',run:function(){return s.findByStoreName("RelationshipStore")}},{label:'findByName("RowManager", false)',run:function(){return s.findByName("RowManager",!1)}},{label:'findByProps("TYPING_WRAPPER_HEIGHT")',run:function(){return s.findByProps("TYPING_WRAPPER_HEIGHT")}},{label:'findByName("VoiceUserConnected", false)',run:function(){return s.findByName("VoiceUserConnected",!1)}},{label:"find(resolveSemanticColor via default.internal)",run:function(){return s.find(function(t){return t?.default?.internal?.resolveSemanticColor})}},{label:"find(resolveSemanticColor via meta)",run:function(){return s.find(function(t){return t?.meta?.resolveSemanticColor})}},{label:"find(UserProfile)",run:function(){return s.find(function(t){return t?.type?.name==="UserProfile"})}},{label:'findByName("UserProfileSection", false)',run:function(){return s.findByName("UserProfileSection",!1)}},{label:'findByProps("sendMessage", "sendBotMessage")',run:function(){return s.findByProps("sendMessage","sendBotMessage")}},{label:'findByProps("openLazy", "hideActionSheet")',run:function(){return s.findByProps("openLazy","hideActionSheet")}},{label:'findByProps("push", "pushLazy", "pop")',run:function(){return s.findByProps("push","pushLazy","pop")}},{label:'findByProps("getRenderCloseButton")',run:function(){return s.findByProps("getRenderCloseButton")}},{label:'findByProps("getHeaderCloseButton")',run:function(){return s.findByProps("getHeaderCloseButton")}},{label:'findByName("Navigator")',run:function(){return s.findByName("Navigator")}},{label:'findByName("ThemedRolePill", false)',run:function(){return s.findByName("ThemedRolePill",!1)}},{label:'findByProps("saveProfileChanges")',run:function(){return s.findByProps("saveProfileChanges")}},{label:'findByProps("useAvatarColors")',run:function(){return s.findByProps("useAvatarColors")}},{label:'findByProps("useThemeContext")',run:function(){return s.findByProps("useThemeContext")}},{label:'findByProps("getProfileTheme")',run:function(){return s.findByProps("getProfileTheme")}},{label:'findByProps("ThemeContextProvider")',run:function(){return s.findByProps("ThemeContextProvider")}},{label:"semanticColors.HEADER_SECONDARY",run:function(){return B.semanticColors?.HEADER_SECONDARY}},{label:"semanticColors.BACKGROUND_ACCENT",run:function(){return B.semanticColors?.BACKGROUND_ACCENT}},{label:"semanticColors.BACKGROUND_PRIMARY",run:function(){return B.semanticColors?.BACKGROUND_PRIMARY}},{label:"semanticColors.BACKGROUND_FLOATING",run:function(){return B.semanticColors?.BACKGROUND_FLOATING}},{label:"semanticColors.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE",run:function(){return B.semanticColors?.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE}},{label:"semanticColors.TEXT_NORMAL",run:function(){return B.semanticColors?.TEXT_NORMAL}}];function M(t){if(t==null)return"NOT FOUND";if(typeof t=="object"){const a=Object.keys(t);return`found (${a.length} key${a.length===1?"":"s"})`}return`found (${typeof t})`}function U(){return x.map(function({label:t,run:a}){try{const n=a();return{label:t,found:n!=null,detail:M(n)}}catch(n){return{label:t,found:!1,detail:`threw: ${n}`}}})}function V(t){const a=t.filter(function(n){return!n.found});return[`Key Inspector report - ${new Date().toISOString()}`,`${t.length} checked, ${a.length} missing`,"",...t.map(function(n){return`[${n.found?"OK":"MISSING"}] ${n.label} -> ${n.detail}`}),"",`semanticColors keys (${Object.keys(B.semanticColors??{}).length}):`,...Object.keys(B.semanticColors??{}).sort(),"",`rawColors keys (${Object.keys(B.rawColors??{}).length}):`,...Object.keys(B.rawColors??{}).sort()].join(`
|
||
`)}const G=new Set(["vendetta.metro.modules"]);function L(t){return t===null?"null":t===void 0?"undefined":Array.isArray(t)?`array(${t.length})`:typeof t}function W(t=3){const a=new WeakSet,n=[];function o(r,c,u){if(r==null||typeof r!="object"&&typeof r!="function")return;if(G.has(c)){n.push(`${c} -> (skipped - Discord's full module registry, use the search tools for this)`);return}if(typeof r=="object"){if(a.has(r)){n.push(`${c} -> [already listed elsewhere, circular]`);return}a.add(r)}let d;try{d=Object.keys(r).sort()}catch(i){n.push(`${c} -> [couldn't read keys: ${i}]`);return}const l=d.slice(0,60);for(const i of l){const f=`${c}.${i}`;let y;try{y=r[i]}catch($){n.push(`${f} -> [threw on access: ${$}]`);continue}const R=L(y);n.push(`${f} (${R})`),R==="object"&&u<t&&o(y,f,u+1)}d.length>60&&n.push(`${c} -> (+${d.length-60} more keys not shown at this level)`)}try{o(globalThis.vendetta,"vendetta",0)}catch(r){n.push(`Error walking the vendetta object: ${r}`)}return n.length?n.join(`
|
||
`):"vendetta object not found or empty"}function Y(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="function")return`[Function: ${t.name||"anonymous"}]`;if(typeof t!="object")return String(t);const a=new WeakSet;try{return JSON.stringify(t,function(n,o){if(typeof o=="function")return`[Function: ${o.name||"anonymous"}]`;if(typeof o=="symbol")return o.toString();if(typeof o=="object"&&o!==null){if(a.has(o))return"[Circular]";a.add(o)}return o},2)}catch{try{return`[unserializable object, keys: ${Object.keys(t).join(", ")}]`}catch(n){return`[unserializable, and Object.keys threw: ${n}]`}}}function K(t){return t.replace(/[‘’]/g,"'").replace(/[“”]/g,'"').replace(/[–—]/g,"-")}async function q(t){const a=K(t);try{const n=new Function("findByProps","findByName","findByTypeName","findByStoreName","findByPropsAll","findByNameAll","find","rawFind","rawFindByTypeName","rawFindByProps","rawFindByName","rawFindByStoreName","instead","before","after","getAssetIDByName","showToast","React","ReactNative","FluxDispatcher","window",`return (function() {
|
||
${a}
|
||
})();`)(s.findByProps,s.findByName,s.findByTypeName,s.findByStoreName,s.findByPropsAll,s.findByNameAll,s.find,S,T,P,m,C,v.instead,v.before,v.after,F.getAssetIDByName,p.showToast,e.React,e.ReactNative,e.FluxDispatcher,window),o=n&&typeof n.then=="function"?await n:n;return Y(o)}catch(n){return`Error: ${n instanceof Error?`${n.message}
|
||
${n.stack??""}`:String(n)}`}}const J=500;function X(t,a){return new Promise(function(n){const o=new Map;let r=function(){},c=!1;const u=function(){if(c)return;c=!0,r();const d=a?.trim(),l=[...o.entries()].sort(function(i,f){return f[1]-i[1]}).map(function([i,f]){return`${String(f).padStart(5)} ${i}`});n(l.length?`${o.size} distinct type(s)${d?` matching "${d}"`:""} over ${t}ms:
|
||
|
||
${l.join(`
|
||
`)}`:`(no${d?` matching "${d}"`:""} events fired during the ${t}ms capture window)`)};try{r=v.before("dispatch",e.FluxDispatcher,function(d){const l=d[0]?.type??"(no type)",i=a?.trim();i&&!l.includes(i)||!o.has(l)&&o.size>=J||o.set(l,(o.get(l)??0)+1)})}catch(d){n(`Failed to patch FluxDispatcher.dispatch: ${d}`);return}setTimeout(u,t)})}function Q(t){try{return JSON.stringify(t,function(a,n){return typeof n=="function"?`[Function: ${n.name||"anonymous"}]`:n},2)}catch{try{return`[unserializable, keys: ${Object.keys(t??{}).join(", ")}]`}catch{return String(t)}}}function Z(t,a,n){return new Promise(function(o){const r=t.trim(),c=s.findByTypeName(r)??s.findByName(r,!1);if(!c){o(`"${r}" not found via findByTypeName or findByName.`);return}if(typeof c.type!="function"){o(`Found "${r}", but it has no callable .type property (not a memo/forwardRef wrapper), so its own render calls can't be intercepted this way. Its keys: ${Object.keys(c).join(", ")}`);return}const u=[];let d=!1,l=function(){};const i=function(){d||(d=!0,l(),o(u.length?u.join(`
|
||
|
||
---
|
||
|
||
`):`"${r}" never rendered during the ${n}ms capture window.`))};try{l=v.before("type",c,function(f){u.push(`Call ${u.length+1} props:
|
||
${Q(f[0])}`),u.length>=a&&i()})}catch(f){o(`Failed to patch "${r}": ${f}`);return}setTimeout(i,n)})}const{View:w,Text:g}=e.ReactNative,{FormSection:N,FormInput:b}=k.Forms;function ee(){const[t,a]=e.React.useState(null);return e.React.createElement(N,{title:"Full diagnostic scan"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(h,{label:"Run scan & copy full report",onPress:function(){const n=U(),o=n.filter(function(r){return!r.found}).length;e.clipboard.setString(V(n)),a(`${n.length} checked, ${o} missing - full report copied`),p.showToast(`${o} missing out of ${n.length} - report copied`,void 0)}}),t&&e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},t)))}function te(){const[t,a]=e.React.useState(""),[n,o]=e.React.useState(null),[r,c]=e.React.useState(!1),u=async function(){if(!(!t.trim()||r)){c(!0);try{const d=await q(t);o(d),e.clipboard.setString(d),p.showToast("Result copied",void 0)}finally{c(!1)}}};return e.React.createElement(N,{title:"Eval"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(b,{title:"Code",placeholder:'e.g. return findByProps("getRootNavigationRef")',value:t,onChange:a,multiline:!0,autoCorrect:!1,autoCapitalize:"none",spellCheck:!1}),e.React.createElement(h,{label:r?"Running...":"Run & copy result",style:{marginTop:8},disabled:r,onPress:u}),n!=null&&e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.85},selectable:!0},n.length>2e3?`${n.slice(0,2e3)}
|
||
... (truncated, full result copied)`:n),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Runs as a plain (non-async) function body - a bare expression or `return ...` works, but not the async/await keywords (Hermes doesn't support those in dynamically-eval'd code). For timed/async checks, return a Promise built with a plain function instead of an arrow/async function - it gets awaited for you outside the sandbox. In scope: findByProps/findByName/ findByTypeName/findByStoreName/findByPropsAll/findByNameAll/find, the raw* passive variants (rawFind/rawFindByTypeName/rawFindByProps/rawFindByName/ rawFindByStoreName), instead/before/after, getAssetIDByName, showToast, React, ReactNative, FluxDispatcher, and window. Nothing runs until you tap the button.")))}function ne(){const[t,a]=e.React.useState(""),[n,o]=e.React.useState("10"),[r,c]=e.React.useState(null),[u,d]=e.React.useState(!1),l=async function(){if(u)return;const i=Math.max(1,Number(n)||10)*1e3;d(!0),c(null),p.showToast(`Capturing Flux events for ${i/1e3}s - go do the thing...`,void 0);try{const f=await X(i,t);c(f),e.clipboard.setString(f),p.showToast("Capture done - report copied",void 0)}finally{d(!1)}};return e.React.createElement(N,{title:"Flux event logger"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(b,{title:"Filter (optional substring, e.g. GUILD)",placeholder:"Leave blank to capture everything",value:t,onChange:a}),e.React.createElement(b,{title:"Capture duration (seconds)",placeholder:"10",value:n,onChange:o,keyboardType:"numeric"}),e.React.createElement(h,{label:u?"Capturing...":"Start capture",style:{marginTop:8},disabled:u,onPress:l}),r!=null&&e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.85},selectable:!0},r.length>2e3?`${r.slice(0,2e3)}
|
||
... (truncated, full report copied)`:r),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Tap start, then go do the thing you're trying to understand (open a screen, send a message, tap a button) before the window closes. Reports every action type that dispatched, sorted by count - the fastest way to find which event to hook into instead of guessing from decompiled source.")))}function re(){const[t,a]=e.React.useState(""),[n,o]=e.React.useState("3"),[r,c]=e.React.useState("15"),[u,d]=e.React.useState(null),[l,i]=e.React.useState(!1),f=async function(){const y=t.trim();if(!y||l)return;const R=Math.max(1,Number(r)||15)*1e3;i(!0),d(null);try{const $=await Z(y,Math.max(1,Number(n)||3),R);d($),e.clipboard.setString($),p.showToast("Capture done - result copied",void 0)}finally{i(!1)}};return e.React.createElement(N,{title:"Component render/props logger"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(b,{title:"Component name (findByTypeName / findByName)",placeholder:"e.g. YouBarNotificationsButton",value:t,onChange:a}),e.React.createElement(b,{title:"Max renders to capture",placeholder:"3",value:n,onChange:o,keyboardType:"numeric"}),e.React.createElement(b,{title:"Give up after (seconds)",placeholder:"15",value:r,onChange:c,keyboardType:"numeric"}),e.React.createElement(h,{label:l?"Waiting for renders...":"Start capture",style:{marginTop:8},disabled:l,onPress:f}),u!=null&&e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.85},selectable:!0},u.length>2e3?`${u.slice(0,2e3)}
|
||
... (truncated, full result copied)`:u),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Patches the component to log its actual props on every render, up to the call cap or the time limit. Only works for React.memo/forwardRef-wrapped components (most of what findByTypeName/findByName return) - a bare function component has no property to intercept its own calls through.")))}function ae(){const[t,a]=e.React.useState(""),[n,o]=e.React.useState(""),[r,c]=e.React.useState(""),[u,d]=e.React.useState(""),l=function(i,f){try{const y=f();if(!y){e.clipboard.setString(`${i} -> not found`),p.showToast("Not found - copied that result",void 0);return}const R=Object.keys(y).sort();e.clipboard.setString(`${i} -> found, keys:
|
||
${R.join(`
|
||
`)}`),p.showToast(`Found it - copied ${R.length} key(s)`,void 0)}catch(y){e.clipboard.setString(`Error running ${i}: ${y}`),p.showToast("Search failed - copied the error instead",void 0)}};return e.React.createElement(N,{title:"Raw search (bypasses the negative-result cache)"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(b,{title:"rawFindByProps - comma-separated prop names",placeholder:"e.g. getRootNavigationRef",value:t,onChange:a}),e.React.createElement(h,{label:"Search & copy result",style:{marginTop:8,marginBottom:16},onPress:function(){const i=t.split(",").map(function(f){return f.trim()}).filter(Boolean);i.length&&l(`rawFindByProps(${i.join(", ")})`,function(){return P(...i)})}}),e.React.createElement(b,{title:"rawFindByName",placeholder:"e.g. YouBarNotificationsButton",value:n,onChange:o}),e.React.createElement(h,{label:"Search & copy result",style:{marginTop:8,marginBottom:16},onPress:function(){return n.trim()&&l(`rawFindByName("${n.trim()}")`,function(){return m(n.trim())})}}),e.React.createElement(b,{title:"rawFindByTypeName",placeholder:"e.g. YouBarNotificationsButton",value:r,onChange:c}),e.React.createElement(h,{label:"Search & copy result",style:{marginTop:8,marginBottom:16},onPress:function(){return r.trim()&&l(`rawFindByTypeName("${r.trim()}")`,function(){return T(r.trim())})}}),e.React.createElement(b,{title:"rawFindByStoreName",placeholder:"e.g. GuildStore",value:u,onChange:d}),e.React.createElement(h,{label:"Search & copy result",style:{marginTop:8},onPress:function(){return u.trim()&&l(`rawFindByStoreName("${u.trim()}")`,function(){return C(u.trim())})}}),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},`Revenge's own findByProps/findByName/findByTypeName/findByStoreName cache a negative result forever the first time a search comes up empty, and never rescan - so if a module hasn't been required yet when you search, it can look "missing" permanently for the rest of the session even after it registers. These raw* variants only ever read modules Metro's own isInitialized flag says are already loaded (never force-requiring anything), so re-running one after doing the thing that loads your target module will actually find it.`)))}function ie(){const[t,a]=e.React.useState("Not captured yet - scroll this section into view (or reopen this screen) to trigger the ref."),n=function(o){if(o)try{let r=null,c="";if(o._internalFiberInstanceHandleDEV)r=o._internalFiberInstanceHandleDEV,c="_internalFiberInstanceHandleDEV";else if(o._internalInstanceHandle)r=o._internalInstanceHandle,c="_internalInstanceHandle";else if(o.__internalInstanceHandle)r=o.__internalInstanceHandle,c="__internalInstanceHandle";else{const l=Object.keys(o).find(function(i){return i.startsWith("__reactFiber$")||i.startsWith("__reactInternalInstance$")});l&&(r=o[l],c=l)}if(!r){a(`No fiber pointer found on the instance. Instance keys: ${Object.keys(o).join(", ")||"(none)"}`);return}if(r.return===void 0&&r.child===void 0){const l=r.stateNode??r.fiber??r._debugOwner;if(l&&(l.return!==void 0||l.child!==void 0))r=l,c+=" (via nested property)";else{a(`Found "${c}" but it doesn't look fiber-shaped (no .return/.child). Its keys: ${Object.keys(r).join(", ")||"(none)"}`);return}}let u=r,d=0;for(;u.return&&d<5e3;)u=u.return,d++;window.__keyInspectorFiberRoot=u,window.__keyInspectorFiberSelf=r,a(`Captured via "${c}" (walked up ${d} level(s) to the root). window.__keyInspectorFiberRoot and window.__keyInspectorFiberSelf are now set - use Eval to walk them.`)}catch(r){a(`Error: ${r}`)}};return e.React.createElement(N,{title:"Fiber capture (for Eval)"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(w,{ref:n,style:{width:1,height:1}}),e.React.createElement(g,{style:{fontSize:12.5,opacity:.85},selectable:!0},t),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Reads React's own internal fiber pointer directly off a native view instance - works without React DevTools (confirmed absent on this build), since it's the same internal linkage React itself relies on to route touch events, not an inspector-only feature. Walks up to the root fiber automatically so Eval can search the whole live tree (whatever's actually mounted right now, not module-registry guessing) from window.__keyInspectorFiberRoot afterward.")))}function oe(){return e.React.createElement(N,{title:"Full Vendetta API tree"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(h,{label:"Copy the entire plugin API tree",onPress:function(){const t=W(3),a=t.split(`
|
||
`).length;e.clipboard.setString(t),p.showToast(`Copied ${a} lines - every key path under window.vendetta`,void 0)}}),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},"Every key path under the stable plugin API (window.vendetta), 3 levels deep - this is everything Revenge itself exposes to plugins, not Discord's raw internals (those are searchable individually below, since dumping all of them would be enormous).")))}function le(){const[t,a]=e.React.useState(""),[n,o]=e.React.useState(""),r=function(){const l=t.split(",").map(function(i){return i.trim()}).filter(Boolean);if(l.length)try{const i=s.findByProps(...l);if(!i){e.clipboard.setString(`findByProps(${l.join(", ")}) -> not found`),p.showToast("No module found - copied that result",void 0);return}const f=Object.keys(i).sort();e.clipboard.setString(`findByProps(${l.join(", ")}) -> found, keys:
|
||
${f.join(`
|
||
`)}`),p.showToast(`Found it - copied ${f.length} key(s)`,void 0)}catch(i){e.clipboard.setString(`Error searching for ${l.join(", ")}: ${i}`),p.showToast("Search failed - copied the error instead",void 0)}},c=function(){const l=n.trim();if(l)try{const i=s.findByName(l,!1);if(!i){e.clipboard.setString(`findByName("${l}") -> not found`),p.showToast("No component found - copied that result",void 0);return}const f=Object.keys(i).sort();e.clipboard.setString(`findByName("${l}") -> found, keys:
|
||
${f.join(`
|
||
`)}`),p.showToast(`Found it - copied ${f.length} key(s)`,void 0)}catch(i){e.clipboard.setString(`Error searching for "${l}": ${i}`),p.showToast("Search failed - copied the error instead",void 0)}},u=function(){const l=t.split(",").map(function(i){return i.trim()}).filter(Boolean);if(l.length)try{const i=s.findByPropsAll(...l)??[],f=i.map(function(y,R){return`[${R}] keys: ${Object.keys(y).sort().join(", ")}`}).join(`
|
||
|
||
`);e.clipboard.setString(`findByPropsAll(${l.join(", ")}) -> ${i.length} match(es)
|
||
|
||
${f}`),p.showToast(`${i.length} match(es) - report copied`,void 0)}catch(i){e.clipboard.setString(`Error searching for ${l.join(", ")}: ${i}`),p.showToast("Search failed - copied the error instead",void 0)}},d=function(){const l=n.trim();if(l)try{const i=s.findByNameAll(l,!1)??[],f=i.map(function(y,R){return`[${R}] keys: ${Object.keys(y).sort().join(", ")}`}).join(`
|
||
|
||
`);e.clipboard.setString(`findByNameAll("${l}") -> ${i.length} match(es)
|
||
|
||
${f}`),p.showToast(`${i.length} match(es) - report copied`,void 0)}catch(i){e.clipboard.setString(`Error searching for "${l}": ${i}`),p.showToast("Search failed - copied the error instead",void 0)}};return e.React.createElement(N,{title:"One-off search"},e.React.createElement(w,{style:{paddingHorizontal:16,paddingVertical:8}},e.React.createElement(b,{title:"findByProps - comma-separated prop names",placeholder:"e.g. sendMessage, sendBotMessage",value:t,onChange:a}),e.React.createElement(h,{label:"Search first match & copy",style:{marginTop:8},onPress:r}),e.React.createElement(h,{label:"Search ALL matches & copy",style:{marginTop:8,marginBottom:16},onPress:u}),e.React.createElement(b,{title:"findByName - component name",placeholder:"e.g. ThemedRolePill",value:n,onChange:o}),e.React.createElement(h,{label:"Search first match & copy",style:{marginTop:8},onPress:c}),e.React.createElement(h,{label:"Search ALL matches & copy",style:{marginTop:8},onPress:d}),e.React.createElement(g,{style:{marginTop:8,fontSize:12.5,opacity:.7}},'"ALL matches" is worth checking even when the first-match search succeeds - more than one module matching the same name/props is a common source of "found the wrong one" bugs (patching a re-export or an unrelated duplicate instead of the component actually on screen).')))}function se(){return e.React.createElement(_,null,e.React.createElement(ee,null),e.React.createElement(ie,null),e.React.createElement(ae,null),e.React.createElement(le,null),e.React.createElement(ne,null),e.React.createElement(re,null),e.React.createElement(te,null),e.React.createElement(oe,null),e.React.createElement(D,null,"The full scan checks every internal lookup this repo's plugins depend on (plus a few for plugins currently being fixed) in one pass, and includes the complete list of semanticColors/rawColors keys at the end. Paste the report back into chat when reporting a bug - it tells us exactly what's missing on your Discord version."))}var ce={settings:se};return E.default=ce,Object.defineProperty(E,"__esModule",{value:!0}),E})({},vendetta.metro.common,vendetta.metro,vendetta.ui.toasts,vendetta.ui.components,vendetta.ui,vendetta.patcher,vendetta.ui.assets);
|