k5web/assets/index.d38521cb.js

2 lines
6.2 KiB
JavaScript
Raw Normal View History

2024-07-02 02:58:02 +00:00
import{d as G,r as j,bI as q,C as L,aE as Z,aH as n,aI as a,aM as o,aN as l,u as d,bg as X,bh as Y,G as r,bq as tt,bJ as ot,bG as at,a$ as nt,ba as et,bK as ut,be as rt,bf as ct,D as it}from"./arco.7f845a67.js";import{v as st,m as lt,_ as K}from"./index.84328ebd.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{e as _t,a as i,b as s}from"./serial.c6b76da8.js";import{L as pt}from"./index.c15881d6.js";import"./chart.95d38b48.js";import"./vue.0bef8fc5.js";import"./useConfig.c667f475.js";import"./useDisabled.1ea0b0ca.js";const dt=""+new URL("../gy.png",import.meta.url).href,m=f=>(rt("data-v-6821f1f8"),f=f(),ct(),f),mt=m(()=>r("br",null,null,-1)),ft=m(()=>r("br",null,null,-1)),ht=m(()=>r("br",null,null,-1)),gt=m(()=>r("br",null,null,-1)),wt=m(()=>r("br",null,null,-1)),Ft=m(()=>r("br",null,null,-1)),bt=m(()=>r("img",{class:"tencent",style:{"margin-bottom":"10px"},width:"200px",src:dt},null,-1)),kt=G({__name:"banner",setup(f){const{t:c}=st.exports.useI18n(),t=lt(),y=j({eepromSize:c("workplace.clickCheck")}),O=async()=>{var h,F,b,k,B,p,_,g,w,C,P,A,M,D,x,$,I,z,V,T,N;let e=c("workplace.unk");const E=[Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256)];await _t(t.connectPort);const u=new Uint8Array(E);if(((h=t.configuration)==null?void 0:h.uart)=="official"){const S=await i(t.connectPort,0,8,(F=t.configuration)==null?void 0:F.uart);await s(t.connectPort,0,u,8,(b=t.configuration)==null?void 0:b.uart);const v=await i(t.connectPort,0,8,(k=t.configuration)==null?void 0:k.uart);u.toString()==v.toString()&&(e=c("global.8kb")),await s(t.connectPort,0,S,8,(B=t.configuration)==null?void 0:B.uart)}else{const S=await i(t.connectPort,0,8,(p=t.configuration)==null?void 0:p.uart);await s(t.connectPort,0,u,8,(_=t.configuration)==null?void 0:_.uart);const v=await i(t.connectPort,0,8,(g=t.configuration)==null?void 0:g.uart);u.toString()==v.toString()&&(e=c("global.8kb")),await s(t.connectPort,0,S,8,(w=t.configuration)==null?void 0:w.uart);const Q=await i(t.connectPort,131064,8,(C=t.configuration)==null?void 0:C.uart);await s(t.connectPort,131064,u,8,(P=t.configuration)==null?void 0:P.uart);const U=await i(t.connectPort,131064,8,(A=t.configuration)==null?void 0:A.uart);u.toString()==U.toString()&&(e=c("global.128kb")),await s(t.connectPort,131064,Q,8,(M=t.configuration)==null?void 0:M.uart);const H=await i(t.connectPort,262136,8,(D=t.configuration)==null?void 0:D.uart);await s(t.connectPort,262136,u,8,(x=t.configuration)==null?void 0:x.uart);const J=await i(t.connectPort,262136,8,($=t.configuration)==null?void 0:$.uart);u.toString()==J.toString()&&(e=c("global.256kb")),await s(t.connectPort,262136,H,8,(I=t.configuration)==null?void 0:I.uart);const R=await i(t.connectPort,524280,8,(z=t.configuration)==null?void 0:z.uart);await s(t.connectPort,524280,u,8,(V=t.configuration)==null?void 0:V.uart);const W=await i(t.connectPort,524280,8,(T=t.configuration)==null?void 0:T.uart);u.toString()==W.toString()&&(e=c("global.512kb")),await s(t.connectPort,524280,R,8,(N=t.configuration)==null?void 0:N.uart)}y.eepromSize=e};return(e,E)=>{const u=tt,h=ot,F=at,b=nt,k=q,B=et,p=pt,_=ut;return L(),Z(h,{class:"banner"},{default:n(()=>[a(h,null,{default:n(()=>[a(u,{heading:5,style:{"margin-top":"0"}},{default:n(()=>[o(l(d(t).connectState?e.$t("workplace.welcomeSuc"):e.$t("workplace.welcome")),1)]),_:1})]),_:1}),a(F,{class:"panel-border"}),a(B,null,{default:n(()=>[X(a(k,{style:{marginTop:"2em",marginBottom:"2em"},title:e.$t("workplace.info")},{default:n(()=>{var g,w;return[o(l(e.$t("workplace.current"))+l(d(t).firmwareVersion)+" ",1),mt,o(" "+l(e.$t("workplace.writeconfig"))+l((g=d(t).configuration)==null?void 0:g.name)+" ",1),ft,o(" "+l(e.$t("workplace.eepromSize"))+l(y.eepromSize)+" "+l(y.eepromSize!=d(c)("workplace.clickCheck")&&((w=d(t).configuration)==