"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),c=require("lodash"),m=require("../../commons/core/datasource/index.js"),v=require("../../commons/core/useChart.js"),f=require("../../commons/utils/parseOtherData.js"),_={class:"zerov-widget"},b=["id"],O=s.defineComponent({name:"zv-chart-scatter-ripples"}),E=s.defineComponent({...O,props:{basicOption:{},sources:{},useEvents:{},uuid:{}},emits:["chart-click","chart-dblclick","chart-mousedown","chart-mouseover","chart-mouseout","chart-contextmenu"],setup(i,{expose:u,emit:l}){const e=i,d=l,{id:p,setOption:o,chart:h,renderChart:n,renderData:a}=v.useChart({basicOption:c.cloneDeep(e.basicOption),useEvents:c.cloneDeep(e.useEvents),customRenderData:t=>{t=c.cloneDeep(t),m.SHJDatasourceV2.parse({tId:e.uuid,sources:e.sources,callback:({data:r})=>{try{window.SHJParseEvent(e.useEvents,"dataListener",r),o(f.parseOtherData(r,t))}catch{window.SHJParseEvent(e.useEvents,"dataListener",null),o(t)}}})},emit:d});return s.watch(()=>e.sources,()=>{e.sources&&e.sources.length>0&&a(e.basicOption)},{deep:!0}),s.watch(()=>c.cloneDeep(e.basicOption),(t,r)=>{c.isEqual(t,r)||n(t)},{deep:!0}),u({getEchartsInstance:()=>h.value,refresh:()=>{e.sources&&e.sources.length>0&&n(e.basicOption),a(e.basicOption)},refreshView:()=>{e.sources&&e.sources.length>0&&n(e.basicOption)},refreshData:()=>{a(e.basicOption)}}),(t,r)=>(s.openBlock(),s.createElementBlock("div",_,[s.createElementVNode("div",{id:s.unref(p),class:"widget"},null,8,b)]))}});exports.default=E;
