(()=>{"use strict";var e={288:e=>{e.exports=require("electron")}},n={};function t(o){var r=n[o];if(void 0!==r)return r.exports;var i=n[o]={exports:{}};return e[o](i,i.exports,t),i.exports}(()=>{const e=t(288);let n={isLoading:!1,isStarting:!0,hasStartedBefore:!1,user:null,worlds:[],environment:"prod",domain:"seed.game",isSimpleMode:!0,portalConfig:{isUserInCurrentPlaysession:!1,isLaunchAllowed:!1,isPlaysessionActive:!1},environments:[],world:""},o=[],r=[];const i={startDownload:(n,t)=>{e.ipcRenderer.send("on-start-download",{gitHash:n,useNemo:t})},cancelDownload:n=>{e.ipcRenderer.send("on-cancel-download",{gitHash:n.gitHash,useNemo:n.useNemo})},launchClient:(n,t,o,r,i)=>{e.ipcRenderer.send("on-launch-client",{gitHash:n,sector:t,world:o,launchdarklyMobileKey:r,sectorRuntime:i})},uninstallClient:(n,t)=>{e.ipcRenderer.send("on-uninstall-client",{gitHash:n,useNemo:t})},changeSettings:async(n,t)=>{e.ipcRenderer.send("on-change-settings",{domain:n,environment:t})},updateWorlds:async()=>{e.ipcRenderer.send("on-update-worlds")},updateEnvironment:async n=>{e.ipcRenderer.send("on-update-environment",{environment:n})},loginWithSteam:async n=>{e.ipcRenderer.send("on-steam-login",{domain:n})},getApplicationState:()=>n,registerStateCallback:e=>{o.includes(e)||o.push(e)},unRegisterStateCallback:e=>{o.includes(e)&&(o=o.filter((n=>n!=e)))},registerNotificationCallback:e=>{r.push(e)},unRegisterNotificationCallback:e=>{r=r.filter((n=>n!=e))},fetchLatestContent:async()=>{try{return await e.ipcRenderer.invoke("fetch-latest-content")}catch(e){return console.error("Frontend IPC Fetch Error:",e),{error:"Unexpected error occurred."}}},voidAuthentication:async()=>await e.ipcRenderer.invoke("void-authentication")};e.contextBridge.exposeInMainWorld("api",i),window.addEventListener("DOMContentLoaded",(()=>{e.ipcRenderer.on("on-set-path",((e,n)=>{console.log(`on-set-path: ${n}`),window.location.hash=n})),e.ipcRenderer.on("on-application-state",((e,t)=>{n=t;try{o.forEach((e=>{e&&e(n)}))}catch(e){console.log("error in state callback",e)}})),e.ipcRenderer.on("on-user-notification",((e,n)=>{r.forEach((e=>{try{if(!e)return;e(n.message,n.type)}catch(e){console.log("error in notification callback",e)}}))}))}))})()})();
//# sourceMappingURL=preload.js.map