_.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s="./lib/browser/init.ts")}({"./lib/browser/api/app.ts": /*!********************************!*\ !*** ./lib/browser/api/app.ts ***! \********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! fs */"fs"),n=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),s=process._linkedBinding("electron_browser_app"),i=process._linkedBinding("electron_common_command_line"),{app:a}=s;t.default=a;let l=null;const c=a.isAccessibilitySupportEnabled,u=a.setAccessibilitySupportEnabled;Object.defineProperty(a,"accessibilitySupportEnabled",{get:()=>c.call(a),set:e=>u.call(a,e)});const d=a.getBadgeCount,p=a.setBadgeCount;Object.defineProperty(a,"badgeCount",{get:()=>d.call(a),set:e=>p.call(a,e)});const h=a.getName,f=a.setName;if(Object.defineProperty(a,"name",{get:()=>h.call(a),set:e=>f.call(a,e)}),Object.assign(a,{commandLine:{hasSwitch:e=>i.hasSwitch(String(e)),getSwitchValue:e=>i.getSwitchValue(String(e)),appendSwitch:(e,t)=>i.appendSwitch(String(e),void 0===t?t:String(t)),appendArgument:e=>i.appendArgument(String(e)),removeSwitch:e=>i.removeSwitch(String(e))}}),Object.defineProperty(a,"applicationMenu",{get:()=>n.Menu.getApplicationMenu(),set:e=>n.Menu.setApplicationMenu(e)}),a.setAppUserModelId=a.setAppUserModelId||(()=>{}),"darwin"===process.platform){const e=a.dock.setMenu;a.dock.setMenu=t=>{l=t,e(t)},a.dock.getMenu=()=>l}if("linux"===process.platform){const e=/^VmRSS:\s*(\d+) kB$/m,t=/^VmHWM:\s*(\d+) kB$/m,getStatus=e=>{try{return o.readFileSync(`/proc/${e}/status`,"utf8")}catch{return""}},getEntry=(e,t)=>{const r=e.match(t);return r?parseInt(r[1],10):0},getProcessMemoryInfo=r=>{const o=getStatus(r);return{workingSetSize:getEntry(o,e),peakWorkingSetSize:getEntry(o,t)}},r=a.getAppMetrics;a.getAppMetrics=()=>{const e=r.call(a);for(const t of e)t.memory=getProcessMemoryInfo(t.pid);return e}}const m=["certificate-error","select-client-certificate"];for(const e of m)a.on(e,(t,r,...o)=>{r.emit(e,t,...o)});n.deprecate.event(a,"gpu-process-crashed","child-process-gone"),n.deprecate.event(a,"renderer-process-crashed","render-process-gone")},"./lib/browser/api/auto-updater.ts": /*!*****************************************!*\ !*** ./lib/browser/api/auto-updater.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";"win32"===process.platform?e.exports=r(/*! ./auto-updater/auto-updater-win */"./lib/browser/api/auto-updater/auto-updater-win.ts"):e.exports=r(/*! ./auto-updater/auto-updater-native */"./lib/browser/api/auto-updater/auto-updater-native.ts")},"./lib/browser/api/auto-updater/auto-updater-native.ts": /*!*************************************************************!*\ !*** ./lib/browser/api/auto-updater/auto-updater-native.ts ***! \*************************************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{autoUpdater:o}=process._linkedBinding("electron_browser_auto_updater");t.default=o},"./lib/browser/api/auto-updater/auto-updater-win.ts": /*!**********************************************************!*\ !*** ./lib/browser/api/auto-updater/auto-updater-win.ts ***! \**********************************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! events */"events"),s=r(/*! @electron/internal/browser/api/auto-updater/squirrel-update-win */"./lib/browser/api/auto-updater/squirrel-update-win.ts");class AutoUpdater extends n.EventEmitter{constructor(){super(...arguments),this.updateAvailable=!1,this.updateURL=null}quitAndInstall(){if(!this.updateAvailable)return this.emitError(new Error("No update available, can't quit and install"));s.processStart(),o.app.quit()}getFeedURL(){return this.updateURL}setFeedURL(e){let t;if("object"==typeof e){if("string"!=typeof e.url)throw new Error("Expected options object to contain a 'url' string property in setFeedUrl call");t=e.url}else{if("string"!=typeof e)throw new Error("Expected an options object with a 'url' property to be provided");t=e}this.updateURL=t}checkForUpdates(){const e=this.updateURL;return e?s.supported()?(this.emit("checking-for-update"),void s.checkForUpdate(e,(t,r)=>null!=t?this.emitError(t):null==r?this.emit("update-not-available"):(this.updateAvailable=!0,this.emit("update-available"),void s.update(e,e=>{if(null!=e)return this.emitError(e);const{releaseNotes:t,version:o}=r,n=new Date;this.emit("update-downloaded",{},t,o,n,this.updateURL,()=>{this.quitAndInstall()})})))):this.emitError(new Error("Can not find Squirrel")):this.emitError(new Error("Update URL is not set"))}emitError(e){this.emit("error",e,e.message)}}t.default=new AutoUpdater},"./lib/browser/api/auto-updater/squirrel-update-win.ts": /*!*************************************************************!*\ !*** ./lib/browser/api/auto-updater/squirrel-update-win.ts ***! \*************************************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supported=t.update=t.checkForUpdate=t.processStart=void 0;const o=r(/*! fs */"fs"),n=r(/*! path */"path"),s=r(/*! child_process */"child_process"),i=n.dirname(process.execPath),a=n.resolve(i,"..","Update.exe"),l=n.basename(process.execPath);let c,u=[];const spawnUpdate=function(e,t,r){let o,n,i,l;try{if(c&&!(e=>e.length===u.length&&e.every((e,t)=>e===u[t]))(e))return r(`AutoUpdater process with arguments ${e} is already running`);c||(c=(0,s.spawn)(a,e,{detached:t,windowsHide:!0}),u=e||[])}catch(e){return o=e,void process.nextTick((function(){return r(o)}))}return l="",i="",c.stdout.on("data",e=>{l+=e}),c.stderr.on("data",e=>{i+=e}),n=!1,c.on("error",e=>{n=!0,r(e)}),c.on("exit",(function(e,t){if(c=void 0,u=[],!n)return 0!==e?r(`Command failed: ${null!=t?t:e}\n${i}`):void r(null,l)}))};t.processStart=function processStart(){return spawnUpdate(["--processStartAndWait",l],!0,(function(){}))},t.checkForUpdate=function checkForUpdate(e,t){return spawnUpdate(["--checkForUpdate",e],!1,(function(e,r){let o,n,s;if(null!=e)return t(e);try{const e=r.trim().split("\n").pop();s=null!=(o=JSON.parse(e))&&null!=(n=o.releasesToApply)&&"function"==typeof n.pop?n.pop():void 0}catch{return t(new Error("Invalid result:\n"+r))}return t(null,s)}))},t.update=function update(e,t){return spawnUpdate(["--update",e],!1,t)},t.supported=function supported(){try{return o.accessSync(a,o.constants.R_OK),!0}catch{return!1}}},"./lib/browser/api/base-window.ts": /*!****************************************!*\ !*** ./lib/browser/api/base-window.ts ***! \****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! events */"events"),{BaseWindow:n}=process._linkedBinding("electron_browser_base_window");Object.setPrototypeOf(n.prototype,o.EventEmitter.prototype),n.prototype._init=function(){const{app:e}=r(/*! electron */"./lib/browser/api/exports/electron.ts");if("darwin"!==process.platform){const t=e.applicationMenu;t&&this.setMenu(t)}},Object.defineProperty(n.prototype,"autoHideMenuBar",{get:function(){return this.isMenuBarAutoHide()},set:function(e){this.setAutoHideMenuBar(e)}}),Object.defineProperty(n.prototype,"visibleOnAllWorkspaces",{get:function(){return this.isVisibleOnAllWorkspaces()},set:function(e){this.setVisibleOnAllWorkspaces(e)}}),Object.defineProperty(n.prototype,"fullScreen",{get:function(){return this.isFullScreen()},set:function(e){this.setFullScreen(e)}}),Object.defineProperty(n.prototype,"simpleFullScreen",{get:function(){return this.isSimpleFullScreen()},set:function(e){this.setSimpleFullScreen(e)}}),Object.defineProperty(n.prototype,"focusable",{get:function(){return this.isFocusable()},set:function(e){this.setFocusable(e)}}),Object.defineProperty(n.prototype,"kiosk",{get:function(){return this.isKiosk()},set:function(e){this.setKiosk(e)}}),Object.defineProperty(n.prototype,"documentEdited",{get:function(){return this.isDocumentEdited()},set:function(e){this.setDocumentEdited(e)}}),Object.defineProperty(n.prototype,"shadow",{get:function(){return this.hasShadow()},set:function(e){this.setHasShadow(e)}}),Object.defineProperty(n.prototype,"representedFilename",{get:function(){return this.getRepresentedFilename()},set:function(e){this.setRepresentedFilename(e)}}),Object.defineProperty(n.prototype,"minimizable",{get:function(){return this.isMinimizable()},set:function(e){this.setMinimizable(e)}}),Object.defineProperty(n.prototype,"title",{get:function(){return this.getTitle()},set:function(e){this.setTitle(e)}}),Object.defineProperty(n.prototype,"maximizable",{get:function(){return this.isMaximizable()},set:function(e){this.setMaximizable(e)}}),Object.defineProperty(n.prototype,"resizable",{get:function(){return this.isResizable()},set:function(e){this.setResizable(e)}}),Object.defineProperty(n.prototype,"menuBarVisible",{get:function(){return this.isMenuBarVisible()},set:function(e){this.setMenuBarVisibility(e)}}),Object.defineProperty(n.prototype,"fullScreenable",{get:function(){return this.isFullScreenable()},set:function(e){this.setFullScreenable(e)}}),Object.defineProperty(n.prototype,"closable",{get:function(){return this.isClosable()},set:function(e){this.setClosable(e)}}),Object.defineProperty(n.prototype,"movable",{get:function(){return this.isMovable()},set:function(e){this.setMovable(e)}}),n.getFocusedWindow=()=>n.getAllWindows().find(e=>e.isFocused()),e.exports=n},"./lib/browser/api/browser-view.ts": /*!*****************************************!*\ !*** ./lib/browser/api/browser-view.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{BrowserView:o}=process._linkedBinding("electron_browser_browser_view");t.default=o},"./lib/browser/api/browser-window.ts": /*!*******************************************!*\ !*** ./lib/browser/api/browser-window.ts ***! \*******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),{BrowserWindow:n}=process._linkedBinding("electron_browser_window");Object.setPrototypeOf(n.prototype,o.BaseWindow.prototype),n.prototype._init=function(){o.BaseWindow.prototype._init.call(this);const{app:e}=r(/*! electron */"./lib/browser/api/exports/electron.ts"),t=this.setBounds;this.setBounds=(e,...r)=>{e={...this.getBounds(),...e},t.call(this,e,...r)},this.on("blur",t=>{e.emit("browser-window-blur",t,this)}),this.on("focus",t=>{e.emit("browser-window-focus",t,this)});let n=this.isVisible()&&!this.isMinimized();const visibilityChanged=()=>{const e=this.isVisible()&&!this.isMinimized();if(n!==e){n=e;const t=n?"visible":"hidden";this.webContents.emit("-window-visibility-change",t)}},s=["show","hide","minimize","maximize","restore"];for(const e of s)this.on(e,visibilityChanged);const i=process._linkedBinding("electron_browser_event").createEmpty();e.emit("browser-window-created",i,this),Object.defineProperty(this,"devToolsWebContents",{enumerable:!0,configurable:!1,get(){return this.webContents.devToolsWebContents}})};const isBrowserWindow=e=>e&&"BrowserWindow"===e.constructor.name;n.fromId=e=>{const t=o.BaseWindow.fromId(e);return isBrowserWindow(t)?t:null},n.getAllWindows=()=>o.BaseWindow.getAllWindows().filter(isBrowserWindow),n.getFocusedWindow=()=>{for(const e of n.getAllWindows())if(!e.isDestroyed()&&e.webContents&&!e.webContents.isDestroyed()&&(e.isFocused()||e.webContents.isDevToolsFocused()))return e;return null},n.fromWebContents=e=>e.getOwnerBrowserWindow(),n.fromBrowserView=e=>n.fromWebContents(e.webContents),n.prototype.setTouchBar=function(e){o.TouchBar._setOnWindow(e,this)},n.prototype.loadURL=function(...e){return this.webContents.loadURL(...e)},n.prototype.getURL=function(){return this.webContents.getURL()},n.prototype.loadFile=function(...e){return this.webContents.loadFile(...e)},n.prototype.reload=function(...e){return this.webContents.reload(...e)},n.prototype.send=function(...e){return this.webContents.send(...e)},n.prototype.openDevTools=function(...e){return this.webContents.openDevTools(...e)},n.prototype.closeDevTools=function(){return this.webContents.closeDevTools()},n.prototype.isDevToolsOpened=function(){return this.webContents.isDevToolsOpened()},n.prototype.isDevToolsFocused=function(){return this.webContents.isDevToolsFocused()},n.prototype.toggleDevTools=function(){return this.webContents.toggleDevTools()},n.prototype.inspectElement=function(...e){return this.webContents.inspectElement(...e)},n.prototype.inspectSharedWorker=function(){return this.webContents.inspectSharedWorker()},n.prototype.inspectServiceWorker=function(){return this.webContents.inspectServiceWorker()},n.prototype.showDefinitionForSelection=function(){return this.webContents.showDefinitionForSelection()},n.prototype.capturePage=function(...e){return this.webContents.capturePage(...e)},n.prototype.getBackgroundThrottling=function(){return this.webContents.getBackgroundThrottling()},n.prototype.setBackgroundThrottling=function(e){return this.webContents.setBackgroundThrottling(e)},e.exports=n},"./lib/browser/api/content-tracing.ts": /*!********************************************!*\ !*** ./lib/browser/api/content-tracing.ts ***! \********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=process._linkedBinding("electron_browser_content_tracing")},"./lib/browser/api/crash-reporter.ts": /*!*******************************************!*\ !*** ./lib/browser/api/crash-reporter.ts ***! \*******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=process._linkedBinding("electron_browser_crash_reporter");t.default=new class CrashReporter{start(e){const{productName:t=o.app.name,companyName:r,extra:s={},globalExtra:i={},ignoreSystemCrashHandler:a=!1,submitURL:l="",uploadToServer:c=!0,rateLimit:u=!1,compress:d=!0}=e||{};if(c&&!l)throw new Error("submitURL must be specified when uploadToServer is true");!d&&c&&o.deprecate.log("Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.");const p=o.app.getVersion();r&&null==i._companyName&&(i._companyName=r);const h={_productName:t,_version:p,...i};n.start(l,c,a,u,d,h,s,!1)}getLastCrashReport(){const e=this.getUploadedReports().sort((e,t)=>{const r=e&&e.date?new Date(e.date).getTime():0;return(t&&t.date?new Date(t.date).getTime():0)-r});return e.length>0?e[0]:null}getUploadedReports(){return n.getUploadedReports()}getUploadToServer(){if("browser"===process.type)return n.getUploadToServer();throw new Error("getUploadToServer can only be called from the main process")}setUploadToServer(e){if("browser"===process.type)return n.setUploadToServer(e);throw new Error("setUploadToServer can only be called from the main process")}addExtraParameter(e,t){n.addExtraParameter(e,t)}removeExtraParameter(e){n.removeExtraParameter(e)}getParameters(){return n.getParameters()}}},"./lib/browser/api/desktop-capturer.ts": /*!*********************************************!*\ !*** ./lib/browser/api/desktop-capturer.ts ***! \*********************************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getSources=void 0;const{createDesktopCapturer:r}=process._linkedBinding("electron_browser_desktop_capturer");let o=[];t.getSources=async function getSources(t){if(!function isValid(e){const t=e?e.types:void 0;return Array.isArray(t)}(t))throw new Error("Invalid options");const n=t.types.includes("window"),s=t.types.includes("screen"),{thumbnailSize:i={width:150,height:150}}=t,{fetchWindowIcons:a=!1}=t,l={captureWindow:n,captureScreen:s,thumbnailSize:i,fetchWindowIcons:a};for(const e of o)if(c=e.options,u=l,JSON.stringify(c)===JSON.stringify(u))return e.getSources;var c,u;const d=new e((e,t)=>{let c=r();const stopRunning=()=>{c&&(delete c._onerror,delete c._onfinished,c=null),o=o.filter(e=>e.options!==l)};c._onerror=e=>{stopRunning(),t(e)},c._onfinished=t=>{stopRunning(),e(t)},c.startHandling(n,s,i,a)});return o.push({options:l,getSources:d}),d}}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/api/dialog.ts": /*!***********************************!*\ !*** ./lib/browser/api/dialog.ts ***! \***********************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.showCertificateTrustDialog=t.showErrorBox=t.showMessageBoxSync=t.showMessageBox=t.showSaveDialogSync=t.showSaveDialog=t.showOpenDialogSync=t.showOpenDialog=void 0;const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=process._linkedBinding("electron_browser_dialog");var s,i;!function(e){e[e.createDirectory=1]="createDirectory",e[e.showHiddenFiles=2]="showHiddenFiles",e[e.treatPackageAsDirectory=4]="treatPackageAsDirectory",e[e.showOverwriteConfirmation=8]="showOverwriteConfirmation",e[e.dontAddToRecent=16]="dontAddToRecent"}(s||(s={})),function(e){e[e.openFile=1]="openFile",e[e.openDirectory=2]="openDirectory",e[e.multiSelections=4]="multiSelections",e[e.createDirectory=8]="createDirectory",e[e.showHiddenFiles=16]="showHiddenFiles",e[e.promptToCreate=32]="promptToCreate",e[e.noResolveAliases=64]="noResolveAliases",e[e.treatPackageAsDirectory=128]="treatPackageAsDirectory",e[e.dontAddToRecent=256]="dontAddToRecent"}(i||(i={}));let a=0;const normalizeAccessKey=e=>"string"!=typeof e?e:"darwin"===process.platform?e.replace(/&(&?)/g,"$1"):"linux"===process.platform?e.replace(/_/g,"__").replace(/&(.?)/g,(e,t)=>"&"===t?t:"_"+t):e,checkAppInitialized=function(){if(!o.app.isReady())throw new Error("dialog module can only be used after app is ready")},setupOpenDialogProperties=e=>{let t=0;for(const r of e)Object.prototype.hasOwnProperty.call(i,r)&&(t|=i[r]);return t},setupSaveDialogProperties=e=>{let t=0;for(const r of e)Object.prototype.hasOwnProperty.call(s,r)&&(t|=s[r]);return t},saveDialog=(e,t,r)=>{checkAppInitialized(),null==r&&(r={title:"Save"});const{buttonLabel:o="",defaultPath:s="",filters:i=[],properties:a=[],title:l="",message:c="",securityScopedBookmarks:u=!1,nameFieldLabel:d="",showsTagField:p=!0}=r;if("string"!=typeof l)throw new TypeError("Title must be a string");if("string"!=typeof o)throw new TypeError("Button label must be a string");if("string"!=typeof s)throw new TypeError("Default path must be a string");if("string"!=typeof c)throw new TypeError("Message must be a string");if("string"!=typeof d)throw new TypeError("Name field label must be a string");const h={buttonLabel:o,defaultPath:s,filters:i,title:l,message:c,securityScopedBookmarks:u,nameFieldLabel:d,showsTagField:p,window:t,properties:setupSaveDialogProperties(a)};return e?n.showSaveDialogSync(h):n.showSaveDialog(h)},openDialog=(e,t,r)=>{checkAppInitialized(),null==r&&(r={title:"Open",properties:["openFile"]});const{buttonLabel:o="",defaultPath:s="",filters:i=[],properties:a=["openFile"],title:l="",message:c="",securityScopedBookmarks:u=!1}=r;if(!Array.isArray(a))throw new TypeError("Properties must be an array");if("string"!=typeof l)throw new TypeError("Title must be a string");if("string"!=typeof o)throw new TypeError("Button label must be a string");if("string"!=typeof s)throw new TypeError("Default path must be a string");if("string"!=typeof c)throw new TypeError("Message must be a string");const d={title:l,buttonLabel:o,defaultPath:s,filters:i,message:c,securityScopedBookmarks:u,window:t,properties:setupOpenDialogProperties(a)};return e?n.showOpenDialogSync(d):n.showOpenDialog(d)},messageBox=(t,r,o)=>{checkAppInitialized(),null==o&&(o={type:"none",message:""});let{buttons:s=[],cancelId:i,signal:l,checkboxLabel:c="",checkboxChecked:u,defaultId:d=-1,detail:p="",icon:h=null,textWidth:f=0,noLink:m=!1,message:b="",title:w="",type:g="none"}=o;const y=["none","info","warning","error","question"].indexOf(g);if(-1===y)throw new TypeError("Invalid message box type");if(!Array.isArray(s))throw new TypeError("Buttons must be an array");if(o.normalizeAccessKeys&&(s=s.map(normalizeAccessKey)),"string"!=typeof w)throw new TypeError("Title must be a string");if("boolean"!=typeof m)throw new TypeError("noLink must be a boolean");if("string"!=typeof b)throw new TypeError("Message must be a string");if("string"!=typeof p)throw new TypeError("Detail must be a string");if("string"!=typeof c)throw new TypeError("checkboxLabel must be a string");if(u=!!u,u&&!c)throw new Error("checkboxChecked requires that checkboxLabel also be passed");if(null==i){i=0===d&&s.length>1?1:0;for(let e=0;en._closeMessageBox(_))}const v={window:r,messageBoxType:y,buttons:s,id:_,defaultId:d,cancelId:i,noLink:m,title:w,message:b,detail:p,checkboxLabel:c,checkboxChecked:u,icon:h,textWidth:f};return t?n.showMessageBoxSync(v):n.showMessageBox(v)};t.showOpenDialog=function showOpenDialog(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,n=!e||e instanceof o.BrowserWindow?t:e;return openDialog(!1,r,n)},t.showOpenDialogSync=function showOpenDialogSync(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,n=!e||e instanceof o.BrowserWindow?t:e;return openDialog(!0,r,n)},t.showSaveDialog=function showSaveDialog(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,n=!e||e instanceof o.BrowserWindow?t:e;return saveDialog(!1,r,n)},t.showSaveDialogSync=function showSaveDialogSync(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,n=!e||e instanceof o.BrowserWindow?t:e;return saveDialog(!0,r,n)},t.showMessageBox=function showMessageBox(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,n=!e||e instanceof o.BrowserWindow?t:e;return messageBox(!1,r,n)},t.showMessageBoxSync=function showMessageBoxSync(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,n=!e||e instanceof o.BrowserWindow?t:e;return messageBox(!0,r,n)},t.showErrorBox=function showErrorBox(...e){return n.showErrorBox(...e)},t.showCertificateTrustDialog=function showCertificateTrustDialog(e,t){const r=!e||e instanceof o.BrowserWindow?e:null,s=!e||e instanceof o.BrowserWindow?t:e;if(null==s||"object"!=typeof s)throw new TypeError("options must be an object");const{certificate:i,message:a=""}=s;if(null==i||"object"!=typeof i)throw new TypeError("certificate must be an object");if("string"!=typeof a)throw new TypeError("message must be a string");return n.showCertificateTrustDialog(r,i,a)}}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/api/exports/electron.ts": /*!*********************************************!*\ !*** ./lib/browser/api/exports/electron.ts ***! \*********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! @electron/internal/common/define-properties */"./lib/common/define-properties.ts"),n=r(/*! @electron/internal/common/api/module-list */"./lib/common/api/module-list.ts"),s=r(/*! @electron/internal/browser/api/module-list */"./lib/browser/api/module-list.ts");e.exports={},(0,o.defineProperties)(e.exports,n.commonModuleList),(0,o.defineProperties)(e.exports,s.browserModuleList)},"./lib/browser/api/global-shortcut.ts": /*!********************************************!*\ !*** ./lib/browser/api/global-shortcut.ts ***! \********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{globalShortcut:o}=process._linkedBinding("electron_browser_global_shortcut");t.default=o},"./lib/browser/api/in-app-purchase.ts": /*!********************************************!*\ !*** ./lib/browser/api/in-app-purchase.ts ***! \********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! events */"events");let n;if("darwin"===process.platform){const{inAppPurchase:e}=process._linkedBinding("electron_browser_in_app_purchase");n=e}else n=new o.EventEmitter,Object.assign(n,{purchaseProduct:()=>{throw new Error("The inAppPurchase module can only be used on macOS")},canMakePayments:()=>!1,getReceiptURL:()=>""});t.default=n},"./lib/browser/api/ipc-main.ts": /*!*************************************!*\ !*** ./lib/browser/api/ipc-main.ts ***! \*************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=new(r(/*! @electron/internal/browser/ipc-main-impl */"./lib/browser/ipc-main-impl.ts").IpcMainImpl);t.default=o},"./lib/browser/api/menu-item-roles.ts": /*!********************************************!*\ !*** ./lib/browser/api/menu-item-roles.ts ***! \********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.getDefaultSubmenu=t.shouldRegisterAccelerator=t.getDefaultAccelerator=t.shouldOverrideCheckStatus=t.getCheckStatus=t.getDefaultLabel=t.getDefaultType=t.roleList=void 0;const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n="darwin"===process.platform,s="win32"===process.platform,i="linux"===process.platform;t.roleList={about:{get label(){return i?"About":"About "+o.app.name},...s&&{appMethod:()=>o.app.showAboutPanel()}},close:{label:n?"Close Window":"Close",accelerator:"CommandOrControl+W",windowMethod:e=>e.close()},copy:{label:"Copy",accelerator:"CommandOrControl+C",webContentsMethod:e=>e.copy(),registerAccelerator:!1},cut:{label:"Cut",accelerator:"CommandOrControl+X",webContentsMethod:e=>e.cut(),registerAccelerator:!1},delete:{label:"Delete",webContentsMethod:e=>e.delete()},forcereload:{label:"Force Reload",accelerator:"Shift+CmdOrCtrl+R",nonNativeMacOSRole:!0,windowMethod:e=>{e.webContents.reloadIgnoringCache()}},front:{label:"Bring All to Front"},help:{label:"Help"},hide:{get label(){return"Hide "+o.app.name},accelerator:"Command+H"},hideothers:{label:"Hide Others",accelerator:"Command+Alt+H"},minimize:{label:"Minimize",accelerator:"CommandOrControl+M",windowMethod:e=>e.minimize()},paste:{label:"Paste",accelerator:"CommandOrControl+V",webContentsMethod:e=>e.paste(),registerAccelerator:!1},pasteandmatchstyle:{label:"Paste and Match Style",accelerator:n?"Cmd+Option+Shift+V":"Shift+CommandOrControl+V",webContentsMethod:e=>e.pasteAndMatchStyle(),registerAccelerator:!1},quit:{get label(){switch(process.platform){case"darwin":return"Quit "+o.app.name;case"win32":return"Exit";default:return"Quit"}},accelerator:s?void 0:"CommandOrControl+Q",appMethod:()=>o.app.quit()},redo:{label:"Redo",accelerator:s?"Control+Y":"Shift+CommandOrControl+Z",webContentsMethod:e=>e.redo()},reload:{label:"Reload",accelerator:"CmdOrCtrl+R",nonNativeMacOSRole:!0,windowMethod:e=>e.reload()},resetzoom:{label:"Actual Size",accelerator:"CommandOrControl+0",nonNativeMacOSRole:!0,webContentsMethod:e=>{e.zoomLevel=0}},selectall:{label:"Select All",accelerator:"CommandOrControl+A",webContentsMethod:e=>e.selectAll()},services:{label:"Services"},recentdocuments:{label:"Open Recent"},clearrecentdocuments:{label:"Clear Menu"},showsubstitutions:{label:"Show Substitutions"},togglesmartquotes:{label:"Smart Quotes"},togglesmartdashes:{label:"Smart Dashes"},toggletextreplacement:{label:"Text Replacement"},startspeaking:{label:"Start Speaking"},stopspeaking:{label:"Stop Speaking"},toggledevtools:{label:"Toggle Developer Tools",accelerator:n?"Alt+Command+I":"Ctrl+Shift+I",nonNativeMacOSRole:!0,webContentsMethod:e=>{const t=e.getOwnerBrowserWindow();t&&t.webContents.toggleDevTools()}},togglefullscreen:{label:"Toggle Full Screen",accelerator:n?"Control+Command+F":"F11",windowMethod:e=>{e.setFullScreen(!e.isFullScreen())}},undo:{label:"Undo",accelerator:"CommandOrControl+Z",webContentsMethod:e=>e.undo()},unhide:{label:"Show All"},window:{label:"Window"},zoom:{label:"Zoom"},zoomin:{label:"Zoom In",accelerator:"CommandOrControl+Plus",nonNativeMacOSRole:!0,webContentsMethod:e=>{e.zoomLevel+=.5}},zoomout:{label:"Zoom Out",accelerator:"CommandOrControl+-",nonNativeMacOSRole:!0,webContentsMethod:e=>{e.zoomLevel-=.5}},togglespellchecker:{label:"Check Spelling While Typing",get checked(){const e=o.webContents.getFocusedWebContents();return(e?e.session:o.session.defaultSession).spellCheckerEnabled},nonNativeMacOSRole:!0,webContentsMethod:e=>{const t=e?e.session:o.session.defaultSession;t.spellCheckerEnabled=!t.spellCheckerEnabled}},appmenu:{get label(){return o.app.name},submenu:[{role:"about"},{type:"separator"},{role:"services"},{type:"separator"},{role:"hide"},{role:"hideOthers"},{role:"unhide"},{type:"separator"},{role:"quit"}]},filemenu:{label:"File",submenu:[n?{role:"close"}:{role:"quit"}]},editmenu:{label:"Edit",submenu:[{role:"undo"},{role:"redo"},{type:"separator"},{role:"cut"},{role:"copy"},{role:"paste"},...n?[{role:"pasteAndMatchStyle"},{role:"delete"},{role:"selectAll"},{type:"separator"},{label:"Substitutions",submenu:[{role:"showSubstitutions"},{type:"separator"},{role:"toggleSmartQuotes"},{role:"toggleSmartDashes"},{role:"toggleTextReplacement"}]},{label:"Speech",submenu:[{role:"startSpeaking"},{role:"stopSpeaking"}]}]:[{role:"delete"},{type:"separator"},{role:"selectAll"}]]},viewmenu:{label:"View",submenu:[{role:"reload"},{role:"forceReload"},{role:"toggleDevTools"},{type:"separator"},{role:"resetZoom"},{role:"zoomIn"},{role:"zoomOut"},{type:"separator"},{role:"togglefullscreen"}]},windowmenu:{label:"Window",submenu:[{role:"minimize"},{role:"zoom"},...n?[{type:"separator"},{role:"front"}]:[{role:"close"}]]},sharemenu:{label:"Share",submenu:[]}};const hasRole=e=>Object.prototype.hasOwnProperty.call(t.roleList,e);function shouldOverrideCheckStatus(e){return hasRole(e)&&Object.prototype.hasOwnProperty.call(t.roleList[e],"checked")}t.getDefaultType=function getDefaultType(e){return shouldOverrideCheckStatus(e)?"checkbox":"normal"},t.getDefaultLabel=function getDefaultLabel(e){return hasRole(e)?t.roleList[e].label:""},t.getCheckStatus=function getCheckStatus(e){if(hasRole(e))return t.roleList[e].checked},t.shouldOverrideCheckStatus=shouldOverrideCheckStatus,t.getDefaultAccelerator=function getDefaultAccelerator(e){if(hasRole(e))return t.roleList[e].accelerator},t.shouldRegisterAccelerator=function shouldRegisterAccelerator(e){return!(hasRole(e)&&void 0!==t.roleList[e].registerAccelerator)||t.roleList[e].registerAccelerator},t.getDefaultSubmenu=function getDefaultSubmenu(e){if(!hasRole(e))return;let{submenu:r}=t.roleList[e];return Array.isArray(r)&&(r=r.filter(e=>null!=e)),r},t.execute=function execute(e,r,o){if(!(e=>!!hasRole(e)&&(!n||t.roleList[e].nonNativeMacOSRole))(e))return!1;const{appMethod:s,webContentsMethod:i,windowMethod:a}=t.roleList[e];return s?(s(),!0):a&&null!=r?(a(r),!0):!(!i||null==o)&&(i(o),!0)}},"./lib/browser/api/menu-item.ts": /*!**************************************!*\ !*** ./lib/browser/api/menu-item.ts ***! \**************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! @electron/internal/browser/api/menu-item-roles */"./lib/browser/api/menu-item-roles.ts"),n=r(/*! electron/main */"./lib/browser/api/exports/electron.ts");let s=0;const MenuItem=function(e){for(const t in e)t in this||(this[t]=e[t]);if(("string"==typeof this.role||this.role instanceof String)&&(this.role=this.role.toLowerCase()),this.submenu=this.submenu||o.getDefaultSubmenu(this.role),null!=this.submenu&&this.submenu.constructor!==n.Menu&&(this.submenu=n.Menu.buildFromTemplate(this.submenu)),null==this.type&&null!=this.submenu&&(this.type="submenu"),"submenu"===this.type&&(null==this.submenu||this.submenu.constructor!==n.Menu))throw new Error("Invalid submenu");if(this.overrideReadOnlyProperty("type",o.getDefaultType(this.role)),this.overrideReadOnlyProperty("role"),this.overrideReadOnlyProperty("accelerator"),this.overrideReadOnlyProperty("icon"),this.overrideReadOnlyProperty("submenu"),this.overrideProperty("label",o.getDefaultLabel(this.role)),this.overrideProperty("sublabel",""),this.overrideProperty("toolTip",""),this.overrideProperty("enabled",!0),this.overrideProperty("visible",!0),this.overrideProperty("checked",!1),this.overrideProperty("acceleratorWorksWhenHidden",!0),this.overrideProperty("registerAccelerator",o.shouldRegisterAccelerator(this.role)),!MenuItem.types.includes(this.type))throw new Error("Unknown menu item type: "+this.type);this.overrideReadOnlyProperty("commandId",++s),Object.defineProperty(this,"userAccelerator",{get:()=>"darwin"!==process.platform?null:this.menu?this.menu._getUserAcceleratorAt(this.commandId):null,enumerable:!0});const t=e.click;this.click=(e,r,s)=>{o.shouldOverrideCheckStatus(this.role)||"checkbox"!==this.type&&"radio"!==this.type||(this.checked=!this.checked),o.execute(this.role,r,s)||("function"==typeof t?t(this,r,e):"string"==typeof this.selector&&"darwin"===process.platform&&n.Menu.sendActionToFirstResponder(this.selector))}};MenuItem.types=["normal","separator","submenu","checkbox","radio"],MenuItem.prototype.getDefaultRoleAccelerator=function(){return o.getDefaultAccelerator(this.role)},MenuItem.prototype.getCheckStatus=function(){return o.shouldOverrideCheckStatus(this.role)?o.getCheckStatus(this.role):this.checked},MenuItem.prototype.overrideProperty=function(e,t=null){null==this[e]&&(this[e]=t)},MenuItem.prototype.overrideReadOnlyProperty=function(e,t){this.overrideProperty(e,t),Object.defineProperty(this,e,{enumerable:!0,writable:!1,value:this[e]})},e.exports=MenuItem},"./lib/browser/api/menu-utils.ts": /*!***************************************!*\ !*** ./lib/browser/api/menu-utils.ts ***! \***************************************/ /*! no static exports found */function(e,t,r){"use strict";function pushOntoMultiMap(e,t,r){e.has(t)||e.set(t,[]),e.get(t).push(r)}function indexOfGroupContainingID(e,t,r){return e.findIndex(e=>e!==r&&e.some(e=>e.id===t))}function sortTopologically(e,t){const r=[],o=new Set,visit=e=>{if(o.has(e))return;o.add(e);const n=t.get(e);null!=n&&n.forEach(visit),r.push(e)};return e.forEach(visit),r}function attemptToMergeAGroup(e){for(let t=0;tt),r=new Map,o=new Map(e.map((e,t)=>[e.id,t]));e.forEach((e,t)=>{e.before&&e.before.forEach(e=>{const n=o.get(e);null!=n&&pushOntoMultiMap(r,n,t)}),e.after&&e.after.forEach(e=>{const n=o.get(e);null!=n&&pushOntoMultiMap(r,t,n)})});return sortTopologically(t,r).map(t=>e[t])}function findEdgesInGroup(e,t,r){const o=e[t];for(const n of o){if(n.beforeGroupContaining)for(const s of n.beforeGroupContaining){const n=indexOfGroupContainingID(e,s,o);if(-1!==n)return void pushOntoMultiMap(r,n,t)}if(n.afterGroupContaining)for(const s of n.afterGroupContaining){const n=indexOfGroupContainingID(e,s,o);if(-1!==n)return void pushOntoMultiMap(r,t,n)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.sortMenuItems=void 0,t.sortMenuItems=function sortMenuItems(e){const isSeparator=e=>{const t=e;return!("separator"!==e.type||t.before||t.after||t.beforeGroupContaining||t.afterGroupContaining)},t=e.filter(isSeparator);return function joinArrays(e,t){return e.reduce((e,r,o)=>(o>0&&r.length&&(t.length>0?(e.push(t[0]),t.splice(0,1)):e.push({type:"separator"})),e.concat(r)),[])}(function sortGroups(e){const t=e.map((e,t)=>t),r=new Map;for(let t=0;te[t])}(function mergeGroups(e){let t=!0;for(;t;)t=attemptToMergeAGroup(e);return e}(function splitArray(e,t){const r=e.reduce((e,r)=>{const o=e[e.length-1];return t(r)?o.length>0&&e.push([]):o.push(r),e},[[]]);return 0===r[r.length-1].length?r.slice(0,r.length-1):r}(e,isSeparator)).map(sortItemsInGroup)),t)}},"./lib/browser/api/menu.ts": /*!*********************************!*\ !*** ./lib/browser/api/menu.ts ***! \*********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! @electron/internal/browser/api/menu-utils */"./lib/browser/api/menu-utils.ts"),s=r(/*! @electron/internal/browser/default-menu */"./lib/browser/default-menu.ts"),i=process._linkedBinding("electron_browser_menu"),{Menu:a}=i,l=new WeakMap;let c=null,u=0;function insertItemByType(e,t){({normal:()=>this.insertItem(t,e.commandId,e.label),checkbox:()=>this.insertCheckItem(t,e.commandId,e.label),separator:()=>this.insertSeparator(t),submenu:()=>this.insertSubMenu(t,e.commandId,e.label,e.submenu),radio:()=>{e.overrideReadOnlyProperty("groupId",function generateGroupId(e,t){if(t>0)for(let r=t-1;r>=0;r--){if("radio"===e[r].type)return e[r].groupId;if("separator"===e[r].type)break}else if(tl.get(e),set:()=>{this.groupsMap[e.groupId].forEach(t=>{t!==e&&l.set(t,!1)}),l.set(e,!0)}}),this.insertRadioItem(t,e.commandId,e.label,e.groupId)}})[e.type]()}a.prototype._init=function(){this.commandsMap={},this.groupsMap={},this.items=[]},a.prototype._isCommandIdChecked=function(e){const t=this.commandsMap[e];return!!t&&t.getCheckStatus()},a.prototype._isCommandIdEnabled=function(e){return!!this.commandsMap[e]&&this.commandsMap[e].enabled},a.prototype._shouldCommandIdWorkWhenHidden=function(e){return!!this.commandsMap[e]&&!!this.commandsMap[e].acceleratorWorksWhenHidden},a.prototype._isCommandIdVisible=function(e){return!!this.commandsMap[e]&&this.commandsMap[e].visible},a.prototype._getAcceleratorForCommandId=function(e,t){const r=this.commandsMap[e];if(r)return null!=r.accelerator?r.accelerator:t?r.getDefaultRoleAccelerator():void 0},a.prototype._shouldRegisterAcceleratorForCommandId=function(e){return!!this.commandsMap[e]&&this.commandsMap[e].registerAccelerator},"darwin"===process.platform&&(a.prototype._getSharingItemForCommandId=function(e){return this.commandsMap[e]?this.commandsMap[e].sharingItem:null}),a.prototype._executeCommand=function(e,t){const r=this.commandsMap[t];if(!r)return;const n=o.BaseWindow.getFocusedWindow();r.click(e,n instanceof o.BrowserWindow?n:void 0,o.webContents.getFocusedWebContents())},a.prototype._menuWillShow=function(){for(const e of Object.keys(this.groupsMap)){this.groupsMap[e].find(e=>e.checked)||null||l.set(this.groupsMap[e][0],!0)}},a.prototype.popup=function(e={}){if(null==e||"object"!=typeof e)throw new TypeError("Options must be an object");let{window:t,x:r,y:n,positioningItem:s,callback:i}=e;i&&"function"==typeof i||(i=()=>{}),"number"!=typeof r&&(r=-1),"number"!=typeof n&&(n=-1),"number"!=typeof s&&(s=-1);const a=o.BaseWindow.getAllWindows();if(!(a&&-1!==a.indexOf(t)||(t=o.BaseWindow.getFocusedWindow(),!t&&a&&a.length>0&&(t=a[0]),t)))throw new Error("Cannot open Menu without a BaseWindow present");return this.popupAt(t,r,n,s,i),{browserWindow:t,x:r,y:n,position:s}},a.prototype.closePopup=function(e){e instanceof o.BaseWindow?this.closePopupAt(e.id):this.closePopupAt(-1)},a.prototype.getMenuItemById=function(e){const t=this.items;let r=t.find(t=>t.id===e)||null;for(let o=0;!r&&othis.getItemCount())throw new RangeError(`Position ${e} cannot be greater than the total MenuItem count`);insertItemByType.call(this,t,e),t.sublabel&&this.setSublabel(e,t.sublabel),t.toolTip&&this.setToolTip(e,t.toolTip),t.icon&&this.setIcon(e,t.icon),t.role&&this.setRole(e,t.role),t.overrideReadOnlyProperty("menu",this),this.items.splice(e,0,t),this.commandsMap[t.commandId]=t},a.prototype._callMenuWillShow=function(){this.delegate&&this.delegate.menuWillShow(this),this.items.forEach(e=>{e.submenu&&e.submenu._callMenuWillShow()})},a.getApplicationMenu=()=>c,a.sendActionToFirstResponder=i.sendActionToFirstResponder,a.setApplicationMenu=function(e){if(e&&e.constructor!==a)throw new TypeError("Invalid menu");if(c=e,(0,s.setApplicationMenuWasSet)(),"darwin"===process.platform){if(!e)return;e._callMenuWillShow(),i.setApplicationMenu(e)}else{o.BaseWindow.getAllWindows().map(t=>t.setMenu(e))}},a.buildFromTemplate=function(e){if(!Array.isArray(e))throw new TypeError("Invalid template for Menu: Menu template must be an array");if(!function areValidTemplateItems(e){return e.every(e=>null!=e&&"object"==typeof e&&(Object.prototype.hasOwnProperty.call(e,"label")||Object.prototype.hasOwnProperty.call(e,"role")||"separator"===e.type))}(e))throw new TypeError("Invalid template for MenuItem: must have at least one of label, role or type");const t=function removeExtraSeparators(e){let t=e.filter((e,t,r)=>!1===e.visible||("separator"!==e.type||0===t||"separator"!==r[t-1].type));return t=t.filter((e,t,r)=>!1===e.visible||("separator"!==e.type||0!==t&&t!==r.length-1)),t}(function sortTemplate(e){const t=(0,n.sortMenuItems)(e);for(const e of t)Array.isArray(e.submenu)&&(e.submenu=sortTemplate(e.submenu));return t}(e)),r=new a;return t.forEach(e=>{e instanceof o.MenuItem?r.append(e):r.append(new o.MenuItem(e))}),r},e.exports=a},"./lib/browser/api/message-channel.ts": /*!********************************************!*\ !*** ./lib/browser/api/message-channel.ts ***! \********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! @electron/internal/browser/message-port-main */"./lib/browser/message-port-main.ts"),{createPair:n}=process._linkedBinding("electron_browser_message_port");t.default=class MessageChannelMain{constructor(){const{port1:e,port2:t}=n();this.port1=new o.MessagePortMain(e),this.port2=new o.MessagePortMain(t)}}},"./lib/browser/api/module-list.ts": /*!****************************************!*\ !*** ./lib/browser/api/module-list.ts ***! \****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserModuleList=void 0,t.browserModuleList=[{name:"app",loader:()=>r(/*! ./app */"./lib/browser/api/app.ts")},{name:"autoUpdater",loader:()=>r(/*! ./auto-updater */"./lib/browser/api/auto-updater.ts")},{name:"BaseWindow",loader:()=>r(/*! ./base-window */"./lib/browser/api/base-window.ts")},{name:"BrowserView",loader:()=>r(/*! ./browser-view */"./lib/browser/api/browser-view.ts")},{name:"BrowserWindow",loader:()=>r(/*! ./browser-window */"./lib/browser/api/browser-window.ts")},{name:"contentTracing",loader:()=>r(/*! ./content-tracing */"./lib/browser/api/content-tracing.ts")},{name:"crashReporter",loader:()=>r(/*! ./crash-reporter */"./lib/browser/api/crash-reporter.ts")},{name:"dialog",loader:()=>r(/*! ./dialog */"./lib/browser/api/dialog.ts")},{name:"globalShortcut",loader:()=>r(/*! ./global-shortcut */"./lib/browser/api/global-shortcut.ts")},{name:"ipcMain",loader:()=>r(/*! ./ipc-main */"./lib/browser/api/ipc-main.ts")},{name:"inAppPurchase",loader:()=>r(/*! ./in-app-purchase */"./lib/browser/api/in-app-purchase.ts")},{name:"Menu",loader:()=>r(/*! ./menu */"./lib/browser/api/menu.ts")},{name:"MenuItem",loader:()=>r(/*! ./menu-item */"./lib/browser/api/menu-item.ts")},{name:"MessageChannelMain",loader:()=>r(/*! ./message-channel */"./lib/browser/api/message-channel.ts")},{name:"nativeTheme",loader:()=>r(/*! ./native-theme */"./lib/browser/api/native-theme.ts")},{name:"net",loader:()=>r(/*! ./net */"./lib/browser/api/net.ts")},{name:"netLog",loader:()=>r(/*! ./net-log */"./lib/browser/api/net-log.ts")},{name:"Notification",loader:()=>r(/*! ./notification */"./lib/browser/api/notification.ts")},{name:"powerMonitor",loader:()=>r(/*! ./power-monitor */"./lib/browser/api/power-monitor.ts")},{name:"powerSaveBlocker",loader:()=>r(/*! ./power-save-blocker */"./lib/browser/api/power-save-blocker.ts")},{name:"pushNotifications",loader:()=>r(/*! ./push-notifications */"./lib/browser/api/push-notifications.ts")},{name:"protocol",loader:()=>r(/*! ./protocol */"./lib/browser/api/protocol.ts")},{name:"safeStorage",loader:()=>r(/*! ./safe-storage */"./lib/browser/api/safe-storage.ts")},{name:"screen",loader:()=>r(/*! ./screen */"./lib/browser/api/screen.ts")},{name:"session",loader:()=>r(/*! ./session */"./lib/browser/api/session.ts")},{name:"ShareMenu",loader:()=>r(/*! ./share-menu */"./lib/browser/api/share-menu.ts")},{name:"systemPreferences",loader:()=>r(/*! ./system-preferences */"./lib/browser/api/system-preferences.ts")},{name:"TouchBar",loader:()=>r(/*! ./touch-bar */"./lib/browser/api/touch-bar.ts")},{name:"Tray",loader:()=>r(/*! ./tray */"./lib/browser/api/tray.ts")},{name:"View",loader:()=>r(/*! ./view */"./lib/browser/api/view.ts")},{name:"webContents",loader:()=>r(/*! ./web-contents */"./lib/browser/api/web-contents.ts")},{name:"WebContentsView",loader:()=>r(/*! ./web-contents-view */"./lib/browser/api/web-contents-view.ts")},{name:"webFrameMain",loader:()=>r(/*! ./web-frame-main */"./lib/browser/api/web-frame-main.ts")}],t.browserModuleList.push({name:"desktopCapturer",loader:()=>r(/*! ./desktop-capturer */"./lib/browser/api/desktop-capturer.ts")}),t.browserModuleList.push({name:"ImageView",loader:()=>r(/*! ./views/image-view */"./lib/browser/api/views/image-view.ts")})},"./lib/browser/api/native-theme.ts": /*!*****************************************!*\ !*** ./lib/browser/api/native-theme.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";const{nativeTheme:o}=process._linkedBinding("electron_browser_native_theme");e.exports=o},"./lib/browser/api/net-log.ts": /*!************************************!*\ !*** ./lib/browser/api/net-log.ts ***! \************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts");t.default={startLogging:async(e,t)=>{if(o.app.isReady())return o.session.defaultSession.netLog.startLogging(e,t)},stopLogging:async()=>{if(o.app.isReady())return o.session.defaultSession.netLog.stopLogging()},get currentlyLogging(){return!!o.app.isReady()&&o.session.defaultSession.netLog.currentlyLogging}}},"./lib/browser/api/net.ts": /*!********************************!*\ !*** ./lib/browser/api/net.ts ***! \********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.request=t.ClientRequest=void 0;const o=r(/*! url */"url"),n=r(/*! stream */"stream"),s=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),{isOnline:i,isValidHeaderName:a,isValidHeaderValue:l,createURLLoader:c}=process._linkedBinding("electron_browser_net"),u=new Set(["http:","https:"]),d=new Set(["content-type","content-length","user-agent","referer","host","authorization","proxy-authorization","if-modified-since","if-unmodified-since","from","location","max-forwards","retry-after","etag","last-modified","server","age","expires"]);class IncomingMessage extends n.Readable{constructor(e){super(),this._shouldPush=!1,this._data=[],this._resume=null,this._responseHead=e}get statusCode(){return this._responseHead.statusCode}get statusMessage(){return this._responseHead.statusMessage}get headers(){const e={},{rawHeaders:t}=this._responseHead;return t.forEach(t=>{const r=t.key.toLowerCase();Object.prototype.hasOwnProperty.call(e,r)&&d.has(r)||("set-cookie"===r?Object.prototype.hasOwnProperty.call(e,r)?e[r].push(t.value):e[r]=[t.value]:Object.prototype.hasOwnProperty.call(e,r)?e[r]+=", "+t.value:e[r]=t.value)}),e}get rawHeaders(){const e=[],{rawHeaders:t}=this._responseHead;return t.forEach(t=>{e.push(t.key,t.value)}),e}get httpVersion(){return`${this.httpVersionMajor}.${this.httpVersionMinor}`}get httpVersionMajor(){return this._responseHead.httpVersion.major}get httpVersionMinor(){return this._responseHead.httpVersion.minor}get rawTrailers(){throw new Error("HTTP trailers are not supported")}get trailers(){throw new Error("HTTP trailers are not supported")}_storeInternalData(e,t){this._resume=t,this._data.push(e),this._pushInternalData()}_pushInternalData(){for(;this._shouldPush&&this._data.length>0;){const e=this._data.shift();this._shouldPush=this.push(e)}if(this._shouldPush&&this._resume){const e=this._resume;this._resume=null,e()}}_read(){this._shouldPush=!0,this._pushInternalData()}}class SlurpStream extends n.Writable{constructor(){super(),this._data=Buffer.alloc(0)}_write(e,t,r){this._data=Buffer.concat([this._data,e]),r()}data(){return this._data}}class ChunkedBodyStream extends n.Writable{constructor(e){super(),this._clientRequest=e}_write(e,t,r){this._downstream?this._downstream.write(e).then(r,r):(this._pendingChunk=e,this._pendingCallback=r,this._clientRequest._startRequest())}_final(e){this._downstream.done(),e()}startReading(e){if(this._downstream)throw new Error("two startReading calls???");if(this._downstream=e,this._pendingChunk){const doneWriting=e=>{if(this._clientRequest._aborted)return;const t=this._pendingCallback;delete this._pendingCallback,delete this._pendingChunk,t(e||void 0)};this._downstream.write(this._pendingChunk).then(doneWriting,doneWriting)}}}class ClientRequest extends n.Writable{constructor(e,t){if(super({autoDestroy:!0}),this._started=!1,this._firstWrite=!1,this._aborted=!1,!s.app.isReady())throw new Error("net module can only be used after app is ready");t&&this.once("response",t);const{redirectPolicy:r,...n}=function parseOptions(e){const t="string"==typeof e?o.parse(e):{...e};let r=t.url;if(!r){const e={},n=t.protocol||"http:";if(!u.has(n))throw new Error('Protocol "'+n+'" not supported');if(e.protocol=n,t.host?e.host=t.host:(t.hostname?e.hostname=t.hostname:e.hostname="localhost",t.port&&(e.port=t.port)),t.path&&/ /.test(t.path))throw new TypeError("Request path contains unescaped characters");const s=o.parse(t.path||"/");e.pathname=s.pathname,e.search=s.search,e.hash=s.hash,r=o.format(e)}const n=t.redirect||"follow";if(!["follow","error","manual"].includes(n))throw new Error("redirect mode should be one of follow, error or manual");if(null!=t.headers&&"object"!=typeof t.headers)throw new TypeError("headers must be an object");const s={method:(t.method||"GET").toUpperCase(),url:r,redirectPolicy:n,headers:{},body:null,useSessionCookies:t.useSessionCookies,credentials:t.credentials,origin:t.origin},i=t.headers||{};for(const[e,t]of Object.entries(i)){if(!a(e))throw new Error(`Invalid header name: '${e}'`);if(!l(t.toString()))throw new Error(`Invalid value for header '${e}': '${t}'`);const r=e.toLowerCase();s.headers[r]={name:e,value:t}}if(t.session){if(!t.session.constructor||"Session"!==t.session.constructor.name)throw new TypeError("`session` should be an instance of the Session class");s.session=t.session}else if(t.partition){if("string"!=typeof t.partition)throw new TypeError("`partition` should be a string");s.partition=t.partition}return s}(e);this._urlLoaderOptions=n,this._redirectPolicy=r}get chunkedEncoding(){return this._chunkedEncoding||!1}set chunkedEncoding(e){if(this._started)throw new Error("chunkedEncoding can only be set before the request is started");if(void 0!==this._chunkedEncoding)throw new Error("chunkedEncoding can only be set once");this._chunkedEncoding=!!e,this._chunkedEncoding&&(this._body=new ChunkedBodyStream(this),this._urlLoaderOptions.body=e=>{this._body.startReading(e)})}setHeader(e,t){if("string"!=typeof e)throw new TypeError("`name` should be a string in setHeader(name, value)");if(null==t)throw new Error('`value` required in setHeader("'+e+'", value)');if(this._started||this._firstWrite)throw new Error("Can't set headers after they are sent");if(!a(e))throw new Error(`Invalid header name: '${e}'`);if(!l(t.toString()))throw new Error(`Invalid value for header '${e}': '${t}'`);const r=e.toLowerCase();this._urlLoaderOptions.headers[r]={name:e,value:t}}getHeader(e){if(null==e)throw new Error("`name` is required for getHeader(name)");const t=e.toLowerCase(),r=this._urlLoaderOptions.headers[t];return r&&r.value}removeHeader(e){if(null==e)throw new Error("`name` is required for removeHeader(name)");if(this._started||this._firstWrite)throw new Error("Can't remove headers after they are sent");const t=e.toLowerCase();delete this._urlLoaderOptions.headers[t]}_write(e,t,r){this._firstWrite=!0,this._body||(this._body=new SlurpStream,this._body.on("finish",()=>{this._urlLoaderOptions.body=this._body.data(),this._startRequest()})),this._body.write(e,t,r)}_final(e){this._body?this._body.end(e):(this._startRequest(),e())}_startRequest(){this._started=!0;this._urlLoaderOptions.referrer=this.getHeader("referer")||"",this._urlLoaderOptions.origin=this._urlLoaderOptions.origin||this.getHeader("origin")||"",this._urlLoaderOptions.hasUserActivation="?1"===this.getHeader("sec-fetch-user"),this._urlLoaderOptions.mode=this.getHeader("sec-fetch-mode")||"",this._urlLoaderOptions.destination=this.getHeader("sec-fetch-dest")||"";const e={...this._urlLoaderOptions,extraHeaders:(e=>{const t={};for(const r of Object.keys(e)){const o=e[r];t[o.name]=o.value.toString()}return t})(this._urlLoaderOptions.headers)};this._urlLoader=c(e),this._urlLoader.on("response-started",(e,t,r)=>{const o=this._response=new IncomingMessage(r);this.emit("response",o)}),this._urlLoader.on("data",(e,t,r)=>{this._response._storeInternalData(Buffer.from(t),r)}),this._urlLoader.on("complete",()=>{this._response&&this._response._storeInternalData(null,null)}),this._urlLoader.on("error",(e,t)=>{const r=new Error(t);this._response&&this._response.destroy(r),this._die(r)}),this._urlLoader.on("login",(e,t,r)=>{this.emit("login",t,r)||r()}),this._urlLoader.on("redirect",(e,t,r)=>{const{statusCode:o,newMethod:n,newUrl:s}=t;if("error"===this._redirectPolicy)this._die(new Error("Attempted to redirect, but redirect policy was 'error'"));else if("manual"===this._redirectPolicy){let e=!1;this._followRedirectCb=()=>{e=!0};try{this.emit("redirect",o,n,s,r)}finally{this._followRedirectCb=void 0,e||this._aborted||this._die(new Error("Redirect was cancelled"))}}else if("follow"===this._redirectPolicy)try{this._followRedirectCb=()=>{},this.emit("redirect",o,n,s,r)}finally{this._followRedirectCb=void 0}else this._die(new Error(`Unexpected redirect policy '${this._redirectPolicy}'`))}),this._urlLoader.on("upload-progress",(e,t,r)=>{this._uploadProgress={active:!0,started:!0,current:t,total:r},this.emit("upload-progress",t,r)}),this._urlLoader.on("download-progress",(e,t)=>{this._response&&this._response.emit("download-progress",t)})}followRedirect(){if(!this._followRedirectCb)throw new Error("followRedirect() called, but was not waiting for a redirect");this._followRedirectCb()}abort(){this._aborted||process.nextTick(()=>{this.emit("abort")}),this._aborted=!0,this._die()}_die(e){this._writableState.destroyed&&e&&this.emit("error",e),this.destroy(e),this._urlLoader&&(this._urlLoader.cancel(),this._response&&this._response.destroy(e))}getUploadProgress(){return this._uploadProgress?{...this._uploadProgress}:{active:!1,started:!1,current:0,total:0}}}t.ClientRequest=ClientRequest,t.request=function request(e,t){return new ClientRequest(e,t)},t.isOnline=i,Object.defineProperty(t,"online",{get:()=>i()})},"./lib/browser/api/notification.ts": /*!*****************************************!*\ !*** ./lib/browser/api/notification.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{Notification:o,isSupported:n}=process._linkedBinding("electron_browser_notification");o.isSupported=n,t.default=o},"./lib/browser/api/power-monitor.ts": /*!******************************************!*\ !*** ./lib/browser/api/power-monitor.ts ***! \******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! events */"events"),n=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),{createPowerMonitor:s,getSystemIdleState:i,getSystemIdleTime:a,isOnBatteryPower:l}=process._linkedBinding("electron_browser_power_monitor");class PowerMonitor extends o.EventEmitter{constructor(){super(),this.once("newListener",()=>{n.app.whenReady().then(()=>{const e=s();e.emit=this.emit.bind(this),"linux"===process.platform&&(e.setListeningForShutdown(this.listenerCount("shutdown")>0),this.on("newListener",t=>{"shutdown"===t&&e.setListeningForShutdown(this.listenerCount("shutdown")+1>0)}),this.on("removeListener",t=>{"shutdown"===t&&e.setListeningForShutdown(this.listenerCount("shutdown")>0)}))})})}getSystemIdleState(e){return i(e)}getSystemIdleTime(){return a()}isOnBatteryPower(){return l()}get onBatteryPower(){return this.isOnBatteryPower()}}e.exports=new PowerMonitor},"./lib/browser/api/power-save-blocker.ts": /*!***********************************************!*\ !*** ./lib/browser/api/power-save-blocker.ts ***! \***********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{powerSaveBlocker:o}=process._linkedBinding("electron_browser_power_save_blocker");t.default=o},"./lib/browser/api/protocol.ts": /*!*************************************!*\ !*** ./lib/browser/api/protocol.ts ***! \*************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=process._linkedBinding("electron_browser_protocol");Object.setPrototypeOf(n,new Proxy({},{get(e,t){if(!o.app.isReady())return;const r=o.session.defaultSession.protocol;return Object.prototype.hasOwnProperty.call(r,t)?(...e)=>r[t](...e):void 0},ownKeys:()=>o.app.isReady()?Reflect.ownKeys(o.session.defaultSession.protocol):[],has:(e,t)=>!!o.app.isReady()&&Reflect.has(o.session.defaultSession.protocol,t),getOwnPropertyDescriptor:()=>({configurable:!0,enumerable:!0})})),t.default=n},"./lib/browser/api/push-notifications.ts": /*!***********************************************!*\ !*** ./lib/browser/api/push-notifications.ts ***! \***********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{pushNotifications:o}=process._linkedBinding("electron_browser_push_notifications");t.default=o},"./lib/browser/api/safe-storage.ts": /*!*****************************************!*\ !*** ./lib/browser/api/safe-storage.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";const o=process._linkedBinding("electron_browser_safe_storage");e.exports=o},"./lib/browser/api/screen.ts": /*!***********************************!*\ !*** ./lib/browser/api/screen.ts ***! \***********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! events */"events"),{createScreen:n}=process._linkedBinding("electron_browser_screen");let s;const createScreenIfNeeded=()=>{void 0===s&&(s=n())};t.default=new Proxy({},{get:(e,t)=>{createScreenIfNeeded();const r=s[t];return"function"==typeof r?r.bind(s):r},set:(e,t,r)=>(createScreenIfNeeded(),Reflect.set(s,t,r)),ownKeys:()=>(createScreenIfNeeded(),Reflect.ownKeys(s)),has:(e,t)=>(createScreenIfNeeded(),t in s),getOwnPropertyDescriptor:(e,t)=>(createScreenIfNeeded(),Reflect.getOwnPropertyDescriptor(s,t)),getPrototypeOf:()=>o.EventEmitter.prototype})},"./lib/browser/api/session.ts": /*!************************************!*\ !*** ./lib/browser/api/session.ts ***! \************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{fromPartition:o}=process._linkedBinding("electron_browser_session");t.default={fromPartition:o,get defaultSession(){return o("")}}},"./lib/browser/api/share-menu.ts": /*!***************************************!*\ !*** ./lib/browser/api/share-menu.ts ***! \***************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts");t.default=class ShareMenu{constructor(e){this.menu=new o.Menu({sharingItem:e})}popup(e){this.menu.popup(e)}closePopup(e){this.menu.closePopup(e)}}},"./lib/browser/api/system-preferences.ts": /*!***********************************************!*\ !*** ./lib/browser/api/system-preferences.ts ***! \***********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{systemPreferences:o}=process._linkedBinding("electron_browser_system_preferences");if("getAppLevelAppearance"in o){const e=o.getAppLevelAppearance,t=o.setAppLevelAppearance;Object.defineProperty(o,"appLevelAppearance",{get:()=>e.call(o),set:e=>t.call(o,e)})}if("getEffectiveAppearance"in o){const e=o.getEffectiveAppearance;Object.defineProperty(o,"effectiveAppearance",{get:()=>e.call(o)})}t.default=o},"./lib/browser/api/touch-bar.ts": /*!**************************************!*\ !*** ./lib/browser/api/touch-bar.ts ***! \**************************************/ /*! no static exports found */function(e,t,r){"use strict";var o,n=this&&this.__decorate||function(e,t,r,o){var n,s=arguments.length,i=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(i=(s<3?n(i):s>3?n(t,r,i):n(t,r))||i);return s>3&&i&&Object.defineProperty(t,r,i),i};Object.defineProperty(t,"__esModule",{value:!0});const s=r(/*! events */"events");let i=1;const a=Symbol("hidden touch bar props"),extendConstructHook=(e,t)=>{const r=e._hook;e._hook=function(){r&&r.call(this),t.call(this)}},ImmutableProperty=e=>(t,r)=>{extendConstructHook(t,(function(){this[a][r]=e(this._config,(e,t)=>{this[a][e]=t})})),Object.defineProperty(t,r,{get:function(){return this[a][r]},set:function(){throw new Error("Cannot override property "+name)},enumerable:!0,configurable:!1})},LiveProperty=(e,t)=>(r,o)=>{extendConstructHook(r,(function(){this[a][o]=e(this._config),t&&t(this,this[a][o])})),Object.defineProperty(r,o,{get:function(){return this[a][o]},set:function(e){t&&t(this,e),this[a][o]=e,this.emit("change",this)},enumerable:!0})};class TouchBarItem extends s.EventEmitter{constructor(e){super(),this._parents=[],this._config=this._config||e||{},this[a]={};const t=this._hook;t&&t.call(this),delete this._hook}_addParent(e){this._parents.some(t=>t.id===e.id)||this._parents.push({id:e.id,type:e.type})}_removeParent(e){this._parents=this._parents.filter(t=>t.id!==e.id)}}n([ImmutableProperty(()=>""+i++)],TouchBarItem.prototype,"id",void 0);class TouchBarButton extends TouchBarItem{}n([ImmutableProperty(()=>"button")],TouchBarButton.prototype,"type",void 0),n([LiveProperty(e=>e.label)],TouchBarButton.prototype,"label",void 0),n([LiveProperty(e=>e.accessibilityLabel)],TouchBarButton.prototype,"accessibilityLabel",void 0),n([LiveProperty(e=>e.backgroundColor)],TouchBarButton.prototype,"backgroundColor",void 0),n([LiveProperty(e=>e.icon)],TouchBarButton.prototype,"icon",void 0),n([LiveProperty(e=>e.iconPosition)],TouchBarButton.prototype,"iconPosition",void 0),n([LiveProperty(e=>"boolean"!=typeof e.enabled||e.enabled)],TouchBarButton.prototype,"enabled",void 0),n([ImmutableProperty(({click:e})=>"function"==typeof e?()=>e():null)],TouchBarButton.prototype,"onInteraction",void 0);class TouchBarColorPicker extends TouchBarItem{}n([ImmutableProperty(()=>"colorpicker")],TouchBarColorPicker.prototype,"type",void 0),n([LiveProperty(e=>e.availableColors)],TouchBarColorPicker.prototype,"availableColors",void 0),n([LiveProperty(e=>e.selectedColor)],TouchBarColorPicker.prototype,"selectedColor",void 0),n([ImmutableProperty(({change:e},t)=>"function"==typeof e?r=>{t("selectedColor",r.color),e(r.color)}:null)],TouchBarColorPicker.prototype,"onInteraction",void 0);class TouchBarGroup extends TouchBarItem{constructor(){super(...arguments),this.onInteraction=null}}n([ImmutableProperty(()=>"group")],TouchBarGroup.prototype,"type",void 0),n([LiveProperty(e=>e.items instanceof TouchBar?e.items:new TouchBar(e.items),(e,t)=>{if(e.child)for(const t of e.child.orderedItems)t._removeParent(e);for(const r of t.orderedItems)r._addParent(e)})],TouchBarGroup.prototype,"child",void 0);class TouchBarLabel extends TouchBarItem{constructor(){super(...arguments),this.onInteraction=null}}n([ImmutableProperty(()=>"label")],TouchBarLabel.prototype,"type",void 0),n([LiveProperty(e=>e.label)],TouchBarLabel.prototype,"label",void 0),n([LiveProperty(e=>e.accessibilityLabel)],TouchBarLabel.prototype,"accessibilityLabel",void 0),n([LiveProperty(e=>e.textColor)],TouchBarLabel.prototype,"textColor",void 0);class TouchBarPopover extends TouchBarItem{constructor(){super(...arguments),this.onInteraction=null}}n([ImmutableProperty(()=>"popover")],TouchBarPopover.prototype,"type",void 0),n([LiveProperty(e=>e.label)],TouchBarPopover.prototype,"label",void 0),n([LiveProperty(e=>e.icon)],TouchBarPopover.prototype,"icon",void 0),n([LiveProperty(e=>e.showCloseButton)],TouchBarPopover.prototype,"showCloseButton",void 0),n([LiveProperty(e=>e.items instanceof TouchBar?e.items:new TouchBar(e.items),(e,t)=>{if(e.child)for(const t of e.child.orderedItems)t._removeParent(e);for(const r of t.orderedItems)r._addParent(e)})],TouchBarPopover.prototype,"child",void 0);class TouchBarSlider extends TouchBarItem{}n([ImmutableProperty(()=>"slider")],TouchBarSlider.prototype,"type",void 0),n([LiveProperty(e=>e.label)],TouchBarSlider.prototype,"label",void 0),n([LiveProperty(e=>e.minValue)],TouchBarSlider.prototype,"minValue",void 0),n([LiveProperty(e=>e.maxValue)],TouchBarSlider.prototype,"maxValue",void 0),n([LiveProperty(e=>e.value)],TouchBarSlider.prototype,"value",void 0),n([ImmutableProperty(({change:e},t)=>"function"==typeof e?r=>{t("value",r.value),e(r.value)}:null)],TouchBarSlider.prototype,"onInteraction",void 0);class TouchBarSpacer extends TouchBarItem{constructor(){super(...arguments),this.onInteraction=null}}n([ImmutableProperty(()=>"spacer")],TouchBarSpacer.prototype,"type",void 0),n([ImmutableProperty(e=>e.size)],TouchBarSpacer.prototype,"size",void 0);class TouchBarSegmentedControl extends TouchBarItem{}n([ImmutableProperty(()=>"segmented_control")],TouchBarSegmentedControl.prototype,"type",void 0),n([LiveProperty(e=>e.segmentStyle)],TouchBarSegmentedControl.prototype,"segmentStyle",void 0),n([LiveProperty(e=>e.segments||[])],TouchBarSegmentedControl.prototype,"segments",void 0),n([LiveProperty(e=>e.selectedIndex)],TouchBarSegmentedControl.prototype,"selectedIndex",void 0),n([LiveProperty(e=>e.mode)],TouchBarSegmentedControl.prototype,"mode",void 0),n([ImmutableProperty(({change:e},t)=>"function"==typeof e?r=>{t("selectedIndex",r.selectedIndex),e(r.selectedIndex,r.isSelected)}:null)],TouchBarSegmentedControl.prototype,"onInteraction",void 0);class TouchBarScrubber extends TouchBarItem{}n([ImmutableProperty(()=>"scrubber")],TouchBarScrubber.prototype,"type",void 0),n([LiveProperty(e=>e.items)],TouchBarScrubber.prototype,"items",void 0),n([LiveProperty(e=>e.selectedStyle||null)],TouchBarScrubber.prototype,"selectedStyle",void 0),n([LiveProperty(e=>e.overlayStyle||null)],TouchBarScrubber.prototype,"overlayStyle",void 0),n([LiveProperty(e=>e.showArrowButtons||!1)],TouchBarScrubber.prototype,"showArrowButtons",void 0),n([LiveProperty(e=>e.mode||"free")],TouchBarScrubber.prototype,"mode",void 0),n([LiveProperty(e=>void 0===e.continuous||e.continuous)],TouchBarScrubber.prototype,"continuous",void 0),n([ImmutableProperty(({select:e,highlight:t})=>"function"==typeof e||"function"==typeof t?r=>{"select"===r.type?e&&e(r.selectedIndex):t&&t(r.highlightedIndex)}:null)],TouchBarScrubber.prototype,"onInteraction",void 0);class TouchBarOtherItemsProxy extends TouchBarItem{constructor(){super(...arguments),this.onInteraction=null}}n([ImmutableProperty(()=>"other_items_proxy")],TouchBarOtherItemsProxy.prototype,"type",void 0);const l=Symbol("escape item");class TouchBar extends s.EventEmitter{constructor(e){if(super(),this.windowListeners=new Map,this.items=new Map,this.orderedItems=[],this.changeListener=e=>{this.emit("change",e.id,e.type)},this[o]=null,null==e)throw new Error("Must specify options object as first argument");let{items:t,escapeItem:r}=e;Array.isArray(t)||(t=[]),this.escapeItem=r||null;const registerItem=e=>{this.items.set(e.id,e),e.on("change",this.changeListener),e.child instanceof TouchBar&&e.child.orderedItems.forEach(registerItem)};let n=!1;const s=new Set;t.forEach(e=>{if(!(e instanceof TouchBarItem))throw new Error("Each item must be an instance of TouchBarItem");if("other_items_proxy"===e.type){if(n)throw new Error("Must only have one OtherItemsProxy per TouchBar");n=!0}if(s.has(e.id))throw new Error("Cannot add a single instance of TouchBarItem multiple times in a TouchBar");s.add(e.id)});for(const e of t)this.orderedItems.push(e),registerItem(e)}static _setOnWindow(e,t){null!=t._touchBar&&t._touchBar._removeFromWindow(t),e?(Array.isArray(e)&&(e=new TouchBar({items:e})),e._addToWindow(t)):t._setTouchBarItems([])}set escapeItem(e){if(null!=e&&!(e instanceof TouchBarItem))throw new Error("Escape item must be an instance of TouchBarItem");const t=this.escapeItem;t&&t.removeListener("change",this.changeListener),this[l]=e,null!=this.escapeItem&&this.escapeItem.on("change",this.changeListener),this.emit("escape-item-change",e)}get escapeItem(){return this[l]}_addToWindow(e){const{id:t}=e;if(this.windowListeners.has(t))return;e._touchBar=this;const changeListener=t=>{e._refreshTouchBarItem(t)};this.on("change",changeListener);const escapeItemListener=t=>{e._setEscapeTouchBarItem(null!=t?t:{})};this.on("escape-item-change",escapeItemListener);const interactionListener=(e,t,r)=>{let o=this.items.get(t);null==o&&null!=this.escapeItem&&this.escapeItem.id===t&&(o=this.escapeItem),null!=o&&null!=o.onInteraction&&o.onInteraction(r)};e.on("-touch-bar-interaction",interactionListener);const removeListeners=()=>{this.removeListener("change",changeListener),this.removeListener("escape-item-change",escapeItemListener),e.removeListener("-touch-bar-interaction",interactionListener),e.removeListener("closed",removeListeners),e._touchBar=null,this.windowListeners.delete(t);const unregisterItems=e=>{for(const t of e)t.removeListener("change",this.changeListener),t.child instanceof TouchBar&&unregisterItems(t.child.orderedItems)};unregisterItems(this.orderedItems),this.escapeItem&&this.escapeItem.removeListener("change",this.changeListener)};e.once("closed",removeListeners),this.windowListeners.set(t,removeListeners),e._setTouchBarItems(this.orderedItems),escapeItemListener(this.escapeItem)}_removeFromWindow(e){const t=this.windowListeners.get(e.id);null!=t&&t()}}o=l,TouchBar.TouchBarButton=TouchBarButton,TouchBar.TouchBarColorPicker=TouchBarColorPicker,TouchBar.TouchBarGroup=TouchBarGroup,TouchBar.TouchBarLabel=TouchBarLabel,TouchBar.TouchBarPopover=TouchBarPopover,TouchBar.TouchBarSlider=TouchBarSlider,TouchBar.TouchBarSpacer=TouchBarSpacer,TouchBar.TouchBarSegmentedControl=TouchBarSegmentedControl,TouchBar.TouchBarScrubber=TouchBarScrubber,TouchBar.TouchBarOtherItemsProxy=TouchBarOtherItemsProxy,t.default=TouchBar},"./lib/browser/api/tray.ts": /*!*********************************!*\ !*** ./lib/browser/api/tray.ts ***! \*********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{Tray:o}=process._linkedBinding("electron_browser_tray");t.default=o},"./lib/browser/api/view.ts": /*!*********************************!*\ !*** ./lib/browser/api/view.ts ***! \*********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{View:o}=process._linkedBinding("electron_browser_view");t.default=o},"./lib/browser/api/views/image-view.ts": /*!*********************************************!*\ !*** ./lib/browser/api/views/image-view.ts ***! \*********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),{ImageView:n}=process._linkedBinding("electron_browser_image_view");Object.setPrototypeOf(n.prototype,o.View.prototype),t.default=n},"./lib/browser/api/web-contents-view.ts": /*!**********************************************!*\ !*** ./lib/browser/api/web-contents-view.ts ***! \**********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),{WebContentsView:n}=process._linkedBinding("electron_browser_web_contents_view");Object.setPrototypeOf(n.prototype,o.View.prototype),t.default=n},"./lib/browser/api/web-contents.ts": /*!*****************************************!*\ !*** ./lib/browser/api/web-contents.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.getAllWebContents=t.getFocusedWebContents=t.fromDevToolsTargetId=t.fromId=t.create=void 0;const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! url */"url"),s=r(/*! path */"path"),i=r(/*! @electron/internal/browser/guest-window-manager */"./lib/browser/guest-window-manager.ts"),a=r(/*! @electron/internal/browser/parse-features-string */"./lib/browser/parse-features-string.ts"),l=r(/*! @electron/internal/browser/ipc-main-internal */"./lib/browser/ipc-main-internal.ts"),c=r(/*! @electron/internal/browser/ipc-main-internal-utils */"./lib/browser/ipc-main-internal-utils.ts"),u=r(/*! @electron/internal/browser/message-port-main */"./lib/browser/message-port-main.ts"),d=r(/*! @electron/internal/browser/ipc-main-impl */"./lib/browser/ipc-main-impl.ts");o.session;const p=process._linkedBinding("electron_browser_web_frame_main");let h=0;const f={A5:{custom_display_name:"A5",height_microns:21e4,name:"ISO_A5",width_microns:148e3},A4:{custom_display_name:"A4",height_microns:297e3,name:"ISO_A4",is_default:"true",width_microns:21e4},A3:{custom_display_name:"A3",height_microns:42e4,name:"ISO_A3",width_microns:297e3},Legal:{custom_display_name:"Legal",height_microns:355600,name:"NA_LEGAL",width_microns:215900},Letter:{custom_display_name:"Letter",height_microns:279400,name:"NA_LETTER",width_microns:215900},Tabloid:{height_microns:431800,name:"NA_LEDGER",width_microns:279400,custom_display_name:"Tabloid"}},m={letter:{width:8.5,height:11},legal:{width:8.5,height:14},tabloid:{width:11,height:17},ledger:{width:17,height:11},a0:{width:33.1,height:46.8},a1:{width:23.4,height:33.1},a2:{width:16.54,height:23.4},a3:{width:11.7,height:16.54},a4:{width:8.27,height:11.7},a5:{width:5.83,height:8.27},a6:{width:4.13,height:5.83}},b=process._linkedBinding("electron_browser_web_contents"),w=process._linkedBinding("electron_browser_printing"),{WebContents:g}=b;g.prototype.postMessage=function(...e){return this.mainFrame.postMessage(...e)},g.prototype.send=function(e,...t){return this.mainFrame.send(e,...t)},g.prototype._sendInternal=function(e,...t){return this.mainFrame._sendInternal(e,...t)},g.prototype.sendToFrame=function(e,t,...r){const n=function getWebFrame(e,t){if("number"==typeof t)return o.webFrameMain.fromId(e.mainFrame.processId,t);if(Array.isArray(t)&&2===t.length&&t.every(e=>"number"==typeof e))return o.webFrameMain.fromId(t[0],t[1]);throw new Error("Missing required frame argument (must be number or [processId, frameId])")}(this,e);return!!n&&(n.send(t,...r),!0)};const y=["insertCSS","insertText","removeInsertedCSS","setVisualZoomLevelLimits"];for(const e of y)g.prototype[e]=function(...t){return c.invokeInWebContents(this,"RENDERER_WEB_FRAME_METHOD",e,...t)};const waitTillCanExecuteJavaScript=async t=>{if(!t.getURL()||t.isLoadingMainFrame())return new e(e=>{t.once("did-stop-loading",()=>{e()})})};let _;g.prototype.executeJavaScript=async function(e,t){return await waitTillCanExecuteJavaScript(this),c.invokeInWebContents(this,"RENDERER_WEB_FRAME_METHOD","executeJavaScript",String(e),!!t)},g.prototype.executeJavaScriptInIsolatedWorld=async function(e,t,r){return await waitTillCanExecuteJavaScript(this),c.invokeInWebContents(this,"RENDERER_WEB_FRAME_METHOD","executeJavaScriptInIsolatedWorld",e,t,!!r)},g.prototype.printToPDF=async function(t){const r={requestID:++h,landscape:!1,displayHeaderFooter:!1,headerTemplate:"",footerTemplate:"",printBackground:!1,scale:1,paperWidth:8.5,paperHeight:11,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,pageRanges:"",preferCSSPageSize:!1};if(void 0!==t.landscape){if("boolean"!=typeof t.landscape)return e.reject(new Error("landscape must be a Boolean"));r.landscape=t.landscape}if(void 0!==t.displayHeaderFooter){if("boolean"!=typeof t.displayHeaderFooter)return e.reject(new Error("displayHeaderFooter must be a Boolean"));r.displayHeaderFooter=t.displayHeaderFooter}if(void 0!==t.printBackground){if("boolean"!=typeof t.printBackground)return e.reject(new Error("printBackground must be a Boolean"));r.shouldPrintBackgrounds=t.printBackground}if(void 0!==t.scale){if("number"!=typeof t.scale)return e.reject(new Error("scale must be a Number"));r.scaleFactor=t.scale}const{pageSize:o}=t;if(void 0!==o)if("string"==typeof o){const t=m[o.toLowerCase()];if(!t)return e.reject(new Error("Invalid pageSize "+o));r.paperWidth=t.width,r.paperHeight=t.height}else{if("object"!=typeof t.pageSize)return e.reject(new Error("pageSize must be a String or Object"));if(!o.height||!o.width)return e.reject(new Error("height and width properties are required for pageSize"));r.paperWidth=o.width,r.paperHeight=o.height}const{margins:n}=t;if(void 0!==n){if("object"!=typeof n)return e.reject(new Error("margins must be an Object"));if(void 0!==n.top){if("number"!=typeof n.top)return e.reject(new Error("margins.top must be a Number"));r.marginTop=n.top}if(void 0!==n.bottom){if("number"!=typeof n.bottom)return e.reject(new Error("margins.bottom must be a Number"));r.marginBottom=n.bottom}if(void 0!==n.left){if("number"!=typeof n.left)return e.reject(new Error("margins.left must be a Number"));r.marginLeft=n.left}if(void 0!==n.right){if("number"!=typeof n.right)return e.reject(new Error("margins.right must be a Number"));r.marginRight=n.right}}if(void 0!==t.pageRanges){if("string"!=typeof t.pageRanges)return e.reject(new Error("printBackground must be a String"));r.pageRanges=t.pageRanges}if(void 0!==t.headerTemplate){if("string"!=typeof t.headerTemplate)return e.reject(new Error("headerTemplate must be a String"));r.headerTemplate=t.headerTemplate}if(void 0!==t.footerTemplate){if("string"!=typeof t.footerTemplate)return e.reject(new Error("footerTemplate must be a String"));r.footerTemplate=t.footerTemplate}if(void 0!==t.preferCSSPageSize){if("boolean"!=typeof t.preferCSSPageSize)return e.reject(new Error("footerTemplate must be a String"));r.preferCSSPageSize=t.preferCSSPageSize}if(this._printToPDF)return _=_?_.then(()=>this._printToPDF(r)):this._printToPDF(r),_;{const t=new Error("Printing feature is disabled");return e.reject(t)}},g.prototype.print=function(e={},t){if("object"==typeof e&&void 0!==e.pageSize){const t=e.pageSize;if("object"==typeof t){if(!t.height||!t.width)throw new Error("height and width properties are required for pageSize");const r=Math.ceil(t.height),o=Math.ceil(t.width);if(!((e,t)=>[e,t].every(e=>e>352))(o,r))throw new Error("height and width properties must be minimum 352 microns.");e.mediaSize={name:"CUSTOM",custom_display_name:"Custom",height_microns:r,width_microns:o}}else{if(!f[t])throw new Error("Unsupported pageSize: "+t);e.mediaSize=f[t]}}this._print?t?this._print(e,t):this._print(e):console.error("Error: Printing feature is disabled.")},g.prototype.getPrinters=function(){return w.getPrinterList?w.getPrinterList():(console.error("Error: Printing feature is disabled."),[])},g.prototype.getPrintersAsync=async function(){return w.getPrinterListAsync?w.getPrinterListAsync():(console.error("Error: Printing feature is disabled."),[])},g.prototype.loadFile=function(e,t={}){if("string"!=typeof e)throw new Error("Must pass filePath as a string");const{query:r,search:i,hash:a}=t;return this.loadURL(n.format({protocol:"file",slashes:!0,pathname:s.resolve(o.app.getAppPath(),e),query:r,search:i,hash:a}))},g.prototype.loadURL=function(t,r){r||(r={});const o=new e((e,r)=>{const rejectAndCleanup=(e,t,o)=>{const n=new Error(`${t} (${e}) loading '${"string"==typeof o?o.substr(0,2048):o}'`);Object.assign(n,{errno:e,code:t,url:o}),removeListeners(),r(n)},finishListener=()=>{removeListeners(),e()},failListener=(e,t,r,o,n)=>{n&&rejectAndCleanup(t,r,o)};let o=!1;const navigationListener=(e,t,r,n)=>{if(n){if(o&&!r)return rejectAndCleanup(-3,"ERR_ABORTED",t);o=!0}},stopLoadingListener=()=>{rejectAndCleanup(-2,"ERR_FAILED",t)},removeListeners=()=>{this.removeListener("did-finish-load",finishListener),this.removeListener("did-fail-load",failListener),this.removeListener("did-start-navigation",navigationListener),this.removeListener("did-stop-loading",stopLoadingListener),this.removeListener("destroyed",stopLoadingListener)};this.on("did-finish-load",finishListener),this.on("did-fail-load",failListener),this.on("did-start-navigation",navigationListener),this.on("did-stop-loading",stopLoadingListener),this.on("destroyed",stopLoadingListener)});return o.catch(()=>{}),this._loadURL(t,r),this.emit("load-url",t,r),o},g.prototype.setWindowOpenHandler=function(e){this._windowOpenHandler=e},g.prototype._callWindowOpenHandler=function(e,t){const r={browserWindowConstructorOptions:null,outlivesOpener:!1};if(!this._windowOpenHandler)return r;const o=this._windowOpenHandler(t);return"object"!=typeof o?(e.preventDefault(),console.error(`The window open handler response must be an object, but was instead of type '${typeof o}'.`),r):null===o?(e.preventDefault(),console.error("The window open handler response must be an object, but was instead null."),r):"deny"===o.action?(e.preventDefault(),r):"allow"===o.action?"object"==typeof o.overrideBrowserWindowOptions&&null!==o.overrideBrowserWindowOptions?{browserWindowConstructorOptions:o.overrideBrowserWindowOptions,outlivesOpener:"boolean"==typeof o.outlivesOpener&&o.outlivesOpener}:{browserWindowConstructorOptions:{},outlivesOpener:"boolean"==typeof o.outlivesOpener&&o.outlivesOpener}:(e.preventDefault(),console.error("The window open handler response must be an object with an 'action' property of 'allow' or 'deny'."),r)};const addReplyToEvent=e=>{const{processId:t,frameId:r}=e;e.reply=(o,...n)=>{e.sender.sendToFrame([t,r],o,...n)}},addSenderFrameToEvent=e=>{const{processId:t,frameId:r}=e;Object.defineProperty(e,"senderFrame",{get:()=>o.webFrameMain.fromId(t,r)})},getWebFrameForEvent=e=>e.processId&&e.frameId?p.fromIdOrNull(e.processId,e.frameId):null,v=process._linkedBinding("electron_common_command_line"),S=process._linkedBinding("electron_common_environment");g.prototype._init=function(){const e=this.getLastWebPreferences()||{};e.nodeIntegration||null==e.preload||null!=e.sandbox||o.deprecate.log("The default sandbox option for windows without nodeIntegration is changing. Presently, by default, when a window has a preload script, it defaults to being unsandboxed. In Electron 20, this default will be changing, and all windows that have nodeIntegration: false (which is the default) will be sandboxed by default. If your preload script doesn't use Node, no action is needed. If your preload script does use Node, either refactor it to move Node usage to the main process, or specify sandbox: false in your WebPreferences.");const t=this.id;Object.defineProperty(this,"id",{value:t,writable:!1}),this._windowOpenHandler=null;const r=new d.IpcMainImpl;if(Object.defineProperty(this,"ipc",{get:()=>r,enumerable:!0}),this.on("-ipc-message",(function(e,t,n,s){if(addSenderFrameToEvent(e),t)l.ipcMainInternal.emit(n,e,...s);else{addReplyToEvent(e),this.emit("ipc-message",e,n,...s);const t=getWebFrameForEvent(e);t&&t.ipc.emit(n,e,...s),r.emit(n,e,...s),o.ipcMain.emit(n,e,...s)}})),this.on("-ipc-invoke",(function(e,t,n,s){addSenderFrameToEvent(e),e._reply=t=>e.sendReply({result:t}),e._throw=t=>{console.error(`Error occurred in handler for '${n}':`,t),e.sendReply({error:t.toString()})};const i=getWebFrameForEvent(e),a=(t?[l.ipcMainInternal]:[i&&i.ipc,r,o.ipcMain]).find(e=>e&&e._invokeHandlers.has(n));a?a._invokeHandlers.get(n)(e,...s):e._throw(`No handler registered for '${n}'`)})),this.on("-ipc-message-sync",(function(e,t,n,s){if(addSenderFrameToEvent(e),(e=>{Object.defineProperty(e,"returnValue",{set:t=>e.sendReply(t),get:()=>{}})})(e),t)l.ipcMainInternal.emit(n,e,...s);else{addReplyToEvent(e);const t=getWebFrameForEvent(e);0!==this.listenerCount("ipc-message-sync")||0!==r.listenerCount(n)||0!==o.ipcMain.listenerCount(n)||t&&0!==t.ipc.listenerCount(n)||console.warn(`WebContents #${this.id} called ipcRenderer.sendSync() with '${n}' channel without listeners.`),this.emit("ipc-message-sync",e,n,...s),t&&t.ipc.emit(n,e,...s),r.emit(n,e,...s),o.ipcMain.emit(n,e,...s)}})),this.on("-ipc-ports",(function(e,t,n,s,i){addSenderFrameToEvent(e),e.ports=i.map(e=>new u.MessagePortMain(e));const a=getWebFrameForEvent(e);a&&a.ipc.emit(n,e,s),r.emit(n,e,s),o.ipcMain.emit(n,e,s)})),this.on("crashed",(e,...t)=>{o.app.emit("renderer-process-crashed",e,this,...t)}),this.on("render-process-gone",(e,t)=>{o.app.emit("render-process-gone",e,this,t),(S.hasVar("ELECTRON_ENABLE_LOGGING")||v.hasSwitch("enable-logging"))&&console.info(`Renderer process ${t.reason} - see https://www.electronjs.org/docs/tutorial/application-debugging for potential debugging information.`)}),this.on("devtools-reload-page",(function(){this.reload()})),"remote"!==this.getType()){this.on("-new-window",(e,t,r,o,n,s,a)=>{const l={url:t,frameName:r,features:n,referrer:s,postBody:a?{data:a,...(0,i.parseContentTypeFormat)(a)}:void 0,disposition:o};let c;try{c=this._callWindowOpenHandler(e,l)}catch(t){throw e.preventDefault(),t}const u=c.browserWindowConstructorOptions;e.defaultPrevented||(0,i.openGuestWindow)({event:e,embedder:e.sender,disposition:o,referrer:s,postData:a,overrideBrowserWindowOptions:u||{},windowOpenArgs:l,outlivesOpener:c.outlivesOpener})});let e=null,t=!1;this.on("-will-add-new-contents",(r,o,n,s,l,c,u)=>{const d={url:o,frameName:n,features:s,disposition:l,referrer:c,postBody:u?{data:u,...(0,i.parseContentTypeFormat)(u)}:void 0};let p;try{p=this._callWindowOpenHandler(r,d)}catch(e){throw r.preventDefault(),e}if(t=p.outlivesOpener,e=p.browserWindowConstructorOptions,!r.defaultPrevented){const t=e?{backgroundColor:e.backgroundColor,transparent:e.transparent,...e.webPreferences}:void 0,{webPreferences:o}=(0,a.parseFeatures)(s),n=(0,i.makeWebPreferences)({embedder:r.sender,insecureParsedWebPreferences:o,secureOverrideWebPreferences:t});this._setNextChildWebPreferences(n)}}),this.on("-add-new-contents",(r,o,n,s,a,l,c,u,d,p,h,f,m)=>{const b=e||void 0,w=t;e=null,t=!1,"foreground-tab"===n||"new-window"===n||"background-tab"===n?(0,i.openGuestWindow)({event:r,embedder:r.sender,guest:o,overrideBrowserWindowOptions:b,disposition:n,referrer:h,postData:m,windowOpenArgs:{url:d,frameName:p,features:f},outlivesOpener:w}):r.preventDefault()})}this.on("login",(e,...t)=>{o.app.emit("login",e,this,...t)}),this.on("ready-to-show",()=>{const e=this.getOwnerBrowserWindow();e&&!e.isDestroyed()&&process.nextTick(()=>{e.emit("ready-to-show")})}),this.on("select-bluetooth-device",(e,t,r)=>{1===this.listenerCount("select-bluetooth-device")&&(e.preventDefault(),r(""))});const n=process._linkedBinding("electron_browser_event").createEmpty();o.app.emit("web-contents-created",n,this),Object.defineProperty(this,"audioMuted",{get:()=>this.isAudioMuted(),set:e=>this.setAudioMuted(e)}),Object.defineProperty(this,"userAgent",{get:()=>this.getUserAgent(),set:e=>this.setUserAgent(e)}),Object.defineProperty(this,"zoomLevel",{get:()=>this.getZoomLevel(),set:e=>this.setZoomLevel(e)}),Object.defineProperty(this,"zoomFactor",{get:()=>this.getZoomFactor(),set:e=>this.setZoomFactor(e)}),Object.defineProperty(this,"frameRate",{get:()=>this.getFrameRate(),set:e=>this.setFrameRate(e)}),Object.defineProperty(this,"backgroundThrottling",{get:()=>this.getBackgroundThrottling(),set:e=>this.setBackgroundThrottling(e)})},t.create=function create(e={}){return new g(e)},t.fromId=function fromId(e){return b.fromId(e)},t.fromDevToolsTargetId=function fromDevToolsTargetId(e){return b.fromDevToolsTargetId(e)},t.getFocusedWebContents=function getFocusedWebContents(){let e=null;for(const t of b.getAllWebContents())if(t.isFocused()&&(null==e&&(e=t),"webview"===t.getType()))return t;return e},t.getAllWebContents=function getAllWebContents(){return b.getAllWebContents()}}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/api/web-frame-main.ts": /*!*******************************************!*\ !*** ./lib/browser/api/web-frame-main.ts ***! \*******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! @electron/internal/browser/message-port-main */"./lib/browser/message-port-main.ts"),n=r(/*! @electron/internal/browser/ipc-main-impl */"./lib/browser/ipc-main-impl.ts"),{WebFrameMain:s,fromId:i}=process._linkedBinding("electron_browser_web_frame_main");Object.defineProperty(s.prototype,"ipc",{get(){const e=new n.IpcMainImpl;return Object.defineProperty(this,"ipc",{value:e}),e}}),s.prototype.send=function(e,...t){if("string"!=typeof e)throw new Error("Missing required channel argument");try{return this._send(!1,e,t)}catch(e){console.error("Error sending from webFrameMain: ",e)}},s.prototype._sendInternal=function(e,...t){if("string"!=typeof e)throw new Error("Missing required channel argument");try{return this._send(!0,e,t)}catch(e){console.error("Error sending from webFrameMain: ",e)}},s.prototype.postMessage=function(...e){Array.isArray(e[2])&&(e[2]=e[2].map(e=>e instanceof o.MessagePortMain?e._internalPort:e)),this._postMessage(...e)},t.default={fromId:i}},"./lib/browser/default-menu.ts": /*!*************************************!*\ !*** ./lib/browser/default-menu.ts ***! \*************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultApplicationMenu=t.setApplicationMenuWasSet=void 0;const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! electron/common */"./lib/browser/api/exports/electron.ts"),s="darwin"===process.platform;let i=!1;t.setApplicationMenuWasSet=()=>{i=!0};t.setDefaultApplicationMenu=()=>{if(i)return;const e={role:"help",submenu:o.app.isPackaged?[]:[{label:"Learn More",click:async()=>{await n.shell.openExternal("https://electronjs.org")}},{label:"Documentation",click:async()=>{const e=process.versions.electron;await n.shell.openExternal(`https://github.com/electron/electron/tree/v${e}/docs#readme`)}},{label:"Community Discussions",click:async()=>{await n.shell.openExternal("https://discord.gg/electronjs")}},{label:"Search Issues",click:async()=>{await n.shell.openExternal("https://github.com/electron/electron/issues")}}]},t=[...s?[{role:"appMenu"}]:[],{role:"fileMenu"},{role:"editMenu"},{role:"viewMenu"},{role:"windowMenu"},e],r=o.Menu.buildFromTemplate(t);o.Menu.setApplicationMenu(r)}},"./lib/browser/devtools.ts": /*!*********************************!*\ !*** ./lib/browser/devtools.ts ***! \*********************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! fs */"fs"),s=r(/*! url */"url"),i=r(/*! @electron/internal/browser/ipc-main-internal */"./lib/browser/ipc-main-internal.ts"),a=r(/*! @electron/internal/browser/ipc-main-internal-utils */"./lib/browser/ipc-main-internal-utils.ts"),convertToMenuTemplate=function(e,t){return e.map((function(e){const r="subMenu"===e.type?{type:"submenu",label:e.label,enabled:e.enabled,submenu:convertToMenuTemplate(e.subItems,t)}:"separator"===e.type?{type:"separator"}:"checkbox"===e.type?{type:"checkbox",label:e.label,enabled:e.enabled,checked:e.checked}:{type:"normal",label:e.label,enabled:e.enabled};return null!=e.id&&(r.click=()=>t(e.id)),r}))},assertChromeDevTools=function(e,t){const r=e.getURL();if(!function(e){const{protocol:t}=s.parse(e);return"devtools:"===t}(r))throw console.error(`Blocked ${r} from calling ${t}`),new Error("Blocked "+t)};i.ipcMainInternal.handle("INSPECTOR_CONTEXT_MENU",(function(t,r,n){return new e(e=>{assertChromeDevTools(t.sender,"window.InspectorFrontendHost.showContextMenuAtPoint()");const s=n?[{role:"undo"},{role:"redo"},{type:"separator"},{role:"cut"},{role:"copy"},{role:"paste"},{role:"pasteAndMatchStyle"},{role:"delete"},{role:"selectAll"}]:convertToMenuTemplate(r,e),i=o.Menu.buildFromTemplate(s),a=t.sender.getOwnerBrowserWindow();i.popup({window:a,callback:()=>e()})})})),i.ipcMainInternal.handle("INSPECTOR_SELECT_FILE",(async function(e){assertChromeDevTools(e.sender,"window.UI.createFileSelectorElement()");const t=await o.dialog.showOpenDialog({});if(t.canceled)return[];const r=t.filePaths[0];return[r,await n.promises.readFile(r)]})),a.handleSync("INSPECTOR_CONFIRM",(async function(e,t="",r=""){assertChromeDevTools(e.sender,"window.confirm()");const n={message:String(t),title:String(r),buttons:["OK","Cancel"],cancelId:1},s=e.sender.getOwnerBrowserWindow(),{response:i}=await o.dialog.showMessageBox(s,n);return 0===i}))}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/guest-view-manager.ts": /*!*******************************************!*\ !*** ./lib/browser/guest-view-manager.ts ***! \*******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! @electron/internal/browser/ipc-main-internal */"./lib/browser/ipc-main-internal.ts"),s=r(/*! @electron/internal/browser/ipc-main-internal-utils */"./lib/browser/ipc-main-internal-utils.ts"),i=r(/*! @electron/internal/browser/parse-features-string */"./lib/browser/parse-features-string.ts"),a=r(/*! @electron/internal/common/web-view-methods */"./lib/common/web-view-methods.ts"),l=r(/*! @electron/internal/browser/web-view-events */"./lib/browser/web-view-events.ts"),c=process._linkedBinding("electron_browser_web_view_manager"),u=process._linkedBinding("electron_browser_event"),d=process._linkedBinding("electron_browser_net"),p=Object.keys(l.webViewEvents),h=new Map,f=new Map;function sanitizeOptionsForGuest(e){const t={...e};return delete t.webContents,t}const createGuest=function(e,t,r,n){const s=function makeWebPreferences(e,t){const r="string"==typeof t.webpreferences?(0,i.parseWebViewWebPreferences)(t.webpreferences):null,o={nodeIntegration:null!=t.nodeintegration&&t.nodeintegration,nodeIntegrationInSubFrames:null!=t.nodeintegrationinsubframes&&t.nodeintegrationinsubframes,plugins:t.plugins,zoomFactor:e.zoomFactor,disablePopups:!t.allowpopups,webSecurity:!t.disablewebsecurity,enableBlinkFeatures:t.blinkfeatures,disableBlinkFeatures:t.disableblinkfeatures,partition:t.partition,...r};t.preload&&(o.preload=d.fileURLToFilePath(t.preload));const n=new Map([["contextIsolation",!0],["javascript",!1],["nodeIntegration",!1],["sandbox",!0],["nodeIntegrationInSubFrames",!1],["enableWebSQL",!1]]),s=e.getLastWebPreferences();for(const[e,t]of n)s[e]===t&&(o[e]=t);return o}(e,n),a=u.createWithSender(e),{instanceId:m}=n;if(e.emit("will-attach-webview",a,s,n),a.defaultPrevented)return-1;const b=o.webContents.create({...s,type:"webview",embedder:e}),w=b.id;h.set(w,{elementInstanceId:r,guest:b,embedder:e}),b.once("destroyed",()=>{h.has(w)&&detachGuest(e,w)}),b.once("did-attach",(function(t){const r=null!=this.viewInstanceId;this.viewInstanceId=m,r||(n.src&&this.loadURL(n.src,function makeLoadURLOptions(e){const t={};return e.httpreferrer&&(t.httpReferrer=e.httpreferrer),e.useragent&&(t.userAgent=e.useragent),t}(n)),e.emit("did-attach-webview",t,b))}));const sendToEmbedder=(t,...r)=>{e.isDestroyed()||e._sendInternal(`${t}-${b.viewInstanceId}`,...r)},makeProps=(e,t)=>{const r={};return l.webViewEvents[e].forEach((e,o)=>{r[e]=t[o]}),r};for(const e of p)b.on(e,(function(t,...r){sendToEmbedder("GUEST_VIEW_INTERNAL_DISPATCH_EVENT",e,makeProps(e,r))}));b.on("new-window",(function(e,t,r,o,n){sendToEmbedder("GUEST_VIEW_INTERNAL_DISPATCH_EVENT","new-window",{url:t,frameName:r,disposition:o,options:sanitizeOptionsForGuest(n)})})),b.on("ipc-message-host",(function(e,t,r){sendToEmbedder("GUEST_VIEW_INTERNAL_DISPATCH_EVENT","ipc-message",{frameId:[e.processId,e.frameId],channel:t,args:r})})),b.on("dom-ready",(function(){const e=h.get(w);null!=e&&null!=e.visibilityState&&b._sendInternal("GUEST_INSTANCE_VISIBILITY_CHANGE",e.visibilityState)}));const g=`${e.id}-${r}`,y=f.get(g);if(null!=y){const e=h.get(y);e&&e.guest.detachFromOuterFrame()}return f.set(g,w),b.setEmbedder(e),watchEmbedder(e),c.addGuest(w,e,b,s),b.attachToIframe(e,t),w},detachGuest=function(e,t){const r=h.get(t);if(!r)return;if(e!==r.embedder)return;c.removeGuest(e,t),h.delete(t);const o=`${e.id}-${r.elementInstanceId}`;f.delete(o)},m=new Set,watchEmbedder=function(e){if(m.has(e))return;m.add(e);const onVisibilityChange=function(t){for(const r of h.values())r.visibilityState=t,r.embedder===e&&r.guest._sendInternal("GUEST_INSTANCE_VISIBILITY_CHANGE",t)};e.on("-window-visibility-change",onVisibilityChange),e.once("will-destroy",()=>{for(const[t,r]of h)r.embedder===e&&detachGuest(e,t);e.removeListener("-window-visibility-change",onVisibilityChange),m.delete(e)})},b=new WeakMap,makeSafeHandler=function(e,t){return(r,...o)=>{if(function(e){if(!b.has(e)){const t=e.getLastWebPreferences()||{};b.set(e,!!t.webviewTag)}return b.get(e)}(r.sender))return t(r,...o);throw console.error(` IPC message ${e} sent by WebContents with disabled (${r.sender.id})`),new Error(" disabled")}},handleMessage=function(e,t){n.ipcMainInternal.handle(e,makeSafeHandler(e,t))},handleMessageSync=function(e,t){s.handleSync(e,makeSafeHandler(e,t))};handleMessage("GUEST_VIEW_MANAGER_CREATE_AND_ATTACH_GUEST",(function(e,t,r,o){return createGuest(e.sender,t,r,o)})),handleMessageSync("GUEST_VIEW_MANAGER_DETACH_GUEST",(function(e,t){return detachGuest(e.sender,t)})),n.ipcMainInternal.on("GUEST_VIEW_MANAGER_FOCUS_CHANGE",(function(e,t){e.sender.emit("-focus-change",{},t)})),handleMessage("GUEST_VIEW_MANAGER_CALL",(function(e,t,r,o){const n=getGuestForWebContents(t,e.sender);if(!a.asyncMethods.has(r))throw new Error("Invalid method: "+r);return n[r](...o)})),handleMessageSync("GUEST_VIEW_MANAGER_CALL",(function(e,t,r,o){const n=getGuestForWebContents(t,e.sender);if(!a.syncMethods.has(r))throw new Error("Invalid method: "+r);return n[r](...o)})),handleMessageSync("GUEST_VIEW_MANAGER_PROPERTY_GET",(function(e,t,r){const o=getGuestForWebContents(t,e.sender);if(!a.properties.has(r))throw new Error("Invalid property: "+r);return o[r]})),handleMessageSync("GUEST_VIEW_MANAGER_PROPERTY_SET",(function(e,t,r,o){const n=getGuestForWebContents(t,e.sender);if(!a.properties.has(r))throw new Error("Invalid property: "+r);n[r]=o}));const getGuestForWebContents=function(e,t){const r=h.get(e);if(!r)throw new Error("Invalid guestInstanceId: "+e);if(r.guest.hostWebContents!==t)throw new Error("Access denied to guestInstanceId: "+e);return r.guest}},"./lib/browser/guest-window-manager.ts": /*!*********************************************!*\ !*** ./lib/browser/guest-window-manager.ts ***! \*********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseContentTypeFormat=t.makeWebPreferences=t.openGuestWindow=void 0;const o=r(/*! electron/main */"./lib/browser/api/exports/electron.ts"),n=r(/*! @electron/internal/browser/parse-features-string */"./lib/browser/parse-features-string.ts"),s=new Map,unregisterFrameName=e=>s.delete(e);t.openGuestWindow=function openGuestWindow({event:e,embedder:r,guest:i,referrer:a,disposition:l,postData:c,overrideBrowserWindowOptions:u,windowOpenArgs:d,outlivesOpener:p}){const{url:h,frameName:f,features:m}=d,b=function makeBrowserWindowOptions({embedder:e,features:t,overrideOptions:r}){const{options:o,webPreferences:s}=(0,n.parseFeatures)(t);return{show:!0,width:800,height:600,...o,...r,webPreferences:makeWebPreferences({embedder:e,insecureParsedWebPreferences:s,secureOverrideWebPreferences:r&&r.webPreferences})}}({embedder:r,features:m,overrideOptions:u});if(function emitDeprecatedNewWindowEvent({event:e,embedder:r,guest:n,windowOpenArgs:s,browserWindowOptions:i,disposition:a,referrer:l,postData:c}){const{url:u,frameName:d}=s,p="webview"===r.getType()&&r.getLastWebPreferences().disablePopups,h=c?{data:c,...(0,t.parseContentTypeFormat)(c)}:null;r.listenerCount("new-window")>0&&o.deprecate.log("The new-window event is deprecated and will be removed. Please use contents.setWindowOpenHandler() instead.");r.emit("new-window",e,u,d,a,{...i,webContents:n},[],l,h);const{newGuest:f}=e;if(p)return!0;if(e.defaultPrevented)return f&&(n===f.webContents&&(e.defaultPrevented=!1),handleWindowLifecycleEvents({embedder:e.sender,guest:f,frameName:d,outlivesOpener:!1})),!0;return!1}({event:e,embedder:r,guest:i,browserWindowOptions:b,windowOpenArgs:d,disposition:l,postData:c,referrer:a}))return;const w=(e=>s.get(e))(f);if(w){if(!w.isDestroyed()&&!w.webContents.isDestroyed())return w.loadURL(h),w;unregisterFrameName(f)}const g=new o.BrowserWindow({webContents:i,...b});return i||g.loadURL(h,{httpReferrer:a,...c&&{postData:c,extraHeaders:formatPostDataHeaders(c)}}),handleWindowLifecycleEvents({embedder:r,frameName:f,guest:g,outlivesOpener:p}),r.emit("did-create-window",g,{url:h,frameName:f,options:b,disposition:l,referrer:a,postData:c}),g};const handleWindowLifecycleEvents=function({embedder:e,guest:t,frameName:r,outlivesOpener:o}){const closedByEmbedder=function(){t.removeListener("closed",closedByUser),t.destroy()},closedByUser=function(){e.isDestroyed()||o||e.removeListener("current-render-view-deleted",closedByEmbedder)};o||e.once("current-render-view-deleted",closedByEmbedder),t.once("closed",closedByUser),r&&(((e,t)=>{s.set(e,t)})(r,t),t.once("closed",(function(){unregisterFrameName(r)})))};const i={contextIsolation:!0,javascript:!1,nodeIntegration:!1,sandbox:!0,webviewTag:!1,nodeIntegrationInSubFrames:!1,enableWebSQL:!1};function makeWebPreferences({embedder:e,secureOverrideWebPreferences:t={},insecureParsedWebPreferences:r={}}){const o=e.getLastWebPreferences();return{...r,...Object.keys(i).reduce((e,t)=>(i[t]===o[t]&&(e[t]=o[t]),e),{}),...t}}function formatPostDataHeaders(e){if(!e)return;const{contentType:r,boundary:o}=(0,t.parseContentTypeFormat)(e);return null!=o?`content-type: ${r}; boundary=${o}`:"content-type: "+r}t.makeWebPreferences=makeWebPreferences;t.parseContentTypeFormat=function(e){if(e.length&&"rawData"===e[0].type){const t=e[0].bytes.toString(),r=/^--.*[^-\r\n]/.exec(t);if(r)return{boundary:r[0].substr(2),contentType:"multipart/form-data"}}return{contentType:"application/x-www-form-urlencoded"}}},"./lib/browser/init.ts": /*!*****************************!*\ !*** ./lib/browser/init.ts ***! \*****************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! events */"events"),n=r(/*! fs */"fs"),s=r(/*! path */"path"),i=r(/*! module */"module");process.argv.splice(1,1),r(/*! ../common/reset-search-paths */"./lib/common/reset-search-paths.ts"),r(/*! @electron/internal/common/init */"./lib/common/init.ts"),process._linkedBinding("electron_browser_event_emitter").setEventEmitterPrototype(o.EventEmitter.prototype),process.on("uncaughtException",(function(t){process.listenerCount("uncaughtException")>1||e.resolve().then(()=>r(/*! electron */"./lib/browser/api/exports/electron.ts")).then(({dialog:e})=>{const r="Uncaught Exception:\n"+(t.stack?t.stack:`${t.name}: ${t.message}`);e.showErrorBox("A JavaScript error occurred in the main process",r)})}));const{app:a}=r(/*! electron */"./lib/browser/api/exports/electron.ts");if(a.on("quit",(e,t)=>{process.emit("exit",t)}),"win32"===process.platform){const e=s.join(s.dirname(process.execPath),"..","update.exe");if(n.existsSync(e)){const t=s.dirname(s.resolve(e)),r=s.basename(t).replace(/\s/g,""),o=s.basename(process.execPath).replace(/\.exe$/i,"").replace(/\s/g,"");a.setAppUserModelId(`com.squirrel.${r}.${o}`)}}process.exit=a.exit,r(/*! @electron/internal/browser/rpc-server */"./lib/browser/rpc-server.ts"),r(/*! @electron/internal/browser/guest-view-manager */"./lib/browser/guest-view-manager.ts");let l=null,c=null;const u=process._linkedBinding("electron_common_v8_util").getHiddenValue(global,"appSearchPaths");if(process.resourcesPath)for(l of u)try{l=s.join(process.resourcesPath,l),c=i._load(s.join(l,"package.json"));break}catch{continue}if(null==c)throw process.nextTick((function(){return process.exit(1)})),new Error("Unable to find a valid app");null!=c.version&&a.setVersion(c.version),null!=c.productName?a.name=(""+c.productName).trim():null!=c.name&&(a.name=(""+c.name).trim()),null!=c.desktopName?a.setDesktopName(c.desktopName):a.setDesktopName(a.name+".desktop"),null!=c.v8Flags&&r(/*! v8 */"v8").setFlagsFromString(c.v8Flags),a.setAppPath(l),r(/*! @electron/internal/browser/devtools */"./lib/browser/devtools.ts"),r(/*! @electron/internal/browser/api/protocol */"./lib/browser/api/protocol.ts"),r(/*! @electron/internal/browser/api/web-contents */"./lib/browser/api/web-contents.ts"),r(/*! @electron/internal/browser/api/web-frame-main */"./lib/browser/api/web-frame-main.ts");const d=c.main||"index.js",p=["Pantheon","Unity:Unity7","pop:GNOME"];process.env.ORIGINAL_XDG_CURRENT_DESKTOP=process.env.XDG_CURRENT_DESKTOP,function currentPlatformSupportsAppIndicator(){if("linux"!==process.platform)return!1;const e=process.env.XDG_CURRENT_DESKTOP;return!!e&&(!!p.includes(e)||!!/ubuntu/gi.test(e))}()&&(process.env.XDG_CURRENT_DESKTOP="Unity"),a.on("window-all-closed",()=>{1===a.listenerCount("window-all-closed")&&a.quit()});const{setDefaultApplicationMenu:h}=r(/*! @electron/internal/browser/default-menu */"./lib/browser/default-menu.ts");a.once("will-finish-launching",h),l?(process._firstFileName=i._resolveFilename(s.join(l,d),null,!1),i._load(s.join(l,d),i,!0)):(console.error("Failed to locate a valid package to load (app, app.asar or default_app.asar)"),console.error("This normally means you've damaged the Electron package somehow"))}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/ipc-main-impl.ts": /*!**************************************!*\ !*** ./lib/browser/ipc-main-impl.ts ***! \**************************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.IpcMainImpl=void 0;const o=r(/*! events */"events");class IpcMainImpl extends o.EventEmitter{constructor(){super(),this._invokeHandlers=new Map,this.handle=(t,r)=>{if(this._invokeHandlers.has(t))throw new Error(`Attempted to register a second handler for '${t}'`);if("function"!=typeof r)throw new Error(`Expected handler to be a function, but found type '${typeof r}'`);this._invokeHandlers.set(t,async(t,...o)=>{try{t._reply(await e.resolve(r(t,...o)))}catch(e){t._throw(e)}})},this.handleOnce=(e,t)=>{this.handle(e,(r,...o)=>(this.removeHandler(e),t(r,...o)))},this.on("error",()=>{})}removeHandler(e){this._invokeHandlers.delete(e)}}t.IpcMainImpl=IpcMainImpl}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/ipc-main-internal-utils.ts": /*!************************************************!*\ !*** ./lib/browser/ipc-main-internal-utils.ts ***! \************************************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.invokeInWebContents=t.handleSync=void 0;const o=r(/*! @electron/internal/browser/ipc-main-internal */"./lib/browser/ipc-main-internal.ts");t.handleSync=function(e,t){o.ipcMainInternal.on(e,async(e,...r)=>{try{e.returnValue=[null,await t(e,...r)]}catch(t){e.returnValue=[t]}})};let n=0;t.invokeInWebContents=function invokeInWebContents(t,r,...s){return new e((e,i)=>{const a=++n,l=`${r}_RESPONSE_${a}`;o.ipcMainInternal.on(l,(function handler(n,s,a){n.sender===t?(o.ipcMainInternal.removeListener(l,handler),s?i(s):e(a)):console.error(`Reply to ${r} sent by unexpected WebContents (${n.sender.id})`)})),t._sendInternal(r,a,...s)})}}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/ipc-main-internal.ts": /*!******************************************!*\ !*** ./lib/browser/ipc-main-internal.ts ***! \******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ipcMainInternal=void 0;const o=r(/*! @electron/internal/browser/ipc-main-impl */"./lib/browser/ipc-main-impl.ts");t.ipcMainInternal=new o.IpcMainImpl},"./lib/browser/message-port-main.ts": /*!******************************************!*\ !*** ./lib/browser/message-port-main.ts ***! \******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePortMain=void 0;const o=r(/*! events */"events");class MessagePortMain extends o.EventEmitter{constructor(e){super(),this._internalPort=e,this._internalPort.emit=(e,t)=>{"message"===e&&(t={...t,ports:t.ports.map(e=>new MessagePortMain(e))}),this.emit(e,t)}}start(){return this._internalPort.start()}close(){return this._internalPort.close()}postMessage(...e){return Array.isArray(e[1])&&(e[1]=e[1].map(e=>e instanceof MessagePortMain?e._internalPort:e)),this._internalPort.postMessage(...e)}}t.MessagePortMain=MessagePortMain},"./lib/browser/parse-features-string.ts": /*!**********************************************!*\ !*** ./lib/browser/parse-features-string.ts ***! \**********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeatures=t.parseWebViewWebPreferences=t.parseCommaSeparatedKeyValue=void 0;const o=["top","left",...Object.keys({x:!0,y:!0,width:!0,height:!0,minWidth:!0,maxWidth:!0,minHeight:!0,maxHeight:!0,opacity:!0})];function coerce(e,t){if(o.includes(e))return parseInt(t,10);switch(t){case"true":case"1":case"yes":case void 0:return!0;case"false":case"0":case"no":return!1;default:return t}}function parseCommaSeparatedKeyValue(e){const t={};for(const r of e.split(",")){const[e,o]=r.split("=").map(e=>e.trim());e&&(t[e]=coerce(e,o))}return t}t.parseCommaSeparatedKeyValue=parseCommaSeparatedKeyValue,t.parseWebViewWebPreferences=function parseWebViewWebPreferences(e){return parseCommaSeparatedKeyValue(e)};const n=["zoomFactor","nodeIntegration","javascript","contextIsolation","webviewTag"];t.parseFeatures=function parseFeatures(e){const t=parseCommaSeparatedKeyValue(e),r={};return n.forEach(e=>{void 0!==t[e]&&(r[e]=t[e],delete t[e])}),void 0!==t.left&&(t.x=t.left),void 0!==t.top&&(t.y=t.top),{options:t,webPreferences:r}}},"./lib/browser/rpc-server.ts": /*!***********************************!*\ !*** ./lib/browser/rpc-server.ts ***! \***********************************/ /*! no static exports found */function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! electron/common */"./lib/browser/api/exports/electron.ts"),n=r(/*! fs */"fs"),s=r(/*! @electron/internal/browser/ipc-main-internal */"./lib/browser/ipc-main-internal.ts"),i=r(/*! @electron/internal/browser/ipc-main-internal-utils */"./lib/browser/ipc-main-internal-utils.ts");s.ipcMainInternal.on("BROWSER_WINDOW_CLOSE",(function(e){const t=e.sender.getOwnerBrowserWindow();t&&t.close(),e.returnValue=null})),s.ipcMainInternal.handle("BROWSER_GET_LAST_WEB_PREFERENCES",(function(e){return e.sender.getLastWebPreferences()})),s.ipcMainInternal.handle("BROWSER_GET_PROCESS_MEMORY_INFO",(function(e){return e.sender._getProcessMemoryInfo()}));const a=(()=>{switch(process.platform){case"darwin":return new Set(["readFindText","writeFindText"]);case"linux":return new Set(Object.keys(o.clipboard));default:return new Set}})();i.handleSync("BROWSER_CLIPBOARD_SYNC",(function(e,t,...r){if(!a.has(t))throw new Error("Invalid method: "+t);return o.clipboard[t](...r)}));i.handleSync("BROWSER_SANDBOX_LOAD",(async function(t){const r=t.sender._getPreloadPaths();return{preloadScripts:await e.all(r.map(e=>async function(e){let t=null,r=null;try{t=await n.promises.readFile(e,"utf8")}catch(e){r=e}return{preloadPath:e,preloadSrc:t,preloadError:r}}(e))),process:{arch:process.arch,platform:process.platform,env:{...process.env},version:process.version,versions:process.versions,execPath:process.helperExecPath}}})),i.handleSync("BROWSER_NONSANDBOX_LOAD",(function(e){return{preloadPaths:e.sender._getPreloadPaths()}})),s.ipcMainInternal.on("BROWSER_PRELOAD_ERROR",(function(e,t,r){e.sender.emit("preload-error",e,t,r)}))}).call(this,r(/*! @electron/internal/common/webpack-globals-provider */"./lib/common/webpack-globals-provider.ts").Promise)},"./lib/browser/web-view-events.ts": /*!****************************************!*\ !*** ./lib/browser/web-view-events.ts ***! \****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.webViewEvents=void 0,t.webViewEvents={"load-commit":["url","isMainFrame"],"did-attach":[],"did-finish-load":[],"did-fail-load":["errorCode","errorDescription","validatedURL","isMainFrame","frameProcessId","frameRoutingId"],"did-frame-finish-load":["isMainFrame","frameProcessId","frameRoutingId"],"did-start-loading":[],"did-stop-loading":[],"dom-ready":[],"console-message":["level","message","line","sourceId"],"context-menu":["params"],"devtools-opened":[],"devtools-closed":[],"devtools-focused":[],"will-navigate":["url"],"did-start-navigation":["url","isInPlace","isMainFrame","frameProcessId","frameRoutingId"],"did-redirect-navigation":["url","isInPlace","isMainFrame","frameProcessId","frameRoutingId"],"did-navigate":["url","httpResponseCode","httpStatusText"],"did-frame-navigate":["url","httpResponseCode","httpStatusText","isMainFrame","frameProcessId","frameRoutingId"],"did-navigate-in-page":["url","isMainFrame","frameProcessId","frameRoutingId"],"-focus-change":["focus"],close:[],crashed:[],"render-process-gone":["details"],"plugin-crashed":["name","version"],destroyed:[],"page-title-updated":["title","explicitSet"],"page-favicon-updated":["favicons"],"enter-html-full-screen":[],"leave-html-full-screen":[],"media-started-playing":[],"media-paused":[],"found-in-page":["result"],"did-change-theme-color":["themeColor"],"update-target-url":["url"]}},"./lib/common/api/clipboard.ts": /*!*************************************!*\ !*** ./lib/common/api/clipboard.ts ***! \*************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=process._linkedBinding("electron_common_clipboard");if("renderer"===process.type){const e=r(/*! @electron/internal/renderer/ipc-renderer-internal-utils */"./lib/renderer/ipc-renderer-internal-utils.ts"),makeRemoteMethod=function(t){return(...r)=>e.invokeSync("BROWSER_CLIPBOARD_SYNC",t,...r)};if("linux"===process.platform)for(const e of Object.keys(o))o[e]=makeRemoteMethod(e);else"darwin"===process.platform&&(o.readFindText=makeRemoteMethod("readFindText"),o.writeFindText=makeRemoteMethod("writeFindText"))}t.default=o},"./lib/common/api/deprecate.ts": /*!*************************************!*\ !*** ./lib/common/api/deprecate.ts ***! \*************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let o=null;function warnOnce(e,t){let r=!1;const o=t?`'${e}' is deprecated and will be removed. Please use '${t}' instead.`:`'${e}' is deprecated and will be removed.`;return()=>{r||process.noDeprecation||(r=!0,n.log(o))}}const n={warnOnce:warnOnce,setHandler:e=>{o=e},getHandler:()=>o,warn:(e,t)=>{process.noDeprecation||n.log(`'${e}' is deprecated. Use '${t}' instead.`)},log:e=>{if("function"!=typeof o){if(process.throwDeprecation)throw new Error(e);return process.traceDeprecation?console.trace(e):console.warn("(electron) "+e)}o(e)},removeFunction:(e,t)=>{if(!e)throw Error(`'${t} function' is invalid or does not exist.`);const r=warnOnce(e.name+" function");return function(){r(),e.apply(this,arguments)}},renameFunction:(e,t)=>{const r=warnOnce(e.name+" function",t+" function");return function(){return r(),e.apply(this,arguments)}},moveAPI(e,t,r){const o=warnOnce(t,r);return function(){return o(),e.apply(this,arguments)}},event:(e,t,r)=>{const o=r.startsWith("-")?warnOnce(t+" event"):warnOnce(t+" event",r+" event");return e.on(r,(function(...e){0!==this.listenerCount(t)&&(o(),this.emit(t,...e))}))},removeProperty:(e,t,r)=>{const o=Object.getOwnPropertyDescriptor(e.__proto__,t);if(!o)return n.log(`Unable to remove property '${t}' from an object that lacks it.`),e;if(!o.get||!o.set)return n.log(`Unable to remove property '${t}' from an object does not have a getter / setter`),e;const s=warnOnce(t);return Object.defineProperty(e,t,{configurable:!0,get:()=>(s(),o.get.call(e)),set:t=>(r&&!r.includes(t)||s(),o.set.call(e,t))})},renameProperty:(e,t,r)=>{const o=warnOnce(t,r);return t in e&&!(r in e)&&(o(),e[r]=e[t]),Object.defineProperty(e,t,{get:()=>(o(),e[r]),set:t=>{o(),e[r]=t}})}};t.default=n},"./lib/common/api/module-list.ts": /*!***************************************!*\ !*** ./lib/common/api/module-list.ts ***! \***************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commonModuleList=void 0,t.commonModuleList=[{name:"clipboard",loader:()=>r(/*! ./clipboard */"./lib/common/api/clipboard.ts")},{name:"nativeImage",loader:()=>r(/*! ./native-image */"./lib/common/api/native-image.ts")},{name:"shell",loader:()=>r(/*! ./shell */"./lib/common/api/shell.ts")},{name:"deprecate",loader:()=>r(/*! ./deprecate */"./lib/common/api/deprecate.ts"),private:!0}]},"./lib/common/api/native-image.ts": /*!****************************************!*\ !*** ./lib/common/api/native-image.ts ***! \****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const{nativeImage:o}=process._linkedBinding("electron_common_native_image");t.default=o},"./lib/common/api/shell.ts": /*!*********************************!*\ !*** ./lib/common/api/shell.ts ***! \*********************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=process._linkedBinding("electron_common_shell");t.default=o},"./lib/common/define-properties.ts": /*!*****************************************!*\ !*** ./lib/common/define-properties.ts ***! \*****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;const handleESModule=e=>()=>{const t=e();return t.__esModule&&t.default?t.default:t};t.defineProperties=function defineProperties(e,t){const r={};for(const e of t)r[e.name]={enumerable:!e.private,get:handleESModule(e.loader)};return Object.defineProperties(e,r)}},"./lib/common/init.ts": /*!****************************!*\ !*** ./lib/common/init.ts ***! \****************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! util */"util"),n=r(/*! timers */"timers"),wrapWithActivateUvLoop=function(e){return function wrap(e,t){const r=t(e);e[o.promisify.custom]&&(r[o.promisify.custom]=t(e[o.promisify.custom]));return r}(e,(function(e){return function(...t){return process.activateUvLoop(),e.apply(this,t)}}))};if(process.nextTick=wrapWithActivateUvLoop(process.nextTick),global.setImmediate=n.setImmediate=wrapWithActivateUvLoop(n.setImmediate),global.clearImmediate=n.clearImmediate,n.setTimeout=wrapWithActivateUvLoop(n.setTimeout),n.setInterval=wrapWithActivateUvLoop(n.setInterval),"browser"===process.type&&(global.setTimeout=n.setTimeout,global.setInterval=n.setInterval),"win32"===process.platform){const{Readable:e}=r(/*! stream */"stream"),t=new e;t.push(null),Object.defineProperty(process,"stdin",{configurable:!1,enumerable:!0,get:()=>t})}},"./lib/common/reset-search-paths.ts": /*!******************************************!*\ !*** ./lib/common/reset-search-paths.ts ***! \******************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=r(/*! path */"path"),n=r(/*! module */"module");if("renderer"===process.type){const e=n._load;n._load=function(t){return"vm"===t&&console.warn("The vm module of Node.js is deprecated in the renderer process and will be removed."),e.apply(this,arguments)}}const s=process.resourcesPath+o.sep,i=n._nodeModulePaths;n._nodeModulePaths=function(e){const t=i(e);return(o.resolve(e)+o.sep).startsWith(s)?t.filter((function(e){return e.startsWith(s)})):t};const makeElectronModule=e=>{const t=new n("electron",null);t.id="electron",t.loaded=!0,t.filename=e,Object.defineProperty(t,"exports",{get:()=>r(/*! electron */"./lib/browser/api/exports/electron.ts")}),n._cache[e]=t};makeElectronModule("electron"),makeElectronModule("electron/common"),"browser"===process.type&&makeElectronModule("electron/main"),"renderer"===process.type&&makeElectronModule("electron/renderer");const a=n._resolveFilename;n._resolveFilename=function(e,t,r,o){return"electron"===e||e.startsWith("electron/")?"electron":a(e,t,r,o)}},"./lib/common/web-view-methods.ts": /*!****************************************!*\ !*** ./lib/common/web-view-methods.ts ***! \****************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncMethods=t.properties=t.syncMethods=void 0,t.syncMethods=new Set(["getURL","getTitle","isLoading","isLoadingMainFrame","isWaitingForResponse","stop","reload","reloadIgnoringCache","canGoBack","canGoForward","canGoToOffset","clearHistory","goBack","goForward","goToIndex","goToOffset","isCrashed","setUserAgent","getUserAgent","openDevTools","closeDevTools","isDevToolsOpened","isDevToolsFocused","inspectElement","setAudioMuted","isAudioMuted","isCurrentlyAudible","undo","redo","cut","copy","paste","pasteAndMatchStyle","delete","selectAll","unselect","replace","replaceMisspelling","findInPage","stopFindInPage","downloadURL","inspectSharedWorker","inspectServiceWorker","showDefinitionForSelection","getZoomFactor","getZoomLevel","setZoomFactor","setZoomLevel"]),t.properties=new Set(["audioMuted","userAgent","zoomLevel","zoomFactor","frameRate"]),t.asyncMethods=new Set(["capturePage","loadURL","executeJavaScript","insertCSS","insertText","removeInsertedCSS","send","sendToFrame","sendInputEvent","setLayoutZoomLevelLimits","setVisualZoomLevelLimits","print","printToPDF"])},"./lib/common/webpack-globals-provider.ts": /*!************************************************!*\ !*** ./lib/common/webpack-globals-provider.ts ***! \************************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Promise=void 0,t.Promise=global.Promise},"./lib/renderer/ipc-renderer-internal-utils.ts": /*!*****************************************************!*\ !*** ./lib/renderer/ipc-renderer-internal-utils.ts ***! \*****************************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invokeSync=t.handle=void 0;const o=r(/*! @electron/internal/renderer/ipc-renderer-internal */"./lib/renderer/ipc-renderer-internal.ts");t.handle=function(e,t){o.ipcRendererInternal.on(e,async(r,o,...n)=>{const s=`${e}_RESPONSE_${o}`;try{r.sender.send(s,null,await t(r,...n))}catch(e){r.sender.send(s,e)}})},t.invokeSync=function invokeSync(e,...t){const[r,n]=o.ipcRendererInternal.sendSync(e,...t);if(r)throw r;return n}},"./lib/renderer/ipc-renderer-internal.ts": /*!***********************************************!*\ !*** ./lib/renderer/ipc-renderer-internal.ts ***! \***********************************************/ /*! no static exports found */function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ipcRendererInternal=void 0;const o=r(/*! events */"events"),{ipc:n}=process._linkedBinding("electron_renderer_ipc");t.ipcRendererInternal=new o.EventEmitter,t.ipcRendererInternal.send=function(e,...t){return n.send(!0,e,t)},t.ipcRendererInternal.sendSync=function(e,...t){return n.sendSync(!0,e,t)},t.ipcRendererInternal.invoke=async function(e,...t){const{error:r,result:o}=await n.invoke(!0,e,t);if(r)throw new Error(`Error invoking remote method '${e}': ${r}`);return o}},child_process: /*!********************************!*\ !*** external "child_process" ***! \********************************/ /*! no static exports found */function(e,t){e.exports=require("child_process")},events: /*!*************************!*\ !*** external "events" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=require("events")},fs: /*!*********************!*\ !*** external "fs" ***! \*********************/ /*! no static exports found */function(e,t){e.exports=require("fs")},module: /*!*************************!*\ !*** external "module" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=require("module")},path: /*!***********************!*\ !*** external "path" ***! \***********************/ /*! no static exports found */function(e,t){e.exports=require("path")},stream: /*!*************************!*\ !*** external "stream" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=require("stream")},timers: /*!*************************!*\ !*** external "timers" ***! \*************************/ /*! no static exports found */function(e,t){e.exports=require("timers")},url: /*!**********************!*\ !*** external "url" ***! \**********************/ /*! no static exports found */function(e,t){e.exports=require("url")},util: /*!***********************!*\ !*** external "util" ***! \***********************/ /*! no static exports found */function(e,t){e.exports=require("util")},v8: /*!*********************!*\ !*** external "v8" ***! \*********************/ /*! no static exports found */function(e,t){e.exports=require("v8")}});try{!function(e){var t={};function __webpack_require__(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,__webpack_require__),r.l=!0,r.exports}__webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,i){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(__webpack_require__.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)__webpack_require__.d(i,r,function(t){return e[t]}.bind(null,r));return i},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s="./lib/isolated_renderer/init.ts")}({"./lib/common/web-view-methods.ts": /*!****************************************!*\ !*** ./lib/common/web-view-methods.ts ***! \****************************************/ /*! no static exports found */function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asyncMethods=t.properties=t.syncMethods=void 0,t.syncMethods=new Set(["getURL","getTitle","isLoading","isLoadingMainFrame","isWaitingForResponse","stop","reload","reloadIgnoringCache","canGoBack","canGoForward","canGoToOffset","clearHistory","goBack","goForward","goToIndex","goToOffset","isCrashed","setUserAgent","getUserAgent","openDevTools","closeDevTools","isDevToolsOpened","isDevToolsFocused","inspectElement","setAudioMuted","isAudioMuted","isCurrentlyAudible","undo","redo","cut","copy","paste","pasteAndMatchStyle","delete","selectAll","unselect","replace","replaceMisspelling","findInPage","stopFindInPage","downloadURL","inspectSharedWorker","inspectServiceWorker","showDefinitionForSelection","getZoomFactor","getZoomLevel","setZoomFactor","setZoomLevel"]),t.properties=new Set(["audioMuted","userAgent","zoomLevel","zoomFactor","frameRate"]),t.asyncMethods=new Set(["capturePage","loadURL","executeJavaScript","insertCSS","insertText","removeInsertedCSS","send","sendToFrame","sendInputEvent","setLayoutZoomLevelLimits","setVisualZoomLevelLimits","print","printToPDF"])},"./lib/isolated_renderer/init.ts": /*!***************************************!*\ !*** ./lib/isolated_renderer/init.ts ***! \***************************************/ /*! no static exports found */function(e,t,i){"use strict";if(Object.defineProperty(t,"__esModule",{value:!0}),isolatedApi.guestViewInternal){const{setupWebView:e}=i(/*! @electron/internal/renderer/web-view/web-view-element */"./lib/renderer/web-view/web-view-element.ts");e(isolatedApi)}},"./lib/renderer/web-view/web-view-attributes.ts": /*!******************************************************!*\ !*** ./lib/renderer/web-view/web-view-attributes.ts ***! \******************************************************/ /*! no static exports found */function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWebViewAttributes=t.SrcAttribute=t.PartitionAttribute=t.WebViewAttribute=void 0;const resolveURL=function(e){return e?new URL(e,location.href).href:""};class WebViewAttribute{constructor(e,t){this.name=e,this.webViewImpl=t,this.ignoreMutation=!1,this.handleMutation=()=>{},this.name=e,this.value=t.webviewNode[e]||"",this.webViewImpl=t,this.defineProperty()}getValue(){return this.webViewImpl.webviewNode.getAttribute(this.name)||this.value}setValue(e){this.webViewImpl.webviewNode.setAttribute(this.name,e||"")}setValueIgnoreMutation(e){this.ignoreMutation=!0,this.setValue(e),this.ignoreMutation=!1}defineProperty(){return Object.defineProperty(this.webViewImpl.webviewNode,this.name,{get:()=>this.getValue(),set:e=>this.setValue(e),enumerable:!0})}}t.WebViewAttribute=WebViewAttribute;class BooleanAttribute extends WebViewAttribute{getValue(){return this.webViewImpl.webviewNode.hasAttribute(this.name)}setValue(e){e?this.webViewImpl.webviewNode.setAttribute(this.name,""):this.webViewImpl.webviewNode.removeAttribute(this.name)}}class PartitionAttribute extends WebViewAttribute{constructor(e){super("partition",e),this.webViewImpl=e,this.validPartitionId=!0,this.handleMutation=(e,t)=>{if(t=t||"",!this.webViewImpl.beforeFirstNavigation)return console.error("The object has already navigated, so its partition cannot be changed."),void this.setValueIgnoreMutation(e);"persist:"===t&&(this.validPartitionId=!1,console.error("Invalid partition attribute."))}}}t.PartitionAttribute=PartitionAttribute;class SrcAttribute extends WebViewAttribute{constructor(e){super("src",e),this.webViewImpl=e,this.handleMutation=(e,t)=>{t||!e?this.parse():this.setValueIgnoreMutation(e)},this.setupMutationObserver()}getValue(){return this.webViewImpl.webviewNode.hasAttribute(this.name)?resolveURL(this.webViewImpl.webviewNode.getAttribute(this.name)):this.value}setValueIgnoreMutation(e){super.setValueIgnoreMutation(e),this.observer.takeRecords()}setupMutationObserver(){this.observer=new MutationObserver(e=>{for(const t of e){const{oldValue:e}=t,i=this.getValue();if(e!==i)return;this.handleMutation(e,i)}});const e={attributes:!0,attributeOldValue:!0,attributeFilter:[this.name]};this.observer.observe(this.webViewImpl.webviewNode,e)}parse(){if(!this.webViewImpl.elementAttached||!this.webViewImpl.attributes.get("partition").validPartitionId||!this.getValue())return;if(null==this.webViewImpl.guestInstanceId)return void(this.webViewImpl.beforeFirstNavigation&&(this.webViewImpl.beforeFirstNavigation=!1,this.webViewImpl.createGuest()));const e={},t=this.webViewImpl.attributes.get("httpreferrer").getValue();t&&(e.httpReferrer=t);const i=this.webViewImpl.attributes.get("useragent").getValue();i&&(e.userAgent=i),this.webViewImpl.webviewNode.loadURL(this.getValue(),e)}}t.SrcAttribute=SrcAttribute;class HttpReferrerAttribute extends WebViewAttribute{constructor(e){super("httpreferrer",e)}}class UserAgentAttribute extends WebViewAttribute{constructor(e){super("useragent",e)}}class PreloadAttribute extends WebViewAttribute{constructor(e){super("preload",e)}getValue(){if(!this.webViewImpl.webviewNode.hasAttribute(this.name))return this.value;let e=resolveURL(this.webViewImpl.webviewNode.getAttribute(this.name));return"file:"!==e.substr(0,5)&&(console.error('Only "file:" protocol is supported in "preload" attribute.'),e=""),e}}class BlinkFeaturesAttribute extends WebViewAttribute{constructor(e){super("blinkfeatures",e)}}class DisableBlinkFeaturesAttribute extends WebViewAttribute{constructor(e){super("disableblinkfeatures",e)}}class WebPreferencesAttribute extends WebViewAttribute{constructor(e){super("webpreferences",e)}}t.setupWebViewAttributes=function setupWebViewAttributes(e){return new Map([["partition",new PartitionAttribute(e)],["src",new SrcAttribute(e)],["httpreferrer",new HttpReferrerAttribute(e)],["useragent",new UserAgentAttribute(e)],["nodeintegration",new BooleanAttribute("nodeintegration",e)],["nodeintegrationinsubframes",new BooleanAttribute("nodeintegrationinsubframes",e)],["plugins",new BooleanAttribute("plugins",e)],["disablewebsecurity",new BooleanAttribute("disablewebsecurity",e)],["allowpopups",new BooleanAttribute("allowpopups",e)],["preload",new PreloadAttribute(e)],["blinkfeatures",new BlinkFeaturesAttribute(e)],["disableblinkfeatures",new DisableBlinkFeaturesAttribute(e)],["webpreferences",new WebPreferencesAttribute(e)]])}},"./lib/renderer/web-view/web-view-element.ts": /*!***************************************************!*\ !*** ./lib/renderer/web-view/web-view-element.ts ***! \***************************************************/ /*! no static exports found */function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupWebView=void 0;const r=i(/*! @electron/internal/renderer/web-view/web-view-impl */"./lib/renderer/web-view/web-view-impl.ts"),n=new WeakMap,defineWebViewElement=e=>class WebViewElement extends HTMLElement{static get observedAttributes(){return["partition","src","httpreferrer","useragent","nodeintegration","nodeintegrationinsubframes","plugins","disablewebsecurity","allowpopups","preload","blinkfeatures","disableblinkfeatures","webpreferences"]}constructor(){super(),n.set(this,new r.WebViewImpl(this,e))}getWebContentsId(){const e=n.get(this);if(!e||!e.guestInstanceId)throw new Error("The WebView must be attached to the DOM and the dom-ready event emitted before this method can be called.");return e.guestInstanceId}connectedCallback(){const t=n.get(this);t&&(t.elementAttached||(e.guestViewInternal.registerEvents(t.viewInstanceId,{dispatchEvent:t.dispatchEvent.bind(t)}),t.elementAttached=!0,t.attributes.get("src").parse()))}attributeChangedCallback(e,t,i){const r=n.get(this);r&&r.handleWebviewAttributeMutation(e,t,i)}disconnectedCallback(){const t=n.get(this);t&&(e.guestViewInternal.deregisterEvents(t.viewInstanceId),t.guestInstanceId&&e.guestViewInternal.detachGuest(t.guestInstanceId),t.elementAttached=!1,t.reset())}};t.setupWebView=e=>{const listener=t=>{"loading"!==document.readyState&&((e=>{const t=defineWebViewElement(e);(0,r.setupMethods)(t,e),e.allowGuestViewElementDefinition(window,()=>{window.customElements.define("webview",t),window.WebView=t,delete t.prototype.connectedCallback,delete t.prototype.disconnectedCallback,delete t.prototype.attributeChangedCallback,delete t.observedAttributes})})(e),window.removeEventListener(t.type,listener,!0))};window.addEventListener("readystatechange",listener,!0)}},"./lib/renderer/web-view/web-view-impl.ts": /*!************************************************!*\ !*** ./lib/renderer/web-view/web-view-impl.ts ***! \************************************************/ /*! no static exports found */function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupMethods=t.WebViewImpl=void 0;const r=i(/*! @electron/internal/common/web-view-methods */"./lib/common/web-view-methods.ts"),n=i(/*! @electron/internal/renderer/web-view/web-view-attributes */"./lib/renderer/web-view/web-view-attributes.ts");let s=0;const getNextId=function(){return++s};t.WebViewImpl=class WebViewImpl{constructor(e,t){this.webviewNode=e,this.hooks=t,this.beforeFirstNavigation=!0,this.elementAttached=!1,this.hasFocus=!1,this.on={},this.internalElement=this.createInternalElement();const i=this.webviewNode.attachShadow({mode:"open"}),r=i.ownerDocument.createElement("style");r.textContent=":host { display: flex; }",i.appendChild(r),this.attributes=(0,n.setupWebViewAttributes)(this),this.viewInstanceId=getNextId(),i.appendChild(this.internalElement),Object.defineProperty(this.webviewNode,"contentWindow",{get:()=>this.internalElement.contentWindow,enumerable:!0})}createInternalElement(){const e=document.createElement("iframe");return e.style.flex="1 1 auto",e.style.width="100%",e.style.border="0",this.hooks.setIsWebView(e),e}reset(){this.guestInstanceId&&(this.guestInstanceId=void 0),this.beforeFirstNavigation=!0,this.attributes.get("partition").validPartitionId=!0;const e=this.createInternalElement(),t=this.internalElement;this.internalElement=e,t&&t.parentNode&&t.parentNode.replaceChild(e,t)}handleWebviewAttributeMutation(e,t,i){this.attributes.has(e)&&!this.attributes.get(e).ignoreMutation&&this.attributes.get(e).handleMutation(t,i)}onElementResize(){const e={newWidth:this.webviewNode.clientWidth,newHeight:this.webviewNode.clientHeight};this.dispatchEvent("resize",e)}createGuest(){this.internalInstanceId=getNextId(),this.hooks.guestViewInternal.createGuest(this.internalElement,this.internalInstanceId,this.buildParams()).then(e=>{this.attachGuestInstance(e)})}dispatchEvent(e,t={}){const i=new Event(e);Object.assign(i,t),this.webviewNode.dispatchEvent(i),"load-commit"===e?this.onLoadCommit(t):"-focus-change"===e&&this.onFocusChange()}setupEventProperty(e){const t="on"+e.toLowerCase();return Object.defineProperty(this.webviewNode,t,{get:()=>this.on[t],set:i=>{if(this.on[t]&&this.webviewNode.removeEventListener(e,this.on[t]),this.on[t]=i,i)return this.webviewNode.addEventListener(e,i)},enumerable:!0})}onLoadCommit(e){const t=this.webviewNode.getAttribute("src"),i=e.url;e.isMainFrame&&t!==i&&this.attributes.get("src").setValueIgnoreMutation(i)}onFocusChange(){const e=this.webviewNode.ownerDocument.activeElement===this.webviewNode;e!==this.hasFocus&&(this.hasFocus=e,this.dispatchEvent(e?"focus":"blur"))}onAttach(e){return this.attributes.get("partition").setValue(e)}buildParams(){const e={instanceId:this.viewInstanceId};for(const[t,i]of this.attributes)e[t]=i.getValue();return e}attachGuestInstance(e){-1!==e?this.elementAttached?(this.guestInstanceId=e,this.resizeObserver=new ResizeObserver(this.onElementResize.bind(this)),this.resizeObserver.observe(this.internalElement)):this.hooks.guestViewInternal.detachGuest(e):this.dispatchEvent("destroyed")}};t.setupMethods=(e,t)=>{e.prototype.focus=function(){this.contentWindow.focus()};for(const i of r.syncMethods)e.prototype[i]=function(...e){return t.guestViewInternal.invokeSync(this.getWebContentsId(),i,e)};for(const i of r.asyncMethods)e.prototype[i]=function(...e){return t.guestViewInternal.invoke(this.getWebContentsId(),i,e)};const createPropertyGetter=function(e){return function(){return t.guestViewInternal.propertyGet(this.getWebContentsId(),e)}},createPropertySetter=function(e){return function(i){return t.guestViewInternal.propertySet(this.getWebContentsId(),e,i)}};for(const t of r.properties)Object.defineProperty(e.prototype,t,{get:createPropertyGetter(t),set:createPropertySetter(t)})}}})}catch(e){console.error("Electron isolated_bundle.js script failed to run"),console.error(e)}