const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./deep-link-BH5Lu5bK.js","./index-CZYymlJf.js","./PrefsViewStore-B9QxYjkz.js","./sentry-common-2nFGZClv.js","./main-process-state-jW3BbbTQ.js","./index-jPDAJ20a.js","./load-stores-Dcoe61kP.js","./App-CSvRzCsn.js","./report-dialog-DCdDPy0Y.js","./App-BikRDAFQ.css","./load-stores-wM6DJ3da.css","./react-D7cl2ZXK.js","./report-web-vitals-DA5aQwpk.js"])))=>i.map(i=>d[i]);
import{_ as l}from"./index-CZYymlJf.js";import{a as m,I as c,u as y,b as P,p as I,o as u,M as S,c as T,d as i,U as R,B as A}from"./sentry-common-2nFGZClv.js";import{serverEnv as L}from"./main-process-state-jW3BbbTQ.js";(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:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="aa6864a3-5e6c-44d5-a7f4-1b8d1e2f232b",e._sentryDebugIdIdentifier="sentry-dbid-aa6864a3-5e6c-44d5-a7f4-1b8d1e2f232b")})()}catch{}const k={info:console.info,error:console.error,warn:console.warn,debug:console.debug,log:console.log,trace:console.trace,buddyOriginOverride:null,silently:{info:console.info,error:console.error,warn:console.warn,debug:console.debug,log:console.log,trace:console.trace}};globalThis.logger=k;window.setImmediate||=(e,...o)=>window.setTimeout(e,0,...o);m.posix.sep;var D={};const N=!0,O=typeof I<"u"&&D.BEEPER_BENCH_SUMMARY_ONLY==="true",r=O?!1:globalThis.LOG_LEVEL==="dev"||c||y.log_level==="dev"||P||N,B=u.platform(),M=u.release(),V={os:{name:B,version:M},appVersion:i.version,arch:"x64",isWKWV:!1},s=[];let a=null;const g=async()=>{if(s.length===0)return;const e=s.splice(0,s.length);a&&clearTimeout(a),a=null;try{logger.info("skipped sending events to legacy /metrics endpoint",e)}catch(o){logger.error("Error recording events",o,e)}},h=({type:e,data:o},t={})=>{s.push({deviceId:S,type:e,eventData:o,metadata:{...V,...t}}),s.length>=20?g():a||(a=setTimeout(g,5e3))},z=(e,o,t)=>{r&&logger.debug("Time:",e,"—",o,"—",t),h({type:"timing",data:{category:e,value:o,time:t.toFixed(0)}})};function v(e,o){r&&logger.debug("Event:",e,"—",o),h({type:e,data:o},{})}const x=e=>v("platform-event",e);function X(e,o,t=""){const n=T(t?o.replace(t,"<scrubbed>"):o);return v("unpleasant-message",{origin:e,text:n})}function $(){const e={IS_DEV:c,isLoggingEnabled:r,log:r?(...o)=>logger.log(...o):()=>{},error:r?(...o)=>logger.error(...o):()=>{},constants:{USER_AGENT:R,APP_VERSION:i.version},Sentry:globalThis.Sentry,trackPlatformEvent:x,getBinariesDirPath(o){return m.join(A,"platform-"+o)}};globalThis.texts=e}$();function C(){return"Settings/Preferences"}function K(e){const o=e.getHours();return o>=5&&o<12?"Good morning":o>=12&&o<18?"Good afternoon":o>=18&&o<22?"Good evening":"Good night"}const Y=Object.freeze({BRAND_NAME:"Beeper",APP_NAME:"Beeper",BROWSER_EXTENSION_NAME:"Beeper browser extension",SYSTEM_PREFS_LABEL:C(),TRAY_NAME:"Tray",SHOW_IN_FOLDER_LABEL:"Show in folder"}),d={};function Q(){return{...d}}function f(e,o=Date.now()){const t=d[e];t!==void 0&&t<=o||(d[e]=o)}class p extends Error{constructor(o,t,n){super(`failed to call ${o} method ${t}: ${n.message}`,{cause:n}),this.name="IPCError",Error.captureStackTrace?.(this,p)}}const b=(e,...o)=>{const t=o?.[0]??"?",n=o?.[1]?.methodName??"?";throw new p(t,n,e)},J=(...e)=>{try{return window.desktopAPI?.ipcSend(...e)}catch(o){b(o,...e)}},Z=async(...e)=>{try{return await window.desktopAPI?.ipcInvoke(...e)}catch(o){b(o,...e)}},G=(e,o)=>window.desktopAPI?.ipcOnEvent(e,o);async function w(e){const{default:o}=await l(async()=>{const{default:t}=await import("./deep-link-BH5Lu5bK.js");return{default:t}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);await o(e)}function H(){G("deep-link",w)}globalThis.handleDeepLink=w;const U=L??"production",E=window.desktopAPI?.getPreloadBootstrapReturnedAt?.();E!=null&&f("preload bootstrap returned",E);f("renderer index import started",window.RENDERER_INDEX_IMPORT_STARTED);logger.log(`You're running ${Y.APP_NAME} v${i.version} on linux ${u.release()} x64 (server env: ${U})`);const _=new URLSearchParams(window.location.search).get("appVersion");i.version!==_&&logger.warn(`The runtime appVersion (${_}) from URL does not match the build version (${i.version})`);f("renderer entry");H();const j=l(async()=>{const{loadStoresPromise:e}=await import("./load-stores-Dcoe61kP.js").then(o=>o.l);return{loadStoresPromise:e}},__vite__mapDeps([6,2,3,4,5,7,1,8,9,10]),import.meta.url).then(({loadStoresPromise:e})=>e);l(async()=>{const{default:e}=await import("./react-D7cl2ZXK.js");return{default:e}},__vite__mapDeps([11,7,3,2,4,5,1,8,9]),import.meta.url).then(({default:e})=>{e(j)});c&&l(async()=>{const{default:e}=await import("./report-web-vitals-DA5aQwpk.js");return{default:e}},__vite__mapDeps([12,1]),import.meta.url).then(({default:e})=>{e(o=>logger.log(o))});const ee=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{J as a,G as b,X as c,z as d,Y as e,Z as f,Q as g,w as h,r as i,K as j,ee as k,f as m,g as s,v as t};
//# sourceMappingURL=index-F0fMEJXd.js.map
