import{nt as e}from"./vendor-quasar-CU_esu6y.js";import{$ as t,Bi as n,Y as r,b as i,w as a,x as o,zi as s}from"./ws-DjAvcWfg.js";import{n as c,r as l}from"./index-IojTodLd.js";s(),o(),r(),c();function u(e,t){let n=new Map;for(let e of t){let t=e.split(`-`)[0].toLowerCase();n.has(t)||n.set(t,e)}for(let r of e){if(!r)continue;let e=r.replace(/_/g,`-`).toLowerCase(),i=t.find(t=>t.toLowerCase()===e);if(i)return i;let a=n.get(e.split(`-`)[0]);if(a)return a}return null}var d=e(async({app:e})=>{if(e.config.errorHandler=(e,t,n)=>{l(e,`vue`,n),console.error(`[Vue error]`,e,n)},t())return;let r=n();try{if(localStorage.getItem(`oobe-welcome`)!==`true`&&i(`general.language`)===`en-US`){let e=await r.fetchLanguages(),t=u(navigator.languages&&navigator.languages.length>0?navigator.languages:[navigator.language],e);t&&t!==`en-US`&&a(`general.language`,t)}}catch{}try{await r.fetchTranslation(i(`general.language`))}catch{}e.use({install:e=>{e.config.globalProperties.$i=(e,t)=>r.getString(e,t),e.config.globalProperties.$lz=(e,t,n)=>r.getStringDefault(e,t,n)}}),e.mixin({mounted(){this?.$el?.setAttribute&&this?.$el?.setAttribute(`sfc-name`,this.$?.type?.name||this?.$options?.__name)}})});export{d as default};