"use strict";var s=Object.create;var g=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.getPrototypeOf;var m=Object.prototype.hasOwnProperty;var c=(e,t)=>g(e,"name",{value:t,configurable:true});var y=(e,t)=>{for(var n in t)g(e,n,{get:t[n],enumerable:true})};var i=(e,t,n,a)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let r of p(t))if(!m.call(e,r)&&r!==n)g(e,r,{get:()=>t[r],enumerable:!(a=d(t,r))||a.enumerable})}return e};var D=(e,t,n)=>(n=e!=null?s(f(e)):{},i(t||!e||!e.__esModule?g(n,"default",{value:e,enumerable:true}):n,e));var L=e=>i(g({},"__esModule",{value:true}),e);var b={};y(b,{default:()=>h});module.exports=L(b);var l=require("electron");var u=D(require("languagedetect"));const o=require("../../preload-safe-debug")("Ferdium:ipcApi:languageDetect");var h=c(async()=>{l.ipcMain.handle("detect-language",async(e,{sample:t})=>{if(!u.default){return null}const n=new u.default;n.setLanguageType("iso2");o("Checking language for sample:",t);const a=n.detect(t,1);o("Language detection result:",a);return a[0][0]})},"default");
