import{t as _}from"./debounce-Xd493GvO.js";import{r as m}from"./request-CEvu378m.js";import{r as s,ax as w,c as d,w as g,n as b,j as x,X as V,ag as K,y as j,z as k}from"./vue-BJk78QHK.js";import"./index-M_JNBppB.js";import"./element-3_pOinej.js";import"./utils-YI6ye1sf.js";import"./threejs-BafxXW5-.js";import"./vxe-Dx3zSILm.js";const C=Object.assign({name:"NumberFlop"},{__name:"NumberFlop",props:{element:{type:Object,default:()=>({})},propValue:{type:Object,default:()=>({})},request:{type:Object,default:()=>({})}},setup(h){const e=h,a=s(null),i=s(0),r=s({}),v=s(16),o=w(),u=d(()=>({...e.element.propValue.config})),y=d(()=>{const t=e.element.style.width,l=e.element.style.height;return{width:t,height:l}});return g(y,_(t=>{i.value++},1e3),{deep:!0}),g(u,()=>{b(()=>{r.value={...u.value}})},{deep:!0}),x(()=>{var t,l;e.request&&(a.value=m(e.request,e.propValue.config,"number")),((l=(t=e.request)==null?void 0:t.global)==null?void 0:l.length)>0&&o.watch(()=>o.state.globalKey,()=>{e.request.global.forEach(c=>{const p=o.state.globalKey.findIndex(n=>n.globalKey===c);if(p>-1){const n=[o.state.globalKey[p].globalKey,o.state.globalKey[p].globalValue],f=e.request.data.findIndex(q=>q[0]===n[0]);f>-1?e.request.data[f][1]=n[1]:e.request.data.push(n)}}),a.value(),a.value=m(e.request,e.propValue.config,"number")},{deep:!0}),b(()=>{r.value={...u.value},v.value=e.element.propValue.config.style.fontSize})}),V(()=>{e.request&&a.value&&a.value()}),(t,l)=>{const c=K("dv-digital-flop");return k(),j(c,{key:i.value,config:r.value,style:{width:"100%",height:"100%"}},null,8,["config"])}}});export{C as default};
