module.exports=function(e){function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(n){return e[n]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=2)}([function(e){e.exports=require("electron")},function(e){e.exports=require("path")},function(e,n,t){"use strict";function o(){(r=new i.BrowserWindow({height:603,backgroundColor:"#f5f5f5",useContentSize:!0,width:850,resizable:!1,show:!1,minimizable:!1,frame:!1,webPreferences:{nodeIntegration:!0,webSecurity:!0,nodeIntegrationInWorker:!1,enableRemoteModule:!0}})).setMenu(null),r.webContents.on("will-navigate",(function(e){return e.preventDefault()})),r.loadURL(s,{userAgent:"ClashforWindows/7.0 (Windows NT 10.0; Win64; x64) Chrome/76.0.3809.126 Electron/6.0.3"}),r.on("hide",(function(){r.webContents.send("window-event","hide")})),r.on("show",(function(){r.webContents.send("window-event","show")})),r.on("close",(function(e){return i.app.isQuiting||(e.preventDefault(),r.hide()),!1})),r.on("minimize",(function(e){e.preventDefault(),r.hide()})),r.on("session-end",(function(e){e.preventDefault(),r.webContents.send("app-exit")})),r.webContents.on("crashed",(function(){i.dialog.showMessageBox({type:"error",title:"Clash for Windows",message:"Dashboard has crashed!",buttons:["Reload","Exit"]},(function(e){0===e?function(e){e.isDestroyed()?(i.app.relaunch(),i.app.exit(0)):(i.BrowserWindow.getAllWindows().forEach((function(n){n.id!==e.id&&n.destroy()})),e.reload())}(r):i.app.quit()}))})),t(0).powerMonitor.on("resume",(function(){r.webContents.send("app-resume")})),(a=new i.Tray(t(1).join(__static,"tray_normal_Z8R_icon.ico"))).setToolTip("Clash for Windows"),a.on("click",(function(){r.show()})),i.ipcMain.on("cleanup-done",(function(){console.log("cleanup done"),i.app.isQuiting=!0,i.app.quit()})),i.ipcMain.on("status-changed",(function(e,n){try{a.setImage(n)}catch(e){}})),i.ipcMain.on("show-notification",(function(e,n){var t=new i.Notification(n);void 0!==n.folder&&t.on("click",(function(){i.shell.openItem(n.folder)})),t.show()}));var e=i.Menu.buildFromTemplate([{label:"Dashboard",click:function(){r.show()}},{label:"Force Quit",click:function(){i.app.isQuiting=!0,i.app.quit()}},{label:"Quit",click:function(){r.webContents.send("app-exit")}}]);a.setContextMenu(e)}t.r(n);var i=t(0);t.n(i);global.__static=t(1).join(__dirname,"/static").replace(/\\/g,"\\\\"),i.app.disableHardwareAcceleration();var r=void 0,a=void 0,s="file://"+__dirname+"/index.html",u=i.app.requestSingleInstanceLock();i.app.setAppUserModelId("com.lbyczf.clashwin"),i.app.setAsDefaultProtocolClient("clash"),u?(i.app.on("second-instance",(function(e,n){r&&(r.webContents.send("app-open",n),r.isMinimized()&&r.restore(),r.show())})),i.app.on("ready",o)):i.app.quit(),i.app.on("activate",(function(){null===r&&o()}))}]);