import C from"./world-DS8sXoXu.js";import{t as f}from"./debounce-Xd493GvO.js";import{r as g}from"./request-CEvu378m.js";import{d as v}from"./index-M_JNBppB.js";import{aq as K,ar as y}from"./echarts-DB130vfq.js";import"./echartsgl-CaHWxu1q.js";import{s as b,r as V,c as d,w as u,j,n as B,X as E,B as M,z as k,D as z}from"./vue-BJk78QHK.js";import"./element-3_pOinej.js";import"./utils-YI6ye1sf.js";import"./threejs-BafxXW5-.js";import"./vxe-Dx3zSILm.js";const F=Object.assign({name:"Earth3D"},{__name:"Earth3D",props:{propValue:{type:Object,default:()=>({})},request:{type:Object,default:()=>({})},element:{type:Object,default:()=>({})}},setup(q){const e=q,r=b(null),l=b(null),m=V(null),p=V(null),w=d(()=>e.propValue.option),_=d(()=>({width:e.element.style.width,height:e.element.style.height})),O=d(()=>e.propValue.option.series[0].symbol);u(_,f(()=>{x()},500),{deep:!0}),u(()=>e.propValue,f(()=>{i()},500),{deep:!0}),u(O,()=>{setTimeout(()=>{i()},1e3)},{deep:!0}),j(()=>{var a,n;K("world",C),r.value=y(m.value,"vintage");const t=document.createElement("canvas");l.value=y(t,null,{width:4096,height:2048}),B(()=>{i()}),e.request&&(p.value=g(e.request,e.propValue,"data")),((n=(a=e.request)==null?void 0:a.global)==null?void 0:n.length)>0&&u(()=>this.$store.state.globalKey,()=>{e.request.global.forEach(c=>{const s=this.$store.state.globalKey.findIndex(o=>o.globalKey===c);if(s>-1){const o=[this.$store.state.globalKey[s].globalKey,this.$store.state.globalKey[s].globalValue],h=e.request.data.findIndex(D=>D[0]===o[0]);h>-1?e.request.data[h][1]=o[1]:e.request.data.push(o)}}),p.value(),p.value=g(e.request,e.propValue,"data")},{deep:!0})}),E(()=>{e.request&&p.value(),r.value.dispose(),l.value.dispose()});function i(){var s,o;const t=v(w.value),a=v(e.propValue.pOp);l.value.setOption(a);const n=(s=e.propValue.data)!=null&&s.geoCoordMap?e.propValue.data.geoCoordMap:[],c=(o=e.propValue.data)!=null&&o.linesData?e.propValue.data.linesData:[];t.series[0].data=n,t.series[1].data=c,e.propValue.SatelliteView||(t.globe.layers=[{type:"blend",texture:l.value}]),r.value.setOption(t,!0)}function x(){var t,a;(t=r.value)==null||t.resize(),(a=l.value)==null||a.resize()}return(t,a)=>(k(),M("div",null,[z("div",{ref_key:"chartRef",ref:m,style:{width:"100%",height:"100%"}},null,512)]))}});export{F as default};
