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