import{e as b,_ as B}from"./index.64ede75c.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as E,r as v,b0 as g,C as w,D as C,aI as u,aH as s,aM as d,G as k,aX as h,bb as x,bD as D,bE as y,bC as A,bF as T,n as H}from"./arco.cd87ac27.js";import{e as P,f as S,g as I}from"./serial.7f1ff1f5.js";import"./chart.19f3a5b6.js";import"./vue.a1682e6c.js";const M={class:"container"},N=["innerHTML"],R={name:"Chi"},V=E({...R,setup($){const r=b(),n=v({status:"\u70B9\u51FB\u5199\u5165\u6309\u94AE\u5199\u5165\u5B57\u5E93\u5230\u8BBE\u5907

",eepromType:""}),m=async(a=0,t)=>{await P(r.connectPort);for(let o=a;o",H(()=>{const e=document==null?void 0:document.getElementById("statusArea");e&&(e.scrollTop=e==null?void 0:e.scrollHeight)});n.status=n.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A100.0%
",await I(r.connectPort)},c=async(a=1)=>{if(r.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}n.status=n.status+"\u6B63\u5728\u4E0B\u8F7D\u5B57\u5E93...
";let t;switch(a){case 1:t=await fetch("/old_font.bin");break;default:alert("TODO");return}const o=t.body.getReader(),e=[];for(;;){const{done:_,value:l}=await o.read();if(_)break;e.push(...l)}const i=new Uint8Array(e);await m(8192,i)};return(a,t)=>{const o=g("Breadcrumb"),e=h,i=x,_=D,l=y,F=A,f=T;return w(),C("div",M,[u(o,{items:["\u5C0F\u5DE5\u5177","\u5B57\u5E93\u5199\u5165"]}),u(f,{gutter:20,align:"stretch"},{default:s(()=>[u(F,{span:24},{default:s(()=>[u(l,{class:"general-card",title:"\u5B57\u5E93\u5199\u5165"},{default:s(()=>[u(i,null,{default:s(()=>[u(e,{onClick:t[0]||(t[0]=p=>c(1))},{default:s(()=>[d("\u5199\u5165 117 \u5B57\u5E93\uFF08K\uFF09")]),_:1}),u(e,{onClick:t[1]||(t[1]=p=>c(2))},{default:s(()=>[d("\u5199\u5165 118 \u5B57\u5E93\uFF08K\uFF09")]),_:1}),u(e,{onClick:t[2]||(t[2]=p=>c(3))},{default:s(()=>[d("\u5199\u5165 118 \u5B57\u5E93\uFF08H\uFF09")]),_:1})]),_:1}),u(_),k("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:n.status},null,8,N)]),_:1})]),_:1})]),_:1})])}}});const J=B(V,[["__scopeId","data-v-04409b57"]]);export{J as default};