// Vencord e2f32fe3
// Standalone: false
// Platform: win32
// Updater Disabled: false
"use strict";function c(e,r=300){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>{e(...i)},r)}}var n=require("electron"),T=require("fs"),_=require("path");var s=require("electron");function o(e,...r){return s.ipcRenderer.invoke(e,...r)}function S(e,...r){return s.ipcRenderer.sendSync(e,...r)}var m={},u=S("VencordGetPluginIpcMethodMap");for(let[e,r]of Object.entries(u)){let t=m[e]={};for(let[i,p]of Object.entries(r))t[i]=(...l)=>o(p,...l)}var d={themes:{uploadTheme:(e,r)=>o("VencordUploadTheme",e,r),deleteTheme:e=>o("VencordDeleteTheme",e),getThemesList:()=>o("VencordGetThemesList"),getThemeData:e=>o("VencordGetThemeData",e),getSystemValues:()=>o("VencordGetThemeSystemValues"),openFolder:()=>o("VencordOpenThemesFolder")},updater:{getUpdates:()=>o("VencordGetUpdates"),update:()=>o("VencordUpdate"),rebuild:()=>o("VencordBuild"),getRepo:()=>o("VencordGetRepo")},settings:{get:()=>S("VencordGetSettings"),set:(e,r)=>o("VencordSetSettings",e,r),openFolder:()=>o("VencordOpenSettingsFolder")},quickCss:{get:()=>o("VencordGetQuickCss"),set:e=>o("VencordSetQuickCss",e),addChangeListener(e){s.ipcRenderer.on("VencordQuickCssUpdate",(r,t)=>e(t))},addThemeChangeListener(e){s.ipcRenderer.on("VencordThemeUpdate",()=>e())},openFile:()=>o("VencordOpenQuickCss"),openEditor:()=>o("VencordOpenMonacoEditor")},native:{getVersions:()=>process.versions,openExternal:e=>o("VencordOpenExternal",e)},csp:{isDomainAllowed:(e,r)=>o("VencordCspIsDomainAllowed",e,r),removeOverride:e=>o("VencordCspRemoveOverride",e),requestAddOverride:(e,r,t)=>o("VencordCspRequestAddOverride",e,r,t)},pluginHelpers:m};n.contextBridge.exposeInMainWorld("VencordNative",d);if(location.protocol!=="data:"){let e=(0,_.join)(__dirname,"renderer.css"),r=document.createElement("style");r.id="vencord-css-core",r.textContent=(0,T.readFileSync)(e,"utf-8"),document.readyState==="complete"?document.documentElement.appendChild(r):document.addEventListener("DOMContentLoaded",()=>document.documentElement.appendChild(r),{once:!0}),n.webFrame.executeJavaScript((0,T.readFileSync)((0,_.join)(__dirname,"renderer.js"),"utf-8")),require(process.env.DISCORD_PRELOAD)}else n.contextBridge.exposeInMainWorld("setCss",c(d.quickCss.set)),n.contextBridge.exposeInMainWorld("getCurrentCss",d.quickCss.get),n.contextBridge.exposeInMainWorld("getTheme",()=>"vs-dark");
//# sourceURL=file:///VencordPreload
//# sourceMappingURL=vencord://preload.js.map
