import"./chunk-CRkDt6fp.js";import{_ as d,m as i,a as m,c as u,M as c,t as o}from"./app-CPb3bToC.js";import{E as p,V as e,an as r,u as a,D as h}from"./chunk-DhYw-kuD.js";import"./chunk-CusLMHK2.js";import"./chunk-xxORVLuj.js";import"./chunk-8e5kB75k.js";import"./chunk-C6R67zTo.js";import"./chunk-GYMadCV3.js";import"./chunk-D3Pjrapm.js";import"./chunk-DbbZ0htz.js";function f(){return"zh_CN"}function g(){return f().replace("_","-").toLowerCase()}const v={class:"setup-bg"},w={class:"setup-inner"},y={style:{width:"50%",position:"relative"}},b={style:{color:"rgb(19, 119, 204)","font-size":"1.2rem",position:"absolute",bottom:"2rem",left:"2rem"}},z={style:{display:"flex","flex-direction":"column",transform:"translateX(1.5rem)"}},x={class:"row",style:{"text-align":"center","justify-content":"center","margin-top":"157px","font-size":"1.4rem",width:"16rem","font-weight":"bold","font-family":`Microsoft YaHei,\r
              sans-serif !important`}},k={class:"row",style:{"justify-content":"center"}},L={class:"setup-footer"};function l(){}const B={data(){return{tab:"mchose",current_locale_name:g(),current_theme:"light",show_language:!1,show_theme:!1,loading_setup_btn:!1}},mounted(){let t=i();this.$mitt.on("on_theme_change",s=>{this.current_theme=s.theme}),this.$mitt.on("on_lang_change",s=>{this.current_locale_name=s.lang}),this.current_locale_name=t.current_locale,this.current_theme=t.current_theme},unmounted(){document.body.style.zoom="unset",window.removeEventListener("resize",l)},created(){i(),window.addEventListener("resize",l)},methods:{async on_setting(){this.loading_setup_btn=!1;let t=m();await t.update_device(),t.current_device=t.online_devices[0];let s=i();s.path_tab="keyboard",await this.$router.push({path:"/keyboard",params:{}})},async on_setup(){try{if(this.loading_setup_btn=!0,await u()===null){c.error(o("get_device_failed_retry")),this.loading_setup_btn=!1;return}c.success(o("connect_success")),await this.on_setting()}catch{c.error(o("connect_failed"))}finally{this.loading_setup_btn=!1}}}},E=Object.assign(B,{__name:"ViewSplash",setup(t){return(s,n)=>(h(),p("div",v,[e("div",w,[e("div",y,[n[1]||(n[1]=e("img",{draggable:"false",alt:"logo",src:"src/assets/img/logo_aula.png",style:{width:"520px",transform:"translateY(-1rem)"}},null,-1)),e("div",b,r(a(o)("home_page_url")),1)]),e("div",z,[e("div",x,r(a(o)("connect_device_permission_required")),1),e("div",k,[e("div",{class:"row btn-connect",onClick:n[0]||(n[0]=(..._)=>s.on_setup&&s.on_setup(..._))},r(a(o)("connect_device")),1)])])]),e("div",L,r(a(o)("home_page_copyright")),1)]))}}),F=d(E,[["__scopeId","data-v-67c1c39b"]]);export{F as default};
