@finsemble/finsemble-electron-adapter 1.0.0-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +46 -0
- package/dist/app.js +3 -0
- package/dist/app.js.LICENSE.txt +331 -0
- package/dist/app.js.map +1 -0
- package/dist/e2o.js +2 -0
- package/dist/e2o.js.map +1 -0
- package/dist/exports.js +3 -0
- package/dist/exports.js.LICENSE.txt +331 -0
- package/dist/exports.js.map +1 -0
- package/exports.js +10 -0
- package/node_modules/electron-ipc-mock/.npmignore +2 -0
- package/node_modules/electron-ipc-mock/.travis.yml +8 -0
- package/node_modules/electron-ipc-mock/LICENSE +19 -0
- package/node_modules/electron-ipc-mock/README.md +42 -0
- package/node_modules/electron-ipc-mock/dist/constants.js +8 -0
- package/node_modules/electron-ipc-mock/dist/electron-ipc-mock.js +56 -0
- package/node_modules/electron-ipc-mock/dist/event.js +25 -0
- package/node_modules/electron-ipc-mock/dist/index.js +22 -0
- package/node_modules/electron-ipc-mock/dist/ipc-main.js +103 -0
- package/node_modules/electron-ipc-mock/dist/ipc-renderer.js +113 -0
- package/node_modules/electron-ipc-mock/dist/pipe.js +40 -0
- package/node_modules/electron-ipc-mock/dist/utils.js +33 -0
- package/node_modules/electron-ipc-mock/package.json +34 -0
- package/node_modules/image-size/LICENSE +9 -0
- package/node_modules/image-size/Readme.md +182 -0
- package/node_modules/image-size/bin/image-size.js +48 -0
- package/node_modules/image-size/dist/detector.d.ts +3 -0
- package/node_modules/image-size/dist/detector.js +30 -0
- package/node_modules/image-size/dist/index.d.ts +11 -0
- package/node_modules/image-size/dist/index.js +134 -0
- package/node_modules/image-size/dist/readUInt.d.ts +4 -0
- package/node_modules/image-size/dist/readUInt.js +11 -0
- package/node_modules/image-size/dist/types/bmp.d.ts +2 -0
- package/node_modules/image-size/dist/types/bmp.js +14 -0
- package/node_modules/image-size/dist/types/cur.d.ts +2 -0
- package/node_modules/image-size/dist/types/cur.js +16 -0
- package/node_modules/image-size/dist/types/dds.d.ts +2 -0
- package/node_modules/image-size/dist/types/dds.js +14 -0
- package/node_modules/image-size/dist/types/gif.d.ts +2 -0
- package/node_modules/image-size/dist/types/gif.js +16 -0
- package/node_modules/image-size/dist/types/icns.d.ts +2 -0
- package/node_modules/image-size/dist/types/icns.js +103 -0
- package/node_modules/image-size/dist/types/ico.d.ts +2 -0
- package/node_modules/image-size/dist/types/ico.js +67 -0
- package/node_modules/image-size/dist/types/interface.d.ts +14 -0
- package/node_modules/image-size/dist/types/interface.js +2 -0
- package/node_modules/image-size/dist/types/j2c.d.ts +2 -0
- package/node_modules/image-size/dist/types/j2c.js +15 -0
- package/node_modules/image-size/dist/types/jp2.d.ts +2 -0
- package/node_modules/image-size/dist/types/jp2.js +58 -0
- package/node_modules/image-size/dist/types/jpg.d.ts +2 -0
- package/node_modules/image-size/dist/types/jpg.js +123 -0
- package/node_modules/image-size/dist/types/ktx.d.ts +2 -0
- package/node_modules/image-size/dist/types/ktx.js +15 -0
- package/node_modules/image-size/dist/types/png.d.ts +2 -0
- package/node_modules/image-size/dist/types/png.js +34 -0
- package/node_modules/image-size/dist/types/pnm.d.ts +2 -0
- package/node_modules/image-size/dist/types/pnm.js +75 -0
- package/node_modules/image-size/dist/types/psd.d.ts +2 -0
- package/node_modules/image-size/dist/types/psd.js +14 -0
- package/node_modules/image-size/dist/types/svg.d.ts +2 -0
- package/node_modules/image-size/dist/types/svg.js +91 -0
- package/node_modules/image-size/dist/types/tiff.d.ts +2 -0
- package/node_modules/image-size/dist/types/tiff.js +97 -0
- package/node_modules/image-size/dist/types/webp.d.ts +2 -0
- package/node_modules/image-size/dist/types/webp.js +58 -0
- package/node_modules/image-size/dist/types.d.ts +19 -0
- package/node_modules/image-size/dist/types.js +38 -0
- package/node_modules/image-size/package.json +67 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/queue/LICENSE +8 -0
- package/node_modules/queue/index.d.ts +173 -0
- package/node_modules/queue/index.js +195 -0
- package/node_modules/queue/package.json +43 -0
- package/node_modules/queue/readme.md +221 -0
- package/package.json +119 -0
- package/types/app.d.ts +1 -0
- package/types/deploy/deploymentHelpers.d.ts +10 -0
- package/types/deploy/installer.d.ts +5 -0
- package/types/deploy/packageCreator.d.ts +4 -0
- package/types/deploy/schemas/installer.d.ts +3 -0
- package/types/deploy/schemas/packager.d.ts +3 -0
- package/types/e2o.d.ts +2 -0
- package/types/exports.d.ts +19 -0
- package/types/logger/classes/LoggerMain.d.ts +21 -0
- package/types/logger/classes/LoggerRenderer.d.ts +11 -0
- package/types/logger/colorizer.d.ts +2 -0
- package/types/logger/config.d.ts +12 -0
- package/types/logger/formatters/basic.d.ts +2 -0
- package/types/logger/main.d.ts +2 -0
- package/types/logger/renderer.d.ts +1 -0
- package/types/logger/transports/winston-daily-rotate-file.d.ts +2 -0
- package/types/logger/transports/winston-terminal-transport.d.ts +2 -0
- package/types/logger/types.d.ts +9 -0
- package/types/main/AffinityGroupManager.d.ts +15 -0
- package/types/main/BrowserViews.d.ts +38 -0
- package/types/main/ExternalApplicationManager.d.ts +37 -0
- package/types/main/IAB.d.ts +17 -0
- package/types/main/IAC.d.ts +18 -0
- package/types/main/Main.d.ts +7 -0
- package/types/main/MainBus.d.ts +22 -0
- package/types/main/MainSystem.d.ts +75 -0
- package/types/main/MainWindow.d.ts +153 -0
- package/types/main/Manifest.d.ts +13 -0
- package/types/main/MonitorInfo.d.ts +4 -0
- package/types/main/PermissionsManager.d.ts +12 -0
- package/types/main/ScreenCapture.d.ts +7 -0
- package/types/main/SplashScreen.d.ts +13 -0
- package/types/main/appDataFolder.d.ts +9 -0
- package/types/main/autoUpdaterWrapper.d.ts +37 -0
- package/types/main/contentSecurity.d.ts +17 -0
- package/types/main/contextMenu.d.ts +2 -0
- package/types/main/download.d.ts +18 -0
- package/types/main/getWindowIdentity.d.ts +3 -0
- package/types/main/listeners.d.ts +6 -0
- package/types/main/mainStore.d.ts +3 -0
- package/types/main/preloads.d.ts +9 -0
- package/types/main/protocolHandler.d.ts +11 -0
- package/types/main/updateManager.d.ts +20 -0
- package/types/permissions/chromePermissions.d.ts +59 -0
- package/types/permissions/defaultWindowOptions.d.ts +377 -0
- package/types/render/InterApplicationBus.d.ts +16 -0
- package/types/render/Notification.d.ts +3 -0
- package/types/render/RequestHelper.d.ts +23 -0
- package/types/render/System.d.ts +62 -0
- package/types/render/Window.d.ts +75 -0
- package/types/render/renderHelpers.d.ts +1 -0
- package/types/server/AppD.d.ts +18 -0
- package/types/server/AppDStaticConfigPlugin.d.ts +8 -0
- package/types/server/CosaicCloud.d.ts +21 -0
- package/types/server/Progress.d.ts +26 -0
- package/types/server/Server.d.ts +17 -0
- package/types/server/SmartDesktop.d.ts +36 -0
- package/types/server/SmartDesktopEndpoints.d.ts +99 -0
- package/types/server/SmartDesktopStaticConfigPlugin.d.ts +9 -0
- package/types/server/cssUtilities.d.ts +6 -0
- package/types/server/writeJSON.d.ts +1 -0
- package/types/startup/e2oLauncher.d.ts +1 -0
- package/types/startup/runScriptInElectron.d.ts +6 -0
- package/types/types/types.d.ts +148 -0
- package/types/util.d.ts +13 -0
package/dist/e2o.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{"use strict";var e={43:(e,t,s)=>{!function(){var t,n,o,r=0,i=[];for(n=0;n<256;n++)i[n]=(n+256).toString(16).substr(1);function a(){var e=(16,(!t||r+16>d.BUFFER_SIZE)&&(r=0,t=d.randomBytes(d.BUFFER_SIZE)),t.slice(r,r+=16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,e}function d(){var e=a();return i[e[0]]+i[e[1]]+i[e[2]]+i[e[3]]+"-"+i[e[4]]+i[e[5]]+"-"+i[e[6]]+i[e[7]]+"-"+i[e[8]]+i[e[9]]+"-"+i[e[10]]+i[e[11]]+i[e[12]]+i[e[13]]+i[e[14]]+i[e[15]]}d.BUFFER_SIZE=4096,d.bin=a,d.clearBuffer=function(){t=null,r=0},d.test=function(e){return"string"==typeof e&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)},"undefined"!=typeof crypto?o=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(o=window.msCrypto),o=o||s(113),e.exports=d,d.randomBytes=function(){if(o){if(o.randomBytes)return o.randomBytes;if(o.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(e){var t=new Uint8Array(e);return o.getRandomValues(t),Array.from(t)}:function(e){var t=new Uint8Array(e);return o.getRandomValues(t),t}}return function(e){var t,s=[];for(t=0;t<e;t++)s.push(Math.floor(256*Math.random()));return s}}()}()},113:e=>{e.exports=require("crypto")}},t={};function s(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e=require("electron");class t{constructor(e){e&&e.send?this.ipc=e:console.log("FEA LoggerRender using console output by default")}send(e,t){this.ipc?this.ipc.send("logger:message",{level:e,args:t}):("verbose"===e&&(e="debug"),console[e]?console[e]("FEA logger:message",t):console.warn(`FEA logger:message: level: ${e} not defined. defaulting to warn. `,t))}error(...e){this.send("error",e)}warn(...e){this.send("warn",e)}info(...e){this.send("info",e)}log(...e){this.send("log",e)}debug(...e){this.send("debug",e)}verbose(...e){this.send("verbose",e)}}let n;const o=()=>{if(n)return n;try{n=new t(e.ipcRenderer)}catch(e){n=console,n.verbose=n.debug,n.error(`Failed to instantiate LoggerRenderer ${e.message}`)}return n},r=require("events");var i=s(43),a=s.n(i);let d,c=!1;class u extends r.EventEmitter{constructor(){super(),this.request={},e.ipcRenderer.on("systemResponse",this.systemResponse.bind(this)),e.ipcRenderer.on("handleResponse",this.handleResponse.bind(this)),e.ipcRenderer.on("pong",(()=>{clearTimeout(d),c=!0})),d=setInterval((()=>{e.ipcRenderer.send("ping")}),5)}handleResponse(e,t){if(!t||!this.request[t.responseUUID])return void console.warn(`Event object not found in handleResponse: event ${e} data ${t&&JSON.stringify(t)}`);const{responseUUID:s,response:n,err:o}=t,r=this.request[s],i=r.responseUUID;o&&console.error(o),r.persistChannel||delete this.request[i],r.functionCB(r,n)}promisifiedSendRequest(e){return new Promise((t=>{this.sendRequest(e,((e,s)=>t(s)))}))}sendRequest(t,s=Function.prototype){const{topic:n,data:o,persistChannel:r}=t,i=a()(),d={topic:n,data:o,persistChannel:r,responseUUID:i,functionCB:s},u=t=>{const s=t.responseUUID;this.request[s]=t;const r={topic:n,data:o};e.ipcRenderer.send("e2o.mainRequest",JSON.parse(JSON.stringify(r)),s)};let p;c?u(d):p=setInterval((()=>{c&&(clearInterval(p),u(d))}),5)}systemResponse(e,t){let s;try{s=JSON.parse(t.data)}catch(e){s=t.data}this.emit(t.topic,s)}addListener(t,s){const n=this.listenerCount(t);return super.addListener(t,s),0===n&&e.ipcRenderer.send("system.addlistener",t),this}removeListener(t,s){return super.removeListener(t,s),0===this.listenerCount(t)&&e.ipcRenderer.send("system.removeListener",t),this}}const p=new u,l=o(),h=e=>"object"==typeof e&&e&&e.error?(console.log("Warning:",e.message),l.warn("Warning:",e.message),!0):!("string"!=typeof e||!e.includes("api_access_denied")||(console.log("Warning:",e),l.warn("Warning:",e),0)),m=o();class w extends r.EventEmitter{constructor(e){var t,s;if(super(),this.uuid="fin.desktop.Window.uuid has been deprecated",this.closeRequestedListeners=[],this.isMoving=!1,this.animationId=0,this.bindAllFunctions(),this.manifest=e.manifest,this.name=e.windowName,this.webContentsName=e.webContentsName,this.webContentsId=e.webContentsId,m.log("Constructing `Window` object in Window.ts",this.name),!this.name)throw new Error("Window being created without a name. This is not allowed.");const n=null===(s=null===(t=this.manifest)||void 0===t?void 0:t["finsemble-electron-adapter"])||void 0===s?void 0:s.useDOMBasedMovement;this.useDOMMovement="darwin"===process.platform||null==n||n}attachToMainWindow(){e.ipcRenderer.on(`windowEvent-${this.name}`,this.remoteFSBLEvents.bind(this))}wrap(t,s){s&&(t=s),m.verbose(`Wrapping window ${t}`);const{err:n,data:o}=e.ipcRenderer.sendSync("fea.getWindowIdentityForWindowName",t);if(n||!o)throw`Window.wrap() failed for ${t}. ${n}`;const r=new w({manifest:this.manifest,windowName:t,webContentsName:o.webContentsName,webContentsId:o.id});return r.attachToMainWindow(),r}static spawnPhysicalWindow(e){return new Promise((t=>{const s=e.name;let n=!1;m.verbose(`spawnPhysicalWindow ${s}`);const o=setTimeout((()=>{n=!0;const e=`Window ${s}: spawn failed to return within 5 seconds`;m.error(e),t({err:e})}),5e3);m.debug(`Window ${s}: spawning`),p.sendRequest({topic:"-SpawnWindow",data:e},((e,r)=>{n?m.debug(`Late spawn window response from main process (after 5 sec) for ${s}: `,r):(clearTimeout(o),"ErrorResponse"!==r.type?(m.debug(`Window ${s}: spawn complete`),t({})):t({err:r.payload.err}))}))}))}async createNew(e,t){const{err:s}=await w.spawnPhysicalWindow(e);if(s)return null==t||t(s),{err:s};const n=new w(Object.assign({},e));return n.attachToMainWindow(),null==t||t(null,n),{data:n}}bindAllFunctions(){const e=this;for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){const s=e[t];s instanceof Function&&s!==w&&(e[t]=e[t].bind(e))}}addEventListener(e,t){this.addListener(e,t)}addBrowserView(e,t){p.sendRequest({topic:`${this.name}-addBrowserView`,data:e},((e,s)=>{h(s),t(s)}))}setViewBounds(e,t,s){const n={type:"window",bounds:{x:t.left,y:t.top,width:t.width,height:t.height},viewId:e};p.sendRequest({topic:`${this.name}-setViewBounds`,data:n},((e,t)=>{t.bounds&&(t.bounds.left=t.bounds.x,t.bounds.top=t.bounds.y),h(t)?s(t):s(t.bounds)}))}bringViewToFront(e,t){p.sendRequest({topic:`${this.name}-bringViewToFront`,data:{viewId:e}},((e,s)=>{h(s)?t(s):t(null)}))}addListener(e,t){const s=`Window.addListener.${e}`;return m.verbose(`Adding listener ${e}, ${this.name}`),p.sendRequest({topic:"checkPermission",data:s},((s,n)=>{n?("close-requested"==e&&this.closeRequestedAdd(t),p.addListener(`windowEvent-${this.name}.${e}`,t)):m.warn(`PERMISSION DENIED: Attempted to add listener on Window.${this.name}.${e}.`)})),this}blur(e=Function.prototype){p.sendRequest({topic:`${this.name}-blur`},((t,s)=>{h(s),e(s)}))}bringToFront(e=Function.prototype){p.sendRequest({topic:`${this.name}-bringToFront`},((t,s)=>{h(s),e(s)}))}close(e=!1,t=Function.prototype){const s={force:e};p.sendRequest({topic:`${this.name}-close`,data:s},((e,s)=>{h(s),t(s)}))}closeRequestedAdd(e){0===this.closeRequestedListeners.length&&p.sendRequest({topic:`${this.name}-closeRequestedAdd`},((e,t)=>{h(t)||m.debug(`${this.name}-closeRequestedAdd`)})),this.closeRequestedListeners.push(e)}closeRequestedRemove(e){const t=this.closeRequestedListeners.indexOf(e);t>-1&&this.closeRequestedListeners.splice(t,1),0===this.closeRequestedListeners.length&&p.sendRequest({topic:`${this.name}-closeRequestedRemove`},((e,t)=>{h(t)||m.debug(`${this.name}-closeRequestedRemove`)}))}disableFrame(e=Function.prototype){p.sendRequest({topic:`${this.name}-disableFrame`},((t,s)=>{h(s),e(s)}))}enableFrame(e=Function.prototype){p.sendRequest({topic:`${this.name}-enableFrame`},((t,s)=>{h(s),e(s)}))}focus(e=Function.prototype){p.sendRequest({topic:`${this.name}-focus`},((t,s)=>{h(s),e(s)}))}getBounds(e=Function.prototype){p.sendRequest({topic:`${this.name}-getBounds`},((t,s)=>{h(s),e(s)}))}getBoundsFromSystem(e=Function.prototype){p.sendRequest({topic:`${this.name}-getBoundsFromSystem`},((t,s)=>{h(s),e(s)}))}getCurrent(){return this}getOptions(e=Function.prototype){p.sendRequest({topic:`${this.name}-getDetails`},((t,s)=>{h(s),e(s)}))}getSnapshot(e,t=Function.prototype){return new Promise((s=>{const n={area:e};p.sendRequest({topic:`${this.name}-getSnapshot`,data:n},((e,n)=>{h(n),t(n),s(n)}))}))}hide(e=Function.prototype){p.sendRequest({topic:`${this.name}-hide`},((t,s)=>{h(s),e(s)}))}isShowing(e=Function.prototype){p.sendRequest({topic:`${this.name}-isShowing`},((t,s)=>{h(s),e(s)}))}minimize(e=Function.prototype){p.sendRequest({topic:`${this.name}-minimize`},((t,s)=>{h(s),e(s)}))}resetBrowserView(e=Function.prototype){p.sendRequest({topic:`${this.name}-resetBrowserView`},((t,s)=>{h(s),e(s)}))}removeBrowserView(e,t=Function.prototype){p.sendRequest({topic:`${this.name}-removeBrowserView`,data:{viewId:e}},((e,s)=>{h(s),t(s)}))}removeEventListener(e,t){this.removeListener(e,t)}removeListener(e,t){return"close-requested"==e&&this.closeRequestedRemove(t),p.removeListener(`windowEvent-${this.name}.${e}`,t),this}removeTrayIcon(e=Function.prototype){p.sendRequest({topic:"removeTrayIcon",data:{}},((e,t)=>{h(t)})),e()}setTrayIcon(e,t,s=Function.prototype){p.sendRequest({topic:"setTrayIconDeprecated",data:{iconpath:e,listeners:t?Object.keys(t):{}},persistChannel:!0},((e,s)=>{!h(s)&&t&&t.clickListener&&"click"==s.event&&(m.debug("setTrayIcon request sent"),t.clickListener(s))})),s()}maximize(e=Function.prototype){p.sendRequest({topic:`${this.name}-maximize`},((t,s)=>{h(s),e(s)}))}reload(e=Function.prototype){p.sendRequest({topic:`${this.name}-reload`},((t,s)=>{h(s),e(s)}))}restore(e=Function.prototype){p.sendRequest({topic:`${this.name}-restore`},((t,s)=>{h(s),e(s)}))}setBounds(e,t,s,n,o){const r={bounds:{x:e,y:t,width:s,height:n}};p.sendRequest({topic:`${this.name}-setBounds`,data:r},((e,t)=>{t.bounds&&(t.bounds.left=t.bounds.x,t.bounds.top=t.bounds.y),h(t)?o(t):o(t.bounds)}))}setIgnoreMouseEvents(e){p.sendRequest({topic:`${this.name}-setIgnoreMouseEvents`,data:e})}setResizable(e){p.sendRequest({topic:`${this.name}-setResizable`,data:e})}setShape(e){p.sendRequest({topic:`${this.name}-setShape`,data:e})}setTaskbarIcon(e){e||(e={}),p.sendRequest({topic:`${this.name}-setTaskbarIcon`,data:e})}setTaskbarIconOverlay(e){p.sendRequest({topic:`${this.name}-setTaskbarIconOverlay`,data:null!=e?e:{}})}showNativeOpenDialog(e,t){p.sendRequest({topic:`${this.name}-showNativeOpenDialog`,data:e},((e,s)=>t(s)))}show(e=Function.prototype){p.sendRequest({topic:`${this.name}-show`},((t,s)=>{h(s),e(s)}))}showAt(e,t,s,n=Function.prototype){const o={left:e,top:t};p.sendRequest({topic:`${this.name}-showAt`,data:o},((e,t)=>{h(t),n(t)}))}setMinimumSize(e,t,s=Function.prototype){const n={size:{width:e,height:t}};p.sendRequest({topic:`${this.name}-setMinimumSize`,data:n},((e,t)=>{h(t),s(t)}))}setMaximumSize(e=null,t=null,s=Function.prototype){const n={size:{width:e,height:t}};p.sendRequest({topic:`${this.name}-setMaximumSize`,data:n},((e,t)=>{h(t),s(t)}))}updateOptions(e,t=Function.prototype){const s={options:e};p.sendRequest({topic:`${this.name}-updateOptions`,data:s},((e,s)=>{h(s),t(s)}))}remoteFSBLEvents(e,t){this.emit(t.topic,t.data)}animate(e,t=Function.prototype){t&&"function"==typeof t&&t()}setAsForeground(e){this.bringToFront((()=>this.focus((()=>e()))))}startMovingWindow(e){if(!this.useDOMMovement)return;this.mouseX=e.clientX,this.mouseY=e.clientY,this.isMoving=!0,p.sendRequest({topic:`${this.name}-windowMouseDown`}),document.addEventListener("mouseup",this.stopMovingWindow),document.addEventListener("dragend",this.stopMovingWindow),window.addEventListener("blur",this.stopMovingWindow);const t=()=>{this.isMoving&&document.hasFocus()&&(p.sendRequest({topic:`${this.name}-windowMoving`,data:{mouseX:this.mouseX,mouseY:this.mouseY}}),this.animationId=requestAnimationFrame(t))};window.requestAnimationFrame(t)}stopMovingWindow(){this.useDOMMovement&&(this.isMoving=!1,p.sendRequest({topic:`${this.name}-windowMoved`}),document.removeEventListener("mouseup",this.stopMovingWindow),document.removeEventListener("dragend",this.stopMovingWindow),window.removeEventListener("blur",this.stopMovingWindow),window.cancelAnimationFrame(this.animationId))}}const g=o();class b{constructor(){this.availableFormats=this.availableFormats.bind(this),this.writeText=this.writeText.bind(this),this.writeHTML=this.writeHTML.bind(this),this.writeRTF=this.writeRTF.bind(this),this.readText=this.readText.bind(this),this.readHTML=this.readHTML.bind(this),this.readRTF=this.readRTF.bind(this),this.write=this.write.bind(this)}availableFormats(e=Function.prototype,t=Function.prototype){p.sendRequest({topic:"availableFormatsFromClipboard"},((s,n)=>{if(!h(n))return"error"===n.status?(g.error(`Error fetching available formats from clipboard - ${n.message}`),t(n)):void e(n.value);t(n)}))}writeText(e,t=Function.prototype,s=Function.prototype){p.sendRequest({topic:"writeTextToClipboard",data:e},((e,n)=>{if(!h(n))return"error"===n.status?(g.error(`Clipboard writeText error: ${n.message}`),s(n)):void t(n);s(n)}))}writeHTML(e,t=Function.prototype,s=Function.prototype){p.sendRequest({topic:"writeHTMLToClipboard",data:e},((e,n)=>{if(!h(n))return"error"===n.status?(g.error(`Clipboard writeHTML error: ${n.message}`),s(n)):void t(n);s(n)}))}writeRTF(e,t=Function.prototype,s=Function.prototype){p.sendRequest({topic:"writeRTFToClipboard",data:e},((e,n)=>{if(!h(n))return"error"===n.status?(g.error(`Clipboard writeRTF error: ${n.message}`),s(n)):void t(n);s(n)}))}write(e,t=Function.prototype,s=Function.prototype){p.sendRequest({topic:"writeToClipboard",data:e},((n,o)=>{if(!h(o))return"error"===o.status?(g.error(`Clipboard write error: ${o.message}`),s(o)):void t(e);s(e)}))}readText(e=Function.prototype,t=Function.prototype){p.sendRequest({topic:"readTextFromClipboard"},((s,n)=>{if(!h(n))return"error"===n.status?(g.error(`Error reading text from clipboard - ${n.message}`),t(n)):void e(n.value);t(n)}))}readHTML(e=Function.prototype,t=Function.prototype){p.sendRequest({topic:"readHTMLFromClipboard"},((s,n)=>{if(!h(n))return"error"===n.status?(g.error(`Error reading html from clipboard - ${n.message}`),t(n)):void e(n.value);t(n)}))}readRTF(e=Function.prototype,t=Function.prototype){p.sendRequest({topic:"readRTFFromClipboard"},((s,n)=>{if(!h(n))return"error"===n.status?(g.error(`Error reading RTF from clipboard - ${n.message}`),t(n)):void e(n.value);t(n)}))}}class R{constructor(){this.register=this.register.bind(this),this.isRegistered=this.isRegistered.bind(this),this.unregister=this.unregister.bind(this),this.listeners={}}register(e,t,s=Function.prototype,n=Function.prototype){p.sendRequest({topic:"registerGlobalShortcut",data:e},((o,r)=>{if(!h(r))return"error"===r.status?(g.error(`GlobalShortcut register error: ${r.message}`),n(r)):(r.value?(p.addListener(`globalShortcut.${e}`,t),g.verbose(`Added listener: globalShortcut.${e}`),this.listeners[e]=t):g.verbose(`Shortcut could not be registered: GlobalShortcut ${e} already exists in some application, possibly outside of Finsemble`),void s(r.value));n(r)}))}isRegistered(e,t=Function.prototype,s=Function.prototype){p.sendRequest({topic:"isRegisteredGlobalShortcut",data:e},((e,n)=>{if(!h(n))return"error"===n.status?(g.error(`GlobalShortcut isRegistered error: ${n.message}`),s(n)):void t(n.value);s(n)}))}unregister(e,t=Function.prototype,s=Function.prototype){p.sendRequest({topic:"unregisterGlobalShortcut",data:e},((n,o)=>{if(!h(o)){if("error"===o.status)return g.error(`GlobalShortcut unregister error: ${o.message}`),s(o);const n=this.listeners[e];return"function"==typeof n&&p.removeListener(`globalShortcut.${e}`,n),delete this.listeners[e],void t(o)}s(o)}))}}class f extends r.EventEmitter{constructor(){super(),this.bindAllFunctions(),this.addEventListener=this.addListener.bind(this),this.removeEventListener=this.removeListener.bind(this),this.Clipboard=new b,this.GlobalShortcut=new R,e.ipcRenderer.on("systemEvent",((e,t)=>{this.emit(t.event,t.data)}))}bindAllFunctions(){const e=this;for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){const s=e[t];s instanceof Function&&s!==f&&(e[t]=e[t].bind(e))}}addListener(e,t){const s=`System.addListener.${e}`;return p.sendRequest({topic:"checkPermission",data:s},((s,n)=>{n?(p.addListener(`systemEvent.${e}`,t),g.verbose(`Added listener: systemEvent.${e}`)):g.warn(`PERMISSION DENIED: Attempted to add listener on SystemEvent.${e}.`)})),this}addSelectClientCertificateListener(e){const t=a()(),s=e=>{p.sendRequest({topic:`picked-client-certificate.${t}`,data:{certificate:e}},((e,t)=>{h(t)}))};p.sendRequest({topic:"select-client-certificate",data:{id:t}},((n,o)=>{h(o),p.addListener(`pick-client-certificate.${t}`,(t=>{const{url:n,list:o}=t;e(n,o,s)}))}))}addCertificateErrorListener(e){const t=a()(),s=e=>{p.sendRequest({topic:`alllow-or-disallow-page.${t}`,data:{allowOrDisallow:e}},((e,t)=>{h(t)}))};p.sendRequest({topic:"certificate-error",data:{id:t}},((n,o)=>{h(o),p.addListener(`possibly-override-certificate-error.${t}`,(t=>{const{url:n,error:o,certificate:r}=t;e(n,o,r,s)}))}))}clearCache(e){p.sendRequest({topic:"clearCache",data:e},((e,t)=>{h(t)}))}exit(){p.sendRequest({topic:"-terminate",data:null},((e,t)=>{h(t)}))}flushStorage(){return p.sendRequest({topic:"flushStorage"},((e,t)=>{h(t)}))}async getManifest(e){const t=await p.promisifiedSendRequest({topic:"-getManifest",data:{type:"application"}});return h(t),null==e||e(t),t}hideSplashScreen(){return p.sendRequest({topic:"hideSplashScreen"})}getEnvironmentVariable(e,t=Function.prototype,s=Function.prototype){return p.sendRequest({topic:"getEnvironmentVariable",data:{variableName:e}},((e,n)=>{"error"===n.status?(g.error(`getEnvironmentVariable Error: ${n.message}`),s(n)):(g.debug("getEnvironmentVariable response received."),t(n.value))}))}deleteAssets(e){return new Promise((t=>{p.sendRequest({topic:"deleteAssets",data:e},((e,s)=>{var n;h(s),t({err:null!==(n=s.err)&&void 0!==n?n:s.error})}))}))}getSDServerInfo(e){return p.sendRequest({topic:"getSDServerInfo"},((t,s)=>{h(s),e(s)}))}getHostSpecs(e){return p.sendRequest({topic:"getHostSpecs"},((t,s)=>{h(s),e(s)}))}getMonitorInfo(e){return p.sendRequest({topic:"getMonitorInfo"},((t,s)=>{h(s)?e(s):(e(s.monitorInfo),g.verbose("getMonitorInfo request sent."))}))}getMousePosition(e){return p.sendRequest({topic:"getMousePosition"},((t,s)=>{h(s),e(s)}))}getProcessList(e){return new Promise((t=>{p.sendRequest({topic:"getProcessList",data:{}},((s,n)=>{h(n),e(n),t(n)}))}))}getVersion(e){return console.log("fin.desktop.System.getVersion() is deprecated. Please use getFEAInfo()."),p.sendRequest({topic:"getVersion"},((t,s)=>{h(s),e(s)}))}getUpdateAvailable(e){return p.sendRequest({topic:"getUpdateAvailable"},((t,s)=>{h(s),e(s)}))}getFEAInfo(e){return p.sendRequest({topic:"getFEAInfo"},((t,s)=>{h(s),e(s)}))}startupApplicationHandshake(){return p.sendRequest({topic:"startupApplicationHandshake"},((e,t)=>{h(t)}))}launchExternalProcess(e,t,s){p.sendRequest({topic:"launchExternalProcess",data:e},((e,n)=>{"error"===n.status?(g.error(`launchExternalProcess: ${n.message}`),null==s||s({status:"error",message:n.error,code:"launch_fail"})):(g.debug("launchExternalProcess request sent."),t(n))}))}openUrlWithBrowser(e,t){return p.sendRequest({topic:"openUrlWithBrowser",data:e},((e,s)=>{h(s),null==t||t(s)}))}removeListener(e,t){return p.removeListener(`systemEvent.${e}`,t),this}showDeveloperTools(e,t=!0,s=Function.prototype){return g.log("System.showDeveloperTools()",e,t),p.sendRequest({topic:`${e}-showDeveloperTools`,data:{name:e,viewId:t,autoPick:!0===t}},((e,t)=>{h(t),s()}))}restart(){p.sendRequest({topic:"restartApplication",data:{}},((e,t)=>{h(t)}))}terminate(){g.log("Render: terminate called for application"),p.sendRequest({topic:"-terminate",data:null},((e,t)=>{h(t)}))}getProtocolString(e){return new Promise((t=>{p.sendRequest({topic:"getProtocolString"},((s,n)=>{t(n),e&&e(n)}))}))}getCommandLineArguments(e=Function.prototype){return p.sendRequest({topic:"getCommandLineArguments"},((t,s)=>{h(s),e(s)}))}async getScreenShareSources(e={}){const t=Object.assign({types:["window","screen"]},e),s=await p.promisifiedSendRequest({topic:"getScreenShareSources",data:t});if(h(s),"error"===s.status)throw g.error(`Error getting ScreenShare sources - ${s.message}`),`Error getting ScreenShare sources - ${s.message}`;return s.value}async getScreenShot(e=null){if(!e)try{if(!(e=(await this.getScreenShareSources()).filter((e=>"Entire Screen"===e.name||"Screen 1"===e.name))[0].id))throw"Not found"}catch(e){throw new Error("Error capturing screenshot: Unable to Find a screen. Please specify a valid sourceId from the sources returned by getScreenShareSources")}try{const t=await navigator.mediaDevices.getUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,minWidth:1280,maxWidth:4e3,minHeight:720,maxHeight:4e3}}});return await(e=>new Promise((t=>{const s=e.getVideoTracks()[0].getSettings(),n=document.createElement("video");n.style.cssText="position:absolute;top:-10000px;left:-10000px;",n.onloadedmetadata=function(){n.style.height=`${s.height}px`,n.style.width=`${s.width}px`,n.play();const o=document.createElement("canvas");o.height=s.height||0,o.width=s.width||0;const r=o.getContext("2d");null==r||r.drawImage(n,0,0,o.width,o.height),t(o.toDataURL("image/png")),n.remove();try{e.getTracks()[0].stop()}catch(e){}},n.srcObject=e,document.body.appendChild(n)})))(t)}catch(e){throw new Error(`Error capturing screenshot: ${e}`)}}setTrayIcon(e,t=Function.prototype){p.sendRequest({topic:"setTrayIcon",data:{url:e}},((e,s)=>{h(s),t()}))}logToDisk(e,...t){p.sendRequest({topic:"logToDisk",data:{level:e,messages:t}},((e,t)=>{h(t)}))}}const v={send:e=>{p.sendRequest({topic:"notification",data:e},((e,t)=>{h(t)}))}},y=o();class F extends r.EventEmitter{constructor(){super(),this.subscribers={},this.bindAllFunctions(),this.setUpListeners()}bindAllFunctions(){const e=this;for(const t of Object.getOwnPropertyNames(Object.getPrototypeOf(e))){const s=e[t];s instanceof Function&&s!==F&&(e[t]=e[t].bind(e))}}setUpListeners(){e.ipcRenderer.on("subscribeResponse",this.onSubscribeResponse.bind(this)),e.ipcRenderer.on("subscribeResponseError",((e,t)=>{h(t)})),e.ipcRenderer.on("unSubscribeResponseError",((e,t)=>{h(t)})),e.ipcRenderer.on("publishResponseError",((e,t)=>{h(t)}))}onSubscribeResponse(e,t){const s=this.subscribers[t.listenerID];null==s||s(t.data)}publish(t,s,n,o){try{e.ipcRenderer.send("e2o.iab.publish",{destination:t,data:s}),null==n||n()}catch(e){y.warn(`Publish to ${t} failed. ${e.message}`),null==o||o(e)}}subscribe(t,s,n,o=Function.prototype,r=Function.prototype){try{const t=a()();return e.ipcRenderer.send("e2o.iab.subscribe",{listenerID:t,source:s}),this.subscribers[t]=n,null==o||o(),t}catch(e){return y.warn(`Subscribing for ${s} failed. ${e.message}`),r(e),null}}unsubscribe(t){e.ipcRenderer.send("e2o.iab.unsubscribe",{listenerID:t}),t&&delete this.subscribers[t]}}console.log("Running e2o.js preload");const q=o(),{err:$,data:S}=e.ipcRenderer.sendSync("fea.getWindowIdentity");if($||!S){const e=`Error loading e2o.js preload: ${$}`;console.error(e),q.error(e)}else(t=>{const{id:s,windowName:n,webContentsName:o,isView:r,isTitlebarWindow:i,manifest:a,contextIsolation:d,preloads:c}=t;r||console.log("This is the devtools for the BrowserWindow object (titlebar shell). Use the central logger to access the devtools for the BrowserView (app content)."),d?e.contextBridge.exposeInMainWorld("finsemble",!0):window.finsemble=!0,e.webFrame.executeJavaScript(`window.name = '${n}'`);const u=new w({windowName:n,webContentsName:o,webContentsId:s,manifest:a});u.attachToMainWindow();const p={hasBrowserView:()=>(console.log("hasBrowserView() is deprecated. Use isTitlebarWindow()"),i),getViewId:()=>(console.log("getViewId() is deprecated. Use getWebContentsId()"),null!=s?s:null),isBrowserView:()=>r,isTitlebarWindow:()=>i,getWebContentsId:()=>null!=s?s:null,desktop:{main:e=>{console.log("fin.desktop.main has been deprecated. It is no longer necessary to wait before using fin."),e()},InterApplicationBus:new F,Notification:v,System:new f,Window:u}};d?(e.contextBridge.exposeInMainWorld("fin",p),e.contextBridge.exposeInMainWorld("e2o",p)):window.fin=window.e2o=p,((t,s)=>{Array.isArray(s)&&s.length&&s.forEach((s=>{((t,s)=>{let{error:n}=s;s.src&&e.webFrame.executeJavaScript(s.src).catch((e=>{const n=`Error running preload ${s.url} in ${t}: ${e}`;console.error(n),q.error(n)})),n&&(console.error(n),q.error(n))})(t,s)}))})(n,c)})(S),console.log(`Completed e2o.js preload for window ${S.windowName}`)})()})();
|
|
2
|
+
//# sourceMappingURL=e2o.js.map
|
package/dist/e2o.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2o.js","mappings":"wCAEA,WAEE,IACEA,EAGAC,EA+BEC,EAjCFC,EAAS,EACTC,EAAW,GAKb,IAAKH,EAAI,EAAGA,EAAI,IAAKA,IACnBG,EAASH,IAAMA,EAAI,KAAOI,SAAS,IAAIC,OAAO,GAiFhD,SAASC,IACP,IAAIC,GAAwB,KATvBR,GAASG,EASc,GATAM,EAAKC,eAC/BP,EAAS,EACTH,EAAMS,EAAKE,YAAYF,EAAKC,cAEvBV,EAAIY,MAAMT,EAAQA,GAKG,KAG5B,OAFAK,EAAE,GAAa,GAAPA,EAAE,GAAa,GACvBA,EAAE,GAAa,GAAPA,EAAE,GAAa,IAChBA,EAIT,SAASC,IACP,IAAID,EAAID,IACR,OAAOH,EAASI,EAAE,IAAMJ,EAASI,EAAE,IACjCJ,EAASI,EAAE,IAAMJ,EAASI,EAAE,IAAM,IAClCJ,EAASI,EAAE,IAAMJ,EAASI,EAAE,IAAM,IAClCJ,EAASI,EAAE,IAAMJ,EAASI,EAAE,IAAM,IAClCJ,EAASI,EAAE,IAAMJ,EAASI,EAAE,IAAM,IAClCJ,EAASI,EAAE,KAAOJ,EAASI,EAAE,KAC7BJ,EAASI,EAAE,KAAOJ,EAASI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ACvCmH,EAASc,SAASC,IAtBD,EAAC5K,EAAoB4K,KACvC,IAAI,MAAEpO,GAAUoO,EACZA,EAAQC,KACX,EAAAb,SAAA,kBAA2BY,EAAQC,KAAKC,OAAOC,IAC9C,MAAMC,EAAiB,yBAAyBJ,EAAQ9E,UAAU9F,MAAe+K,IACjF/O,QAAQQ,MAAMwO,GACd,EAAOxO,MAAMwO,MAGXxO,IACHR,QAAQQ,MAAMA,GACd,EAAOA,MAAMA,KAYZyO,CAAWjL,EAAY4K,OA8EzBM,CAAYlL,EAAY6J,IAiBxBsB,CAAMxK,GACN3E,QAAQC,IAAI,wCAAwC0E,EAAeX,e","sources":["webpack://@finsemble/finsemble-electron-adapter/./node_modules/uuid-random/index.js","webpack://@finsemble/finsemble-electron-adapter/external node-commonjs \"crypto\"","webpack://@finsemble/finsemble-electron-adapter/webpack/bootstrap","webpack://@finsemble/finsemble-electron-adapter/webpack/runtime/compat get default export","webpack://@finsemble/finsemble-electron-adapter/webpack/runtime/define property getters","webpack://@finsemble/finsemble-electron-adapter/webpack/runtime/hasOwnProperty shorthand","webpack://@finsemble/finsemble-electron-adapter/external node-commonjs \"electron\"","webpack://@finsemble/finsemble-electron-adapter/./src/logger/classes/LoggerRenderer.ts","webpack://@finsemble/finsemble-electron-adapter/./src/logger/renderer.ts","webpack://@finsemble/finsemble-electron-adapter/external node-commonjs \"events\"","webpack://@finsemble/finsemble-electron-adapter/./src/render/RequestHelper.ts","webpack://@finsemble/finsemble-electron-adapter/./src/render/renderHelpers.ts","webpack://@finsemble/finsemble-electron-adapter/./src/render/Window.ts","webpack://@finsemble/finsemble-electron-adapter/./src/render/System.ts","webpack://@finsemble/finsemble-electron-adapter/./src/render/Notification.ts","webpack://@finsemble/finsemble-electron-adapter/./src/render/InterApplicationBus.ts","webpack://@finsemble/finsemble-electron-adapter/./src/e2o.ts"],"sourcesContent":["\"use strict\";\n\n(function(){\n\n var\n buf,\n bufIdx = 0,\n hexBytes = [],\n i\n ;\n\n // Pre-calculate toString(16) for speed\n for (i = 0; i < 256; i++) {\n hexBytes[i] = (i + 0x100).toString(16).substr(1);\n }\n\n // Buffer random numbers for speed\n // Reduce memory usage by decreasing this number (min 16)\n // or improve speed by increasing this number (try 16384)\n uuid.BUFFER_SIZE = 4096;\n\n // Binary uuids\n uuid.bin = uuidBin;\n\n // Clear buffer\n uuid.clearBuffer = function() {\n buf = null;\n bufIdx = 0;\n };\n\n // Test for uuid\n uuid.test = function(uuid) {\n if (typeof uuid === 'string') {\n return /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(uuid);\n }\n return false;\n };\n\n // Node & Browser support\n var crypt0;\n if (typeof crypto !== 'undefined') {\n crypt0 = crypto;\n } else if( (typeof window !== 'undefined') && (typeof window.msCrypto !== 'undefined')) {\n crypt0 = window.msCrypto; // IE11\n }\n\n if ((typeof module !== 'undefined') && (typeof require === 'function')) {\n crypt0 = crypt0 || require('crypto');\n module.exports = uuid;\n } else if (typeof window !== 'undefined') {\n window.uuid = uuid;\n }\n\n // Use best available PRNG\n // Also expose this so you can override it.\n uuid.randomBytes = (function(){\n if (crypt0) {\n if (crypt0.randomBytes) {\n return crypt0.randomBytes;\n }\n if (crypt0.getRandomValues) {\n if (typeof Uint8Array.prototype.slice !== 'function') {\n return function(n) {\n var bytes = new Uint8Array(n);\n crypt0.getRandomValues(bytes);\n return Array.from(bytes);\n };\n }\n return function(n) {\n var bytes = new Uint8Array(n);\n crypt0.getRandomValues(bytes);\n return bytes;\n };\n }\n }\n return function(n) {\n var i, r = [];\n for (i = 0; i < n; i++) {\n r.push(Math.floor(Math.random() * 256));\n }\n return r;\n };\n })();\n\n // Buffer some random bytes for speed\n function randomBytesBuffered(n) {\n if (!buf || ((bufIdx + n) > uuid.BUFFER_SIZE)) {\n bufIdx = 0;\n buf = uuid.randomBytes(uuid.BUFFER_SIZE);\n }\n return buf.slice(bufIdx, bufIdx += n);\n }\n\n // uuid.bin\n function uuidBin() {\n var b = randomBytesBuffered(16);\n b[6] = (b[6] & 0x0f) | 0x40;\n b[8] = (b[8] & 0x3f) | 0x80;\n return b;\n }\n\n // String UUIDv4 (Random)\n function uuid() {\n var b = uuidBin();\n return hexBytes[b[0]] + hexBytes[b[1]] +\n hexBytes[b[2]] + hexBytes[b[3]] + '-' +\n hexBytes[b[4]] + hexBytes[b[5]] + '-' +\n hexBytes[b[6]] + hexBytes[b[7]] + '-' +\n hexBytes[b[8]] + hexBytes[b[9]] + '-' +\n hexBytes[b[10]] + hexBytes[b[11]] +\n hexBytes[b[12]] + hexBytes[b[13]] +\n hexBytes[b[14]] + hexBytes[b[15]]\n ;\n }\n\n})();\n","module.exports = require(\"crypto\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"electron\");","export default class LoggerRenderer {\n\tipc: any;\n\n\t/**\n\t * Create LoggerRenderer instance\n\t * @param {EventEmitter} ipcRenderer Electron's ipcRenderer\n\t */\n\tconstructor(ipcRenderer: any) {\n\t\t// if no ipcRenderer defined then don't initialize ipc variable, which will cause send() to use console by default; otherwise send() will use IPC to send messages to be logged\n\t\tif (!ipcRenderer || !ipcRenderer.send) {\n\t\t\tconsole.log(\"FEA LoggerRender using console output by default\");\n\t\t} else {\n\t\t\tthis.ipc = ipcRenderer;\n\t\t}\n\t}\n\n\t/**\n\t * Sends `logger:message` message to main logger if IPC defined; otherwise, log message directly to console\n\t * @param {string} level The log level\n\t * @param {...*} args The log message(s)\n\t * @return {void}\n\t * @private\n\t */\n\tsend(level: string, args: any) {\n\t\tif (this.ipc) {\n\t\t\tthis.ipc.send(\"logger:message\", {\n\t\t\t\tlevel,\n\t\t\t\targs,\n\t\t\t});\n\t\t} else {\n\t\t\t// console doesn't support verbose so use debug instead\n\t\t\tif (level === \"verbose\") {\n\t\t\t\tlevel = \"debug\";\n\t\t\t}\n\t\t\tif ((console as any)[level]) {\n\t\t\t\t(console as any)[level](\"FEA logger:message\", args);\n\t\t\t} else {\n\t\t\t\tconsole.warn(`FEA logger:message: level: ${level} not defined. defaulting to warn. `, args);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Logs a message of type error\n\t * @param {...*} messages The log message(s)\n\t */\n\terror(...messages: any[]) {\n\t\tthis.send(\"error\", messages);\n\t}\n\n\t/**\n\t * Logs a message of type warn\n\t * @param {...*} messages The log message(s)\n\t */\n\twarn(...messages: any[]) {\n\t\tthis.send(\"warn\", messages);\n\t}\n\n\t/**\n\t * Logs a message of type info\n\t * @param {...*} messages The log message(s)\n\t */\n\tinfo(...messages: any[]) {\n\t\tthis.send(\"info\", messages);\n\t}\n\n\t/**\n\t * Logs a message of type log\n\t * @param {...*} messages The log message(s)\n\t */\n\tlog(...messages: any[]) {\n\t\tthis.send(\"log\", messages);\n\t}\n\n\t/**\n\t * Logs a message of type debug\n\t * @param {...*} messages The log message(s)\n\t */\n\tdebug(...messages: any[]) {\n\t\tthis.send(\"debug\", messages);\n\t}\n\n\t/**\n\t * Logs a message of type verbose\n\t * @param {...*} messages The log message(s)\n\t */\n\tverbose(...messages: any[]) {\n\t\tthis.send(\"verbose\", messages);\n\t}\n}\n","import { ipcRenderer } from \"electron\";\nimport LoggerRenderer from \"./classes/LoggerRenderer\";\n\nlet logger: any;\n\nexport const getOrCreateRendererLogger = () => {\n\tif (logger) return logger;\n\n\ttry {\n\t\tlogger = new LoggerRenderer(ipcRenderer);\n\t} catch (error: any) {\n\t\tlogger = console;\n\t\t// Native console does not support verbose\n\t\tlogger.verbose = logger.debug;\n\t\tlogger.error(`Failed to instantiate LoggerRenderer ${error.message}`);\n\t}\n\treturn logger;\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"events\");","import { RendererBusResponse } from \"../types/types\";\nimport { ipcRenderer, IpcRendererEvent } from \"electron\";\nimport { EventEmitter } from \"events\";\nimport uuidv4 from \"uuid-random\";\n\n// See handshake comment below in SendRequest\nlet handShaked = false;\nlet handshakeIntervalTimeout: ReturnType<typeof setTimeout>;\n\ntype RequestParams = {\n\ttopic: string;\n\tdata?: any;\n\tpersistChannel?: any;\n};\n\n/**\n * This is a central location for all of our communication in the render process\n *\n * @class RequestHelper\n * @extends {EventEmitter}\n */\nclass RequestHelper extends EventEmitter {\n\trequest: any;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.request = {};\n\n\t\tipcRenderer.on(\"systemResponse\", this.systemResponse.bind(this));\n\t\tipcRenderer.on(\"handleResponse\", this.handleResponse.bind(this));\n\n\t\t// See handshake comment below in SendRequest\n\t\tipcRenderer.on(\"pong\", () => {\n\t\t\tclearTimeout(handshakeIntervalTimeout);\n\t\t\thandShaked = true;\n\t\t});\n\n\t\tconst sendNewHandshake = () => {\n\t\t\tipcRenderer.send(\"ping\");\n\t\t};\n\t\thandshakeIntervalTimeout = setInterval(sendNewHandshake, 5);\n\t}\n\n\t/**\n\t * Responses to querys are handled here.\n\t */\n\thandleResponse(event: IpcRendererEvent, data: any) {\n\t\tif (!data || !this.request[data.responseUUID]) {\n\t\t\tconsole.warn(`Event object not found in handleResponse: event ${event} data ${data && JSON.stringify(data)}`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst { responseUUID, response, err } = data;\n\t\tconst eventObject = this.request[responseUUID];\n\t\tconst reUUID = eventObject.responseUUID;\n\n\t\tif (err) console.error(err);\n\n\t\t// If persistChannel is true then don't delete the listener ( because the main process\n\t\t// may send a stream of responses )\n\t\tif (!eventObject.persistChannel) {\n\t\t\tdelete this.request[reUUID];\n\t\t}\n\n\t\teventObject.functionCB(eventObject, response);\n\t}\n\n\tpromisifiedSendRequest<T>(e2oRequest: RequestParams) {\n\t\treturn new Promise<T>((resolve) => {\n\t\t\tthis.sendRequest(e2oRequest, (eventObject: RendererBusResponse, response: any) => resolve(response));\n\t\t});\n\t}\n\n\t/**\n\t * Here's how this works:\n\t * 1. We listen on a channel (responseUUID).\n\t * 2. We send a message to the main process with a topic, data,\n\t * and where to return the response (responseUUID).\n\t * 3. When we receive a response, we invoke the functionCB.\n\t */\n\tsendRequest(params: RequestParams, functionCB = Function.prototype) {\n\t\tconst { topic, data, persistChannel } = params;\n\t\tconst responseUUID = uuidv4();\n\n\t\tconst eventObject: RendererBusResponse = {\n\t\t\ttopic,\n\t\t\tdata,\n\t\t\tpersistChannel,\n\t\t\tresponseUUID,\n\t\t\tfunctionCB,\n\t\t};\n\n\t\t/**\n\t\t * Actually does the dirty work of sending a message, listening for a response, and cleaning up listeners.\n\t\t * @param {RequestHelperEventObject} eObject\n\t\t */\n\t\tconst sendRequestOut = (eObject: RendererBusResponse) => {\n\t\t\tconst reUUID = eObject.responseUUID;\n\t\t\tthis.request[reUUID] = eObject;\n\n\t\t\tconst SendObject = {\n\t\t\t\ttopic,\n\t\t\t\tdata,\n\t\t\t};\n\n\t\t\tipcRenderer.send(\"e2o.mainRequest\", JSON.parse(JSON.stringify(SendObject)), reUUID);\n\t\t};\n\n\t\t/**\n\t\t * Electron has a bug where inbound messages to ipcRenderer (from ipcMain) are silently dropped in preloads\n\t\t * when sent too soon after the window's creation:\n\t\t * https://github.com/electron/electron/issues/27137\n\t\t *\n\t\t * To work around this issue, we delay any broadcasts to the main thread until the window\n\t\t * has completed a handshake (a simple ping to the main process and a received pong response).\n\t\t *\n\t\t * This problem manifests in Finsemble as missing window title bars on window.open()\n\t\t * but traces down to fin.getOption() calls during launcherClient initialization.\n\t\t *\n\t\t * The handshake code should be removed when the Electron bug is fixed.\n\t\t */\n\n\t\tlet intervalTimer: ReturnType<typeof setTimeout>;\n\n\t\tconst sendIfHandshaked = () => {\n\t\t\tif (handShaked) {\n\t\t\t\tclearInterval(intervalTimer);\n\t\t\t\tsendRequestOut(eventObject);\n\t\t\t}\n\t\t};\n\n\t\tif (handShaked) {\n\t\t\tsendRequestOut(eventObject);\n\t\t} else {\n\t\t\tintervalTimer = setInterval(sendIfHandshaked, 5);\n\t\t}\n\t}\n\n\t/**\n\t * Inbound events from the main process are handled here.\n\t */\n\tsystemResponse(\n\t\tevent: IpcRendererEvent,\n\t\tresponse: {\n\t\t\ttopic: string;\n\t\t\tdata: any;\n\t\t}\n\t) {\n\t\tlet dataToEmit;\n\t\ttry {\n\t\t\tdataToEmit = JSON.parse(response.data);\n\t\t} catch {\n\t\t\tdataToEmit = response.data;\n\t\t}\n\t\tthis.emit(response.topic, dataToEmit);\n\t}\n\n\t/**\n\t * Registers a handler for system events from the main process\n\t */\n\taddListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tconst count = this.listenerCount(eventName);\n\t\tsuper.addListener(eventName, listener);\n\t\tif (count === 0) {\n\t\t\t// On the first listener for this topic, tell the main process to start sending messages to this renderer\n\t\t\tipcRenderer.send(\"system.addlistener\", eventName);\n\t\t}\n\t\treturn this;\n\t}\n\n\tremoveListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tsuper.removeListener(eventName, listener);\n\t\tconst count = this.listenerCount(eventName);\n\t\t// Notify the main process when this renderer has zero listeners remaining for the topic\n\t\tif (count === 0) ipcRenderer.send(\"system.removeListener\", eventName);\n\t\treturn this;\n\t}\n}\nexport default new RequestHelper();\n","import { getOrCreateRendererLogger } from \"../logger/renderer\";\n\nconst logger = getOrCreateRendererLogger();\n\n/**\n * Checks if the accessDenied callback or error text responded to an event\n * If so, log an error\n * Returns true or false in case the calling function needs to do more gating\n * Currently this function is only used to check permission results.\n * @param {*} response\n */\nexport const checkAndLogAccessDenied = (response: any) => {\n\tif (typeof response === \"object\" && response && response.error) {\n\t\tconsole.log(\"Warning:\", response.message);\n\t\tlogger.warn(\"Warning:\", response.message);\n\t\treturn true;\n\t}\n\tif (typeof response === \"string\" && response.includes(\"api_access_denied\")) {\n\t\tconsole.log(\"Warning:\", response);\n\t\tlogger.warn(\"Warning:\", response);\n\t\treturn true;\n\t}\n\treturn false;\n};\n","import RequestHelper from \"./RequestHelper\";\nimport { checkAndLogAccessDenied } from \"./renderHelpers\";\nimport { getOrCreateRendererLogger } from \"../logger/renderer\";\nimport { RendererBusResponse, WebContentsId } from \"../types/types\";\nimport {\n\tManifest,\n\tWebContentsRecord,\n\tStandardResponse,\n\tStandardErrorCallback,\n\tStandardPromise,\n\tSpawnResponseFSA,\n\tErrorResponseFSA,\n} from \"../types/types\";\nimport { EventEmitter } from \"events\";\nimport { ipcRenderer } from \"electron\";\nimport uuidv4 from \"uuid-random\";\n\nconst logger = getOrCreateRendererLogger();\n\n/**\n * There are three ways that a Window object gets created.\n *\n * 1) The e2o.ts preload obtains a reference to itself. This is accomplished by calling\n * the Window constructor directly and then attaching it to the main process for events.\n *\n * 2) A finsemble app or service wishes to spawn a new window. In this case, `createNew()` is\n * called, which spawns a new physical window in the main process and then returns a Window\n * object back to the finsemble app. The finsemble app may then listen for events or control that window\n * from the returned object.\n *\n * 3) A finsemble app or service wishes to obtain a handle to an existing Window (other than itself).\n * In this case, `wrap()` is called, which attaches to the existing Window's events and then returns\n * a Window object that can be used to listen for events or control the window.\n */\nexport class Window extends EventEmitter {\n\t// Deprecated\n\tuuid: string = \"fin.desktop.Window.uuid has been deprecated\";\n\n\t// The name of the window. If this is accessed from a BrowserView then it will contain\n\t// the name of the containing window.\n\tname: string;\n\n\t// The name of the WebContents (BrowserWindow or BrowserView). This is used for display purposes.\n\twebContentsName: string;\n\n\t// The Electron WebContents id for this BrowserWindow/BrowserView. Guaranteed to be unique.\n\twebContentsId: WebContentsId;\n\n\tcloseRequestedListeners: any[] = [];\n\n\tuseDOMMovement: boolean;\n\n\tmouseX?: number;\n\n\tmouseY?: number;\n\n\tisMoving: boolean = false;\n\n\tanimationId: number = 0;\n\n\tmanifest: Manifest;\n\n\tconstructor(params: {\n\t\tmanifest: Manifest;\n\t\twindowName: string;\n\t\twebContentsName: string;\n\t\twebContentsId: WebContentsId;\n\t}) {\n\t\tsuper();\n\t\tthis.bindAllFunctions();\n\t\tthis.manifest = params.manifest;\n\t\tthis.name = params.windowName;\n\t\tthis.webContentsName = params.webContentsName;\n\t\tthis.webContentsId = params.webContentsId;\n\t\tlogger.log(\"Constructing `Window` object in Window.ts\", this.name);\n\t\tif (!this.name) {\n\t\t\tthrow new Error(`Window being created without a name. This is not allowed.`);\n\t\t}\n\t\t// Use of DOM based window movement defaults to true, unless this isn't Mac and has a specific config setting.\n\t\tconst useDOMBasedMovementConfigValue = this.manifest?.[\"finsemble-electron-adapter\"]?.useDOMBasedMovement;\n\t\tthis.useDOMMovement = process.platform === \"darwin\" ? true : useDOMBasedMovementConfigValue ?? true;\n\t}\n\n\t/**\n\t * Starts the local Window listening to events from the MainWindow.\n\t */\n\tattachToMainWindow() {\n\t\tipcRenderer.on(`windowEvent-${this.name}`, this.remoteFSBLEvents.bind(this));\n\t}\n\n\t/**\n\t * Creates a handle to an existing window. The handle can then be used to manipulate annd receive\n\t * events from that window. This function throws an error if the remote window cannot be located\n\t * (e.g. if an invalid windowName is provided).\n\t */\n\twrap(windowName: string, deprecated: string): Window {\n\t\tif (deprecated) windowName = deprecated; // old code used to accept uuid as first parameter\n\t\tlogger.verbose(`Wrapping window ${windowName}`);\n\t\tconst { err, data: windowIdentity }: StandardResponse<WebContentsRecord> = ipcRenderer.sendSync(\n\t\t\t\"fea.getWindowIdentityForWindowName\",\n\t\t\twindowName\n\t\t);\n\n\t\tif (err || !windowIdentity) {\n\t\t\tthrow `Window.wrap() failed for ${windowName}. ${err}`;\n\t\t}\n\n\t\tconst win = new Window({\n\t\t\tmanifest: this.manifest,\n\t\t\twindowName,\n\t\t\twebContentsName: windowIdentity.webContentsName,\n\t\t\twebContentsId: windowIdentity.id,\n\t\t});\n\t\twin.attachToMainWindow();\n\t\treturn win;\n\t}\n\n\t/**\n\t * Asks the main process to spawn a new window. This is used by `createNew()`.\n\t */\n\tprivate static spawnPhysicalWindow(params: any): StandardPromise<number> {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst windowName = params.name;\n\t\t\tlet timedOut = false;\n\t\t\tlogger.verbose(`spawnPhysicalWindow ${windowName}`);\n\n\t\t\tconst spawnTimeout = setTimeout(() => {\n\t\t\t\ttimedOut = true;\n\t\t\t\tconst error = `Window ${windowName}: spawn failed to return within 5 seconds`;\n\t\t\t\tlogger.error(error);\n\t\t\t\tresolve({ err: error });\n\t\t\t}, 5000);\n\n\t\t\tlogger.debug(`Window ${windowName}: spawning`);\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{\n\t\t\t\t\ttopic: `-SpawnWindow`,\n\t\t\t\t\tdata: params,\n\t\t\t\t},\n\t\t\t\t(eventObj: any, fsa: SpawnResponseFSA | ErrorResponseFSA) => {\n\t\t\t\t\tif (timedOut) {\n\t\t\t\t\t\tlogger.debug(`Late spawn window response from main process (after 5 sec) for ${windowName}: `, fsa);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tclearTimeout(spawnTimeout);\n\t\t\t\t\tif (fsa.type === \"ErrorResponse\") {\n\t\t\t\t\t\tresolve({ err: fsa.payload.err });\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tlogger.debug(`Window ${windowName}: spawn complete`);\n\t\t\t\t\tresolve({});\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t}\n\n\t/**\n\t * Create a new window (i.e. spawn a child). A promise (or optional callback) will resolve with a handle\n\t * to the new window (which behaves like a wrap).\n\t */\n\tasync createNew(params: any, cb?: StandardErrorCallback<Window>): StandardPromise<Window> {\n\t\tconst { err } = await Window.spawnPhysicalWindow(params);\n\t\tif (err) {\n\t\t\tcb?.(err);\n\t\t\treturn { err };\n\t\t}\n\t\tconst win = new Window({\n\t\t\t...params,\n\t\t});\n\t\twin.attachToMainWindow();\n\t\tcb?.(null, win);\n\t\treturn { data: win };\n\t}\n\n\tbindAllFunctions() {\n\t\tconst self: any = this;\n\t\tfor (const name of Object.getOwnPropertyNames(Object.getPrototypeOf(self))) {\n\t\t\tconst method = self[name];\n\t\t\t// skip constructor\n\t\t\tif (!(method instanceof Function) || method === Window) continue;\n\t\t\tself[name] = self[name].bind(self);\n\t\t}\n\t}\n\n\t/**\n\t * @param {String} eventName\n\t * @param {Function} listener\n\t */\n\taddEventListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tthis.addListener(eventName, listener);\n\t}\n\n\taddBrowserView(data: any, cb: Function) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-addBrowserView`, data }, (eventObject: any, _data: any) => {\n\t\t\tcheckAndLogAccessDenied(_data);\n\t\t\tcb(_data);\n\t\t});\n\t}\n\n\t/**\n\t * @param viewId\n\t * @param {object} bounds\n\t * @param {Number} bounds.left\n\t * @param {Number} bounds.top\n\t * @param {Number} bounds.width\n\t * @param {Number} bounds.height\n\t * @param {Function} cb\n\t */\n\tsetViewBounds(viewId: any, bounds: any, cb: Function) {\n\t\tconst adjustedBounds = {\n\t\t\tx: bounds.left,\n\t\t\ty: bounds.top,\n\t\t\twidth: bounds.width,\n\t\t\theight: bounds.height,\n\t\t};\n\t\tconst sendObject = {\n\t\t\ttype: \"window\",\n\t\t\tbounds: adjustedBounds,\n\t\t\tviewId,\n\t\t};\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-setViewBounds`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tif (data.bounds) {\n\t\t\t\t\tdata.bounds.left = data.bounds.x;\n\t\t\t\t\tdata.bounds.top = data.bounds.y;\n\t\t\t\t}\n\t\t\t\tconst error = checkAndLogAccessDenied(data);\n\t\t\t\tif (error) {\n\t\t\t\t\tcb(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcb(data.bounds);\n\t\t\t}\n\t\t);\n\t}\n\n\tbringViewToFront(viewId: any, cb: Function) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-bringViewToFront`, data: { viewId } },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tconst error = checkAndLogAccessDenied(data);\n\t\t\t\tif (error) {\n\t\t\t\t\tcb(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcb(null);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Adds listeners for window events if permitted\n\t * @param {String} eventName\n\t * @param {Function} listener\n\t */\n\taddListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tconst permission = `Window.addListener.${eventName}`;\n\t\tlogger.verbose(`Adding listener ${eventName}, ${this.name}`);\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"checkPermission\", data: permission },\n\t\t\t(eventObject: RendererBusResponse, isAllowed: any) => {\n\t\t\t\tif (isAllowed) {\n\t\t\t\t\tif (eventName == \"close-requested\") {\n\t\t\t\t\t\tthis.closeRequestedAdd(listener);\n\t\t\t\t\t}\n\t\t\t\t\tRequestHelper.addListener(`windowEvent-${this.name}.${eventName}`, listener);\n\t\t\t\t} else {\n\t\t\t\t\tlogger.warn(`PERMISSION DENIED: Attempted to add listener on Window.${this.name}.${eventName}.`);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\treturn this;\n\t}\n\n\tblur(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-blur` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tbringToFront(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-bringToFront` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\t/**\n\t * @param {boolean} force\n\t */\n\tclose(force = false, cb = Function.prototype) {\n\t\tconst sendObject = { force };\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-close`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * If a developer has requested a close-requested event then we disable automatic closing of the window.\n\t */\n\tcloseRequestedAdd(listener: Function) {\n\t\t// If we've never done this before, we need to let the main proc know to hold up the close process for a\n\t\t// window. If we have, we can just add this listener to our existing list.\n\t\tif (this.closeRequestedListeners.length === 0) {\n\t\t\tRequestHelper.sendRequest({ topic: `${this.name}-closeRequestedAdd` }, (eventObject: any, data: any) => {\n\t\t\t\t/** Would be nice to know _who_ added the closeRequested event. */\n\t\t\t\tif (!checkAndLogAccessDenied(data)) logger.debug(`${this.name}-closeRequestedAdd`);\n\t\t\t});\n\t\t}\n\t\tthis.closeRequestedListeners.push(listener);\n\t}\n\n\tcloseRequestedRemove(listener: Function) {\n\t\tconst i = this.closeRequestedListeners.indexOf(listener);\n\t\tif (i > -1) this.closeRequestedListeners.splice(i, 1);\n\t\tif (this.closeRequestedListeners.length === 0) {\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{ topic: `${this.name}-closeRequestedRemove` },\n\t\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\t\tif (!checkAndLogAccessDenied(data)) logger.debug(`${this.name}-closeRequestedRemove`);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tdisableFrame(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-disableFrame` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tenableFrame(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-enableFrame` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tfocus(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-focus` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetBounds(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-getBounds` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetBoundsFromSystem(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{\n\t\t\t\ttopic: `${this.name}-getBoundsFromSystem`,\n\t\t\t},\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\tgetCurrent(): Window {\n\t\treturn this;\n\t}\n\n\tgetOptions(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-getDetails` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetSnapshot(area: any, cb = Function.prototype) {\n\t\treturn new Promise((resolve) => {\n\t\t\tconst sendObject = { area };\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{ topic: `${this.name}-getSnapshot`, data: sendObject },\n\t\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\t\tcb(data);\n\t\t\t\t\tresolve(data);\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t}\n\n\thide(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-hide` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tisShowing(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-isShowing` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tminimize(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-minimize` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\t/**\n\t * @private This exists to work around an electron bug on MacOS. Needs to be removed when maximize is handled properly.\n\t */\n\tresetBrowserView(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-resetBrowserView` },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @param {*} viewId\n\t */\n\tremoveBrowserView(viewId: number, cb = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-removeBrowserView`, data: { viewId } },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @param {String} eventName\n\t * @param {Function} listener\n\t */\n\tremoveEventListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tthis.removeListener(eventName, listener);\n\t}\n\n\t/**\n\t * @param {String} eventName\n\t * @param {Function} listener\n\t */\n\tremoveListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tif (eventName == \"close-requested\") {\n\t\t\tthis.closeRequestedRemove(listener);\n\t\t}\n\t\tRequestHelper.removeListener(`windowEvent-${this.name}.${eventName}`, listener);\n\t\treturn this;\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\tremoveTrayIcon(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: \"removeTrayIcon\", data: {} }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t});\n\t\tcb();\n\t}\n\n\t/**\n\t * @deprecated, use System.setTrayIcon\n\t */\n\tsetTrayIcon(iconpath: string, listeners: any, cb = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{\n\t\t\t\ttopic: \"setTrayIconDeprecated\",\n\t\t\t\tdata: {\n\t\t\t\t\ticonpath,\n\t\t\t\t\tlisteners: listeners ? Object.keys(listeners) : {},\n\t\t\t\t},\n\t\t\t\tpersistChannel: true,\n\t\t\t},\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tconst error = checkAndLogAccessDenied(data);\n\t\t\t\tif (!error && listeners && listeners.clickListener && data.event == \"click\") {\n\t\t\t\t\tlogger.debug(\"setTrayIcon request sent\");\n\t\t\t\t\tlisteners.clickListener(data);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\tcb();\n\t}\n\n\tmaximize(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-maximize` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\treload(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-reload` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\trestore(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-restore` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param {Number} left\n\t * @param {Number} top\n\t * @param {Number} width\n\t * @param {Number} height\n\t * @param {Function} cb\n\t */\n\tsetBounds(left: number, top: number, width: number, height: number, cb: Function) {\n\t\tconst bounds = {\n\t\t\tx: left,\n\t\t\ty: top,\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t\tconst sendObject = { bounds };\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-setBounds`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tif (data.bounds) {\n\t\t\t\t\tdata.bounds.left = data.bounds.x;\n\t\t\t\t\tdata.bounds.top = data.bounds.y;\n\t\t\t\t}\n\t\t\t\tconst error = checkAndLogAccessDenied(data);\n\t\t\t\tif (error) {\n\t\t\t\t\tcb(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcb(data.bounds);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Send the requested reconfiguration data to the main window.\n\t *\n\t * @param {object} data\n\t * @return {undefined}\n\t */\n\tsetIgnoreMouseEvents(data: any) {\n\t\tRequestHelper.sendRequest({\n\t\t\ttopic: `${this.name}-setIgnoreMouseEvents`,\n\t\t\tdata,\n\t\t});\n\t}\n\n\t/**\n\t * Enable/disable resizing of the window.\n\t *\n\t * @param {object} data\n\t * @return {undefined}\n\t */\n\tsetResizable(data: any) {\n\t\tRequestHelper.sendRequest({\n\t\t\ttopic: `${this.name}-setResizable`,\n\t\t\tdata,\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param {Object} data\n\t */\n\tsetShape(data: any) {\n\t\tRequestHelper.sendRequest({\n\t\t\ttopic: `${this.name}-setShape`,\n\t\t\tdata,\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param {Object} data\n\t */\n\tsetTaskbarIcon(data: any) {\n\t\tif (!data) {\n\t\t\tdata = {};\n\t\t}\n\t\tRequestHelper.sendRequest({\n\t\t\ttopic: `${this.name}-setTaskbarIcon`,\n\t\t\tdata,\n\t\t});\n\t}\n\n\t/**\n\t * @param {Object} data\n\t */\n\tsetTaskbarIconOverlay(data: any) {\n\t\tRequestHelper.sendRequest({\n\t\t\ttopic: `${this.name}-setTaskbarIconOverlay`,\n\t\t\tdata: data ?? {},\n\t\t});\n\t}\n\n\t/**\n\t * Open a native file selection dialog on a window\n\t *\n\t * @param {Object} params - see https://www.electronjs.org/docs/api/dialog\n\t * @param {Function} cb\n\t * @return {undefined}\n\t */\n\tshowNativeOpenDialog(data: any, cb: Function) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-showNativeOpenDialog`, data },\n\t\t\t(eventObject: RendererBusResponse, _data: any) => cb(_data)\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * @param {Function} cb\n\n\t */\n\tshow(cb = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-show` }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\t/**\n\t *\n\t * @param {Number} left\n\t * @param {Number} top\n\t * @param {boolean} force\n\t * @param {Function} cb\n\n\t */\n\tshowAt(left: number, top: number, force: boolean, cb = Function.prototype) {\n\t\tconst sendObject = {\n\t\t\tleft,\n\t\t\ttop,\n\t\t};\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-showAt`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * @param {number | null} width\n\t * @param {number | null} height\n\t * @param {Function} cb\n\n\t */\n\tsetMinimumSize(width: number, height: number, cb = Function.prototype) {\n\t\tconst size = {\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t\tconst sendObject = { size };\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-setMinimumSize`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * @param {number | null} width\n\t * @param {number | null} height\n\t * @param {Function} cb\n\n\t */\n\tsetMaximumSize(width: number | null = null, height: number | null = null, cb = Function.prototype) {\n\t\tconst size = {\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t\tconst sendObject = { size };\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-setMaximumSize`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * @param {Object} options\n\t * @param {Function} cb\n\n\t */\n\tupdateOptions(options: any, cb = Function.prototype) {\n\t\tconst sendObject = { options };\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: `${this.name}-updateOptions`, data: sendObject },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * @private\n\t * @param {ElectronEvent} event\n\t * @param {Object} data\n\t */\n\tremoteFSBLEvents(event: any, data: any) {\n\t\tthis.emit(data.topic, data.data);\n\t}\n\n\tanimate(params: any, cb = Function.prototype) {\n\t\t// Not implemented\n\t\tif (cb && typeof cb == \"function\") {\n\t\t\tcb();\n\t\t}\n\t}\n\n\tsetAsForeground(cb: Function) {\n\t\tthis.bringToFront(() => this.focus(() => cb()));\n\t}\n\n\t/**\n\t * onmousedown event handler. The mousedown event is captured by the DOM. This function handles tracking the mouse location\n\t * and sending the information to the electron main process to move the window.\n\t * @param {WindowEvent} e DOM event\n\t */\n\tstartMovingWindow(e: any) {\n\t\tif (!this.useDOMMovement) return;\n\t\tthis.mouseX = e.clientX;\n\t\tthis.mouseY = e.clientY;\n\t\tthis.isMoving = true;\n\t\tRequestHelper.sendRequest({\n\t\t\ttopic: `${this.name}-windowMouseDown`,\n\t\t});\n\t\tdocument.addEventListener(\"mouseup\", this.stopMovingWindow);\n\t\t/**\n\t\t * The 'dragend' event will fire if the text of the titlebar is selected, and then dragged. This\n\t\t * can occur if someone selects the text of the page and pulls up above the window. Then, when the\n\t\t * user clicks the titlebar, chrome will drag the element, and never fire mouseup.\n\t\t */\n\t\tdocument.addEventListener(\"dragend\", this.stopMovingWindow);\n\t\t/**\n\t\t * The window can blur while the user is moving the window. If the user is moving the window\n\t\t * and a native application or notification steals focus, the window would get \"stuck\" to the\n\t\t * mouse, because mouseup wouldn't fire.\n\t\t * An easy way to simulate this bad behavior is to remove this listener and start moving the window.\n\t\t * Then hit alt+tab.\n\t\t * Alternatively, you can press the windows key while moving a window (this will bring up the\n\t\t * cortana search menu and focus it).\n\t\t */\n\t\twindow.addEventListener(\"blur\", this.stopMovingWindow);\n\t\tconst moveWindow = () => {\n\t\t\t// Currently the blur event should fire whenever the window loses\n\t\t\t// focus and document.hasfocus() is redundant. However, the Chromium API\n\t\t\t// Is not in our control, and this could change out from under us, so we leave this additional check.\n\t\t\tif (!this.isMoving || !document.hasFocus()) return;\n\t\t\tRequestHelper.sendRequest({\n\t\t\t\ttopic: `${this.name}-windowMoving`,\n\t\t\t\tdata: {\n\t\t\t\t\tmouseX: this.mouseX,\n\t\t\t\t\tmouseY: this.mouseY,\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.animationId = requestAnimationFrame(moveWindow);\n\t\t};\n\t\twindow.requestAnimationFrame(moveWindow);\n\t}\n\n\t/**\n\t * onmouseup event handler. The mouseup event is captured by the DOM. This function handles\n\t * sending the mouseup information to the electron main process.\n\t */\n\tstopMovingWindow() {\n\t\tif (!this.useDOMMovement) return;\n\t\tthis.isMoving = false;\n\t\tRequestHelper.sendRequest({ topic: `${this.name}-windowMoved` });\n\t\tdocument.removeEventListener(\"mouseup\", this.stopMovingWindow);\n\t\tdocument.removeEventListener(\"dragend\", this.stopMovingWindow);\n\t\twindow.removeEventListener(\"blur\", this.stopMovingWindow);\n\t\twindow.cancelAnimationFrame(this.animationId);\n\t}\n}\n","import { EventEmitter } from \"events\";\nimport RequestHelper from \"./RequestHelper\";\nimport { checkAndLogAccessDenied } from \"./renderHelpers\";\nimport { getOrCreateRendererLogger } from \"../logger/renderer\";\nimport { RendererBusResponse, StandardPromise, FEALogLevel } from \"../types/types\";\nimport uuidv4 from \"uuid-random\";\nimport { ipcRenderer, desktopCapturer, SourcesOptions, Certificate } from \"electron\";\nimport { ScreenCaptureSource } from \"../main/ScreenCapture\";\n\nconst logger = getOrCreateRendererLogger();\n\n/**\n * Clipboard class for System. Contains clipboard specific actions\n * @deprecated\n */\nclass Clipboard {\n\tconstructor() {\n\t\t//Bind functions for access to verbose logging shortcuts\n\t\tthis.availableFormats = this.availableFormats.bind(this);\n\t\tthis.writeText = this.writeText.bind(this);\n\t\tthis.writeHTML = this.writeHTML.bind(this);\n\t\tthis.writeRTF = this.writeRTF.bind(this);\n\t\tthis.readText = this.readText.bind(this);\n\t\tthis.readHTML = this.readHTML.bind(this);\n\t\tthis.readRTF = this.readRTF.bind(this);\n\t\tthis.write = this.write.bind(this);\n\t}\n\n\t/**\n\t * Reads available formats for the clipboard\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional failure callback\n\t * @deprecated\n\t */\n\tavailableFormats(successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"availableFormatsFromClipboard\" },\n\t\t\t(eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`Error fetching available formats from clipboard - ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tsuccessCallback(data.value);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n\t/**\n\t * Takes input text and writes to the system's clipboard\n\t * @param {string} text The text to write to the system's clipboard\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional failure callback\n\t * @deprecated\n\t */\n\n\twriteText(text: string, successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"writeTextToClipboard\", data: text },\n\t\t\t(eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`Clipboard writeText error: ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tsuccessCallback(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Takes input HTML as a string and writes to the system's clipboard\n\t * @param {string} text The text to write to the system's clipboard\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional failure callback\n\t * @deprecated\n\t */\n\twriteHTML(text: string, successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"writeHTMLToClipboard\", data: text },\n\t\t\t(eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`Clipboard writeHTML error: ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tsuccessCallback(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Takes input RTF as a string and writes to the system's clipboard\n\t * @param {string} text The text to write to the system's clipboard\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional failure callback\n\t * @deprecated\n\t */\n\twriteRTF(text: string, successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"writeRTFToClipboard\", data: text },\n\t\t\t(eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`Clipboard writeRTF error: ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tsuccessCallback(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Takes input data (text, html and/or RTF) and writes it to the system's clipboard\n\t * @param {object} data The data to write to the system's clipboard\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional failure callback\n\t * @deprecated\n\t */\n\twrite(data: any, successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: \"writeToClipboard\", data }, (eventObj: RendererBusResponse, res: any) => {\n\t\t\tif (!checkAndLogAccessDenied(res)) {\n\t\t\t\tif (res.status === \"error\") {\n\t\t\t\t\tlogger.error(`Clipboard write error: ${res.message}`);\n\t\t\t\t\treturn errorCallback(res);\n\t\t\t\t}\n\n\t\t\t\tsuccessCallback(data);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\terrorCallback(data);\n\t\t});\n\t}\n\t/**\n\t * Reads text from the system clipboard and returns it\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional error callback\n\t * @deprecated\n\t */\n\n\treadText(successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: \"readTextFromClipboard\" }, (eventObj: RendererBusResponse, data: any) => {\n\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\tlogger.error(`Error reading text from clipboard - ${data.message}`);\n\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t}\n\n\t\t\t\tsuccessCallback(data.value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\terrorCallback(data);\n\t\t});\n\t}\n\n\t/**\n\t * Reads HTML from the system clipboard and returns it as text\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional error callback\n\t * @deprecated\n\t */\n\treadHTML(successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: \"readHTMLFromClipboard\" }, (eventObj: RendererBusResponse, data: any) => {\n\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\tlogger.error(`Error reading html from clipboard - ${data.message}`);\n\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t}\n\n\t\t\t\tsuccessCallback(data.value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\terrorCallback(data);\n\t\t});\n\t}\n\n\t/**\n\t * Reads RTF from the system clipboard and returns it as text\n\t * @param {*} [successCallback] Optional success callback\n\t * @param {*} [errorCallback] Optional error callback\n\t * @deprecated\n\t */\n\treadRTF(successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest({ topic: \"readRTFFromClipboard\" }, (eventObj: RendererBusResponse, data: any) => {\n\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\tlogger.error(`Error reading RTF from clipboard - ${data.message}`);\n\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t}\n\n\t\t\t\tsuccessCallback(data.value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\terrorCallback(data);\n\t\t});\n\t}\n}\n\nclass GlobalShortcut {\n\tlisteners: any;\n\n\tconstructor() {\n\t\t// Bind functions for access to verbose logging shortcuts\n\t\tthis.register = this.register.bind(this);\n\t\tthis.isRegistered = this.isRegistered.bind(this);\n\t\tthis.unregister = this.unregister.bind(this);\n\n\t\tthis.listeners = {};\n\t}\n\n\tregister(\n\t\taccelerator: string,\n\t\tcallback: (...args: any[]) => void,\n\t\tsuccessCallback = Function.prototype,\n\t\terrorCallback = Function.prototype\n\t) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"registerGlobalShortcut\", data: accelerator },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`GlobalShortcut register error: ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (data.value) {\n\t\t\t\t\t\tRequestHelper.addListener(`globalShortcut.${accelerator}`, callback);\n\t\t\t\t\t\tlogger.verbose(`Added listener: globalShortcut.${accelerator}`);\n\t\t\t\t\t\tthis.listeners[accelerator] = callback;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogger.verbose(\n\t\t\t\t\t\t\t`Shortcut could not be registered: GlobalShortcut ${accelerator} already exists in some application, possibly outside of Finsemble`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tsuccessCallback(data.value);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n\n\tisRegistered(accelerator: string, successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"isRegisteredGlobalShortcut\", data: accelerator },\n\t\t\t(eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`GlobalShortcut isRegistered error: ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tsuccessCallback(data.value);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n\n\tunregister(accelerator: string, successCallback = Function.prototype, errorCallback = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"unregisterGlobalShortcut\", data: accelerator },\n\t\t\t(eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tif (!checkAndLogAccessDenied(data)) {\n\t\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\t\tlogger.error(`GlobalShortcut unregister error: ${data.message}`);\n\t\t\t\t\t\treturn errorCallback(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst callback = this.listeners[accelerator];\n\t\t\t\t\tif (typeof callback === \"function\") {\n\t\t\t\t\t\tRequestHelper.removeListener(`globalShortcut.${accelerator}`, callback);\n\t\t\t\t\t}\n\n\t\t\t\t\tdelete this.listeners[accelerator];\n\t\t\t\t\tsuccessCallback(data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\terrorCallback(data);\n\t\t\t}\n\t\t);\n\t}\n}\n\n/*\n * Defines the functions available in fin.desktop.System. If adding functions to FSBL.System, be sure to add them to\n * system.ts as well.\n */\nexport class System extends EventEmitter {\n\taddEventListener: (eventName: string, listener: (...args: any[]) => void) => System;\n\n\tremoveEventListener: (eventName: string, listener: (...args: any[]) => void) => void;\n\n\tClipboard: Clipboard;\n\n\tGlobalShortcut: GlobalShortcut;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.bindAllFunctions();\n\n\t\tthis.addEventListener = this.addListener.bind(this);\n\t\tthis.removeEventListener = this.removeListener.bind(this);\n\n\t\tthis.Clipboard = new Clipboard();\n\t\tthis.GlobalShortcut = new GlobalShortcut();\n\t\tipcRenderer.on(\"systemEvent\", (event: any, data: any) => {\n\t\t\tthis.emit(data.event, data.data);\n\t\t});\n\t}\n\n\tbindAllFunctions() {\n\t\tconst self: any = this;\n\t\tfor (const name of Object.getOwnPropertyNames(Object.getPrototypeOf(self))) {\n\t\t\tconst method = self[name];\n\t\t\t// skip constructor\n\t\t\tif (!(method instanceof Function) || method === System) continue;\n\t\t\tself[name] = self[name].bind(self);\n\t\t}\n\t}\n\n\t/**\n\t * Adds listeners for system events if permitted\n\t */\n\taddListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tconst permission = `System.addListener.${eventName}`;\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"checkPermission\", data: permission },\n\t\t\t(eventObject: RendererBusResponse, isAllowed: any) => {\n\t\t\t\tif (isAllowed) {\n\t\t\t\t\tRequestHelper.addListener(`systemEvent.${eventName}`, listener);\n\t\t\t\t\tlogger.verbose(`Added listener: systemEvent.${eventName}`);\n\t\t\t\t} else {\n\t\t\t\t\tlogger.warn(`PERMISSION DENIED: Attempted to add listener on SystemEvent.${eventName}.`);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a listener for the select-client-certificate event.\n\t */\n\taddSelectClientCertificateListener(\n\t\tcallback: (url: string, list: Certificate[], pickedCertificate: (certificate: Certificate) => void) => void\n\t) {\n\t\tconst id = uuidv4();\n\n\t\t// (5) The picked certificate is returned back to the main process which returns it to Electron\n\t\tconst pickedCertificate = (certificate: Certificate) => {\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{ topic: `picked-client-certificate.${id}`, data: { certificate } },\n\t\t\t\t(_eventObj: RendererBusResponse, res: any) => {\n\t\t\t\t\tcheckAndLogAccessDenied(res);\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\t\t// (1) Tell the main process that we want to choose client certificates when they are requested\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"select-client-certificate\", data: { id } },\n\t\t\t(_eventObject: RendererBusResponse, response: any) => {\n\t\t\t\tcheckAndLogAccessDenied(response);\n\n\t\t\t\t// (2) Add a handler so that when a client certificate is requested, the main process\n\t\t\t\t// can ask this renderer which one to choose\n\t\t\t\tRequestHelper.addListener(`pick-client-certificate.${id}`, (data: any) => {\n\t\t\t\t\tconst { url, list }: { url: string; list: Certificate[] } = data;\n\t\t\t\t\t// (3) When a request to pick is received, pass it to the user function to make a choice\n\t\t\t\t\tcallback(url, list, pickedCertificate);\n\t\t\t\t\t// (4) The user function must call `pickedCertificate(certificate)` with its choice\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Adds a listener for the certificate-error event.\n\t */\n\taddCertificateErrorListener(\n\t\tcallback: (\n\t\t\turl: string,\n\t\t\terror: string,\n\t\t\tcertificate: Certificate,\n\t\t\tallowOrDisallowCertificate: (allowOrDisallow: boolean) => void\n\t\t) => void\n\t) {\n\t\tconst id = uuidv4();\n\t\tconst allowOrDisallowCertificate = (allowOrDisallow: boolean) => {\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{ topic: `alllow-or-disallow-page.${id}`, data: { allowOrDisallow } },\n\t\t\t\t(_eventObj: RendererBusResponse, res: any) => {\n\t\t\t\t\tcheckAndLogAccessDenied(res);\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"certificate-error\", data: { id } },\n\t\t\t(eventObject: RendererBusResponse, response: any) => {\n\t\t\t\tcheckAndLogAccessDenied(response);\n\n\t\t\t\tRequestHelper.addListener(`possibly-override-certificate-error.${id}`, (data) => {\n\t\t\t\t\tconst { url, error, certificate }: { url: string; error: string; certificate: Certificate } = data;\n\t\t\t\t\tcallback(url, error, certificate, allowOrDisallowCertificate);\n\t\t\t\t});\n\t\t\t}\n\t\t);\n\t}\n\n\tclearCache(data: any) {\n\t\tRequestHelper.sendRequest({ topic: \"clearCache\", data }, (eventObject: RendererBusResponse, response: any) => {\n\t\t\tcheckAndLogAccessDenied(response);\n\t\t});\n\t}\n\n\t/**\n\t * Deprecated, use terminate instead\n\t */\n\texit() {\n\t\tRequestHelper.sendRequest({ topic: \"-terminate\", data: null }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t});\n\t}\n\n\tflushStorage() {\n\t\treturn RequestHelper.sendRequest({ topic: \"flushStorage\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t});\n\t}\n\n\tasync getManifest(cb?: Function) {\n\t\tconst data = { type: \"application\" };\n\t\tconst topic = `-getManifest`;\n\t\tconst request = { topic, data };\n\t\tconst response = await RequestHelper.promisifiedSendRequest(request);\n\t\tcheckAndLogAccessDenied(response);\n\t\tcb?.(response);\n\t\treturn response;\n\t}\n\n\thideSplashScreen() {\n\t\treturn RequestHelper.sendRequest({ topic: \"hideSplashScreen\" });\n\t}\n\n\t/**\n\t * Gets the value of system environment variable(s)\n\t * @param {*} variableName either a string or an array of strings for the environment variable name(s) needed\n\t * @param {*} successCallback called when the function succeeds, regardless of whether the environment variable(s) exist.\n\t * If a string was passed, then the value of the variable name is passed to the function, or `null` if it does not exist.\n\t * If an array of strings was passed, then an object with the variable names as properties is returned. Non-existent variables\n\t * will be `null`.\n\t * @param {*} errorCallback called when the environment variable lookup failed.\n\t */\n\tgetEnvironmentVariable(\n\t\tvariableName: string | string[],\n\t\tsuccessCallback = Function.prototype,\n\t\terrorCallback = Function.prototype\n\t) {\n\t\treturn RequestHelper.sendRequest(\n\t\t\t{ topic: \"getEnvironmentVariable\", data: { variableName } },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\t// If an error was returned by the main process, invoke the error callback.\n\t\t\t\t// An error means that environment variables couldn't even be accessed\n\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\tlogger.error(`getEnvironmentVariable Error: ${data.message}`);\n\t\t\t\t\terrorCallback(data);\n\t\t\t\t} else {\n\t\t\t\t\tlogger.debug(\"getEnvironmentVariable response received.\");\n\t\t\t\t\tsuccessCallback(data.value); // this could be null if the env variable didn't exist -- that's allowed\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tdeleteAssets(alias?: string | null): StandardPromise<void> {\n\t\treturn new Promise((resolve) => {\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{ topic: \"deleteAssets\", data: alias },\n\t\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\t\tresolve({ err: data.err ?? data.error });\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t}\n\n\tgetSDServerInfo(cb: Function) {\n\t\treturn RequestHelper.sendRequest({ topic: \"getSDServerInfo\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetHostSpecs(cb: Function) {\n\t\treturn RequestHelper.sendRequest({ topic: \"getHostSpecs\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetMonitorInfo(cb: Function) {\n\t\treturn RequestHelper.sendRequest({ topic: \"getMonitorInfo\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tconst error = checkAndLogAccessDenied(data);\n\t\t\tif (error) {\n\t\t\t\tcb(data);\n\t\t\t} else {\n\t\t\t\tcb(data.monitorInfo);\n\t\t\t\tlogger.verbose(\"getMonitorInfo request sent.\");\n\t\t\t}\n\t\t});\n\t}\n\n\tgetMousePosition(cb: Function) {\n\t\treturn RequestHelper.sendRequest({ topic: \"getMousePosition\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetProcessList(cb: Function) {\n\t\treturn new Promise((resolve) => {\n\t\t\tRequestHelper.sendRequest(\n\t\t\t\t{ topic: \"getProcessList\", data: {} },\n\t\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\t\tcb(data);\n\t\t\t\t\tresolve(data);\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\t}\n\n\tgetVersion(cb: Function) {\n\t\tconsole.log(\"fin.desktop.System.getVersion() is deprecated. Please use getFEAInfo().\");\n\t\treturn RequestHelper.sendRequest({ topic: \"getVersion\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\t/**\n\t * Gets a value indicating whether there is an update available to be downloaded.\n\t */\n\tgetUpdateAvailable(cb: Function) {\n\t\treturn RequestHelper.sendRequest({ topic: \"getUpdateAvailable\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\tgetFEAInfo(cb: Function) {\n\t\treturn RequestHelper.sendRequest({ topic: \"getFEAInfo\" }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t\tcb(data);\n\t\t});\n\t}\n\n\t/**\n\t * Should be called once from startup application specified in manifest.startup_app.url to confirm it has started\n\t */\n\tstartupApplicationHandshake() {\n\t\treturn RequestHelper.sendRequest(\n\t\t\t{ topic: \"startupApplicationHandshake\" },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * @param {@object} params object\n\t * @param {string} params.arguments additional arguments to be passed to the asset.\n\t * @param {string} params.alias \"Alias\" of the asset. Refers to an alias inside of the \"appAssets\" part of the application's manifest\n\t * @param {*} cb1 Callback to be invoked upon method success\n\t * @param {*} cb2 Callback to be invoked upon method failure\n\t */\n\tlaunchExternalProcess(params: any, cb1: Function, cb2: Function) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{\n\t\t\t\ttopic: \"launchExternalProcess\",\n\t\t\t\tdata: params,\n\t\t\t},\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\t// If an error was returned by the main process, invoke the error callback.\n\t\t\t\tif (data.status === \"error\") {\n\t\t\t\t\tlogger.error(`launchExternalProcess: ${data.message}`);\n\t\t\t\t\tcb2?.({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\tmessage: data.error,\n\t\t\t\t\t\tcode: \"launch_fail\",\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tlogger.debug(\"launchExternalProcess request sent.\");\n\t\t\t\t\tcb1(data);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\topenUrlWithBrowser(url: string, cb?: (...args: any[]) => void) {\n\t\treturn RequestHelper.sendRequest(\n\t\t\t{ topic: \"openUrlWithBrowser\", data: url },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb?.(data);\n\t\t\t}\n\t\t);\n\t}\n\n\tremoveListener(eventName: string, listener: (...args: any[]) => void) {\n\t\tRequestHelper.removeListener(`systemEvent.${eventName}`, listener);\n\t\treturn this;\n\t}\n\n\t/**\n\t * @param {boolean|number|null} viewId - If null, then display tools for the window. If a number, then display tools for the specific browser view. If true, then display tools automatically based on the current location.\n\t */\n\tshowDeveloperTools(name: string, viewId = true, cb = Function.prototype) {\n\t\tlogger.log(\"System.showDeveloperTools()\", name, viewId);\n\n\t\treturn RequestHelper.sendRequest(\n\t\t\t{ topic: `${name}-showDeveloperTools`, data: { name, viewId, autoPick: viewId === true } },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb();\n\t\t\t}\n\t\t);\n\t}\n\n\trestart() {\n\t\tRequestHelper.sendRequest(\n\t\t\t{ topic: \"restartApplication\", data: {} },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t}\n\t\t);\n\t}\n\n\tterminate() {\n\t\tlogger.log(`Render: terminate called for application`);\n\t\tRequestHelper.sendRequest({ topic: \"-terminate\", data: null }, (eventObject: RendererBusResponse, data: any) => {\n\t\t\tcheckAndLogAccessDenied(data);\n\t\t});\n\t}\n\n\t/**\n\t * getProtocolString\n\t *\n\t * @param {Function} [cb=Function.prototype]\n\t * @returns {Promise<string>}\n\t * @memberof System\n\t */\n\tgetProtocolString(cb?: (data: string) => void): Promise<string> {\n\t\treturn new Promise((resolve) => {\n\t\t\tRequestHelper.sendRequest({ topic: \"getProtocolString\" }, (eventObj: RendererBusResponse, data: any) => {\n\t\t\t\tresolve(data);\n\t\t\t\tif (cb) {\n\t\t\t\t\tcb(data);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Gets Command Line Arguments\n\t */\n\tgetCommandLineArguments(cb = Function.prototype) {\n\t\treturn RequestHelper.sendRequest(\n\t\t\t{ topic: `getCommandLineArguments` },\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb(data);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Gets Sources and Thumbnails for all screen share sources\n\t * @param {*} options\n\t */\n\tasync getScreenShareSources(options = {}) {\n\t\tconst sourcesOptions: SourcesOptions = Object.assign({ types: [\"window\", \"screen\"] }, options);\n\n\t\tconst response = await RequestHelper.promisifiedSendRequest<{\n\t\t\tstatus: string;\n\t\t\tmessage: string;\n\t\t\tvalue: ScreenCaptureSource[];\n\t\t}>({ topic: \"getScreenShareSources\", data: sourcesOptions });\n\n\t\tcheckAndLogAccessDenied(response);\n\n\t\tif (response.status === \"error\") {\n\t\t\tlogger.error(`Error getting ScreenShare sources - ${response.message}`);\n\t\t\tthrow `Error getting ScreenShare sources - ${response.message}`;\n\t\t}\n\n\t\treturn response.value as Electron.DesktopCapturerSource[];\n\t}\n\n\t/**\n\t * Gets Sources and Thumbnails for all screen share sources\n\t * @param {string} sourceId\n\t */\n\tasync getScreenShot(sourceId: string | null = null) {\n\t\tif (!sourceId) {\n\t\t\ttry {\n\t\t\t\tconst sources = await this.getScreenShareSources();\n\t\t\t\t// not sure if this will work on MacOS\n\n\t\t\t\tsourceId = sources.filter((source) => source.name === \"Entire Screen\" || source.name === \"Screen 1\")[0].id;\n\t\t\t\tif (!sourceId) throw \"Not found\";\n\t\t\t} catch {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Error capturing screenshot: Unable to Find a screen. Please specify a valid sourceId from the sources returned by getScreenShareSources\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tconst handleStream = (stream: MediaStream) =>\n\t\t\tnew Promise<string>((resolve) => {\n\t\t\t\t// get height and width of stream\n\t\t\t\tconst track = stream.getVideoTracks()[0];\n\t\t\t\tconst settings = track.getSettings();\n\n\t\t\t\t// Create hidden video tag\n\t\t\t\tconst video = document.createElement(\"video\");\n\t\t\t\tvideo.style.cssText = \"position:absolute;top:-10000px;left:-10000px;\";\n\n\t\t\t\t// Event connected to stream\n\t\t\t\tvideo.onloadedmetadata = function () {\n\t\t\t\t\tvideo.style.height = `${settings.height}px`; // videoHeight\n\t\t\t\t\tvideo.style.width = `${settings.width}px`; // videoWidth\n\n\t\t\t\t\tvideo.play();\n\n\t\t\t\t\t// Create canvas\n\t\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\t\tcanvas.height = settings.height || 0;\n\t\t\t\t\tcanvas.width = settings.width || 0;\n\t\t\t\t\tconst ctx = canvas.getContext(\"2d\");\n\n\t\t\t\t\t// Draw video on canvas\n\t\t\t\t\tctx?.drawImage(video, 0, 0, canvas.width, canvas.height);\n\n\t\t\t\t\tresolve(canvas.toDataURL(\"image/png\"));\n\n\t\t\t\t\t// Remove hidden video tag\n\t\t\t\t\tvideo.remove();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Destroy connect to stream\n\t\t\t\t\t\tstream.getTracks()[0].stop();\n\t\t\t\t\t} catch (e) {}\n\t\t\t\t};\n\n\t\t\t\tvideo.srcObject = stream;\n\t\t\t\tdocument.body.appendChild(video);\n\t\t\t});\n\n\t\ttry {\n\t\t\tconst stream = await navigator.mediaDevices.getUserMedia({\n\t\t\t\taudio: false,\n\t\t\t\tvideo: {\n\t\t\t\t\t// @ts-ignore mandatory is chromium specific\n\t\t\t\t\tmandatory: {\n\t\t\t\t\t\tchromeMediaSource: \"desktop\",\n\t\t\t\t\t\tchromeMediaSourceId: sourceId,\n\t\t\t\t\t\tminWidth: 1280,\n\t\t\t\t\t\tmaxWidth: 4000,\n\t\t\t\t\t\tminHeight: 720,\n\t\t\t\t\t\tmaxHeight: 4000,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn await handleStream(stream);\n\t\t} catch (err) {\n\t\t\tthrow new Error(`Error capturing screenshot: ${err}`);\n\t\t}\n\t}\n\n\tsetTrayIcon(url: string, cb = Function.prototype) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{\n\t\t\t\ttopic: \"setTrayIcon\",\n\t\t\t\tdata: { url },\n\t\t\t},\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t\tcb();\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Sends a log message to the FEA log. This is only allowed if the app is running\n\t * under a security profile that has logToDisk set to true (such as the \"trusted\" profile.)\n\t *\n\t * @param level The log level to use\n\t * @param ...messages Messages to log\n\t */\n\tlogToDisk(level: FEALogLevel, ...messages: any[]) {\n\t\tRequestHelper.sendRequest(\n\t\t\t{\n\t\t\t\ttopic: \"logToDisk\",\n\t\t\t\tdata: { level, messages },\n\t\t\t},\n\t\t\t(eventObject: RendererBusResponse, data: any) => {\n\t\t\t\tcheckAndLogAccessDenied(data);\n\t\t\t}\n\t\t);\n\t}\n}\n","import RequestHelper from \"./RequestHelper\";\nimport { checkAndLogAccessDenied } from \"./renderHelpers\";\n\nexport const Notification = {\n\tsend: (params: any) => {\n\t\tRequestHelper.sendRequest({ topic: \"notification\", data: params }, (event: any, response: any) => {\n\t\t\tcheckAndLogAccessDenied(response);\n\t\t});\n\t},\n};\n","import { ipcRenderer, IpcRendererEvent } from \"electron\";\nimport { EventEmitter } from \"events\";\nimport uuidv4 from \"uuid-random\";\nimport { checkAndLogAccessDenied } from \"./renderHelpers\";\nimport { getOrCreateRendererLogger } from \"../logger/renderer\";\nimport { IABSubscribeResponse, IABPublish, IABSubscribe, IABUnsubscribe } from \"../types/types\";\nconst logger = getOrCreateRendererLogger();\n\n/**\n * The IAB object is exposed to Finsemble as the intercommunications interface. It utilizes Electron's IPC to\n * interact with the MainBus running in the main process.\n * \n * The \"e2o.iab\" namespace is used on the IPC bus so that this traffic doesn't interfere with other possible IPC traffic.\n * i.e. e2o.iab.subscribe, e2o.iab.unsubscribe, e2o.iab.publish\n *\n * These requests are handled in the main process by MainBus.\n *\n * Context: The InterApplicationBus is exposed to the higher-level users of FEA, such as Finsemble. In the Finsemble case the InterApplicationBus\n * is used to implement a Finsemble Router Transport for cross domain communication. When a cross-domain router message is sent from within Finsemble\n * the communiction path looks something like the below (represented in PlantUML).\n *\n\t@startuml\n\n\ttitle **Finsemble Router/FEA IAB Communication**\n\n\tparticipant \"Finsemble Component\"\n\tparticipant \"RouterClient\"\n\tparticipant \"Common/RouterTransport.IAB\"\n\tparticipant \"FEA.render.InterApplicationBus\"\n\tbox \"Main Electron Process\"\n\tparticipant \"FEA.main.MainBusClass.onIPCPublish\"\n\tend box\n\n\t\"Finsemble Component\" -> \"RouterClient\": transmit request (Window 1)\n\t\"RouterClient\" -> \"Common/RouterTransport.IAB\" : send request (Window 1)\n\t\"Common/RouterTransport.IAB\" -> \"FEA.render.InterApplicationBus\": publish request (Window 1)\n\t\"FEA.render.InterApplicationBus\" -> \"FEA.main.MainBusClass.onIPCPublish\": publish request (Window 1)\n\t\"FEA.main.MainBusClass.onIPCPublish\"-> \"FEA.render.InterApplicationBus\": webContents.send request (Window 2)\n\t\"FEA.render.InterApplicationBus\" -> \"Common/RouterTransport.IAB\": listener callback (Window 2)\n\t\"Common/RouterTransport.IAB\" -> \"RouterClient\": listener callback (Window 2)\n\t\"RouterClient\" -> \"Finsemble Component\": listener callback (Window 2)\n\n\t@enduml\n */\n\nexport class InterApplicationBus extends EventEmitter {\n\tsubscribers: {\n\t\t[listenerID: string]: (data: any) => void;\n\t} = {};\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.bindAllFunctions();\n\t\tthis.setUpListeners();\n\t}\n\n\tbindAllFunctions() {\n\t\tconst self: any = this;\n\t\tfor (const name of Object.getOwnPropertyNames(Object.getPrototypeOf(self))) {\n\t\t\tconst method = self[name];\n\t\t\t// skip constructor\n\t\t\tif (!(method instanceof Function) || method === InterApplicationBus) continue;\n\t\t\tself[name] = self[name].bind(self);\n\t\t}\n\t}\n\n\tsetUpListeners() {\n\t\tipcRenderer.on(\"subscribeResponse\", this.onSubscribeResponse.bind(this));\n\t\tipcRenderer.on(\"subscribeResponseError\", (event, response) => {\n\t\t\tcheckAndLogAccessDenied(response);\n\t\t});\n\t\tipcRenderer.on(\"unSubscribeResponseError\", (event, response) => {\n\t\t\tcheckAndLogAccessDenied(response);\n\t\t});\n\t\tipcRenderer.on(\"publishResponseError\", (event, response) => {\n\t\t\tcheckAndLogAccessDenied(response);\n\t\t});\n\t}\n\n\t/**\n\t * @param {any} event Ignored property\n\t * @param {object} response Response from the main process. Someone has published information to us.\n\t * @param {any} response.data information sent back to us\n\t * @param {string} response.listenerID Lets us find the listener\n\t */\n\tonSubscribeResponse(event: IpcRendererEvent, response: IABSubscribeResponse) {\n\t\tconst listener = this.subscribers[response.listenerID];\n\t\tlistener?.(response.data);\n\t}\n\n\t/**\n\t * @param {string} destination The destinationto send the message (either a windowName or RouterService)\n\t * @param {any} message Data to send to other subscribers\n\t * @param {Function} callback Function to be invoked when the publish has completed\n\t * @param {Function} errorCallback Function to be invoked if the publish fails.\n\t */\n\tpublish(destination: string, message: any, callback?: Function, errorCallback?: Function) {\n\t\ttry {\n\t\t\tipcRenderer.send(\"e2o.iab.publish\", { destination, data: message } as IABPublish);\n\t\t\tcallback?.();\n\t\t} catch (err: any) {\n\t\t\tlogger.warn(`Publish to ${destination} failed. ${err.message}`);\n\t\t\terrorCallback?.(err);\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param {string} ignored Deprecated `topic` is always \"*\" in Finsemble.\n\t * @param {string} source The source of the subscription. Only messages destined for this source will be received.\n\t * @param {Function} listener Method to be invoked when the specified sender publishes a message on the specified\n\t * windowName.\n\t * @param {Function} [callback] Callback to be invoked upon successful subscribe\n\t * @param {Function} [errorCallback] Callback to be invoked upon unsuccessful subscribe.\n\t */\n\tsubscribe(\n\t\tignored: string,\n\t\tsource: string,\n\t\tlistener: (data: any) => void,\n\t\tcallback = Function.prototype,\n\t\terrorCallbackArg = Function.prototype\n\t) {\n\t\ttry {\n\t\t\tconst listenerID = uuidv4();\n\n\t\t\tipcRenderer.send(\"e2o.iab.subscribe\", {\n\t\t\t\tlistenerID,\n\t\t\t\tsource,\n\t\t\t} as IABSubscribe);\n\n\t\t\t// Inbound messages from the main process will be looked up here by listener ID.\n\t\t\tthis.subscribers[listenerID] = listener;\n\n\t\t\tcallback?.();\n\t\t\treturn listenerID;\n\t\t} catch (err: any) {\n\t\t\tlogger.warn(`Subscribing for ${source} failed. ${err.message}`);\n\t\t\terrorCallbackArg(err);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tunsubscribe(listenerID: string) {\n\t\tipcRenderer.send(\"e2o.iab.unsubscribe\", {\n\t\t\tlistenerID,\n\t\t} as IABUnsubscribe);\n\t\tif (listenerID) delete this.subscribers[listenerID];\n\t}\n}\n","import { getOrCreateRendererLogger } from \"./logger/renderer\";\nimport { Window } from \"./render/Window\";\nimport { System } from \"./render/System\";\nimport { Notification } from \"./render/Notification\";\nimport { InterApplicationBus } from \"./render/InterApplicationBus\";\nimport { StandardResponse, Preload, WebContentsRecord } from \"./types/types\";\nimport { ipcRenderer, contextBridge, webFrame } from \"electron\";\nconsole.log(\"Running e2o.js preload\");\n\nconst logger = getOrCreateRendererLogger();\n\n/**\n * Uses executeJavaScript to run an individual preload on this webFrame (the window/view's browser content)\n */\nconst runPreload = (windowName: string, preload: Preload) => {\n\tlet { error } = preload;\n\tif (preload.src) {\n\t\twebFrame.executeJavaScript(preload.src).catch((jsExecutionError) => {\n\t\t\tconst executionError = `Error running preload ${preload.url} in ${windowName}: ${jsExecutionError}`;\n\t\t\tconsole.error(executionError);\n\t\t\tlogger.error(executionError);\n\t\t});\n\t}\n\tif (error) {\n\t\tconsole.error(error);\n\t\tlogger.error(error);\n\t}\n};\n\n/**\n * Get and then run the Finsemble preloads for this window. A synchronous fetch\n * of the preloads from the main process returns the actual runnable JavaScript src (not\n * just links to files).\n */\nconst runPreloads = (windowName: string, preloads: Preload[]) => {\n\tif (Array.isArray(preloads) && preloads.length) {\n\t\tpreloads.forEach((preload) => {\n\t\t\trunPreload(windowName, preload);\n\t\t});\n\t}\n};\n\n/**\n * This, main body of e2o, initializes a `Window` object and attaches it to the corresponding MainWindow\n * in the main process (in order to send requests and receive events). It then exposes the `fin` API\n * either as a global variable or via a contextBridge depending on whether contextIsolation is enabled\n * for this window. Finally, it fetches and runs the Finsemble preloads (e.g. FSBL.js, WindowTitleBar.js, config preloads, etc).\n */\nexport const start = (windowIdentity: WebContentsRecord) => {\n\tconst {\n\t\tid: webContentsId,\n\t\twindowName,\n\t\twebContentsName,\n\t\tisView,\n\t\tisTitlebarWindow,\n\t\tmanifest,\n\t\tcontextIsolation,\n\t\tpreloads,\n\t} = windowIdentity;\n\tif (!isView) {\n\t\tconsole.log(\n\t\t\t`This is the devtools for the BrowserWindow object (titlebar shell). Use the central logger to access the devtools for the BrowserView (app content).`\n\t\t);\n\t}\n\n\t// Set customer-facing flag to detect when running within FEA\n\tif (contextIsolation) {\n\t\tcontextBridge.exposeInMainWorld(\"finsemble\", true);\n\t} else {\n\t\t(window as any).finsemble = true;\n\t}\n\n\t// This annotation on the global window object is deprecated. Use `e2o.Window.name` or, idealy, Startup instead.\n\twebFrame.executeJavaScript(`window.name = '${windowName}'`);\n\n\tconst thisWindow = new Window({\n\t\twindowName,\n\t\twebContentsName,\n\t\twebContentsId,\n\t\tmanifest: manifest,\n\t});\n\n\tthisWindow.attachToMainWindow();\n\n\tconst e2o = {\n\t\thasBrowserView: () => {\n\t\t\tconsole.log(\"hasBrowserView() is deprecated. Use isTitlebarWindow()\");\n\t\t\treturn isTitlebarWindow;\n\t\t},\n\t\tgetViewId: () => {\n\t\t\tconsole.log(\"getViewId() is deprecated. Use getWebContentsId()\");\n\t\t\treturn webContentsId ?? null;\n\t\t},\n\t\tisBrowserView: () => isView,\n\t\tisTitlebarWindow: () => isTitlebarWindow,\n\t\tgetWebContentsId: () => webContentsId ?? null,\n\t\tdesktop: {\n\t\t\tmain: (cb: Function) => {\n\t\t\t\tconsole.log(\"fin.desktop.main has been deprecated. It is no longer necessary to wait before using fin.\");\n\t\t\t\tcb();\n\t\t\t},\n\t\t\tInterApplicationBus: new InterApplicationBus(),\n\t\t\tNotification,\n\t\t\tSystem: new System(),\n\t\t\tWindow: thisWindow,\n\t\t},\n\t};\n\n\tif (contextIsolation) {\n\t\tcontextBridge.exposeInMainWorld(\"fin\", e2o);\n\t\tcontextBridge.exposeInMainWorld(\"e2o\", e2o);\n\t} else {\n\t\t(window as any).fin = (window as any).e2o = e2o;\n\t}\n\n\trunPreloads(windowName, preloads);\n};\n\n/**\n * Step 1: Get our identity using a sync call to the main process. The identity must contain\n * all of the information necessary to run this preload synchronously. The main process will\n * know who we are by nature of the WebContents id that comes with the sync call.\n */\nconst { err, data: windowIdentity }: StandardResponse<WebContentsRecord> =\n\tipcRenderer.sendSync(\"fea.getWindowIdentity\");\n\nif (err || !windowIdentity) {\n\tconst error = `Error loading e2o.js preload: ${err}`;\n\tconsole.error(error);\n\tlogger.error(error);\n} else {\n\t// Step 2: Run this preload with the retrieved identity\n\tstart(windowIdentity);\n\tconsole.log(`Completed e2o.js preload for window ${windowIdentity.windowName}`);\n}\n"],"names":["buf","i","crypt0","bufIdx","hexBytes","toString","substr","uuidBin","b","uuid","BUFFER_SIZE","randomBytes","slice","bin","clearBuffer","test","crypto","window","msCrypto","module","exports","getRandomValues","Uint8Array","prototype","n","bytes","Array","from","r","push","Math","floor","random","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","hasOwnProperty","call","LoggerRenderer","ipcRenderer","send","this","ipc","console","log","level","args","warn","messages","logger","getOrCreateRendererLogger","error","verbose","debug","message","handshakeIntervalTimeout","handShaked","RequestHelper","EventEmitter","super","request","systemResponse","bind","handleResponse","clearTimeout","setInterval","event","data","responseUUID","JSON","stringify","response","err","eventObject","reUUID","persistChannel","functionCB","e2oRequest","Promise","resolve","sendRequest","params","Function","topic","sendRequestOut","eObject","SendObject","parse","intervalTimer","clearInterval","dataToEmit","emit","eventName","listener","count","listenerCount","addListener","removeListener","checkAndLogAccessDenied","includes","Window","closeRequestedListeners","isMoving","animationId","bindAllFunctions","manifest","name","windowName","webContentsName","webContentsId","Error","useDOMBasedMovementConfigValue","useDOMBasedMovement","useDOMMovement","process","platform","remoteFSBLEvents","deprecated","windowIdentity","win","id","attachToMainWindow","timedOut","spawnTimeout","setTimeout","eventObj","fsa","type","payload","cb","spawnPhysicalWindow","self","getOwnPropertyNames","getPrototypeOf","method","_data","viewId","bounds","sendObject","x","left","y","top","width","height","permission","isAllowed","closeRequestedAdd","force","length","indexOf","splice","area","closeRequestedRemove","iconpath","listeners","keys","clickListener","size","options","bringToFront","focus","e","mouseX","clientX","mouseY","clientY","document","addEventListener","stopMovingWindow","moveWindow","hasFocus","requestAnimationFrame","removeEventListener","cancelAnimationFrame","Clipboard","availableFormats","writeText","writeHTML","writeRTF","readText","readHTML","readRTF","write","successCallback","errorCallback","status","value","text","res","GlobalShortcut","register","isRegistered","unregister","accelerator","callback","System","pickedCertificate","certificate","_eventObj","_eventObject","url","list","allowOrDisallowCertificate","allowOrDisallow","variableName","alias","monitorInfo","cb1","cb2","code","autoPick","sourcesOptions","assign","types","sourceId","getScreenShareSources","filter","source","stream","navigator","mediaDevices","getUserMedia","audio","video","mandatory","chromeMediaSource","chromeMediaSourceId","minWidth","maxWidth","minHeight","maxHeight","settings","getVideoTracks","getSettings","createElement","style","cssText","onloadedmetadata","play","canvas","ctx","getContext","drawImage","toDataURL","remove","getTracks","stop","srcObject","body","appendChild","handleStream","Notification","InterApplicationBus","subscribers","setUpListeners","onSubscribeResponse","listenerID","destination","ignored","errorCallbackArg","isView","isTitlebarWindow","contextIsolation","preloads","contextBridge","finsemble","webFrame","thisWindow","e2o","hasBrowserView","getViewId","isBrowserView","getWebContentsId","desktop","main","fin","isArray","forEach","preload","src","catch","jsExecutionError","executionError","runPreload","runPreloads","start"],"sourceRoot":""}
|