import"path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ad8da7bd-cf1f-4a46-9636-c40326912379",e._sentryDebugIdIdentifier="sentry-dbid-ad8da7bd-cf1f-4a46-9636-c40326912379")})()}catch{}const a={"--no-enforce-app-location":"NO_ENFORCE_APP_LOCATION","--load-prod-frontend-build":"LOAD_PROD_FRONTEND_BUILD","--run-in-browser":"RUN_IN_BROWSER","--run-in-electron":"RUN_IN_ELECTRON","--use-default-electron-updater":"USE_DEFAULT_ELECTRON_UPDATER","--allow-downgrade":"ALLOW_DOWNGRADE","--no-tls-verify":"NO_TLS_VERIFY","--open-devtools":"OPEN_DEVTOOLS"},o=e=>process.argv.find(n=>n.startsWith(`--${e}=`))?.split("=",2)?.[1],c=o("run-in-tab"),l=o("pas-hostname"),E=o("pas-port"),_=o("log-level"),f=o("server-env"),{NO_ENFORCE_APP_LOCATION:N,LOAD_PROD_FRONTEND_BUILD:O,RUN_IN_BROWSER:u,RUN_IN_ELECTRON:p,USE_DEFAULT_ELECTRON_UPDATER:L,ALLOW_DOWNGRADE:R,NO_TLS_VERIFY:T,OPEN_DEVTOOLS:A}=(()=>{const e={};return process.argv.forEach(n=>{const s=a[n];s&&(e[s]=!0)}),e})(),g=864e5,D=e=>Math.round(e*1e3),b=e=>e instanceof Error?e.message:typeof e=="string"?e:"Unknown error",y=e=>new Promise(n=>{setTimeout(n,e).unref?.()}),m=()=>{let e,n;const s=new Promise((t,r)=>{e=t,n=r});return{resolve:e,reject:n,promise:s}},I=(e={})=>{let n=null;if(e?.["m.text"]&&Array.isArray(e["m.text"])&&e["m.text"].forEach(s=>{s?.body&&(!s.mimetype||s.mimetype==="text/plain")&&(n=s.body)}),n)return{transcription:n,engine:e["com.beeper.transcription.model"]||"unknown"}};function S(e){const n=e instanceof Error?e.message:String(e);return n.includes("Cannot find module")||n.includes("ERR_MODULE_NOT_FOUND")}const w="0.0.0.0",P="127.0.0.1",i=e=>e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1).toLowerCase():e.toLowerCase(),U=e=>{const n=i(e);return n==="localhost"||n==="::1"||n.startsWith("127.")};export{R as A,w as B,_ as L,g as M,N,A as O,l as P,p as R,f as S,L as U,E as a,P as b,U as c,D as d,c as e,b as f,u as g,S as i,m as n,I as p,y as s};
//# sourceMappingURL=util-4MLVQf5_.mjs.map
