let data=location.search.replace("?data=","");data=decodeURIComponent(data),data=JSON.parse(data);const pfs=require("pfs");let{dirpath:dirpath,appName:appName}=data,{remote:remote,ipcRenderer:ipcRenderer}=require("electron");const{BrowserWindow:BrowserWindow,BrowserView:BrowserView}=remote;let currentWin=remote.getCurrentWindow();ipcRenderer.once("notice-initData",(e,r)=>{Object.assign(window,r),setTimeout(async()=>{let e=await pfs.readFile(`${serverDir}/${appName}/package.json`);e=JSON.parse(e),loadJS(e.o)},0)}),ipcRenderer.send("d-msg",{type:"getData"});const loadJS=(e,r=0)=>{let a=e[r];if(!a)return;let t=document.createElement("script");t.onload=(()=>{loadJS(e,++r)}),t.onerror=(()=>{ipcRenderer.send("c-msg",{type:"openError",appName:appName,dirpath:dirpath,error:"load error => "+t.src}),currentWin.close()}),t.src=`file://${serverDir}/${appName}/${a}.js`,document.head.appendChild(t)};