import{w as m,c as p,r as d}from"./main-entry-Sq_q4UiZ.mjs";import{T as l,be as a,L as s}from"./Keychain-CuE0MP5_.mjs";import r from"events";import{session as n}from"electron";import{I as h}from"./sentry-common-ai21LIAw.mjs";import w from"child_process";import"path";import"os";import"electron-drag-click";import"./AsyncSqlite-8sGv3lfc.mjs";import"./index-7t_wvw7g.mjs";import"worker_threads";import"./constants-DED7MIJj.mjs";import"url";import"fs";import"./machine-id-D3_purtu.mjs";import"./package-uaSG8XjZ.mjs";import"perf_hooks";import"./index-Cl8VihPn.mjs";import"./_commonjsHelpers-CLLqo0NO.mjs";import"timers/promises";import"./logger-D_9t6p_W.mjs";import"async_hooks";import"./util-4MLVQf5_.mjs";import"node:net";import"node:os";import"./pas-constants-BUlQqMvk.mjs";import"crypto";import"util";import"./local-ips-C5d2WBdP.mjs";import"fs/promises";import"./startup-checkpoints-BHncfdsM.mjs";import"./index-B8MOUWcP.mjs";import"assert";import"buffer";import"stream";import"./app-api-Dyy9vj_s.mjs";import"./got-fetch-D7dM7Qr-.mjs";import"./got-BLig4ziO.mjs";import"http";import"https";import"dns";import"zlib";import"http2";import"tls";import"net";import"./macos-contacts-server-ClUNd65v.mjs";import"./fs-xattr-D9kndW7T.mjs";import"diskusage";import"./rolling-logger-H_IO3gVC.mjs";import"node:fs/promises";import"node:path";import"./system-stats-DIGFNPck.mjs";import"./index-xofbljon.mjs";import"./fromFile-C3cbHc9O.mjs";import"node:fs";import"stream/promises";import"./v4-CEl4XKrc.mjs";import"./download-C2kdRpx0.mjs";import"constants";import"tty";import"string_decoder";import"./index-HJDsW6S6.mjs";import"./SimpleHTMLParser-Cs2FMgno.mjs";import"./SimpleTwitterClient-D5m2RlHJ.mjs";import"./readable-DJlI2ect.mjs";import"node:url";import"./sentry-buffer-BNqrS-8_.mjs";import"module";import"vm";import"node:util";import"node:stream";import"node:child_process";import"node:crypto";import"node:events";import"better-sqlite3";import"node:module";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="a88cb614-64b7-4265-bcb8-c1993980f795",o._sentryDebugIdIdentifier="sentry-dbid-a88cb614-64b7-4265-bcb8-c1993980f795")})()}catch{}const u=["loadURL","show","hide","isMaximized","isMinimized","isVisible","isFocused","maximize","unmaximize","minimize","restore","isFullScreen","toggleFullScreen","getBounds","setBounds"],f=class extends r{constructor(t){super(),this.webContents={send(i,...e){globalThis.pas.defaultTransports.tranportSend({type:"ipc-message",channel:i,args:e})},session:n.defaultSession,downloadURL(i){throw Error("unimplemented")}},this.setTouchBar=()=>{},this.isDestroyed=()=>!1,this.nsWin=new l.NativeWebView(h,a());for(const i of u)this[i]=(...e)=>this.nsWin[i](...e)}get fullScreen(){return this.isFullScreen()}},c=class extends r{constructor(t){super(),this.webContents={send(i,...e){globalThis.pas.defaultTransports.tranportSend({type:"ipc-message",channel:i,args:e})},session:n.defaultSession,downloadURL(i){throw Error("unimplemented")}},this.setTouchBar=()=>{},this.isDestroyed=()=>!1,this.loadURL=i=>{const e=s||"Google Chrome";w.spawn("open",["-a",e,i])},this.isMaximized=()=>{},this.isMinimized=()=>{},this.unmaximize=()=>{},this.maximize=()=>{},this.minimize=()=>{},this.show=()=>{},this.hide=()=>{},this.restore=()=>{},this.isVisible=()=>{},this.isFocused=()=>{},this.isFullScreen=()=>{},this.toggleFullScreen=()=>{}}};class b{constructor(){this.wsk=m("main"),this.window=new(s?c:f)({}),this.rs=p(this.window),d(this)}get fullScreen(){return this.window.isFullScreen()}show(){this.window.isMinimized()&&this.window.restore(),this.window.show()}hide(){this.window.hide()}get isVisible(){return this.window.isVisible()}toggleVisible(){this.isVisible?this.window.hide():this.show()}sendMessage(t,...i){this.window.webContents.send(t,...i)}loadURL(t){logger.log({url:t}),this.window.loadURL(t)}}function ki(){return new b}export{b as MainWindowShim,ki as default};
//# sourceMappingURL=main-window-shim-uQc5BRfZ.mjs.map
