var u=Object.create;var i=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var x=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},f=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of m(t))!w.call(e,s)&&s!==r&&i(e,s,{get:()=>t[s],enumerable:!(n=h(t,s))||n.enumerable});return e};var y=(e,t,r)=>(r=e!=null?u(d(e)):{},f(t||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),E=e=>f(i({},"__esModule",{value:!0}),e);var v={};x(v,{getAppHash:()=>L,getAppPath:()=>g,getLocale:()=>T,getName:()=>b,showMessageBox:()=>B});module.exports=E(v);var o=require("electron/main"),l=require("fs"),p=require("path"),c=require("node:original-fs"),a=require("crypto");function A(e){if(e instanceof Error)throw e}function g(){if(process.type==="browser")return o.app.getAppPath();{let e=__dirname;for(;!(0,l.existsSync)((0,p.resolve)(e,"./package.json"))&&!/^(?:\/|[A-Z]:\\)$/.test(e);)e=(0,p.resolve)(e,"../");return e}}function B(e){if(process.type==="browser")import("electron").then(t=>t.dialog.showMessageBox(e)).catch(A);else{const t=e.title!==void 0?e.title+`
`:"";alert(t+e.message)}}function T(){return process.type==="browser"?process.platform!=="win32"||o.app.isReady()?o.app.getLocale():o.app.getLocaleCountryCode().toLowerCase():navigator.language}function b(){return process.type==="browser"?o.app.getName():"the application"}async function L(e="sha512",t="hex"){const r=g();if(!(0,a.getHashes)().includes(e))throw new Error("Unsuported hashing algorithm: "+e);if((await c.promises.stat(r)).isFile())return c.promises.readFile(r).then(n=>(0,a.createHash)(e).update(n).digest(t))}0&&(module.exports={getAppHash,getAppPath,getLocale,getName,showMessageBox});
