import n from"path";import{promises as s}from"fs";import{s as a}from"./logger-D_9t6p_W.mjs";import{I as g}from"./sentry-common-ai21LIAw.mjs";import{A as h,i,h as u,j as b,k as y}from"./AsyncSqlite-8sGv3lfc.mjs";import{USER_AGENT as E,BUILD_DIR_PATH as T}from"./constants-DED7MIJj.mjs";import{version as f}from"./package-uaSG8XjZ.mjs";import{g as d}from"./got-BLig4ziO.mjs";import{c as _}from"./got-fetch-D7dM7Qr-.mjs";import{u as w}from"./index-7t_wvw7g.mjs";import"os";import"./_commonjsHelpers-CLLqo0NO.mjs";import"./machine-id-D3_purtu.mjs";import"perf_hooks";import"child_process";import"worker_threads";import"./index-Cl8VihPn.mjs";import"timers/promises";import"async_hooks";import"url";import"events";import"util";import"stream";import"http";import"https";import"dns";import"buffer";import"zlib";import"http2";import"tls";import"net";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e833452f-5bde-437f-a663-158b326d30c6",t._sentryDebugIdIdentifier="sentry-dbid-e833452f-5bde-437f-a663-158b326d30c6")})()}catch{}const l=t=>["-----BEGIN CERTIFICATE-----",t.toString("base64"),"-----END CERTIFICATE-----"].join(`
`);async function I(t,e={}){const r=await d(t,{throwHttpErrors:!1,...e,responseType:"buffer",https:{certificateAuthority:e.pinnedCertificates?.map(o=>l(o))}});return{statusCode:r.statusCode,headers:r.headers,body:r.body}}async function S(t,e={}){return d.stream(t,{throwHttpErrors:!1,...e,https:{certificateAuthority:e.pinnedCertificates?.map(r=>l(r))}})}const A=I,p=S;function rt(t,e={openBrowserWindow:void 0,nativeFetch:void 0,nativeFetchStream:void 0}){const r=n.join(t,"worker-log.log");globalThis.AsyncSqlite=h,globalThis.AppVersion=f,globalThis.DONT_LOCK_SQLITE=w.dont_lock_sqlite||!1,globalThis.texts={IS_DEV:g,isLoggingEnabled:i,log:i?(...o)=>{s.appendFile(r,a([new Date,...o])+`
`),logger.log(...o)}:()=>{},error:i?(...o)=>{s.appendFile(r,a([new Date,...o])+`
`),logger.error(...o)}:()=>{},constants:{USER_AGENT:E,APP_VERSION:f},Sentry,trackPlatformEvent:u,runWorker:b(t),forkChildProcess:y(t),fetch:A,fetchStream:p,createHttpClient:_,...e,nativeFetchStream:(o,m,c)=>p(m,c),getOriginalObject:void 0,getBinariesDirPath(o){return n.join(T,"platform-"+o)}}}export{rt as default};
//# sourceMappingURL=inject-globals-v3dPEknE.mjs.map
