import{a4 as a,y as e,a5 as t,a6 as s,a7 as n,a8 as o,a9 as i,aa as r,ab as l,ac as u,am as m,af as p,ag as d,ah as v}from"./echarts.js?v=1763625242172";import{d3 as c}from"./naive.js?v=1763625242172";import{k as f,r as h,w as y,n as g,o as w,b as j,R as _,S as b,I as x,V as B,ap as I}from"./vue.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./common.js?v=1763625242172";e([t,s,n,o,i,r,l,u,m,p,d,v]);const z=f({__name:"index",props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"200px"},dataZoom:{type:Boolean,default:!1},option:{type:Object,required:!0}},setup(e){const t=e,s=h(null);function n(){if(null===s.value)return;let e=a.getInstanceByDom(s.value);null==e&&(e=a.init(s.value)),e.setOption(t.option,!0)}y((()=>t.option),(a=>{a&&g((()=>{n()}))}),{immediate:!0,deep:!0});const o=I((function(){var e;null!==s.value&&(null==(e=a.getInstanceByDom(s.value))||e.resize())}),300,{maxWait:800});return w((()=>{g((()=>{n(),window.addEventListener("resize",o)}))})),j((()=>{var e;s.value&&(null==(e=a.getInstanceByDom(s.value))||e.dispose(),window.removeEventListener("resize",o))})),(a,t)=>(_(),b("div",{ref_key:"chartRef",ref:s,style:x({width:B(c)(e.width),height:B(c)(e.height)})},null,4))}});export{z as default};
