
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
import{B as e,C as t,Ct as n,Tt as r}from"./reactivity.esm-bundler-D9OPVc9J.js";import{D as i,_ as a,b as o,bt as s,g as c,mt as l,o as u,v as d,y as f}from"./runtime-core.esm-bundler-D-xeQwTN.js";import{J as p,d as m}from"./lib-C-QGo8GG-CvPpiVvZ.js";import{t as h}from"./rolldown-runtime-Dy4uBu1J-DK3Fl9T5.js";import{t as g}from"./useConfig-C0V0eG7L-BW30Wel-.js";import{t as _}from"./_plugin-vue_export-helper-B3ysoDQm-BDNMzG2s.js";import{t as v}from"./useNestedProp-BYfiWVP8-DbrxFlsg.js";import{n as y}from"./PackageVersion-BUmadjVO-D-GRfJH2.js";var b={key:0},x=[`d`,`fill`],S=[`d`,`fill`],C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O={key:1},k=[`cx`,`cy`,`r`,`fill`],A={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let n=e,r=t({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),i=c(()=>2*(n.thickness||1)),s=c(()=>[void 0,null].includes(n.quanta)?r.value.X:r.value[n.quanta]);return(t,n)=>(l(),o(u,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(l(),o(`g`,b,[a(`path`,{d:`M ${e.x} ${e.y}
                L ${e.x+i.value} ${e.y-i.value}
                L ${e.x+26-i.value} ${e.y-i.value}
                L ${e.x+26} ${e.y}
                L ${e.x+26-i.value} ${e.y+i.value}
                L ${e.x+i.value} ${e.y+i.value} Z`,fill:s.value[0]==1?e.color:e.backgroundColor,stroke:`none`},null,8,x),a(`path`,{d:`M ${e.x+28-i.value} ${e.y+28-i.value}
                L ${e.x+28-i.value} ${e.y+2+i.value}
                L ${e.x+28} ${e.y+2}
                L ${e.x+28+i.value} ${e.y+2+i.value}
                L ${e.x+28+i.value} ${e.y+28-i.value}
                L ${e.x+28} ${e.y+28}
                L ${e.x+28-i.value} ${e.y+28-i.value}`,fill:s.value[1]==1?e.color:e.backgroundColor,stroke:`none`},null,8,S),a(`path`,{d:`M ${e.x+28-i.value} ${e.y+58-i.value}
                L ${e.x+28-i.value} ${e.y+32+i.value}
                L ${e.x+28} ${e.y+32}
                L ${e.x+28+i.value} ${e.y+32+i.value}
                L ${e.x+28+i.value} ${e.y+58-i.value}
                L ${e.x+28} ${e.y+58}
                L ${e.x+28-i.value} ${e.y+58-i.value}`,fill:s.value[2]==1?e.color:e.backgroundColor,stroke:`none`},null,8,C),a(`path`,{d:`M ${e.x+i.value} ${e.y+60-i.value}
                L ${e.x} ${e.y+60}
                L ${e.x+i.value} ${e.y+60+i.value}
                L ${e.x+26-i.value} ${e.y+60+i.value}
                L ${e.x+26} ${e.y+60}
                L ${e.x+26-i.value} ${e.y+60-i.value}
                L ${e.x+i.value} ${e.y+60-i.value}`,fill:s.value[3]==1?e.color:e.backgroundColor,stroke:`none`},null,8,w),a(`path`,{d:`M ${e.x-2+i.value} ${e.y+58-i.value}
                L ${e.x-2+i.value} ${e.y+32+i.value}
                L ${e.x-2} ${e.y+32}
                L ${e.x-2-i.value} ${e.y+32+i.value}
                L ${e.x-2-i.value} ${e.y+58-i.value}
                L ${e.x-2} ${e.y+58}
                L ${e.x-2+i.value} ${e.y+58-i.value}`,fill:s.value[4]==1?e.color:e.backgroundColor,stroke:`none`},null,8,T),a(`path`,{d:`M ${e.x-2+i.value} ${e.y+28-i.value}
                L ${e.x-2+i.value} ${e.y+2+i.value}
                L ${e.x-2} ${e.y+2}
                L ${e.x-2-i.value} ${e.y+2+i.value}
                L ${e.x-2-i.value} ${e.y+28-i.value}
                L ${e.x-2} ${e.y+28}
                L ${e.x-2+i.value} ${e.y+28-i.value}`,fill:s.value[5]==1?e.color:e.backgroundColor,stroke:`none`},null,8,E),a(`path`,{d:`M ${e.x+i.value} ${e.y+30-i.value}
                L ${e.x} ${e.y+30}
                L ${e.x+i.value} ${e.y+30+i.value}
                L ${e.x+26-i.value} ${e.y+30+i.value}
                L ${e.x+26} ${e.y+30}
                L ${e.x+26-i.value} ${e.y+30-i.value}
                L ${e.x+i.value} ${e.y+30-i.value}`,fill:s.value[6]==1?e.color:e.backgroundColor,stroke:`none`},null,8,D)])),e.quanta==`.`?(l(),o(`g`,O,[a(`circle`,{cx:e.x-8,cy:e.y+60,r:2+i.value/2,fill:e.color},null,8,k)])):f(``,!0)],64))}},j=h({default:()=>P}),M=[`id`],N=[`xmlns`,`viewBox`,`aria-describedby`],P=_({__name:`vue-ui-digits`,props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(t){let{vue_ui_digits:f}=g(),h=t,_=c(()=>v({userConfig:h.config,defaultConfig:f})),b=c(()=>{let e=(h.dataset||0).toString().split(``),t=[],n={x:10,y:10},r=0;for(let i=0;i<e.length;i+=1){let a=e[i];t.push({x:n.x+r,y:n.y,quanta:a}),r+=a==`.`?2:44}return t}),x=c(()=>Math.max(...b.value.map(e=>e.x))+36),S=p();return(c,f)=>(l(),o(u,null,[a(`div`,{class:`sr-only`,id:`digit-${e(S)}`},r(t.dataset),9,M),(l(),o(`svg`,{class:`vue-data-ui-component vue-ui-digits`,xmlns:e(m),viewBox:`0 0 ${x.value} 80`,style:n(`background:${_.value.backgroundColor};${_.value.height?`height:${_.value.height};`:``}${_.value.width?`width:${_.value.width}`:``}`),"aria-describedby":`digit-${e(S)}`},[i(y),(l(!0),o(u,null,s(b.value,e=>(l(),d(A,{x:e.x,y:e.y,quanta:e.quanta,color:_.value.digits.color,backgroundColor:_.value.digits.skeletonColor,thickness:_.value.digits.thickness},null,8,[`x`,`y`,`quanta`,`color`,`backgroundColor`,`thickness`]))),256))],12,N))],64))}},[[`__scopeId`,`data-v-dc66e2b9`]]);export{j as n};