import{it as e}from"./vendor-quasar-BMuYn1t2.js";import{K as t,X as n,b as r,bi as i,w as a,x as o,yi as s}from"./ws-JRT2XE7Y.js";s(),o(),t();function c(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 l=e(async({app:e})=>{if(n())return;let t=i();try{if(localStorage.getItem(`oobe-welcome`)!==`true`&&r(`general.language`)===`en-US`){let e=await t.fetchLanguages(),n=c(navigator.languages&&navigator.languages.length>0?navigator.languages:[navigator.language],e);n&&n!==`en-US`&&a(`general.language`,n)}}catch{}try{await t.fetchTranslation(r(`general.language`))}catch{}e.use({install:e=>{e.config.globalProperties.$i=(e,n)=>t.getString(e,n),e.config.globalProperties.$lz=(e,n,r)=>t.getStringDefault(e,n,r)}}),e.mixin({mounted(){this?.$el?.setAttribute&&this?.$el?.setAttribute(`sfc-name`,this.$?.type?.name||this?.$options?.__name)}})});export{l as default};