// Vencord e2f32fe3
// Standalone: false
// Platform: win32
// Updater Disabled: false
"use strict";function T(e,r=300){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>{e(...i)},r)}}var s=require("electron"),S=require("fs"),m=require("path");var n=require("electron");function o(e,...r){return n.ipcRenderer.invoke(e,...r)}function _(e,...r){return n.ipcRenderer.sendSync(e,...r)}var c={},u=_("VencordGetPluginIpcMethodMap");for(let[e,r]of Object.entries(u)){let t=c[e]={};for(let[i,l]of Object.entries(r))t[i]=(...p)=>o(l,...p)}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:()=>_("VencordGetSettings"),set:(e,r)=>o("VencordSetSettings",e,r),openFolder:()=>o("VencordOpenSettingsFolder")},quickCss:{get:()=>o("VencordGetQuickCss"),set:e=>o("VencordSetQuickCss",e),addChangeListener(e){n.ipcRenderer.on("VencordQuickCssUpdate",(r,t)=>e(t))},addThemeChangeListener(e){n.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:c};s.contextBridge.exposeInMainWorld("VencordNative",d);if(location.protocol!=="data:"){let e=(0,m.join)(__dirname,"vencordDesktopRenderer.css"),r=document.createElement("style");r.id="vencord-css-core",r.textContent=(0,S.readFileSync)(e,"utf-8"),document.readyState==="complete"?document.documentElement.appendChild(r):document.addEventListener("DOMContentLoaded",()=>document.documentElement.appendChild(r),{once:!0})}else s.contextBridge.exposeInMainWorld("setCss",T(d.quickCss.set)),s.contextBridge.exposeInMainWorld("getCurrentCss",d.quickCss.get),s.contextBridge.exposeInMainWorld("getTheme",()=>"vs-dark");
//# sourceURL=file:///VencordPreload
//# sourceMappingURL=vencord://vencordDesktopPreload.js.map
