import{watch as e,inject as t,computed as n,unref as o,watchEffect as r,defineComponent as i,shallowRef as a,toRefs as u,onMounted as c,onUnmounted as s,h as l,Vue2 as p,nextTick as v}from"vue-demi";import{throttle as f,init as d}from"echarts/core";import{addListener as g,removeListener as h}from"resize-detector";var O=function(){return(O=Object.assign||function(e){for(var t,n=1,o=arguments.length;n2})).forEach((function(e){var t=e.charAt(2).toLowerCase()+e.slice(3);n[t]=p[e]}))),Object.keys(n).forEach((function(e){var o=n[e];o&&(0===e.indexOf("zr:")?t.getZr().on(e.slice(3).toLowerCase(),o):t.on(e.toLowerCase(),o))})),C.value?v((function(){t&&!t.isDisposed()&&t.resize(),o()})):o()}function o(){var n=e||S.value;n&&t.setOption(n,P.value)}}function R(){x.value&&(x.value.dispose(),x.value=void 0)}var q=null;e(T,(function(t){"function"==typeof q&&(q(),q=null),t||(q=e((function(){return i.option}),(function(e,t){e&&(x.value?x.value.setOption(e,O({notMerge:e.value!==(null==t?void 0:t.value)},P.value)):N())}),{deep:!0}))}),{immediate:!0}),e([k,B],(function(){R(),N()}),{deep:!0}),r((function(){i.group&&x.value&&(x.value.group=i.group)}));var F=b(x);return function(e,i,a){var u=t("ecLoadingOptions",{}),c=n((function(){return O(O({},o(u)),null==a?void 0:a.value)}));r((function(){var t=e.value;t&&(i.value?t.showLoading(c.value):t.hideLoading())}))}(x,U,D),function(t,n,o){var r=null;e([o,t,n],(function(e,t,n){var o=e[0],i=e[1],a=e[2];o&&i&&a&&(r=f((function(){i.resize()}),100),g(o,r)),n((function(){r&&o&&h(o,r)}))}))}(x,C,y),c((function(){N()})),s(R),O({chart:x,root:y,setOption:function(e,t){i.manualUpdate&&(j.value=e),x.value?x.value.setOption(e,t||{}):N(e)},nonEventAttrs:I},F)},render:function(){var e=O({},this.nonEventAttrs);return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",l("x-vue-echarts",e)}});export default U;export{C as INIT_OPTIONS_KEY,x as LOADING_OPTIONS_KEY,w as THEME_KEY,T as UPDATE_OPTIONS_KEY}; //# sourceMappingURL=index.esm.min.js.map