text: module.exports=function(e){var n={};function s(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=e,s.c=n,s.d=function(e,n,t){s.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},s.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(n,"a",n),n},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},s.p="./dist/",s(s.s="./app/ui/preload.js")}({"./app/app.html":function(e,n){e.exports="<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <title>Bastet</title>\n    <script>\n      (function() {\n        if (!process.env.HOT) {\n          const link = document.createElement('link');\n          link.rel = 'stylesheet';\n          link.href = './dist/style.css';\n          // HACK: Writing the script path should be done with webpack\n          document.getElementsByTagName('head')[0].appendChild(link);\n        }\n      }());\n    <\/script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script>\n      {\n        const scripts = [];\n\n        // Dynamically insert the DLL script in development env in the\n        // renderer process\n        if (process.env.NODE_ENV === 'development') {\n          scripts.push('../dll/renderer.dev.dll.js');\n        }\n\n        // Dynamically insert the bundled app script in the renderer process\n        const port = process.env.PORT || 1212;\n        scripts.push(\n          (process.env.HOT)\n            ? 'http://localhost:' + port + '/dist/renderer.dev.js'\n            : './dist/renderer.prod.js'\n        );\n\n        document.write(\n          scripts\n            .map(script => '<script defer src=\"' + script + '\"><\\/script>')\n            .join('')\n        );\n      }\n    <\/script>\n  </body>\n</html>\n"},"./app/ui/preload.js":function(e,n,s){"use strict";console.log("preload"),window.ipcBus=s("./node_modules/electron-ipc-bus/lib/electron-ipc-bus.js").CreateIpcBusClient(),window.ipcBus_QUERYSTATE_CHANNEL=s("./node_modules/electron-ipc-bus/lib/electron-ipc-bus.js").IPCBUS_CHANNEL_QUERY_STATE,s("./node_modules/electron-ipc-bus/lib/electron-ipc-bus.js").ActivateIpcBusTrace(!0),window.ipcRenderer=s("electron").ipcRenderer;s("./app/app.html");console.log("window",window)},"./node_modules/easy-ipc/lib/ipc-cli.js":function(e,n,s){e.exports=c;var t=s("./node_modules/easy-ipc/lib/ipc-cmd.js").line2cmd,r=(s("./node_modules/easy-ipc/lib/ipc-cmd.js").mkCmd,s("./node_modules/easy-ipc/lib/ipc-cmd.js").isCmd),i=s("readline"),o=s("util");function c(e,n){if(!(this instanceof c))return new c(e,n);var s=this;s.ipc=e,s.conn=n,s.stdin=process.openStdin(),s.stdout=process.stdout,s._rl=i.createInterface(s.stdin,s.stdout),s._rl.on("line",function(e){s.conn.write(t(e)),s.consoleRefresh()}),s.stdin.on("keypress",function(e,n){n&&"c"===n.name&&n.ctrl&&!n.meta&&!n.shift&&(s.console(!1),s.writeToConsole("Press [Ctrl+C] again to quit.\n"))}),s.ipc.on("connect",function(e){s.setConnection(e)}),s.ipc.on("reconnect",function(e){s.setConnection(e)}),s.ipc.on("data",function(e){r(e)||s.writeToConsole(e)}),s.setConnection(n),console.log=s.writeToConsole.bind(s),console.info=s.writeToConsole.bind(s,"info"),console.warn=s.writeToConsole.bind(s,"warn"),console.error=s.writeToConsole.bind(s,"error")}c.prototype.setConnection=function(e){var n=this;n.conn&&(n.conn=null),n.conn=e,n.console(!0),n.writeToConsole("connected to "+e.remoteAddress+":"+e.remotePort+" from "+JSON.stringify(e.address())+"\n"),n.consoleRefresh(),e.on("close",function(){console.error("connection lost!"),n.conn=null,n.console(!1),n.ipc.reconnect&&console.info("reconnecting...")})},c.prototype.console=function(e){e?(this.consoleEnabled=!0,this.stdin.resume(),this._rl.resume(),this._rl.prompt()):(this.consoleEnabled&&this._rl.output.cursorTo(0),this.consoleEnabled=!1,this.stdin.pause(),this._rl.pause())};var l={log:"grey",info:"cyan",warn:"magenta",error:"red",fatal:"inverse"};c.prototype.writeToConsole=function(){var e,n;null!=l[arguments[0]]?(e=arguments[0],n=Array.prototype.slice.call(arguments,1)):(e="log",n=arguments);var s=function(e,n){if(!e)return"";var s=a[n];return s?"["+s[0]+"m"+e+"["+s[1]+"m":e}(o.format.apply(o.format,n),l[e])+"\n";this.consoleEnabled?(this._rl.output.cursorTo(0),this.stdout.write(s),this.consoleRefresh()):this.stdout.write(s)},c.prototype.consoleRefresh=function(){this.consoleEnabled&&this._rl._refreshLine()};var a={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]}},"./node_modules/easy-ipc/lib/ipc-cmd-help.js":function(e,n){function s(e,n,s){var t=s._cmds[e];t?n.cmd[".info"]("Usage: %s",e,r(t.sig)):n.cmd[".error"]("Unknown command: %s",e)}function t(e,n,s){if(e){var t=s._cmds[e];if(t){var i="",o=[];i+=e,t.doc&&(i+="\n"+t.doc+"\n"),i+="\nUsage: "+e+" "+r(t.sig)+"\n",t.sig.forEach(function(e){var n=[];e.type&&n.push("<"+e.type+">"),e.required?n.push(e.name):n.push("["+e.name+"]"),n=n.join(" "),e.description&&(n+=" - "+e.description),o.push("  "+n)}),o.length&&(i+="\nArguments:\n\n"+o.join("\n")+"\n"),n.cmd[".info"](i)}else n.cmd[".error"]("Unknown command: %s",e)}else{var c=Object.keys(s._cmds).filter(function(e){return"."!==e[0]}),l=c.reduce(function(e,n){return Math.max(e,n.length)},0);l=new Array(Math.max(11,l+1)).join(" ")+"  ",i=c.map(function(e){var n=s._cmds[e];return(l+e).slice(-1*l.length)+" - "+function(e,n,s){n=n||78;var t=[s=s||""],r=0;e=e.split(" ");for(;e.length;){var i=e.shift();(t[r]+i).length>n+s.length?(t.push(s),r++):t[r]!==s&&(t[r]+=" "),t[r]+=i}return t.join("\n").slice(s.length)}(n.doc,48,l+"   ")});n.cmd[".info"]("Available commands:\n\n%s\n\n%d total.",i.join("\n"),c.length)}}function r(e){var n=[];return e.forEach(function(e,s){var t=e.name||"arg"+s;e.required?n.push(t):n.push("["+t+"]")}),n=n.join(" ")}e.exports={help:t,usage:s},s.doc="Prints the usage-description of a command.",s.sig=[{name:"name",required:!0,type:"String",description:"The name of a command."}],t.doc="Prints this help. Type help [command] to get detailed informations.",t.sig=[{name:"name",required:!1,type:"String",description:"The name of a command."}]},"./node_modules/easy-ipc/lib/ipc-cmd.js":function(e,n,s){e.exports=i;var t=s("./node_modules/lazy/lazy.js"),r=s("stream").Stream;function i(e,n){if(!(this instanceof i))return new i(e,n);var a=this;a.ipc=e,a._cmds={};var u=new r;a.ipc.on("connection",function(e){e.write("Welcome!"),e.write('Type "help" for help.')}),a.ipc.on("connection",o),a.ipc.on("reconnect",o),a.ipc.on("data",function(e,n){u.emit("data",{conn:n,data:e})}),t(u).filter(function(e){return l(e.data)}).forEach(function(e){var n=e.conn,s=e.data.name,t=e.data.args||[],r=a._cmds[s];if(r){if(r.sig){if((o=r.sig.length-t.length)<0)return void c(".error","Too much arguments: %s %s",s,t.join(" "),n);var i=r.sig.reduce(function(e,n,s){return n.required&&null==t[s]?e+1:e},0);if(i)return c(".error","Missing %d required arguments: %s %s",i,s,t.join(" "),n),void a._cmds.usage(s,n,a);for(;o>0;)t.push(null),o-=1;t.push(n),t.push(a)}else for(var o=r.length-t.length;o>0;)1===o?(t.push(n),o-=1):2===o?(t.push(n),t.push(a),o-=2):(t.push(null),o-=1);r.apply(a,t||[])}else c(".error","Unknown command: %s",s,n)}),a.add(".commands",function(e){c(".commands-remote",Object.keys(a._cmds),e)}),a.add(".commands-remote",function(e,n){n.cmd=n.cmd||{},e.forEach(function(e){n.cmd[e]=function(){var s=Array.prototype.slice.call(arguments,0);s.unshift(e),s.push(n),c.apply(c,s)}})}),a.add(".log",function(){console.log.apply(console.log,arguments)}),a.add(".info",function(){console.info.apply(console.info,arguments)}),a.add(".warn",function(){console.warn.apply(console.warn,arguments)}),a.add(".error",function(){console.error.apply(console.error,arguments)}),a.add("exit",function(e,n){e.end()}),a.set(s("./node_modules/easy-ipc/lib/ipc-cmd-help.js")),n&&o(n)}i.prototype.set=function(e){var n=this;return Object.keys(e).forEach(function(s){n.add(s,e[s],null,e[s].doc,e[s].sig)}),this},i.prototype.add=function(e,n,s,t,r){if(this._cmds[e])throw new Error("Command already defined: "+e);return this._cmds[e]=n.bind(s||this),this._cmds[e].doc=null!=t?t:"",this._cmds[e].sig=null!=r?r:null,this};var o=i.introspect=function(e){c(".commands",e)},c=i.exec=function(){var e=Array.prototype.slice.call(arguments,0),n=e.pop();return!!n.write&&(n.write(a.apply(a,e)),!0)},l=i.isCmd=function(e){return e&&"cmd"===e.type},a=i.mkCmd=function(){var e=Array.prototype.slice.call(arguments,0);return{type:"cmd",name:e[0],args:e.slice(1)}};i.line2cmd=function(e){return{type:"cmd",name:(e=e.split(" "))[0],args:e.slice(1)}}},"./node_modules/easy-ipc/lib/ipc.js":function(e,n,s){e.exports=c;var t=s("net"),r=s("util"),i=(s("events").EventEmitter,s("stream").Stream),o=s("./node_modules/lazy/lazy.js");function c(e){if(!(this instanceof c))return new c(e);i.call(this);e=e||{},this.socketPath=null!=e.socketPath&&e.socketPath,this.port=null!=e.port?e.port:7100,this.host=null!=e.host?e.host:"localhost",this.reconnect=null==e.reconnect||e.reconnect,this.delayReconnect=null!=e.delayReconnect?e.delayReconnect:3e3,this.dataType=null!=e.dataType?e.dataType:"json",this.numReconnects=0}r.inherits(c,i),c.prototype.connect=function(e,n,s){var r,i=this;function o(t){return r.removeListener("connect",c),"ENOENT"===t.code&&isNaN(e)&&i.port?(i.emit("warn",new Error(t.code+" on "+e+", "+n)),void i.connect(i.port,s)):"ECONNREFUSED"===t.code&&i.numReconnects?(i.emit("warn",new Error(t.code+" on "+e+", "+n)),i._reconnect(e,n)):(s(t),void i.emit("error",t))}function c(){r.removeListener("error",o),i._parseStream(r),r.on("close",function(s){i.emit("close",s,r),i.reconnect&&i._reconnect(e,n)}),s(null,r),i.numReconnects>0?(i.emit("reconnect",r),i.numReconnects=0):i.emit("connect",r)}e instanceof Function&&(s=e,e=null),n instanceof Function&&(s=n,n=null),e=e||i.socketPath||i.port,n=n||(isNaN(e)?null:i.host),s=s||function(){},(r=e&&n?t.connect(e,n):t.connect(e)).once("error",o),r.once("connect",c)},c.prototype._reconnect=function(e,n){var s=this;s.numReconnects+=1,s.delayReconnect?setTimeout(function(){s.connect(e,n)},s.delayReconnect):s.connect(e,n)},c.prototype.listen=function(e,n,s){var r=this;function i(t){if("EACCES"===t.code&&isNaN(e)&&r.port)return r.emit("warn",new Error(t.code+" on "+e+", "+n)),void r.listen(r.port,s);s(t),r.emit("error",t)}e instanceof Function&&(s=e,e=null),n instanceof Function&&(s=n,n=null),e=e||r.socketPath||r.port,n=n||(isNaN(e)?null:r.host),s=s||function(){};var o=t.createServer();o.once("error",i),o.once("listening",function(){o.removeListener("error",i),r.emit("listening",o)}),o.on("connection",function(e){r._parseStream(e,o),e.on("close",function(n){r.emit("close",n,e,o)}),s(null,e,o),r.emit("connection",e,o)}),e&&n?o.listen(e,n):o.listen(e)},c.prototype.start=function(e,n,s){var t=this;function r(r){"ECONNREFUSED"==r.code?(t.emit("warn",new Error(r.code+" on "+e+", "+n)),t.listen(e,n)):(t.removeListener("listening",i),t.removeListener("connection",o),t.removeListener("connect",c),s(r),t.emit("error",r))}function i(e){t.removeListener("error",r),t.removeListener("connection",o),t.removeListener("connect",c),s(null,!0,e)}function o(e,n){t.removeListener("error",r),t.removeListener("listening",i),t.removeListener("connect",c),s(null,!0,e,n)}function c(e){t.removeListener("error",r),t.removeListener("listening",i),t.removeListener("connection",o),s(null,!1,e)}e instanceof Function&&(s=e,e=null),n instanceof Function&&(s=n,n=null),e=e||t.socketPath||t.port,n=n||(isNaN(e)?null:t.host),s=s||function(){},t.once("error",r),t.once("listening",i),t.once("connection",o),t.once("connect",c),t.connect(e,n)},c.prototype._parseStream=function(e,n){var s=this;o(e).lines.map(String).forEach(s._onData.bind(s,e,n));var t=e.write;e.write=function(){if(e.writable)return"json"===s.dataType&&(arguments[0]=JSON.stringify(arguments[0])+"\n"),t.apply(e,arguments);s.emit("warn",new Error("Connection is not writable."))}},c.prototype._onData=function(e,n,s){"json"===this.dataType&&(s=JSON.parse(s)),n?this.emit("data",s,e,n):this.emit("data",s,e)},c.Cmd=s("./node_modules/easy-ipc/lib/ipc-cmd.js"),c.Cli=s("./node_modules/easy-ipc/lib/ipc-cli.js")},"./node_modules/electron-ipc-bus/lib/IpcBus/ElectronUtils.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GuessElectronProcessType=function(){let e=null;try{e=s("electron")}catch(e){return"node"}let n=process.type;return null==n&&(n="node",e.ipcRenderer?n="renderer":e.ipcMain&&(n="browser")),n}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusServiceImpl.js"),i=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusServiceProxyImpl.js"),o=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusBrokerImpl.js"),c=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusBridgeImpl.js"),l=s("./node_modules/electron-ipc-bus/lib/IpcBus/ElectronUtils.js");n._CreateIpcBusBroker=function(e){let n=null,s=t.ExtractIpcOptions(e),r=l.GuessElectronProcessType();switch(t.Logger.enable&&t.Logger.info(`_CreateIpcBusBroker process type = ${r}, ipc options = ${s}`),r){case"browser":case"node":s.isValid()&&(n=new o.IpcBusBrokerImpl({type:r,pid:process.pid},s))}return n},n._CreateIpcBusBridge=function(e){let n=null,s=t.ExtractIpcOptions(e),r=l.GuessElectronProcessType();switch(t.Logger.enable&&t.Logger.info(`_CreateIpcBusBridge process type = ${r}, ipc options = ${s}`),r){case"browser":s.isValid()&&(n=new c.IpcBusBridgeImpl({type:r,pid:process.pid},s))}return n};const a=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusClient.js"),u=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransport.js");n._CreateIpcBusClient=function(e){let n=t.ExtractIpcOptions(e),s=u.CreateIpcBusTransport(n),r=null;return null!=s&&(r=new a.IpcBusCommonClient(s)),r},n._CreateIpcBusService=function(e,n,s){return new r.IpcBusServiceImpl(e,n,s)},n._CreateIpcBusServiceProxy=function(e,n,s=1e3){return new i.IpcBusServiceProxyImpl(e,n,s)},n._ActivateIpcBusTrace=function(e){t.Logger.enable=e},n._ActivateServiceTrace=function(e){t.Logger.service=e}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusBridgeImpl.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransportNode.js");n.IpcBusBridgeImpl=class extends r.IpcBusTransportNode{constructor(e,n){super(e,n),this._ipcMain=s("electron").ipcMain,this._webContents=s("electron").webContents,this._subscriptions=new t.ChannelConnectionMap("IPCBus:Bridge"),this._requestChannels=new Map,this._ipcBusPeers=new Map}_onEventReceived(e,n,s,r){switch(e){case t.IPC_BUS_EVENT_SENDMESSAGE:case t.IPC_BUS_EVENT_REQUESTMESSAGE:t.Logger.enable&&t.Logger.info(`[IPCBus:Bridge] Received ${e} on channel '${s.channel}' from peer #${s.sender.name}`),this._subscriptions.forEachChannel(s.channel,(i,o)=>{t.Logger.enable&&t.Logger.info(`[IPCBus:Bridge] Forward send message received on '${o}' to peer #Renderer_${i.connKey}`),i.conn.send(t.IPC_BUS_RENDERER_EVENT,e,n,s,r)});break;case t.IPC_BUS_EVENT_REQUESTRESPONSE:{t.Logger.enable&&t.Logger.info(`[IPCBus:Bridge] Received ${e} on channel '${n.replyChannel}' from peer #${s.sender.name}`);let i=this._requestChannels.get(n.replyChannel);i&&(this._requestChannels.delete(n.replyChannel),t.Logger.enable&&t.Logger.info(`[IPCBus:Bridge] Forward send response received on '${n.replyChannel}' to peer #Renderer_${i.id}`),i.send(t.IPC_BUS_RENDERER_EVENT,e,n,s,r));break}}}start(e){return null==e&&(e=t.IPC_BUS_TIMEOUT),new Promise((n,s)=>{this.ipcConnect(e).then(e=>{0===this._ipcMain.listenerCount(t.IPC_BUS_RENDERER_HANDSHAKE)&&this._ipcMain.addListener(t.IPC_BUS_RENDERER_HANDSHAKE,(e,n)=>this._onHandshake(e,n)),0===this._ipcMain.listenerCount(t.IPC_BUS_RENDERER_COMMAND)&&this._ipcMain.addListener(t.IPC_BUS_RENDERER_COMMAND,(e,n,s,t,r)=>this._onRendererMessage(e,n,s,t,r)),t.Logger.enable&&t.Logger.info("[IPCBus:Bridge] Installed"),n(e)}).catch(e=>{s(e)})})}stop(){this.ipcClose(),this._ipcMain.removeAllListeners(t.IPC_BUS_RENDERER_HANDSHAKE),this._ipcMain.removeAllListeners(t.IPC_BUS_RENDERER_COMMAND)}queryState(){let e=[];return this._subscriptions.forEach((n,s)=>{n.peerIds.forEach((n,t)=>{e.push({channel:s,peer:this._ipcBusPeers.get(t),count:n})})}),e}_rendererCleanUp(e,n,s){this._subscriptions.releaseConnection(n),this._requestChannels.forEach((n,s)=>{n===e&&this._requestChannels.delete(s)})}_onHandshake(e,n){const s=e.sender;let r=s.id;s.addListener("destroyed",()=>{this._rendererCleanUp(s,r,n);let e=this._ipcBusPeers.get(n);e&&(this._ipcPushCommand(t.IPC_BUS_COMMAND_DISCONNECT,{peerId:n},{channel:"",sender:e}),this._ipcBusPeers.delete(n))}),s.send(t.IPC_BUS_RENDERER_HANDSHAKE,s.id)}_onRendererMessage(e,n,s,r,i){const o=e.sender;switch(t.Logger.enable&&t.Logger.info(`[IPCBus:Bridge] Peer #${r.sender.name} post ${n} on '${r.channel}'`),n){case t.IPC_BUS_COMMAND_CONNECT:this._ipcBusPeers.set(s.peerId,r.sender),o.send(t.IPC_BUS_COMMAND_CONNECT,o.id);break;case t.IPC_BUS_COMMAND_DISCONNECT:case t.IPC_BUS_COMMAND_CLOSE:n=t.IPC_BUS_COMMAND_DISCONNECT,this._rendererCleanUp(o,o.id,s.peerId),this._ipcBusPeers.delete(s.peerId);break;case t.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL:this._subscriptions.addRef(r.channel,o.id,o,s.peerId);break;case t.IPC_BUS_COMMAND_UNSUBSCRIBE_CHANNEL:s.unsubscribeAll?this._subscriptions.releaseAll(r.channel,o.id,s.peerId):this._subscriptions.release(r.channel,o.id,s.peerId);break;case t.IPC_BUS_COMMAND_UNSUBSCRIBE_ALL:this._rendererCleanUp(o,o.id,s.peerId);break;case t.IPC_BUS_COMMAND_REQUESTMESSAGE:this._requestChannels.set(s.replyChannel,o);break;case t.IPC_BUS_COMMAND_REQUESTCANCEL:this._requestChannels.delete(s.replyChannel)}this._ipcPushCommand(n,s,r,i)}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusBrokerImpl.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/easy-ipc/lib/ipc.js"),r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js"),i=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),o=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusClient.js"),c=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransportNode.js");n.IpcBusBrokerImpl=class{constructor(e,n){this._ipcServer=null,this._queryStateLamdba=((e,n)=>this._onQueryState(e,n)),this._serviceAvailableLambda=((e,n)=>this._onServiceAvailable(e,n)),this._ipcOptions=n,this._baseIpc=new t,this._subscriptions=new i.ChannelConnectionMap("IPCBus:Broker"),this._requestChannels=new Map,this._ipcBusPeers=new Map,this._baseIpc.on("connection",(e,n)=>this._onConnection(e,n)),this._baseIpc.on("close",(e,n,s)=>this._onClose(e,n,s)),this._baseIpc.on("data",(e,n,s)=>this._onData(e,n,s));let s=new c.IpcBusTransportNode(e,n);this._ipcBusBrokerClient=new o.IpcBusCommonClient(s)}start(e){return null==e&&(e=i.IPC_BUS_TIMEOUT),new Promise((n,s)=>{this._baseIpc.once("listening",e=>{this._ipcServer?n("started"):(this._ipcServer=e,i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Listening for incoming connections on ${this._ipcOptions}`),this._ipcBusBrokerClient.connect(`Broker_${process.pid}`).then(()=>{this._ipcBusBrokerClient.on(r.IPCBUS_CHANNEL_QUERY_STATE,this._queryStateLamdba),this._ipcBusBrokerClient.on(r.IPCBUS_CHANNEL_SERVICE_AVAILABLE,this._serviceAvailableLambda),n("started")}).catch(e=>s(`Broker client error = ${e}`)))}),setTimeout(()=>{s("timeout")},e),this._baseIpc.listen(this._ipcOptions.port,this._ipcOptions.host)})}stop(){this._ipcServer&&(this._ipcBusBrokerClient.off(r.IPCBUS_CHANNEL_QUERY_STATE,this._queryStateLamdba),this._ipcBusBrokerClient.off(r.IPCBUS_CHANNEL_SERVICE_AVAILABLE,this._serviceAvailableLambda),this._ipcBusBrokerClient.close(),this._ipcServer.close(),this._ipcServer=null)}queryState(){let e=[];return this._subscriptions.forEach((n,s)=>{n.peerIds.forEach((n,t)=>{e.push({channel:s,peer:this._ipcBusPeers.get(t),count:n})})}),e}isServiceAvailable(e){return this._subscriptions.hasChannel(i.getServiceCallChannel(e))}_onQueryState(e,n){const s=this.queryState();e.request?e.request.resolve(s):null!=n&&this._ipcBusBrokerClient.send(n,s)}_onServiceAvailable(e,n){const s=this.isServiceAvailable(n);i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Service '${n}' availability : ${s}`),e.request&&e.request.resolve(s)}_onConnection(e,n){i.Logger.enable&&i.Logger.info("[IPCBus:Broker] Incoming connection !"),i.Logger.enable&&i.Logger.info("[IPCBus:Broker] socket.remotePort="+e.remotePort),e.on("error",e=>{i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Error on connection: ${e}`)})}_socketCleanUp(e){this._subscriptions.releaseConnection(e.remotePort),this._requestChannels.forEach((n,s)=>{n.remotePort===e.remotePort&&this._requestChannels.delete(s)}),i.Logger.enable&&i.Logger.info("[IPCBus:Broker] Connection closed !")}_onClose(e,n,s){this._socketCleanUp(n)}_onData(e,n,s){if(t.Cmd.isCmd(e))switch(e.name){case i.IPC_BUS_COMMAND_CONNECT:{const n=e.args[0],s=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Connect peer #${s.sender.name}`),this._ipcBusPeers.set(n.peerId,s.sender);break}case i.IPC_BUS_COMMAND_DISCONNECT:{const s=e.args[0],t=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Unsubscribe all '${t.channel}' from peer #${t.sender.name}`),this._ipcBusPeers.delete(s.peerId)&&this._subscriptions.releasePeerId(n.remotePort,s.peerId);break}case i.IPC_BUS_COMMAND_CLOSE:{const s=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Close peer #${s.sender.name}`),this._socketCleanUp(n);break}case i.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL:{const s=e.args[0],t=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Subscribe to channel '${t.channel}' from peer #${t.sender.name}`),this._subscriptions.addRef(t.channel,n.remotePort,n,s.peerId);break}case i.IPC_BUS_COMMAND_UNSUBSCRIBE_CHANNEL:{const s=e.args[0],t=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Unsubscribe from channel '${t.channel}' from peer #${t.sender.name}`),s.unsubscribeAll?this._subscriptions.releaseAll(t.channel,n.remotePort,s.peerId):this._subscriptions.release(t.channel,n.remotePort,s.peerId);break}case i.IPC_BUS_COMMAND_UNSUBSCRIBE_ALL:{const s=e.args[0],t=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Unsubscribe all '${t.channel}' from peer #${t.sender.name}`),this._subscriptions.releasePeerId(n.remotePort,s.peerId);break}case i.IPC_BUS_COMMAND_SENDMESSAGE:{const n=e.args[0],s=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Received send on channel '${s.channel}' from peer #${s.sender.name}`),this._subscriptions.forEachChannel(s.channel,function(r,o){t.Cmd.exec(i.IPC_BUS_EVENT_SENDMESSAGE,n,s,e.args[2],r.conn)});break}case i.IPC_BUS_COMMAND_REQUESTMESSAGE:{const s=e.args[0],r=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Received request on channel '${r.channel}' (reply = '${s.replyChannel}') from peer #${r.sender.name}`),this._requestChannels.set(s.replyChannel,n),this._subscriptions.forEachChannel(r.channel,function(n,o){t.Cmd.exec(i.IPC_BUS_EVENT_REQUESTMESSAGE,s,r,e.args[2],n.conn)});break}case i.IPC_BUS_COMMAND_REQUESTRESPONSE:{const n=e.args[0],s=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Received response request on channel '${s.channel}' (reply = '${n.replyChannel}') from peer #${s.sender.name}`);let r=this._requestChannels.get(n.replyChannel);r&&(this._requestChannels.delete(n.replyChannel),t.Cmd.exec(i.IPC_BUS_EVENT_REQUESTRESPONSE,n,s,e.args[2],r));break}case i.IPC_BUS_COMMAND_REQUESTCANCEL:{const n=e.args[0],s=e.args[1];i.Logger.enable&&i.Logger.info(`[IPCBus:Broker] Received cancel request on channel '${s.channel}' (reply = '${n.replyChannel}') from peer #${s.sender.name}`),this._requestChannels.delete(n.replyChannel);break}}}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusClient.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),r=s("events");n.IpcBusCommonClient=class extends r.EventEmitter{constructor(e){super(),this._ipcBusTransport=e,this._ipcBusTransport.eventEmitter=this}get peer(){return this._ipcBusTransport.peer}connect(e,n){let s=t.IPC_BUS_TIMEOUT;return"number"==typeof e&&e>0?s=e:"string"==typeof e&&(n=e),this._ipcBusTransport.ipcConnect(s,n)}close(){super.removeAllListeners(),this._ipcBusTransport.ipcClose()}send(e,...n){this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_SENDMESSAGE,{},e,n)}request(e,...n){return"number"==typeof e?this._ipcBusTransport.request(e,n[0],n.slice(1)):this._ipcBusTransport.request(null,e,n)}addListener(e,n){return super.addListener(e,n),this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL,{},e),this}removeListener(e,n){return super.removeListener(e,n),this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_UNSUBSCRIBE_CHANNEL,{},e),this}on(e,n){return this.addListener(e,n)}once(e,n){return super.once(e,n),this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL,{},e),this}off(e,n){return this.removeListener(e,n)}removeAllListeners(e){return e?this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_UNSUBSCRIBE_CHANNEL,{unsubscribeAll:!0},e):this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_UNSUBSCRIBE_ALL,{},""),super.removeAllListeners(e),this}prependListener(e,n){return super.prependListener(e,n),this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL,{},e),this}prependOnceListener(e,n){return super.prependOnceListener(e,n),this._ipcBusTransport.ipcPushCommand(t.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL,{},e),this}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IPCBUS_SERVICE_CALL_GETSTATUS="__getServiceStatus",n.IPCBUS_CHANNEL_QUERY_STATE="/electron-ipc-bus/queryState",n.IPCBUS_CHANNEL_SERVICE_AVAILABLE="/electron-ipc-bus/serviceAvailable",n.IPCBUS_SERVICE_EVENT_START="service-event-start",n.IPCBUS_SERVICE_EVENT_STOP="service-event-stop",n.IPCBUS_SERVICE_WRAPPER_EVENT="service-wrapper-event";n.ServiceStatus=class{constructor(e,n,s){this.started=e,this.callHandlers=n,this.supportEventEmitter=s}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusServiceImpl.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js"),r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js");class i{constructor(e,n,s){if(this._ipcBusClient=e,this._serviceName=n,this._exposedInstance=s,this._callReceivedLamdba=((e,...n)=>this._onCallReceived(e,n[0])),this._prevImplEmit=null,this._callHandlers=new Map,this.registerCallHandler(t.IPCBUS_SERVICE_CALL_GETSTATUS,(e,n,s)=>{s.resolve(new t.ServiceStatus(!0,this._getCallHandlerNames(),null!=this._prevImplEmit))}),this._exposedInstance){for(let e in this._exposedInstance){"function"==typeof this._exposedInstance[e]&&this._isFunctionVisible(e)&&this.registerCallHandler(e,(e,n,s)=>this._doCall(e,n,s))}for(let e of Object.getOwnPropertyNames(Object.getPrototypeOf(this._exposedInstance)))if(!this._callHandlers.has(e)){this._exposedInstance[e]instanceof Function&&this._isFunctionVisible(e)&&this.registerCallHandler(e,(e,n,s)=>this._doCall(e,n,s))}}else r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' does NOT have an implementation`)}_isFunctionVisible(e){return!i._hiddenMethods.has(e)&&"_"!==e[0]}start(){this._exposedInstance&&this._exposedInstance.emit&&(this._prevImplEmit=this._exposedInstance.emit,this._exposedInstance.emit=((e,...n)=>{r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' is emitting event '${e}'`),this.sendEvent(t.IPCBUS_SERVICE_WRAPPER_EVENT,e,n),this._prevImplEmit.call(this._exposedInstance,e,...n)}),r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' will send events emitted by its implementation`)),this._ipcBusClient.addListener(r.getServiceCallChannel(this._serviceName),this._callReceivedLamdba),this.sendEvent(t.IPCBUS_SERVICE_EVENT_START,new t.ServiceStatus(!0,this._getCallHandlerNames(),null!=this._prevImplEmit)),r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' is STARTED`)}stop(){this._exposedInstance&&this._prevImplEmit&&(this._exposedInstance.emit=this._prevImplEmit,this._prevImplEmit=null),this.sendEvent(t.IPCBUS_SERVICE_EVENT_STOP,{}),this._ipcBusClient.removeListener(r.getServiceCallChannel(this._serviceName),this._callReceivedLamdba),r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' is STOPPED`)}registerCallHandler(e,n){this._callHandlers.set(e,n),r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' registered call handler '${e}'`)}unregisterCallHandler(e){this._callHandlers.delete(e),r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' unregistered call handler '${e}'`)}sendEvent(e,...n){const s={eventName:e,args:n};this._ipcBusClient.send(r.getServiceEventChannel(this._serviceName),s)}_onCallReceived(e,n){let s=this._callHandlers.get(n.handlerName);if(s)try{s(n,e.sender,e.request)}catch(s){e.request.reject(s),r.Logger.service&&r.Logger.error(`[IpcService] Service '${this._serviceName}' encountered an exception while processing call to '${n.handlerName}' : ${s}`)}else e.request.reject(`Service '${this._serviceName}' does NOT handle calls to '${n.handlerName}' !`),r.Logger.service&&r.Logger.error(`[IpcService] Service '${this._serviceName}' does NOT handle calls to '${n.handlerName}' !`)}_doCall(e,n,s){r.Logger.service&&r.Logger.info(`[IpcService] Service '${this._serviceName}' is calling implementation's '${e.handlerName}'`);let t=e.args;this._exposedInstance._beforeCallHandler&&(t=this._exposedInstance._beforeCallHandler(e,n,s));try{const n=this._exposedInstance[e.handlerName](...t);n&&n.then?n.then(s.resolve,s.reject):s.resolve(n)}catch(n){s.reject(n),r.Logger.service&&r.Logger.error(`[IpcService] Service '${this._serviceName}' encountered an exception while processing call to '${e.handlerName}' : ${n}`)}}_getCallHandlerNames(){return Array.from(this._callHandlers.keys()).filter(e=>"_"!==e[0])}}i._hiddenMethods=new Set(["constructor","setMaxListeners","getMaxListeners","emit","addListener","on","off","prependListener","once","prependOnceListener","removeListener","removeAllListeners","listeners","listenerCount","eventNames"]),n.IpcBusServiceImpl=i},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusServiceProxyImpl.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("events"),r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js"),i=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js");class o extends t.EventEmitter{}n.IpcBusServiceProxyImpl=class extends t.EventEmitter{constructor(e,n,s=1e3){super(),this._ipcBusClient=e,this._serviceName=n,this._callTimeout=s,this._eventReceivedLamdba=((e,...n)=>this._onEventReceived(e,n[0])),this._delayedCalls=new Array,this._wrapper=null,this._wrapper=new o,this._isStarted=!1,this.getStatus().then(e=>{!this._isStarted&&e.started&&this._onServiceStart(e)}).catch(e=>{}),e.addListener(i.getServiceEventChannel(this._serviceName),this._eventReceivedLamdba)}get isStarted(){return this._isStarted}get wrapper(){return this._wrapper}getStatus(){return new Promise((e,n)=>{const s={handlerName:r.IPCBUS_SERVICE_CALL_GETSTATUS};this._ipcBusClient.request(this._callTimeout,i.getServiceCallChannel(this._serviceName),s).then(n=>{const s=n.payload;i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Service '${this._serviceName}' availability = ${s.started}`),e(s)}).catch(e=>{i.Logger.service&&i.Logger.warn(`[IpcBusServiceProxy] Service '${this._serviceName}' error ${e.err}`)})})}call(e,...n){const s={handlerName:e,args:n};return this._isStarted?new Promise((e,n)=>{this._ipcBusClient.request(this._callTimeout,i.getServiceCallChannel(this._serviceName),s).then(n=>e(n.payload)).catch(e=>n(e.err))}):new Promise((n,t)=>{i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Call to '${e}' from service '${this._serviceName}' delayed as the service is not available`),this._delayedCalls.push(()=>{i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Executing delayed call to '${e}' from service '${this._serviceName}' ...`),this._ipcBusClient.request(this._callTimeout,i.getServiceCallChannel(this._serviceName),s).then(e=>n(e.payload)).catch(e=>t(e.err))})})}getWrapper(){return this._wrapper}_updateWrapper(e){e.callHandlers.forEach(e=>{this._wrapper[e]=((...n)=>this.call(e,...n)),i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Service '${this._serviceName}' added '${e}' to its wrapper`)})}_sendDelayedCalls(){this._delayedCalls.forEach(e=>{e()}),this._delayedCalls.splice(0,this._delayedCalls.length)}_onEventReceived(e,n){if(n.eventName===r.IPCBUS_SERVICE_WRAPPER_EVENT)i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Wrapper '${this._serviceName}' receive event '${n.args[0]}'`),this._wrapper.emit(n.args[0],...n.args[1]);else switch(i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Service '${this._serviceName}' receive event '${n.eventName}'`),n.eventName){case r.IPCBUS_SERVICE_EVENT_START:this._onServiceStart(n.args[0]);break;case r.IPCBUS_SERVICE_EVENT_STOP:this._onServiceStop();break;default:this.emit(n.eventName,...n.args)}}_onServiceStart(e){this._isStarted=e.started,i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Service '${this._serviceName}' is STARTED`),this._updateWrapper(e),this.emit(r.IPCBUS_SERVICE_EVENT_START,e),this._sendDelayedCalls()}_onServiceStop(){this._isStarted=!1,i.Logger.service&&i.Logger.info(`[IpcBusServiceProxy] Service '${this._serviceName}' is STOPPED`),this.emit(r.IPCBUS_SERVICE_EVENT_STOP)}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransport.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),r=s("./node_modules/uuid/index.js");n.IpcBusData=class{};n.IpcBusTransport=class{constructor(e,n){this._ipcBusPeer={name:"",process:e},this.ipcOptions=n,this._peerId=r.v1(),this._requestFunctions=new Map}get peer(){return this._ipcBusPeer}_onEventReceived(e,n,s,r){switch(e){case t.IPC_BUS_EVENT_SENDMESSAGE:t.Logger.enable&&t.Logger.info(`[IpcBusClient] Emit message received on channel '${s.channel}' from peer #${s.sender.name}`),this.eventEmitter.emit(s.channel,s,...r);break;case t.IPC_BUS_EVENT_REQUESTMESSAGE:t.Logger.enable&&t.Logger.info(`[IpcBusClient] Emit request received on channel '${s.channel}' from peer #${s.sender.name} (replyChannel '${n.replyChannel}')`),s.request={resolve:e=>{n.resolve=!0,this.ipcPushCommand(t.IPC_BUS_COMMAND_REQUESTRESPONSE,n,n.replyChannel,[e])},reject:e=>{n.reject=!0,this.ipcPushCommand(t.IPC_BUS_COMMAND_REQUESTRESPONSE,n,n.replyChannel,[e])}},this.eventEmitter.emit(s.channel,s,...r);break;case t.IPC_BUS_EVENT_REQUESTRESPONSE:{t.Logger.enable&&t.Logger.info(`[IpcBusClient] Emit request response received on channel '${s.channel}' from peer #${s.sender.name} (replyChannel '${n.replyChannel}')`);let e=this._requestFunctions.get(n.replyChannel);e&&e(n,s,...r);break}}}request(e,n,s){return(null==e||e<=0)&&(e=t.IPC_BUS_TIMEOUT),new Promise((i,o)=>{const c={replyChannel:"/electron-ipc-bus/request-reply/"+r.v1()};this._requestFunctions.set(c.replyChannel,(e,s,r)=>{t.Logger.enable&&t.Logger.info(`[IpcBusClient] Peer #${s.sender.name} replied to request on ${c.replyChannel}`),this._requestFunctions.delete(c.replyChannel),s.channel=n,e.resolve?(t.Logger.enable&&t.Logger.info("[IpcBusClient] resolve"),i({event:s,payload:r})):e.reject?(t.Logger.enable&&t.Logger.info("[IpcBusClient] reject"),o({event:s,err:r})):(t.Logger.enable&&t.Logger.info("[IpcBusClient] reject: unknown format"),o({event:s,err:"unknown format"}))}),this.ipcPushCommand(t.IPC_BUS_COMMAND_REQUESTMESSAGE,c,n,s),setTimeout(()=>{if(this._requestFunctions.delete(c.replyChannel)){this.ipcPushCommand(t.IPC_BUS_COMMAND_REQUESTCANCEL,c,n),t.Logger.enable&&t.Logger.info("[IpcBusClient] reject: timeout");let e={event:{channel:n,sender:this._ipcBusPeer},err:"timeout"};o(e)}},e)})}ipcConnect(e,n){return new Promise((e,s)=>{null==n&&(n=`${this._ipcBusPeer.process.type}_${this._ipcBusPeer.process.pid}`),this._ipcBusPeer.name=n,e("connected")})}};const i=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransportNode.js"),o=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransportRenderer.js"),c=s("./node_modules/electron-ipc-bus/lib/IpcBus/ElectronUtils.js");n.CreateIpcBusTransport=function(e){let n=c.GuessElectronProcessType();t.Logger.enable&&t.Logger.info(`CreateIpcBusForProcess process type = ${n}, ipc options = ${e}`);let s=null;switch(n){case"renderer":s=new o.IpcBusTransportRenderer({type:n,pid:-1},e);break;case"browser":case"node":e.isValid()&&(s=new i.IpcBusTransportNode({type:n,pid:process.pid},e))}return s}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransportNode.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),r=s("./node_modules/easy-ipc/lib/ipc.js"),i=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransport.js");n.IpcBusTransportNode=class extends i.IpcBusTransport{constructor(e,n){super(e,n),this._baseIpc=new r,this._baseIpc.on("data",e=>{r.Cmd.isCmd(e)&&this._onEventReceived(e.name,e.args[0],e.args[1],e.args[2])})}ipcConnect(e,n){return new Promise((s,r)=>{super.ipcConnect(e,n).then(n=>{this._baseIpc.on("connect",e=>{this._busConn=e,this.ipcPushCommand(t.IPC_BUS_COMMAND_CONNECT,{},""),s(n)}),setTimeout(()=>{r("timeout")},e),this._baseIpc.connect(this.ipcOptions.port,this.ipcOptions.host)}).catch(e=>{r(e)})})}ipcClose(){this.ipcPushCommand(t.IPC_BUS_COMMAND_CLOSE,{},""),this._busConn.end(),this._busConn=null}ipcPushCommand(e,n,s,t){n.peerId=this._peerId,this._ipcPushCommand(e,n,{channel:s,sender:this.peer},t)}_ipcPushCommand(e,n,s,t){t?r.Cmd.exec(e,n,s,t,this._busConn):r.Cmd.exec(e,n,s,this._busConn)}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransportRenderer.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js"),r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusTransport.js");n.IpcBusTransportRenderer=class extends r.IpcBusTransport{constructor(e,n){super(e,n)}_onHandshake(e,n){n?(this._ipcBusPeer.process.pid=n,t.Logger.enable&&t.Logger.info(`[IPCBus:Renderer] Activate Standard listening for #${this._ipcBusPeer.name}`),this._onIpcEventReceived=((e,n,s,t,r)=>this._onEventReceived(n,s,t,r))):(this._ipcBusPeer.process.pid=e,t.Logger.enable&&t.Logger.info(`[IPCBus:Renderer] Activate Sandbox listening for #${this._ipcBusPeer.name}`),this._onIpcEventReceived=((e,n,s,t)=>this._onEventReceived(e,n,s,t))),this._ipcRenderer.addListener(t.IPC_BUS_RENDERER_EVENT,this._onIpcEventReceived)}_ipcConnect(e,n){return new Promise((s,r)=>{super.ipcConnect(e,n).then(n=>{this._ipcRenderer.once(t.IPC_BUS_COMMAND_CONNECT,()=>{s("connected")}),setTimeout(()=>{r("timeout")},e),this.ipcPushCommand(t.IPC_BUS_COMMAND_CONNECT,{},"")}).catch(e=>{r(e)})})}ipcConnect(e,n){return this._ipcRenderer?this._ipcConnect(e,n):new Promise((r,i)=>{this._ipcRenderer=s("electron").ipcRenderer,this._ipcRenderer.once(t.IPC_BUS_RENDERER_HANDSHAKE,(s,t)=>{this._onHandshake(s,t),this._ipcConnect(e,n).then(e=>{r(e)}).catch(e=>{i(e)})}),setTimeout(()=>{i("timeout")},e),this._ipcRenderer.send(t.IPC_BUS_RENDERER_HANDSHAKE,this._peerId)})}ipcClose(){this._ipcRenderer&&(this.ipcPushCommand(t.IPC_BUS_COMMAND_CLOSE,{},""),this._ipcRenderer.removeListener(t.IPC_BUS_RENDERER_EVENT,this._onIpcEventReceived),this._ipcRenderer=null)}ipcPushCommand(e,n,s,r){n.peerId=this._peerId,this._ipcRenderer.send(t.IPC_BUS_RENDERER_COMMAND,e,n,{channel:s,sender:this.peer},r)}}},"./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusUtils.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IPC_BUS_RENDERER_HANDSHAKE="IpcBusRenderer:Handshake",n.IPC_BUS_RENDERER_CONNECT="IpcBusRenderer:Connect",n.IPC_BUS_RENDERER_COMMAND="IpcBusRenderer:Command",n.IPC_BUS_RENDERER_EVENT="IpcBusRenderer:Event",n.IPC_BUS_COMMAND_CONNECT="IpcBusCommand:connect",n.IPC_BUS_COMMAND_DISCONNECT="IpcBusCommand:disconnect",n.IPC_BUS_COMMAND_CLOSE="IpcBusCommand:close",n.IPC_BUS_COMMAND_SUBSCRIBE_CHANNEL="IpcBusCommand:subscribeChannel",n.IPC_BUS_COMMAND_UNSUBSCRIBE_CHANNEL="IpcBusCommand:unsubscribeChannel",n.IPC_BUS_COMMAND_UNSUBSCRIBE_ALL="IpcBusCommand:unsubscribeAll",n.IPC_BUS_COMMAND_SENDMESSAGE="IpcBusCommand:sendMessage",n.IPC_BUS_COMMAND_REQUESTMESSAGE="IpcBusCommand:requestMessage",n.IPC_BUS_COMMAND_REQUESTRESPONSE="IpcBusCommand:requestResponse",n.IPC_BUS_COMMAND_REQUESTCANCEL="IpcBusCommand:requestCancel",n.IPC_BUS_EVENT_SENDMESSAGE="IpcBusEvent:onSendMessage",n.IPC_BUS_EVENT_REQUESTMESSAGE="IpcBusEvent:onRequestMessage",n.IPC_BUS_EVENT_REQUESTRESPONSE="IpcBusEvent:onRequestResponse",n.IPC_BUS_TIMEOUT=2e3;class t{isValid(){return null!=this.port}}function r(e){return`/electron-ipc-bus/ipc-service/${e}`}n.IpcOptions=t,n.ExtractIpcOptions=function(e){let n=new t;if(null==e&&(e=function(e){for(let n=0;n<process.argv.length;++n)if(process.argv[n].startsWith("--"+e))return process.argv[n].split("=")[1];return null}("bus-path")),null!=e)if("number"==typeof e)n.port=e;else if("string"==typeof e){let s=e.split(":");1===s.length?n.port=s[0]:2===s.length&&(n.host=s[0],n.port=s[1])}return n},n.getServiceNamespace=r,n.getServiceCallChannel=function(e){return r(e)+"/call"},n.getServiceEventChannel=function(e){return r(e)+"/event"};class i{static info(e){console.log(e)}static warn(e){console.warn(e)}static error(e){console.error(e)}}i.enable=!1,i.service=!1,n.Logger=i;class o{constructor(e){this._name=e,this._channelsMap=new Map}_info(e){i.info(`[${this._name}] ${e}`)}_warn(e){i.warn(`[${this._name}] ${e}`)}_error(e){i.error(`[${this._name}] ${e}`)}hasChannel(e){return this._channelsMap.has(e)}addRef(e,n,s,t,r){i.enable&&this._info(`AddRef: '${e}', connKey = ${n}`);let c=this._channelsMap.get(e);null==c&&(c=new Map,this._channelsMap.set(e,c));let l=c.get(n);null==l&&(l=new o.ConnectionData(n,s),c.set(n,l));let a=l.peerIds.get(t);null==a?a=1:++a,l.peerIds.set(t,a),i.enable&&this._info(`AddRef: '${e}', connKey = ${n}, count = ${l.peerIds.size}`),r instanceof Function==!0&&r(e,t,l)}_release(e,n,s,t,r){i.enable&&this._info(`Release: '${n}', connKey = ${s}`);let o=this._channelsMap.get(n);if(null==o)i.enable&&this._warn(`Release: '${n}' is unknown`);else{let c=o.get(s);if(null==c)i.enable&&this._warn(`Release: connKey = ${s} is unknown`);else{if(null==t)r instanceof Function==!0?c.peerIds.forEach((e,s)=>{c.peerIds.delete(s),r(n,s,c)}):c.peerIds.clear();else{let s=c.peerIds.get(t);if(null==s)i.enable&&this._warn(`Release: peerId #${t} is unknown`);else if(e){if(r instanceof Function==!0)for(;s>0;)--s,c.peerIds.set(t,s),r instanceof Function==!0&&r(n,t,c);c.peerIds.delete(t)}else--s>0?c.peerIds.set(t,s):c.peerIds.delete(t),r instanceof Function==!0&&r(n,t,c)}0===c.peerIds.size&&(o.delete(s),0===o.size&&this._channelsMap.delete(n)),i.enable&&this._info(`Release: '${n}', connKey = ${s}, count = ${c.peerIds.size}`)}}}release(e,n,s,t){this._release(!1,e,n,s,t)}releaseAll(e,n,s,t){i.enable&&this._info(`releaseAll: connKey = ${n}`),this._release(!0,e,n,s,t)}releasePeerId(e,n,s){i.enable&&this._info(`releasePeerId: peerId = ${n}`),this._channelsMap.forEach((t,r)=>{this._release(!0,r,e,n,s)})}releaseConnection(e,n){i.enable&&this._info(`ReleaseConn: connKey = ${e}`),this._channelsMap.forEach((s,t)=>{this._release(!1,t,e,null,n)})}forEachChannel(e,n){if(i.enable&&this._info(`forEachChannel: '${e}'`),n instanceof Function==!1)return void(i.enable&&this._error("forEachChannel: No callback provided !"));let s=this._channelsMap.get(e);null==s?i.enable&&this._warn(`forEachChannel: Unknown channel '${e}' !`):s.forEach((s,t)=>{i.enable&&this._info(`forEachChannel: '${e}', connKey = ${t} (${s.peerIds.size})`),n(s,e)})}forEach(e){i.enable&&this._info("forEach"),e instanceof Function!=!1?this._channelsMap.forEach((n,s)=>{n.forEach((n,t)=>{i.enable&&this._info(`forEach: '${s}', connKey = ${t} (${n.peerIds.size})`),e(n,s)})}):i.enable&&this._error("forEach: No callback provided !")}}n.ChannelConnectionMap=o,function(e){e.ConnectionData=class{constructor(e,n){this.peerIds=new Map,this.connKey=e,this.conn=n}}}(o=n.ChannelConnectionMap||(n.ChannelConnectionMap={}))},"./node_modules/electron-ipc-bus/lib/electron-ipc-bus.js":function(e,n,s){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js");n.IPCBUS_CHANNEL_QUERY_STATE=t.IPCBUS_CHANNEL_QUERY_STATE;var r=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js");n.IPCBUS_CHANNEL_SERVICE_AVAILABLE=r.IPCBUS_CHANNEL_SERVICE_AVAILABLE;var i=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js");n.IPCBUS_SERVICE_EVENT_START=i.IPCBUS_SERVICE_EVENT_START;var o=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js");n.IPCBUS_SERVICE_EVENT_STOP=o.IPCBUS_SERVICE_EVENT_STOP;var c=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusInterfaces.js");n.ServiceStatus=c.ServiceStatus;const l=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js"),a=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js"),u=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js"),p=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js"),d=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js"),_=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js"),h=s("./node_modules/electron-ipc-bus/lib/IpcBus/IpcBusApi.js");n.CreateIpcBusBroker=function(e){return l._CreateIpcBusBroker(e)},n.CreateIpcBusBridge=function(e){return a._CreateIpcBusBridge(e)},n.CreateIpcBusClient=function(e){return u._CreateIpcBusClient(e)},n.CreateIpcBusService=function(e,n,s){return p._CreateIpcBusService(e,n,s)},n.CreateIpcBusServiceProxy=function(e,n,s=1e3){return d._CreateIpcBusServiceProxy(e,n,s)},n.ActivateIpcBusTrace=function(e){return _._ActivateIpcBusTrace(e)},n.ActivateServiceTrace=function(e){return h._ActivateServiceTrace(e)}},"./node_modules/lazy/lazy.js":function(e,n,s){var t=s("events").EventEmitter,r=s("util"),i=s("stream");function o(e,n){if(!(this instanceof o))return new o(e,n);t.call(this);var s=this;s.once=function(e,n){s.on(e,function t(){s.removeListener(e,t),n.apply(this,arguments)})},n||(n={});var r=n.data||"data",l=n.pipe||"pipe",a=n.pipe||"end";if(l!=a){var u=!1;s.once(l,function(){u=!0}),s.once(a,function(){u||s.emit(l)})}function p(e,t,i){e||(e=function(){return!0}),t||(t=function(e){return e});var c=new o(null,n,i);return s.on(r,function(n,s){e.call(c,n)&&c.emit(r,t(n),s)}),s.once(l,function(){c.emit(l)}),c}s.push=function(e){s.emit(r,e)},s.end=function(){s.emit(a)},e&&e.on&&(e.on(a,function(){s.emit(a)}),s.on(l,function(){e.emit(l)}),i.Duplex&&e instanceof i?e.on("readable",function(){var n=e.read();s.emit(r,n)}):e.on(r,function(e){s.emit(r,e)})),s.filter=function(e){return p(function(n){return e(n)})},s.forEach=function(e){return p(function(n){return e(n),!0})},s.map=function(e){return p(function(){return!0},function(n){return e(n)})},s.head=function(e){var n=p();n.on(r,function s(t){e(t),n.removeListener(r,s)})},s.tail=function(){var e=!0;return p(function(){return!e||(e=!1,!1)})},s.skip=function(e){return p(function(){return!(e>0)||(e--,!1)})},s.take=function(e){return p(function(){return 0==e&&s.emit(l),e-- >0})},s.takeWhile=function(e){var n=!0;return p(function(t){return!(!n||!e(t))||(n=!1,s.emit(l),!1)})},s.foldr=function(e,n,s){var t=n,i=p();i.on(r,function(n){t=e(n,t)}),i.once(l,function(){s(t)})},s.sum=function(e){return s.foldr(function(e,n){return e+n},0,e)},s.product=function(e){return s.foldr(function(e,n){return e*n},1,e)},s.join=function(e){var n=[];return p(function(e){return n.push(e),!0}).once(l,function(){e(n)}),s},s.bucket=function(e,t){var i=new o(null,n),u=function(e){i.emit(r,e)},p=e;return s.on(r,function(e){p=t.call(u,p,e)}),s.once(l,function(){i.emit(l)}),s.once(a,function(){var e=c(p);e&&u(e)}),i},s.__defineGetter__("lines",function(){return s.bucket([],function(e,n){var s="\n".charCodeAt(0),t=0;if("string"==typeof n&&(n=new Buffer(n)),n)for(var r=0;r<n.length;r++)n[r]===s&&(r>0&&e.push(n.slice(t,r)),this(c(e)),t=r+1);return t>0?t<n.length&&e.push(n.slice(t)):n&&n.length&&e.push(n),e})})}o.range=function(){var e=arguments,n=1,s=!1;if(1==e.length&&"number"==typeof e[0])var t=0,r=e[0];else if(1==e.length&&"string"==typeof e[0]){var i=e[0],c=!1,l=!1;"("!=i[0]&&"["!=i[0]||("("==i[0]&&(c=!0),i=i.slice(1)),"]"==i.slice(-1)&&(l=!0);var a=i.split("..");if(2!=a.length)throw new Error("single argument range takes 'start..' or 'start..end' or 'start,next..end'");if(""==a[1]){t=a[0];s=!0}else{var u=a[0].split(",");if(1==u.length)t=a[0],r=a[1];else{t=u[0],r=a[1];n=Math.abs(u[1]-t)}}t=parseInt(t,10),r=parseInt(r,10),c&&(s||t<r?t++:t--),l&&(t<r?r++:r--)}else{if(2!=e.length&&3!=e.length)throw new Error("range takes 1, 2 or 3 arguments");t=e[0],r=e[1];if(3==e.length)n=e[2]}var p=new o,d=!1;return p.on("pipe",function(){d=!0}),s?process.nextTick(function e(){d||(p.emit("data",t++),process.nextTick(e))}):process.nextTick(function(){if(t<r)for(;t<r;t+=n)p.emit("data",t);else for(;t>r;t-=n)p.emit("data",t);p.emit("end")}),p};var c=function(e){if(e&&Array.isArray(e)&&e.length){var n,s,t,r=0;for(n=e.reduce(function(e,n){return(e.length||e)+(n.length||n)},0),s=new Buffer(n);e.length;)(t=e.shift()).copy(s,r),r+=t.length;return s}};r.inherits(o,t),e.exports=o},"./node_modules/uuid/index.js":function(e,n,s){var t=s("./node_modules/uuid/v1.js"),r=s("./node_modules/uuid/v4.js"),i=r;i.v1=t,i.v4=r,e.exports=i},"./node_modules/uuid/lib/bytesToUuid.js":function(e,n){for(var s=[],t=0;t<256;++t)s[t]=(t+256).toString(16).substr(1);e.exports=function(e,n){var t=n||0,r=s;return r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+"-"+r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]+r[e[t++]]}},"./node_modules/uuid/lib/rng.js":function(e,n,s){var t=s("crypto");e.exports=function(){return t.randomBytes(16)}},"./node_modules/uuid/v1.js":function(e,n,s){var t,r,i=s("./node_modules/uuid/lib/rng.js"),o=s("./node_modules/uuid/lib/bytesToUuid.js"),c=0,l=0;e.exports=function(e,n,s){var a=n&&s||0,u=n||[],p=(e=e||{}).node||t,d=void 0!==e.clockseq?e.clockseq:r;if(null==p||null==d){var _=i();null==p&&(p=t=[1|_[0],_[1],_[2],_[3],_[4],_[5]]),null==d&&(d=r=16383&(_[6]<<8|_[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:l+1,C=h-c+(m-l)/1e4;if(C<0&&void 0===e.clockseq&&(d=d+1&16383),(C<0||h>c)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,l=m,r=d;var I=(1e4*(268435455&(h+=122192928e5))+m)%4294967296;u[a++]=I>>>24&255,u[a++]=I>>>16&255,u[a++]=I>>>8&255,u[a++]=255&I;var f=h/4294967296*1e4&268435455;u[a++]=f>>>8&255,u[a++]=255&f,u[a++]=f>>>24&15|16,u[a++]=f>>>16&255,u[a++]=d>>>8|128,u[a++]=255&d;for(var E=0;E<6;++E)u[a+E]=p[E];return n||o(u)}},"./node_modules/uuid/v4.js":function(e,n,s){var t=s("./node_modules/uuid/lib/rng.js"),r=s("./node_modules/uuid/lib/bytesToUuid.js");e.exports=function(e,n,s){var i=n&&s||0;"string"==typeof e&&(n="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,n)for(var c=0;c<16;++c)n[i+c]=o[c];return n||r(o)}},crypto:function(e,n){e.exports=require("crypto")},electron:function(e,n){e.exports=require("electron")},events:function(e,n){e.exports=require("events")},net:function(e,n){e.exports=require("net")},readline:function(e,n){e.exports=require("readline")},stream:function(e,n){e.exports=require("stream")},util:function(e,n){e.exports=require("util")}});
  //# sourceMappingURL=preload-ui.bundled.js.map